Web gold combination LAMP on Linux is certainly unfamiliar, because of its advantages in stability, prices, etc., the first choice for many SME architectural Web sites. This article is a detailed introduction to the installation and configuration of each package ^ _ ^
Software Selection (source package):
MySQL Database: mysql-4.1.4a-gamma.tar.gz can
Www.mysql.org download to
HTTP server: httpd-2.0.50.tar.gz can
Http://httpd.apache.org download to
PHP interpreter: PHP-4.3.8.tar.gz can
Http://www..php.net download to
Installation order:
mysql => http => PHP Take the project TEST to install the project to / OPT / TEST.
First, put the software source code to the / OPT / PHP_INSTALL directory.
Second, MYSQL installation:
1.mysql decompression: #tar zxvf mysql-4.1.4a-gamma.tar.gz
2. # cd mysql-4.1.4a-gamma
#. / configure --prefix = / opt / test / mysql --with-unix-socket-path = / OPT / TEST / MYSQL
3. # make; make install
4. # cd /opt/php_install/mysql-4.1.4a-gamma/scripts
#. / mysql_install_db
5. # cd/opt/php_install/mysql-4.1.4a-gamma/support-files
#CP mysql.sever / opt / test / mysql / bin / test_mysqld
#CP my-huge.cnf /opt/test/mysql/var/my.cnf
6. # cd / opt / test #chown mysql.mysql -r mysql modified permissions
The MySQL database has been installed. The following is an additional configuration of MySQL:
7. Edit the My.cnf file, change the socket port, so as not to conflict with the system's own MySQL; Socket is specified SOCKET file to put to / opt / test / mysql
8. You can copy Test_Mysqld to /etc/rc.d/init.d/
#CHKCONFIG --ADD Test_Mysqld Add to System Services.
Third, the installation of the HTTP server:
1. Unzip: #tar zxvf httpd-2.0.50.tar.gz
2. # cd httpd-2.0.50 #. / Configure --prefix = / opt / test / http --enable-so
3. # make; make install
4. # CD / OPT / TEST / HTTP / CONF /
#vi httpd.conf Add the following two lines, the statement related to the PHP interpreter:
"AddType Application / X-httpd-php .php .php4 .phtml"
"AddType Application / X-httpd-php-source .phps"
5. It is recommended to add "AddCharset GB2312" to make the browser defaults to Chinese character sets.
The HTTP server database has been installed. The following is an additional configuration of the HTTP server:
6. You can copy / opt / test / http / bin / apachectl to /etc/rc.d/init.d/test_http
#CHKCONFIG - ADD Test_HTTP Add to System Services.
Fourth, the installation of the PHP interpreter:
1. Unzip: #TAR ZXVF PHP-4.3.8.Tar.gz
2. # CD PHP-4.3.8
#. / configure --prefix = / opt / test / php --with-apxs2 = / opt / test / http / bin / apxs --with-inIfile = / opt / test / php --with-mysql-sock = /opt/test/mysql/3.make;make install
4. # cd/opt/php_install/php-4.3.8
#cp php.ini-dist /opt/test/php/php.ini
This PHP interpreter database has been installed.
Then you can copy the entire Test directory to the client server to build a web server.