CentOS can be installed via Yum:
Yum-y Install httpd php php-mysql mysql-server
Service httpd Status|start|stop|restart|reload
Service Mysqld Status|start|stop|restart|reload
Site root directory/var/www/html/
Apache Home Directory/etc/httpd/
Apache Master configuration file/etc/httpd/conf/httpd.conf
Apache Log/etc/httpd/logs/
PHP Home Directory/etc/php.d/
PHP configuration file/etc/php.ini
PHP Module Location/usr/lib/php/or/usr/lib64/php/
MySQL configuration file/etc/my.cnf
MySQL database file/var/lib/mysql/
Run mysql_secure_installation to set the MySQL root user password
Ubuntu can be installed like this:
sudo apt-get-y install apache2 php5 php5-mysql mysql-server mysql-client
sudo service apache2 status|start|stop|restart|reload
sudo service MySQL Status|start|stop|restart|reload
Site root directory/var/www
Apache Home Directory/etc/apache2/
Apache Master configuration file/etc/apache2/apache2.conf
Apache Log/var/log/apache2/
PHP Home Directory/etc/php5/
PHP configuration file/etc/php5/apache2/php.ini
PHP Module Location/usr/lib/php5/
MySQL configuration file/etc/mysql/my.cnf
MySQL database file/var/lib/mysql/
Run mysql_secure_installation to set the MySQL root user password
Linux rpm installation apache PHP MySQL