Linux php 5.4 installation tutorial

藏色散人
Release: 2020-08-01 09:19:51
Original
4329 people have browsed it

linux php5.4 installation method: first download and decompress PHP; then configure and install PHP; then edit the "httpd.conf" file to call the PHP module; finally parse the specific extension into PHP, and Just start the Apache service test.

Linux php 5.4 installation tutorial

Recommended: "linux tutorial"

Installing PHP 5.4 under Linux .3 (Using Apache as WebServer)

Download PHP

Official download: http://www.php.net/downloads.php

Install PHP

First, make sure Apache supports the PHP module when compiling and installing;

Decompress PHP

shell> sudo tar zxvf php-5.4.3.tar.gz /opt/sources
Copy after login

Stop the Apache service

shell> sudo service httpd stop
Copy after login

Configure and install PHP

shell> cd /opt/sources/php-5.4.3 shell> sudo ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql shell> sudo make shell> sudo make install
Copy after login

Configure php.ini

shell> sudo cp php.ini-development /usr/local/lib/php.ini
Copy after login

Edit the httpd.conf file to call the PHP module. The path on the right side of the LoadModule expression must point to PHP on your system. The make install command above may already do this, but be sure to check.

LoadModule php5_module modules/libphp5.so
Copy after login

Tell Apache to parse a specific extension into PHP, for example, tell Apache to parse the extension .php into PHP. Edit httpd.conf

 SetHandler application/x-httpd-php 
Copy after login

and start the Apache service test in the usual way.

The above is the detailed content of Linux php 5.4 installation tutorial. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!