Linuxphp compilation and installation, linuxphp compilation and installation _ PHP Tutorial

Source: Internet
Author: User
Linuxphp compilation and installation, and linuxphp compilation and installation. Linuxphp compilation and installation: 1. download the PHP installation package cn2.php.netgetphp-5.5.36.tar.gz fromthismirror. by default, Nginx and php are not compiled and installed in linux PHP.

1. download the php installation package

Http://cn2.php.net/get/php-5.5.36.tar.gz/from/this/mirror

By default, Nginx and PHP do not feel anything at all. After Apache + PHP is compiled, module files are generated, while Nginx + PHP requires PHP to generate executable files. Therefore, fastcgi technology must be used to integrate Nginx with PHP, you only need to enable FastCGI during installation. This time we install PHP not only use FastCGI, but also use the PHP-FPM such a stuff, PHP-FPM said White is a management FastCGI a manager, it exists as a PHP plug-in, to use PHP-FPM when installing PHP, you need to install the PHP-FPM in the form of a patch to PHP, and PHP to be consistent with the PHP-FPM version, this is necessary, remember!

2. Installation

[root@localhost src]# tar -zxvf php-5.5.36.tar.gz [root@localhost src]# cd php-5.5.36[root@localhost php-5.5.36]# ./configure   --prefix=/usr/local/php   --with-config-file-path=/usr/local/php/etc  --with-png-dir=/usr/local/libpng   --with-jpeg-dir=/usr/local/jpeg   --with-freetype-dir=/usr/local/freetype   --with-zlib-dir=/usr/local/zlib   --with-mcrypt=/usr/local/libmcrypt   --with-libxml-dir=/usr/local/libxml2/   --with-iconv-dir=/usr/local/libiconv   --enable-libxml   --enable-xml   --enable-bcmath   --enable-shmop   --enable-sysvsem   --enable-inline-optimization   --enable-opcache   --enable-mbregex   --enable-fpm   --enable-mbstring=all   --enable-gd-native-ttf   --with-openssl   --enable-pcntl   --enable-sockets   --with-xmlrpc   --enable-zip   --enable-soap   --without-pear   --with-gettext   --enable-session   --with-curl   --enable-ctype   --enable-shared   --with-gd  [root@localhost php-5.5.36]make clean[root@localhost php-5.5.36]make [root@localhost php-5.5.36]make install

3. copy php. ini-development from the source code to the configuredPhp. iniUnder the search path

[root@localhost php-5.5.36]# cp php.ini-development /usr/local/php/etc/php.ini

4. copy a php-fpm configuration file named php-fpm.conf (/usr/local/php/etc path)

[root@localhost etc]# cp php-fpm.conf.default php-fpm.conf

5. start php-fpm

[root@localhost /]# /usr/local/php/sbin/php-fpm [root@localhost /]# ps aux | grep php-fpmroot 7790 0.0 0.2 27300 3048 ? Ss 22:23 0:00 php-fpm: master process (/usr/local/php/etc/php-fpm.conf)nobody 7791 0.0 0.4 27300 4380 ? S 22:23 0:00 php-fpm: pool www nobody 7792 0.0 0.2 27300 2524 ? S 22:23 0:00 php-fpm: pool www root 8124 0.0 0.0 4420 756 pts/3 S+ 23:19 0:00 grep php-fpm

Appendix:

1. find the php configuration file path

[root@localhost /]# /usr/local/php/bin/php --iniConfiguration File (php.ini) Path: /usr/local/php/etcLoaded Configuration File:         /usr/local/php/etc/php.iniScan for additional .ini files in: (none)Additional .ini files parsed:      (none)

2. disable php-fpm.

[root@localhost /]# killall php-fpm

3. php core configuration option list

Http://php.net/manual/zh/configure.about.php

Http://www.bkjia.com/PHPjc/1134602.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/1134602.htmlTechArticlelinux php compilation and installation, linuxphp compilation and installation 1, download the php installation package http://cn2.php.net/get/php-5.5.36.tar.gz/from/this/mirror default Nginx and PHP between them is a bit of feeling no...

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.