Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The method of compiling and installing PHP with Source Code under CentOS

2025-03-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces the relevant knowledge of "CentOS source code compilation and installation method of PHP". Xiaobian shows you the operation process through actual cases. The operation method is simple and fast, and the practicality is strong. I hope this article "CentOS source code compilation and installation method of PHP" can help you solve the problem.

First you need to install the following installation packages, you can find the following installation packages in the cd-rom data source yum installation

yum install perl* freetype libpng* libxm2 libxm2-devel curl curl-devel libjpeg*

Manual download and install jpegsrc.v8c.tar libmcrypt-2.5.8.tar.gz

Install jpegsrc

# tar -xvzf jpegsrc.v8c.tar# cd jpeg-8c# ./ configure --prefix=/usr/local/jpeg# make && make install

Install libmcrypt

# tar -xvzf libmcrypt-2.5.8.tar.gz# cd libmcrypt-2.5.8# ./ configure --prefix-/usr/local/libmcrypt# make && makeinstall

install PHP

# tar -xvzf php-5.5.10.tar.gz# cd php-5.5.10# ./ configure --prefix=/usr/local/php -with-apxs2=/usr/local/httpd/bin/apxs --with-curl --with-mcrypt --with-mbstring# make && make install

Configure Apache to support PHP

Modify the/usr/local/apache/conf/httpd.conf file

After the loadmodule entry, insert:

loadmodule php5_module modules/libphp5.so

Join in between

addtype application/x-httpd-php .php .phtmladdtype application/x-httpd-php-source .phpsaddhandler application/x-httpd-php .php

Restart Apache Service

Execute command # apachectl restart

testing php

Write probe files in the site root directory

# vi phpinfo.php

Input:

Enter http://192.168.23.131/phpinfo.php in the browser address bar

The following message appears: php installation is successful.

On the "CentOS source code compilation and installation of PHP method" content is introduced here, thank you for reading. If you want to know more about industry-related knowledge, you can pay attention to the industry information channel. Xiaobian will update different knowledge points for you every day.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report