Install php on CentOS

Source: Internet
Author: User

Install php on CentOS
Php dependency

[Plain] view plaincopy
  1. Yuminstall-ylibxml2-developenssl-devellibcurl-devellibjpeg-devellibpng-devellibicu-developenldap-devel

Download: php-5.5.23.tar.gz
[Plain] view plaincopy
  1. . /Configure -- prefix =/root/tools/php5.5 -- with-config-file-path =/root/tools/php5.5/etc -- enable-fpm -- enable-xml -- disable-rpath -- enable-bcmath -- enable-shmop -- enable-sysvsem -- enable-inline-optimization -- with-curl -- enable-mbregex -- enable-fpm -- enable-mbstring -- with-gd -- enable -gd-native-ttf -- with-openssl -- with-mhash -- enable-pcntl -- enable-sockets -- with-xmlrpc -- enable-zip -- enable-soap -- enable-opcache -- -pdo-mysql -- enable-maintainer-zts -- disable-fileinfo

Cp/root/tools/php-5.5.23/php. ini-production/root/tools/php5.5/php. ini

Modify the php. ini file register_globals = On


Make: *** [ext/fileinfo/libmagic/apprentice. lo] Error 1 

An error occurred while compiling PHP5.5 make.

Make: *** [ext/fileinfo/libmagic/apprentice. lo] Error 1

Solution

This is because the memory is less than 1 GB.

Add the following options to./configure:

-- Disable-fileinfo

Disable fileinfo support Disable fileinfo

######################################## ######################################## ####################

Configure php:

cp php.ini-production /usr/local/php-5.5.0/etc/php.inicp /usr/local/php-5.5.0/etc/php-fpm.conf.default /usr/local/php-5.5.0/etc/php-fpm.conf
/usr/local/php-5.5.0/sbin/php-fpm
Determine whether PHP is enabled through the port

# netstat -lnt | grep 9000tcp 0 0 127.0.0.1:9000 0.0.0.0:* LISTEN

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.