Install and Configure LAMP (Linux Apache MySQL PHP)

14 12 2009

1. Backup Currently Running IP Configuration File
cp /etc/network/interfaces /home/sugizo/bkup/interfaces.ori

2. Edit IP Address Configuration File
sudo vim /etc/network/interfaces

auto eth0
iface eth0 inet static
address         192.168.44.3
netmask         255.255.255.0
gateway         192.168.44.2
network         192.168.44.0
broadcast       192.168.44.255

auto eth1
iface eth1 inet static
address         18.18.18.3
netmask         255.255.255.0
gateway         192.162.44.2
network         18.18.18.0
broadcast       18.18.18.255

auto eth2
iface eth2 inet static
address         88.88.88.3
netmask         255.255.255.0
gateway         192.168.44.2
network         88.88.88.0
broadcast       88.88.88.255

3. Backup Currently Hostname File Configuration
cp /etc/hostname /home/sugizo/bkup/hostname.ori

4. Edit Hostname File Configuration
sudo vim /etc/hostname

karmic.ubuntu64.vmw

5. Backup Currently Host Addresses Configuration
cp /etc/hosts /home/sugizo/bkup/hosts.ori

6. Change Host Addresses Configuration
sudo vim /etc/hosts

127.0.0.1       localhost
127.0.1.1       karmic.ubuntu64.vmw     karmic
192.168.44.3    karmic.ubuntu64.vmw     karmic
18.18.18.3    karmic.ubuntu64.vmw     karmic
88.88.88.3    karmic.ubuntu64.vmw     karmic

7. Reboot the Machine
sudo reboot

8. Update List Packages
sudo apt-get update

9. Install Apache 2 Web Server, PHP 5, PHPMYADMIN MySQL Database Client Server
sudo apt-get install apache2 php5 libapache2-mod-auth-mysql php5-mysql mysql-server mysql-client mysql-admin phpmyadmin

10. MySQL Server Initialize Configuration (Change * with your own Password):
New password for the MySQL “root” user: *****
Repeat password for the MySQL “root” user: *****

11. PHPMYADMIN Initialize Configuration (Change * with your own Password):
[*] apache2
Configure database for phpmyadmin with dbconfig-common? Yes
Password of your database’s administrative user: ***** (MySQL Root Password)
MySQL application password for phpmyadmin: *****
Password confirmation: *****

12. Test Apache
Open Your Browser Type :
http://karmic
or
http://192.168.44.3

13. Create PHP Info File
sudo vim /var/www/phpinfo.php

<?
phpinfo();
?>

14. Backup MySQL Configuration File
cp /etc/mysql/my.cnf /home/sugizo/bkup/my.cnf.ori

15. Change MySQL Configuration File To Enable Access From The Other Computer
sudo vim /etc/mysql/my.cnf

#bind-address           = 127.0.0.1

16. Backup PHP Configuration File
cp /etc/php5/apache2/php.ini /home/sugizo/bkup/php.ini.ori

17. Edit PHP Configuration File to Support MySQL Database Extension
sudo vim /etc/php5/apache2/php.ini

extension=msql.so

18. Restart MySQL and Apache Service
sudo service mysql restart
sudo service apache2 restart

19. Test PHP Info File
Open Your Browser Type : http://karmic/phpinfo.php
or
http://192.168.44.3/phpinfo.php

20. Test PHPMYADMIN
Open Your Browser Type :
http://karmic/phpmyadmin
or
http://192.168.44.3/phpmyadmin

Advertisement

Actions

Information

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 )

Connecting to %s




Follow

Get every new post delivered to your Inbox.