LAMP trên Ubuntu

Posted: 23 March, 2008 in Technical

Install Apache

1. Open Terminal (Applications > Accessories > Terminal)

2. Copy/Paste below command into Terminal và and press enter button:

sudo apt-get install apache2

Install PHP

1. Open Terminal (Applications > Accessories > Terminal)

2. Copy/Paste below command into Terminal và and press enter button:

sudo apt-get install php5 libapache2-mod-php5

Bước 3: Config

sudo /etc/init.d/apache2 restart

Install MySQL

1. Open Terminal (Applications > Accessories > Terminal)

2. Copy/Paste below command into Terminal và and press enter button:

sudo apt-get install mysql-server

3 (Not required): for the computers on networks which can see your computer, first you must config “Bind Address”. By open Terminal for modifying my.cnf.

gksudo gedit /etc/mysql/my.cnf

at the line:

bind-address = 127.0.0.1

change 127.0.0.1 to your IP

4: (Important), Input below line into Terminal:

mysql -u root

and copy/paste below line:

mysql> SET PASSWORD FOR ‘root’@’localhost’ = PASSWORD(‘yourpassword’)
Install PhpMyAdmin

1. Open Terminal (Applications > Accessories > Terminal)

2. Copy/Paste below command into Terminal và and press enter button:

sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin

After finsh, we need opening php.ini by command:

gksudo gedit /etc/php5/apache2/php.ini

in this file,we must remove some comma at the begin of these line:

;extension=mysql.so

Now, you can restart Apache and complete all of process:

sudo /etc/init.d/apache2 restart

source: quantrimang.com

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s