We recommend a very good Linux PHP system with great learning value. Here I will mainly explain the application of the Linux PHP system, including introducing the knowledge of Linux PHP. After the server runs for a period of time, it may suddenly need to add an extension, such as curl, pdo, and xmlrpc. This requires you to add the extension independently without re-compiling Linux PHP. The following describes how to install curl and tidy.
1. Install crul
- wget http://curl.haxx.se/download/curl-7.19.6.tar.gz
- tar -zxvf curl-7.19.6.tar.gz
- cd curl-7.19.6
- ./configure --prefix=/usr/local/curl
- make
- make install
2. Linux PHP compilation and generation Extension
Go to the ext directory in the Linux PHP source code directory, where the source code of each extension module is stored. Select the required module, such as the curl module: cd curl, and run phpize to generate the compilation file, phpize may report the following error when running/usr/local/php5/bin/phpize in the bin directory of the PHP installation directory: Cannot find autoconf. please check your autoconf installation and the $ PHP_AUTOCONF, environment variable is set correctly and then rerun this script. ", you need to install autoconf: yum install autoconfRedHat or CentOS), apt-get install autoconfUbuntu Linux)
Generate a configuration file and compile and generate a module for Linux PHP:
- /usr/local/php5/bin/phpize
- ./configure --with-curl=/usr/local/curl --with-php-config=/usr/local/php5/bin/php-config
- make
- make install
In this way, curl. so is copied to the PHP Directory such as:/usr/local/php5/lib/php/extensions/no-debug-non-zts-20090626 /)
3. modify the configuration in Linux PHP
In Linux PHP. in ini, set the extension Directory: extension_dir = "/usr/local/php5/lib/php/extensions/no-debug-non-zts-20090626/" and add extension module reference: extension = curl. so
4. Check and restart Apache
When executing this command in/usr/local/php/bin/php-v, Linux PHP checks whether the configuration file is correct. If any configuration error occurs, an error is returned, you can troubleshoot the problem based on the error information. Install the tidy extension in this way.
However, the libtidy installation package is relatively verified and downloaded at the following address. The installation method is the same:
# Tar zxvf tidy-cvs_20070326.tar.bz2
# Cd tidy-cvs_20070326
#./Configure -- prefix =/usr/local/tidy
# Make
# Make install
- Ubuntu Linux is more powerful, faster, and better
- Update list of Linux yum installation package
- High-performance servers and monitoring required for Linux System Administrators
- Linux memory usage view unit display
- Build a powerful Linux SVN Control System