Php-(/usr/local/php) Install compilation options

Source: Internet
Author: User

./Configure--prefix=/usr/local/PHP--with-config-file-path=/usr/local/php/etc--enable-FPM--with-fpm-user=www--with-fpm-group=www--with-mysql=/usr/local/MySQL--with-mysql-sock=/tmp--with-libxml-dir --with-GD--with-jpeg-dir --with-png-dir --with-freetype-dir --with-iconv-dir --with-zlib-dir --with-MCrypt--enable-Soap--enable-gd-native-TTF--enable-FTP --enable-mbstring--enable-EXIF--enable-zend-multibyte--disable-IPv6--enable-fastcgi--with-Pear--with-Curl--with-openssl

make && make install

Note: If you are not prompted to find an error such as libevent in the above steps, then you have not installed the Libevent library, so you need to install it manually. It can be done with Yum install-y libevent this command.

If you have successfully completed the above 5 steps, then you have installed the php-5.3.3

The next step is to configure it.
Cp/usr/local/src/php-5.3.3/php.ini-development/usr/local/php/etc/php.ini
Cp/usr/local/php/etc/php-fpm.conf.default/usr/local/php/etc/php-fpm.conf

Vi/usr/local/php/etc/php-fpm.conf
The places to be modified Are:

[global]pid=/usr/local/php/var/run/php-Fpm.piderror_log=/usr/local/php/var/log/php-Fpm.log[www]listen=/tmp/php-Fcgi.socklisten.owner=Wwwlisten.group=Wwwlisten.mode=0666User=Wwwgroup=wwwpm=Dynamicpm.max_children= -pm.start_servers= -pm.min_spare_servers=5pm.max_spare_servers= *pm.max_requests= -Rlimit_files=1024x768



These places need to delete the semicolon at the beginning of the LINE.

Start PHP-FPM
Command for/usr/local/php/sbin/php-fpm-c/usr/local/php/etc/php.ini-y/usr/local/php/etc/php-fpm.conf
You can also use the system startup script
cp/usr/local/src/php-5.3.3/sapi/fpm/init.d.php-fpm/etc/init.d/php-fpm
chmod 755/etc/init.d/php-fpm

/ETC/INIT.D/PHP-FPM start

Error resolution:

1. Cannot find OpenSSL ' s<evp.h>

Yum Install OpenSSL Openssl-devel

2, mcryot.h not found
Yum Install Epel-release//expansion Pack update package
Yum update//update Yum Source
Yum install Libmcrypt libmcrypt-devel mcrypt Mhash is Ok.

3, Jpeglib.h not Found.

Yum Install Jpeglib Jpeglib-devel

4, Png.h not found

Yum Install libpng Libpng-devel

5, Freetype-config not Found.

Yum install-y FreeType Freetype-devel

Php-(/usr/local/php) Install compilation options

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.