Download the following files to/usr/local/src/
Apache(unixplatform's most popular Web server platform 20172.tar.gz
Mysql(and PHP combination of runtime -5.0.22.tar.gz
PHP (for the current development language example -5.1.2.tar.gz
Decompress:
# Tar xvz (parallels's virtual line platform) f apache(unixplatform's most popular Web server platform 4102.tar.gz
# Tar xvz (parallels's virtual row platform) f mysql(and PHP combination of runtime -5.0.22.tar.gz
# Tar xvz (parallels's virtual line platform) f PHP (used as the current development language objective -5.1.2.tar.gz)
# Cd .. // create a folder in the/usr/local/directory
# Mkdir apache (the most popular WEB server platform on Unix)
# Mkdir MySQL (the best combination with PHP)
# Mkdir php (as the mainstream development language)
// Install MySQL (the best combination with PHP)
# Cd ../MySQL (the best combination with PHP) // find the/usr/local/MySQL (the best combination with PHP) folder
# Groupadd MySQL (the best combination with PHP)
# Usseradd-g MySQL (the best combination with PHP)
# Cd ../MySQL (the best combination with PHP)-5.0.22 // find/usr/local/src/MySQL (the best combination with PHP)-5.0.22 folder
#. /Configure -- prefix =/usr/local/MySQL (the best combination with PHP) -- localstatedir =/var/lib/MySQL (the best combination with PHP) /-- with-client-ldflags =-all-static -- with-MySQL (the best combination with PHP) d-ldflags =-all-static -- with-MySQL (the best combination with PHP) d-user = MySQL (the best combination with PHP) -- enable-generator er -- with-extra-charsets = all
# Make; make install
/Usr/local/MySQL (the best combination with PHP)/bin/MySQL (the best combination with PHP) _ install_db // initialize MySQL (the best combination with PHP)
// Configure MySQL (the best combination with PHP)
# Chown-R root/usr/local/MySQL (the best combination with PHP)
# Chown-R MySQL (the best combination with PHP)/var/lib/MySQL (the best combination with PHP )/
# Chgrp-R MySQL (the best combination with PHP)/usr/local/MySQL (the best combination with PHP)
# Cp support-files/my-medium.cnf/etc/my. cnf
/Usr/local/MySQL (the best combination with PHP)/bin/MySQL (the best combination with PHP) d_safe-user = MySQL (the best combination with PHP) & // start MySQL (the best combination of PHP and MySQL)
/Usr/local/MySQL (the best combination with PHP)/bin/MySQL (the best combination with PHP) admin-u root-p password 123 // change the password to 123
Enter password:
// Test the new password
/Usr/local/MySQL (the best combination with PHP)/bin/MySQL (the best combination with PHP)-u root-p MySQL (the best combination with PHP)
Enter password: // If successful, you can enter MySQL (the best combination with PHP.
// Install apache (the most popular WEB server platform on Unix)
./Configure -- prefix =/usr/local/apache (the most popular WEB server platform on Unix) -- enable-mod = shared = all -- enable-module = so -- disable-info
Make
Make install
During the installation of apache (the most popular WEB server platform on Unix), The libiconv. so.2 problem occurs. The solution is as follows:
Ln-sf/usr/local/lib/libiconv. so.2/usr/lib/libiconv. so.2
// Enter the IP address of the local machine in the window. If a famous feather webpage appears, it will be successful ....
// Php (as the mainstream development language) Installation Process
. /Configure -- prefix =/usr/local/php (as the mainstream development language) -- with-MySQL (the best combination with PHP) =/usr/local/MySQL (best combination with PHP) -- with-apxs2 =/usr/local/apache (the most popular WEB server platform on Unix) /bin/apxs -- enable-calendar -- with-openssl =/usr/-- with-config-file-path =/usr/local/php (as the mainstream development language)
Make
Make install
Cp/usr/local/src/php (as the mainstream development language)-5.1.2/php (as the mainstream development language ). ini-dist/usr/local/lib/php (as the mainstream development language ). ini
# Cd usr/local/apache (the most popular WEB server platform on Unix)/conf
// Open httpd. conf and modify it in the appropriate place.
AddType application/x-httpd-php (as the mainstream development language). php (as the mainstream development language)
AddType application/x-httpd-php (as the mainstream development language)-source. php (as the mainstream development language) s
DocumentRoot "/usr/local/apache (the most popular WEB server platform on Unix)/htdocs"
LoadModule php (as the mainstream development language) 5_module modules/libphp (as the mainstream development language) 5.so
// Test. put php (as the mainstream development language) files in/usr/local/apache (the most popular WEB server platform on the Unix platform)/htdocs/. If you can open the page in the window bar, that's all done.
// FAQ 1: ERROR 2002: Can't connect to local MySQL (the best combination with PHP) server through socket '/var/lib/MySQL (the best combination with PHP ). sock
'(2)
// Solution: permission issues
Chown-R MySQL (the best combination with PHP)/var/lib/MySQL (the best combination with PHP )/
// FAQ 2: Warning: MySQL (the best combination with PHP) Connection Failed: Can't connect to local MySQL (the best combination with PHP) server
// Through socket '/tmp/MySQL (the best combination with PHP ). sock '(111) in/home/httpd/html/show. php (as the mainstream development language) on line 9
// Solution: Add/tmp/MySQL (the best combination with PHP). sock link to the/var/lib/MySQL (the best combination with PHP) directory:
Linux # ln-s/var/lib/MySQL (the best combination with PHP ). sock/tmp/MySQL (the best combination with PHP ). sock