Home > Article > Backend Development > php5 mysql installation and configuration method
php5 Mysql installation method: first select the dynamically added module of apache2; then compile on redhat linux 9; then install the non-CGI version of PHP; and finally install the required software packages.
Recommended: "PHP Tutorial"
Installation and configuration of php5 and mysql5
Select the dynamic addition module of apache2, compile on redhat linux 9, and install the non-CGI version of PHP
The software packages I used:
apache 2.0.54 php 5.1.4 zlib 1.2.3 mysql 5.0.22 libxml2 2.6.26
Problems encountered:
1. mysql has been installed locally
Countermeasures: rpm -e --nodeps mysql-VERSION-NUMBER. The rest of the software is similar
2. The zlib version is too low
Countermeasures: Download a new version to install, such as zlib-1.2.3.tar.tar
3. The version of mysql cannot be It is the installed version mysql-standard-5.0.22-linux-i686.tar.gz with a static library, otherwise PHP cannot configure
Countermeasures: Download the source code and compile it, such as mysql-5.0.22.tar. gz
4. Do not compile on the disk mounted, especially in NTFS format, otherwise inexplicable errors will occur
5. Mysql configure command, excerpted from mysql-5.0.22.tar INSTALL file in .gz
CFLAGS="-O3" CXX=gcc CXXFLAGS="-O3 -felide-constructors / -fno-exceptions -fno-rtti" ./configure / --prefix=/usr/local/mysql --enable-assembler / --with-mysqld-ldflags=-all-static
6. PHP configure command
./configure / --disable-cgi / --with-apxs2=/usr/local/apache2/bin/apxs / --with-mysql=/usr/local/mysql / --with-xml / --with-dom / --with-zlib / --with-libxml / --enable-inline-optimization / --enable-safe-mode / --enable-track-vars / --enable-trans-sid / --enable-xml / --enable-libxml / --enable-so
7. Since the lib library on each machine is different, there may be problems when loading libphp5.so in apache2 Some symbols undefined
Countermeasures: Change the --enable and --with options in configure. Add --disable-all if necessary. Note that --disable-all does not install php5-extension, which is compatible with perl, and will make many functions unable to run.
Other points to note can be found in the INSTALL files of each installation package and online articles. For example
web server-apache2+php5+mysql5 for linux::Apache web server-apache2+php5+mysql5 for linux OS::Php web server-apache2+php5+mysql5 for linux::Mysql web server-apache2+php5+mysql5 for windows OS
The above is the detailed content of php5 mysql installation and configuration method. For more information, please follow other related articles on the PHP Chinese website!