Showing posts with label Ubuntu. Show all posts
Showing posts with label Ubuntu. Show all posts

June 17, 2015

Ubuntu installation issue: Failed to create a file system - SCSI3 failed

Today when I was trying to install ubuntu 12.04 along with windows 7, I was encountering an weird issue again and again which ruined my night. So, I want to share it with you all. The issue was occurring while installer was partitioning the free space.

The error message was saying:

"The ext4 file system creation in partition #6 of SCSI3 (0,0,0)(sda) failed. I click "OK" and the installation stops"

I have fixed this issue by partitioning the free space by my own.

Steps to resolve the issue:

  1. Boot on ubuntu installtion CD/USB stick
  2. Choose "Try without install"
  3. Start terminal
  4. Run "sudo apt-get install gparted" command
  5. Now fire another command to start 'GParted' i.e. "sudo gparted"
  6. Make a 2GB swap partition
  7. With remaining disk, make an ext4fs partition.
  8. Now double click on the icon "install ubuntu 12.04" from your desktop.
  9. It will start ubuntu installer and this time it will not give you file system error.

The above steps resolved my problem.

June 12, 2015

Hướng dẫn cài đặt và bảo mật phpMyAdmin trên Ubuntu 12.04

phpMyAdmin là một phần mềm mã nguồn mở phổ biến trên nền web để quản lý MySQL.
Trước khi tiến hành cài đặt phpMyAdmin bạn cần cài đặt trước LAMP hoặc LEMP server trên Ubuntu.
Chúng ta có 2 cách để cài đặt phpMyAdmin là cài đặt thông qua package và chạy phpMyAdmin như một php script thông thường. Cách thứ 1 thì đơn giản hơn, trong khi cách thứ 2 thì tiết kiệm tài nguyên và bảo mật hơn rất nhiều.

1. Cài đặt phpMyAdmin package

Chạy lệnh sau
sudo apt-get install phpmyadmin
Trong quá trình cài đặt bạn cần lưu ý:
  1. Chọn Apache2 server
  2. Chọn Yes khi được hỏi Configure the database for phpmyadmin with dbconfig-common
  3. Nhập MySQL password khi được hỏi
  4. Nhập password để truy cập phpMyAdmin
Sau khi cài xong, thêm phpmyadmin vào cấu hình cài đặt Apache
sudo nano /etc/apache2/apache2.conf
Thêm dòng sau vào cuối
Include /etc/phpmyadmin/apache.conf
Khởi động lại apache
sudo service apache2 restart
Giờ bạn có thể truy cập vào phpMyAdmin thông qua link http://yourip/phpmyadmin rồi đó.

2. Cài đặt phpMyAdmin script

Cách này mình thường dùng vì 2 lí do:
  1. Chỉ khi nào chạy mới dùng đến bộ nhớ -> tiết kiệm tài nguyên server
  2. Có thể tùy biến đường dẫn phpmyadmin -> bảo mật hơn
Đầu tiên bạn cần chọn phiên bản muốn cài trong trang chủ phpMyAdmin
Copy đường dẫn trực tiếp với file extension là .tar.gz, ví dụ bản 4.1.4 là http://jaist.dl.sourceforge.net/project/phpmyadmin/phpMyAdmin/4.1.4/phpMyAdmin-4.1.4-all-languages.tar.gz
Vào thư mục www chứa nội dung website, chạy lệnh sau
wget http://jaist.dl.sourceforge.net/project/phpmyadmin/phpMyAdmin/4.1.4/phpMyAdmin-4.1.4-all-languages.tar.gz
Giải nén
tar -xzvf phpMyAdmin-4.1.4-all-languages.tar.gz
Xong bạn sẽ có folder phpMyAdmin-4.1.4-all-languages, để sử dụng bạn truy cập vào link http://ip/phpMyAdmin-4.1.4-all-languages. Tất nhiên bạn có thể đổi tên thành bất cứ cái nào bạn muốn để sử dụng và bảo mật hơn.

June 5, 2015

How to fix Apache – "Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName" Error on Ubuntu

You might probably faced the same following error while you were restarting the Apache server on Ubuntu.
aslam@aslam:~$ sudo /etc/init.d/apache2 restart
* Restarting web server apache2                                                apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
... waiting apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
To fix that problem, you need to edit the httpd.conf file. Open the terminal and type,
sudo gedit /etc/apache2/httpd.conf
By default httpd.conf file will be blank. Now, simply add the following line to the file.
ServerName localhost
Save the file and exit from gEdit. Finally restart the server.
sudo /etc/init.d/apa