01-04mysql-5.1.42-linux-i686-glibc23.tar.gz.html ">MYSQL-5.1.42-LINUX-I686-GLIBC2
First, install the Apache2 ———————————————————————————————— –
1, tar-zvxf httpd-2.2.14.tar.gz
2, CD httpd-2.2.14
3,./configure–enable-modules=so–enable-rewrite
4, Make
5, make install
6,/usr/local/apache2/bin/apachectl-k start//launch APAHCE
view in browser [url]http://localhost[/ URL], get it works, stating that Apache has been configured successfully.
7,/usr/local/apache2/bin/apachectl-k stop//Stop Apache
8, Apache installed successfully and started, after restarting the machine does not automatically start Apache, need to manually start, To set the random start execution command: echo "/usr/local/apache2/bin/apachectl" >>/etc/rc.d/rc.local, the instruction means "/usr/local/apache2/bin/ Apachectl "This string is attached to the last line of the rc.local file, rc.local is a scripts file to be executed after the Linux boot is successful.
9, installation apache2 Modify/usr/local/apache/conf/httpd.conf discovery will not take effect, it is likely that the system uses the default installation httpd (the default httpd configuration file in:/etc/httpd/conf/ httpd.conf). To uninstall the httpd execution instructions for the system default installation: Rpm-e httpd. If there is a dependency, you cannot unload the following parameter-nodeps.
directive:
RPM-E httpd--nodeps (if you want to uninstall the httpd of the system, execute)
TAR-ZVXF httpd-2.2.14.tar.gz
CD httpd-2.2.14
./configure--enable-modules=so--enable-rewrite
Make
Make install
/usr/local/apache2/bin/apachectl start
echo "/usr/local/apache2/bin/apachectl" >>/etc/rc.d/rc.local
Second, install MySQL ———————————————————————————————— –
1, unzip the mysql-5.1.42-linux-i686-glibc23.tar.gz file (i686 is a 32-bit operating system, GLIBC23 is compiled binary files, decompression can be used), the resulting folder is copied to the/usr/local/ MySQL and switch to this directory under
2, sudo groupadd mysql–> create MySQL user group
3, sudo useradd-g mysql mysql–> create MySQL user and add to MySQL user group br>4, sudo chown-r MySQL. –> the owner of all files under MySQL to MySQL user, sudo chgrp-r mysql. –> all the files under MySQL are set to the MySQL user group (note that after this step, go to the data directory, the "ll" command to see all the file owner and group, if there is not MySQL, in the Data directory repeat the step instruction)
6. Execute scripts/mysql_install_db–> create MySQL DB instance
7, copy mysql.server under/usr/local/mysql/support-files/to/etc/ init.d/, named Mysqld
8, copy my-medium.cnf under/usr/local/mysql/support-files/to/etc/, named My.cnf
9, at which time the service Mysqld start to launch the MySQL service, after booting, through the NETSTAT-ATLN command can see 3306 port is occupied
10, the root user of the MySQL default no password, can be through the/usr/local/mysql/bin/ Mysqladmin-u root password "New password" to set the initial password.
directive:
TAR-ZXVF mysql-5.1.42-linux-i686-glibc23.tar.gz
Cp-a Mysql-5.1.42-linux-i686-glibc23/usr/local/mysql
Cd/usr/local/mysql
Groupadd MySQL
useradd-g MySQL MySQL
Chown-r MySQL.
Chgrp-r MySQL.
scripts/mysql_install_db
Cp/usr/local/mysql/support-files/mysql.server/etc/init.d/mysqld
Cp/usr/local/mysql/support-files/my-medium.cnf/etc/my.cnf
Service mysqld Start
Netstat-atln
/usr/local/mysql/bin/mysqladmin-u root Password "1q2w3e"
Iii. Installation of PHP5.3.1 ———————————————————————————————— –
1, TAR-ZVXF php-5.3.1.tar.gz decompression
2, cd php-5.3.1 switch directory
3,./configure–with-apxs2=/usr/local/apache2/bin/apxs–with-mysql=/usr/local/mysql
4. Make
5. Make install
6. CP Php.ini-development/usr/local/php5/lib/php.ini
Instructions:
TAR-ZVXF php-5.3.1.tar.gz
CD php-5.3.1
./configure--with-apxs2=/usr/local/apache2/bin/apxs--with-mysql=/usr/local/mysql
Make
Make install
CP Php.ini-development/usr/local/lib/php.ini
Iv. reconfigure apache2 let him support PHP ———————————————————————————————— –
Cd/usr/local/apache2/conf
Vim httpd.conf
Add LoadModule php5_module modules/libphp5.so
Add AddType application/x-httpd-php. php
Or
SetHandler application/x-httpd-php
http://www.bkjia.com/PHPjc/632371.html www.bkjia.com true http://www.bkjia.com/PHPjc/632371.html techarticle Linux Installation mysql+apache2+php5.3.1 Tutorial please download the following three install the necessary software 01-04 php-5.3.1.tar.gz.html "> php-5.3.1.tar.gz installation package Download 01-04 httpd-2.2.14.tar.gz installation ...