# apt-get update # apt-get install apache2 apache2-utils
Add ServerName <mymachinename> to /etc/apache2/apache2.conf
Restart the server with either of the following commands:
# service apache2 restart # /etc/init.d/apache2 restart
To install PHP5 package and all related package dependencies run the following command below. by default ubuntu server 14.04 will installed PHP 5.5
# apt-get install php5 php5-mysql php-pear php5-gd php5-mcrypt php5-curl
To install Mysql Server package and all related package dependencies run the followong command:
# apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql # apt-get install phpmyadmin
During the installation, you’ll be asked to setup the MySQL root user password. This is an administrative account in MySQL that has increased privileges, Enter the password and select [OK].
# Allow access without password SetEnvIf User-Agent "Mozilla" webmaster Order Deny,Allow Deny from all Allow from env=webmaster
# find / -name my.cnf
# /etc/init.d/mysql stop # chown -R mysql:mysql /var/lib/mysql/<folder> # /etc/init.d/mysql start