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 set MySQL root user password Ubuntu can install this way:
sudo apt-get-y install apache2 php5 php5-mysql mysql-server
sudo service apache2 status|start|stop|restart|reload
sudo service MySQL status|start|stop|restart|reload web 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 set the MySQL root user password