Home  >  Article  >  Backend Development  >  PHP installation guide linux five_PHP tutorial

PHP installation guide linux five_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 17:30:16768browse

The installation method of PM package is created by REDHAT company. This installation method makes it extremely easy to install applications. Now many LINUX distribution companies have also added RPM installation methods to their products, so that the installation of RPM packages has become a standard for LINUX program installation.
Before installing the RPM package, we need to be familiar with some of the command forms and parameters of RPM. In the LINUX text interface, enter the following command:
rpm -help
You can see that there are many parameters. Use the following command to display the HELP file in split screen:
rpm -help |more
Among the many parameters of RPM, the most common ones are -e, -ivh, and -ql.
These three commands are to delete installed RPM packages, install RPM packages, and query installed RPM packages. After understanding the use of these three commands, we can install the program.
First, we need to find the installation file, which is the RPM package to be installed. This package can be obtained from many FTP sites, and these RPM packages can also be found in LINUX versions distributed by many companies. Remember, you must ensure your ROOT status before installation. Only the ROOT identity can load hardware, install programs, and other operations. Let's take installing the php-3.0.7.i386.rpm package as an example to explain how to install it. In the command line, type the following command to start the PHP installation:
rpm -ivh php-3.0.7.i386.rpm
You will see a progress bar, which is used to indicate the progress of the installation. When the progress bar reaches the end, php-3.0.7.i386.rpm is installed.
In this RPM package of PHP, because it supports relatively few options, it generally cannot meet our requirements. Then we can also customize and compile PHP (only suitable for users using REDHAT6.1).
The specific steps are as follows:
First obtain the PHP source code package, unzip it and enter the package.
Modify the apxs file in the /usr/sbin/ directory. Change:
my $CFG_LIBEXECDIR =modules; #substituted via APACI install
to:
my $CFG_LIBEXECDIR =/usr/lib/apache; #substituted via APACI install


Check freetype- Whether the devel package is installed? If not, please install it according to the following command:
rpm -I freetype-devel-1.3.6.i386.rpm
Start the configuration. This step can be done by referring to the previously compiled options. 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 commands 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 to php3.ini. Use 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.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/509181.htmlTechArticleThe installation method of PM package is created by REDHAT company. This installation method makes it extremely easy to install applications. Now many LINUX distribution companies also add...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn