Compile and install php-5.5.4 as Apache module

Source: Internet
Author: User

New users and user groups

-G WebUser WebUser

Download php-5.5

: Http://pan.baidu.com/s/1o6I6Lnk

Unpack

TarZXVF php-5.5.4.Tar. GZCD php-5.5.4./configure--prefix=/server/php5--enable-Sockets--with-apxs2=/server/apache2/bin/Apxs--with-mysql=/server/MySQL--with-mysqli--with-mysqli=/server/mysql/bin/Mysql_config--with-pdo-mysql=/server/MySQL--with-jpeg-dir=/usr/lib64--with-Curl--enable-mbstring= All--with-config-file-path=/server/php5/etc--enable-Soap--with-freetype-dir=/usr/local/Lib--with-GD--with-gettext

Compiling and installing

 Make  Make Install VI /server/apache2/conf/httpd.conf

Add AddType Line

AddType application/x-httpd-php. phpcp ./php.ini-production/server/php5/etc/php.ini

Edit Include_path

VI  /server/php5/etc/".:/ php/includes:/server/php5/lib/php"cgi.fix_pathinfo=1date. TimeZone = Asia/shanghai

A system with SELinux enabled requires the following line operation

Chcon-t texrel_shlib_t/server/apache2/modules/libphp5.so

Restart Apache

/server/apache2/bin/apachectl restart

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.