LNMP--------PHP Software Installation

Source: Internet
Author: User
Tags mcrypt php software

Lnmp PHPSoftware Installation1.1SolvePhpDependencies of software

Yum install zlib-devel libxml2-devel libjpeg-devellibjpeg-turbo-devel libiconv-devel freetype-devel libpng-devel Gd-devellibcurl-devel Libxslt-devel libxslt-devel-y

1.1.1 LibiconvSoftware Installation

Mkdir-p/home/oldboy/tools

Cd/home/oldboy/tools

#wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz

Tar zxf libiconv-1.14.tar.gz

CD libiconv-1.14

./configure--prefix=/usr/local/libiconv # # # Specify the installation directory for the software

Make

Make install

Description: libiconv Software converts text between encodings and uses it to handle conversions between various Chinese encodings

Note: Using yum does not install the Libiconv software, it is necessary to download and compile the installation.

#wget-O/etc/yum.repos.d/epel.repohttp://mirrors.aliyun.com/repo/epel-6.repo

Yum-y Install Libmcrypt-devel Mhash mcrypt

Rpm-qa Libmcrypt-devel Mhash MCrypt

Note: Install Libmcrypt to implement cryptographic functions, install Mhash (ha-function library)

1.2installationPHP1.2.1Download UnzipPhp

can be downloaded first to put in Windows disk, then upload to Linux , then unzip.

[Email protected] libiconv-1.14]# cd/home/oldboy/tools/

[Email protected] tools]# tar xf php-5.5.32.tar.gz

[[email protected] tools]# ls

libiconv-1.14

Libiconv-1.14.tar.gz

Mysql-5.6.34-linux-glibc2.5-x86_64.tar.gz

nginx-1.10.2

Nginx-1.10.2.tar.gz

php-5.5.32

Php-5.5.32.tar.gz

[Email protected] tools]#

1.2.2ConfigurationPhpSoftware Options

CD php-5.5.32

./configure \

--prefix=/application/php-5.5.32 \

--with-mysql=/application/mysql/\

--WITH-PDO-MYSQL=MYSQLND \

--with-iconv-dir=/usr/local/libiconv \

--with-freetype-dir \

--with-jpeg-dir \

--with-png-dir \

--with-zlib \

--WITH-LIBXML-DIR=/USR \

--enable-xml \

--disable-rpath \

--enable-bcmath \

--ENABLE-SHMOP \

--enable-sysvsem \

--enable-inline-optimization \

--with-curl \

--enable-mbregex \

--ENABLE-FPM \

--enable-mbstring \

--with-mcrypt \

--WITH-GD \

--ENABLE-GD-NATIVE-TTF \

--WITH-OPENSSL \

--with-mhash \

--ENABLE-PCNTL \

--enable-sockets \

--WITH-XMLRPC \

--ENABLE-SOAP \

--enable-short-tags \

--enable-static \

--with-xsl \

--WITH-FPM-USER=WWW \

--WITH-FPM-GROUP=WWW \

--ENABLE-FTP \

--enable-opcache=no

1.2.3 # #Error-Proof

ln-s/application/mysql/lib/libmysqlclient.so.18/usr/lib64/

[Email protected] php-5.5.32]# pwd

/home/oldboy/tools/php-5.5.32

[[email protected] php-5.5.32]# touch Ext/phar/phar.phar # # Some compiled files to be put in this file

1.2.4Compiling the installation

[Email protected] php-5.5.32]# pwd

/home/oldboy/tools/php-5.5.32 # # # Note Be sure to compile under this directory

[[email protected] php-5.5.32]# make

[[email protected] php-5.5.32]# make install

1.2.5 PHPsoftware programs Create soft links

[Email protected] php-5.5.32]# ln-s/application/php-5.5.32//application/php

1.2.6ConfigurationPhpparsing Files/Configurationphp-fpmconfiguration file

[Email protected] php-5.5.32]# cd/home/oldboy/tools/php-5.5.32

[email protected] php-5.5.32]# ll php.ini*

-rw-r--r--1 1001 1001 69236 Feb 2 2016php.ini-development

-rw-r--r--1 1001 1001 69266 Feb 2 2016php.ini-production

[Email protected] php-5.5.32]# cd/home/oldboy/tools/php-5.5.32

[Email protected] php-5.5.32]# CP Php.ini-production/application/php/lib/php.ini

##/application/php/lib/php.ini the main process profile, not by default, it needs to be copied from the installation directory.

[[email protected]] #cd/application/php/etc/

[[email protected]] #cp Php-fpm.conf.default php-fpm.conf

nginx and php communication fastcgi configuration file.

extension: File Compare command diff Zdiffvimdiff Windows Comparison of files on

1.2.7StartPhp

[Email protected] etc]# /application/php/sbin/php-fpm

[Email protected] etc]# ps-ef |grep php

Root 124014 1 0 11:46? 00:00:00 Php-fpm:master Process (/application/php-5.5.32/etc/php-fpm.conf)

www 124015 124014 0 11:46? 00:00:00 Php-fpm:pool www

www 124016 124014 0 11:46? 00:00:00 Php-fpm:pool www

Root 124018 1664 0 11:47 pts/1 00:00:00 grep php

[Email protected]]# netstat-lnutp|grep php

TCP 0 0 127.0.0.1:9000 0.0.0.0:* LISTEN 124014/php-fpm

[Email protected] etc]#


This article from "Dadong" blog, reproduced please contact the author!

LNMP--------PHP Software Installation

Related Article

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.