(iv) The enterprise part of PHP (not finished)

Source: Internet
Author: User
Tags gettext gmp openssl pear snmp

1.PHP Installation

Package:php-5.6.19.tar.bz2 re2c-0.13.5-1.el6.x86_64.rpm gd-devel-2.0.35-11.el6.x86_64.rpm

Tar jxf php-5.6.19.tar.bz2

Yum install curl-devel re2c-0.13.5-1.el6.x86_64.rpm gd-devel-2.0.35-11.el6.x86_64.rpm gmp-devel net-snmp-devel Libxml2-devel-y

CD php-5.6.19

./configure--prefix=/usr/local/lnmp/php--with-config-file-path=/usr/local/lnmp/php/etc--with-mysql=mysqlnd-- With-mysqli=mysqlnd--with-pdo-mysql=mysqlnd--with-openssl--with-snmp--with-gd--with-zlib--with-curl-- With-libxml-dir--with-png-dir--with-jpeg-dir--with-freetype-dir--without-pear--with-gettext--with-gmp-- Enable-inline-optimization--enable-soap--enable-ftp--enable-sockets--enable-mbstring--enable-fpm-- With-fpm-user=nginx--with-fpm-group=nginx

####

[Email protected] php-5.6.19]#/configure--prefix=/usr/local/lnmp/php \

>--WITH-CONFIG-FILE-PATH=/USR/LOCAL/LNMP/PHP/ETC \

>--with-mysql=mysqlnd \ # # automatically loading mysql information

>--WITH-MYSQLI=MYSQLND \

>--WITH-PDO-MYSQL=MYSQLND \

>--with-openssl \

>--WITH-SNMP \ # # load Simple Network Management protocol

>--WITH-GD \ # # support Graphics

>--with-zlib \ # # Support page compression

>--with-curl \ # # support for text browsing

>--with-libxml-dir \ # # support XML

>--with-png-dir \ # # support png images

>--with-jpeg-dir \ # # support jpeg

>--with-freetype-dir \

>--without-pear \ # # no networking installation

>--with-gettext \ ##

>--WITH-GMP \ # # support for GMP

>--enable-inline-optimization \

>--enable-soap \ # # supports dynamic loading modules

>--enable-ftp \ # # supports FTP

>--enable-sockets \ # # support for nested words

>--enable-mbstring \

>--ENABLE-FPM \

>--with-fpm-user=nginx \ # # make php and nginx permissions consistent

>--with-fpm-group=nginx

Make && make install

2.php Configuration

CD php-5.6.19

CP Php.ini-production/usr/local/lnmp/php/etc/php.ini

Vim/root/.bash_profile

Figure

Source/root/.bash_profile

Cd/usr/local/lnmp/php/etc

/etc/init.d/mysqld start

CP Php-fpm.conf.default php-fpm.conf

Vim php.ini

922 Date.timezone = Asia/shanghai

1001 Pdo_mysql.default_socket=/usr/local/lnmp/mysql/data/mysql.sock

1150 Mysql.default_socket=/usr/local/lnmp/mysql/data/mysql.sock

1209 Mysqli.default_socket=/usr/local/lnmp/mysql/data/mysql.sock

chmod 755/usr/local/lnmp/mysql/data/

Vim php-fpm.conf

PID = Run/php-fpm.pid

CD php-5.6.19/sapi/fpm/

CP INIT.D.PHP-FPM/ETC/INIT.D/FPM

chmod +x/etc/init.d/fpm

/ETC/INIT.D/FPM start

php-m # # view php support plugin

PS aux | grep nginx

vim/usr/local/lnmp/nginx/html/index.php

<?php

Phpinfo ();

?>

Vim/usr/local/lnmp/nginx/conf/nginx.conf

Add the index.php

Remove the 76-82 location ~ \.php$ Comment and Modify the include to the existing name

Figure

Nginx-t

Nginx-s Reload

Figure

3. Building a forum

Unzip discuz_x3.2_sc_utf8.zip-d/usr/local/lnmp/nginx/html/

cd/usr/local/lnmp/nginx/html/

MV Upload/bbs

chmod 777 bbs/config/-R

chmod 777 bbs/data/-R

chmod 777 Bbs/uc_*-R

Login mysql:mysql-p

CREATE DATABASE Discuz;

Grant all on discuz.* to [e-mail protected] identified by "westos+007";

Visit the webpage Ip/bbs

To install

Figure


(iv) The enterprise part of PHP (not finished)

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.