PHP Installation Guide linux 5. The installation method of the PM package is developed by REDHAT. This installation method can be used to install applications conveniently. Currently, many LINUX distribution companies have installed the PM package in their products through REDHAT. This installation method can be used to install applications conveniently. Now many LINUX distribution companies have added the RPM installation method to their products, so that the RPM Package installation has become a standard for LINUX program installation.
Before installing the RPM package, we need to familiarize ourselves with some command forms and parameters of the RPM. On the LINUX text interface, enter the following command:
Rpm-help
We can see that there are many parameters. Run the following command to display the HELP file on a split screen:
Rpm-help | more
Among the many RPM parameters, the most common ones are-e,-ivh, and-ql.
These three commands respectively delete the installed RPM Package, install the RPM package, and query the installed RPM package. After understanding how to use these three commands, we can install the program.
First, we need to find the installation file, that is, the RPM package to be installed. This package can be obtained from many FTP sites and found in LINUX versions released by many companies. Make sure that you have the ROOT identity before installation. Hardware loading and program installation can only be performed as ROOT. We take the installation of php-3.0.7.i386.rpm package as an example to explain how to install. In the command line, type the following command to start PHP installation:
Rpm-ivh php-3.0.7.i386.rpm
You will see a progress bar, which indicates the installation progress. When the progress bar comes to an end, the php-3.0.7.i386.rpm is installed.
In this php rpm package, because there are few options supported, it generally does not meet our requirements. We can also customize and compile PHP (only applicable to users who use REDHAT6.1 ).
The procedure is as follows:
Obtain the PHP source code package, decompress it, and enter the package.
Modify the apxs file in the/usr/sbin/directory. Set:
My $ CFG_LIBEXECDIR = modules; # substituted via APACI install
To:
My $ cmd_libexecdir =/usr/lib/apache; # substituted via APACI install
Check whether the freetype-devel package is installed. if not, run the following command to install it:
Rpm-I freetype-devel-1.3.6.i386.rpm
Start configuration. you can refer to the preceding compilation options for this step. the following options are recommended:
./Configure -- with-apxs =/usr/sbin/apxs -- with-mysql -- with-ldap -- with-config-file-path =/etc/httpd/conf
Then, use the following command to compile and install the new PHP.
Make
Make install
Copy the php3.ini-dist file in the source file directory to the/etc/httpd/conf directory and rename it php3.ini. Run the following command to restart the APACHE service.
/Etc/rc. d/init. d/httpb tart
At this time, the new PHP version will take effect.
Bytes. This installation method can be used to install applications conveniently. Now many LINUX distribution companies are adding...