Posts Tagged LAMP

Setup a LAMP server on Ubuntu

These are the steps to install an Apache-MySQL-PHP server on an Ubuntu desktop machine.

# Install Apache 2
sudo apt-get install apache2
 
#Install PHP5
sudo apt-get install php5
 
#Install MySQL
sudo apt-get install mysql-server
 
#Install MySQL for Apache
sudo apt-get install libapache2-mod-auth-mysql
 
#Install PHP MySQL Support
sudo apt-get install libapache2-mod-php5
sudo apt-get install php5-mysql
 
#Restart Apache
sudo /etc/init.d/apache2 restart

Managing Apache

Web files must be placed in ”/var/www/”.

sudo /etc/init.d/apache2 start
sudo /etc/init.d/apache2 stop
sudo /etc/init.d/apache2 restart

Managing MySql

sudo /etc/init.d/mysqld start
sudo /etc/init.d/mysqld stop
sudo /etc/init.d/mysqld restart