LNMP deployment based on e-commerce platform under Linux

Source: Internet
Author: User
Tags apc fpm geoip gettext imagemagick zend

Lab Environment:
System:centos 6.5
nginx:tengine-1.5.1
php:php-5.4.25
mysql:mysql-5.5.38

[email protected] opt]# Yum install-y make CMake apr* autoconf automake curl-devel gcc gcc-c++ gtk+-devel zlib-devel op Enssl openssl-devel pcre-devel gd gd-devel gettext gettext-devel kernel keyutils patch perl kernel-headers compat* MPFR CPP glibc libgomp libstdc++-devel ppl cloog-ppl keyutils-libs-devel libcom_err-devel libsepol-devel libselinux-devel KRB 5-devel zlib-devel libxpm* freetype freetype-devel freetype* fontconfig fontconfig-devel libjpeg* libpng* Php-common php- GD ncurses* libtool* libxml2 libxml2-devel patch libxslt-devel lua-devel GeoIP geoip-devel t1lib-devel libicu-devel LIBMCR Ypt-devel
[Email protected] opt]# ln-s/usr/lib64/*/usr/lib/


1.nginx Installation
[Email protected] opt]# tar zxf pcre-8.34.tar.gz
[Email protected] opt]# CD pcre-8.34
[Email protected] pcre-8.34]#./configure
[[email protected] pcre-8.34]# make && make install
[Email protected] opt]# useradd nginx-s/sbin/nologin
[Email protected] opt]# tar zxf tengine-1.5.1.tar.gz
[Email protected] opt]# CD tengine-1.5.1
[Email protected] tengine-1.5.1]#/configure--user=nginx--group=nginx--prefix=/usr/local/nginx--with-http_stub_ Status_module--with-http_ssl_module--with-http_gzip_static_module--with-http_sysguard_module--with-http_concat _module--enable-mods-shared=all
[[email protected] tengine-1.5.1]# make && make install
[Email protected] tengine-1.5.1]# ln-s/usr/local/nginx/sbin/nginx/usr/bin/nginx
[[email protected] tengine-1.5.1]# mv/opt/nginxd/etc/init.d/# nginxd startup script in Attachment
[Email protected] tengine-1.5.1]# chmod 700/etc/init.d/nginxd
[Email protected] tengine-1.5.1]# chkconfig--add nginxd
[Email protected] tengine-1.5.1]# chkconfig nginxd on


2.php Installation
[Email protected] opt]# tar zxf php-5.4.25.tar.gz
[Email protected] opt]# CD php-5.4.25
[Email protected] php-5.4.25]#/configure--prefix=/usr/local/php--sysconfdir=/usr/local/php/etc--enable-fpm-- With-fpm-user=nginx--with-fpm-group=nginx--disable-cgi--with-config-file-path=/usr/local/php/etc-- With-config-file-scan-dir=/usr/local/php/etc/ext--enable-calendar--with-curl--enable-ftp--with-gd--enable-intl --enable-mbstring--with-mcrypt--with-mysql--with-pdo-mysql--enable-sockets--enable-zip--with-pcre-dir-- Enable-mysqlnd--with-iconv=/usr/local/libiconv--with-jpeg-dir=dir--with-png-dir=dir--with-zlib-dir=DIR-- With-xpm-dir=dir--with-freetype-dir=dir--with-t1lib=dir--enable-gd-native-ttf--enable-gd-jis-conv--with-iconv
[[email protected] php-5.4.25]# make && make install
[email protected] php-5.4.25]# CP Php.ini-production/usr/local/php/etc/php.ini
[Email protected] php-5.4.25]# Rm-rf/etc/php.ini
[Email protected] php-5.4.25]# ln-s/usr/local/php/etc/php.ini/etc/php.ini
[Email protected] php-5.4.25]# cp/usr/local/php/etc/php-fpm.conf.default/usr/local/php/etc/php-fpm.conf
[email protected] php-5.4.25]# CP SAPI/FPM/INIT.D.PHP-FPM/ETC/RC.D/INIT.D/PHP-FPM
[Email protected] php-5.4.25]# chmod o+x/etc/rc.d/init.d/php-fpm
[Email protected] php-5.4.25]# chkconfig--add php-fpm
[Email protected] php-5.4.25]# chkconfig php-fpm on


3.mysql Installation
[Email protected] opt]# useradd mysql-s/sbin/nologin
[Email protected] opt]# tar zxf mysql-5.5.38.tar.gz
[Email protected] opt]# CD mysql-5.5.38
[Email protected] mysql-5.5.38]# CMake. -dcmake_install_prefix=/usr/local/mysql-dmysql_datadir=/var/lib/mysql-ddefault_charset=utf8-ddefault_collation =utf8_general_ci-dwith_innobase_storage_engine=1-dextra_charsets=all-dwith_ssl=system-dwith_debug=0
[[email protected] mysql-5.5.38]# make && make install
[Email protected] mysql-5.5.38]# Mkdir/var/lib/mysql
[Email protected] mysql-5.5.38]# Mkdir/var/log/mysql
[Email protected] mysql-5.5.38]# chown-r mysql:mysql/var/lib/mysql
[Email protected] mysql-5.5.38]# chown-r mysql:mysql/var/log/mysql
[Email protected] mysql-5.5.38]#/usr/local/mysql/scripts/mysql_install_db--user=mysql--pid-file=/var/lib/mysql/ Mysql.pid--datadir=/var/lib/mysql/--basedir=/usr/local/mysql
[email protected] mysql-5.5.38]# CP support-files/my-medium.cnf/etc/my.cnf
[Email protected] mysql-5.5.38]# VI/ETC/MY.CNF
[Client]
Socket =/var/lib/mysql/mysql.sock
# The MySQL server
[Mysqld]

Socket =/var/lib/mysql/mysql.sock
Log-error =/var/log/mysql/mysql-error.log
Pid-file =/var/lib/mysql/mysql.pid
Character-set-server = UTF8
[email protected] mysql-5.5.38]# CP Support-files/mysql.server/etc/rc.d/init.d/mysql
[Email protected] mysql-5.5.38]# chmod o+x/etc/rc.d/init.d/mysql
[[email protected] mysql-5.5.38]# chkconfig--add MySQL
[[email protected] mysql-5.5.38]# chkconfig MySQL on
[Email protected] mysql-5.5.38]# ln/usr/local/mysql/bin/mysql/usr/bin/
[Email protected] mysql-5.5.38]# ln/usr/local/mysql/bin/mysqladmin/usr/bin/
[Email protected] mysql-5.5.38]# ln/usr/local/mysql/bin/mysqldump/usr/bin/


4.php Plug-in installation
(1) APC
[Email protected] opt]# tar zxf apc-3.1.13.tgz
[Email protected] opt]# CD APC-3.1.13
[Email protected] apc-3.1.13]#/usr/local/php/bin/phpize
[Email protected] apc-3.1.13]#/configure--with-php-config=/usr/local/php/bin/php-config--ENABLE-APC-- Enable-mmap--enable-apc-spinlocks--disable-apc-pthreadmutex
[[email protected] apc-3.1.13]# make && make install
[Email protected] apc-3.1.13]# echo "extension = apc.so" >>/usr/local/webapps/php/etc/php.ini
(2) Memcache
[Email protected] opt]# tar zxf memcache-2.2.7.tgz
[Email protected] opt]# CD memcache-2.2.7
[Email protected] memcache-2.2.7]#/usr/local/php/bin/phpize
[Email protected] memcache-2.2.7]#/configure--with-php-config=/usr/local/php/bin/php-config
[[email protected] memcache-2.2.7]# make && make install
[Email protected] memcache-2.2.7]# echo "extension = memcache.so" >>/usr/local/php/etc/php.ini
(3) Redis
[Email protected] opt]# Unzip Phpredis-master.zip
[Email protected] opt]# CD Phpredis-master
[Email protected] phpredis-master]#/usr/local/php/bin/phpize
[Email protected] phpredis-master]#/configure--with-php-config=/usr/local/php/bin/php-config
[[email protected] phpredis-master]# make && make install
[Email protected] phpredis-master]# echo "extension = redis.so" >>/usr/local/php/etc/php.ini
(4) Imagick
[Email protected] opt]# tar zxf ImageMagick.tar.gz
[Email protected] opt]# CD imagemagick-6.8.9-10/
[Email protected] imagemagick-6.8.9-10]#/configure ldflags= "-l/usr/lib" cppflags= "-i/usr/include"--prefix=/usr/ Local/imagemagick--enable-shared--ENABLE-LZW--disable-openmp
[Email protected] opt]# tar zxf imagick-3.1.0rc2.tgz
[Email protected] opt]# CD IMAGICK-3.1.0RC2
[Email protected] imagick-3.1.0rc2]#/usr/local/php/bin/phpize
[Email protected] imagick-3.1.0rc2]# ln-s/usr/local/imagemagick/include/imagemagick-6/usr/local/imagemagick/ Include/imagemagick
[Email protected] imagick-3.1.0rc2]#/configure--with-php-config=/usr/local/php/bin/php-config--with-imagick=/ usr/local/imagemagick/
/php-config--with-imagick=/usr/local/imagemagick/
[[email protected] imagick-3.1.0rc2]# make && make install
[Email protected] imagick-3.1.0rc2]# echo "extension = imagick.so" >>/usr/local/php/etc/php.ini
(5) Magickwand
[Email protected] opt]# tar zxf magickwandforphp-1.0.9-2.tar.gz
[Email protected] opt]# CD MagickWandForPHP-1.0.9
[Email protected] magickwandforphp-1.0.9]#/usr/local/php/bin/phpize
[Email protected] magickwandforphp-1.0.9]#/configure--prefix=/usr/local/magickwand--enable-shared-- With-php-config=/usr/local/php/bin/php-config--with-magickwand=/usr/local/imagemagick/
[[email protected] magickwandforphp-1.0.9]# make && make install
[Email protected] magickwandforphp-1.0.9]# echo "extension = magickwand.so" >>/usr/local/php/etc/php.ini
(6) Eaccelerator
[Email protected] opt]# tar zxf eaccelerator-eaccelerator-42067ac.tar.gz
[Email protected] opt]# CD EACCELERATOR-EACCELERATOR-42067AC
[Email protected] eaccelerator-eaccelerator-42067ac]#/usr/local/php/bin/phpize
[Email protected] eaccelerator-eaccelerator-42067ac]#/configure--enable-eaccelerator=shared--with-php-config=/ Usr/local/php/bin/php-config
[[email protected] eaccelerator-eaccelerator-42067ac]# make && make install
[Email protected] eaccelerator-eaccelerator-42067ac]# Mkdir/tmp/eaccelerator
[Email protected] eaccelerator-eaccelerator-42067ac]# chmod 777/tmp/eaccelerator/
[Email protected] eaccelerator-eaccelerator-42067ac]# echo "extension = eaccelerator.so" >>/usr/local/php/etc/ Ini
(7) Zend
[Email protected] opt]# tar zxf zendguardloader-70429-php-5.4-linux-glibc23-x86_64.tar.gz
[Email protected] opt]# Mkdir/usr/local/zend
[email protected] opt]# CP zendguardloader-70429-php-5.4-linux-glibc23-x86_64/php-5.4.x/zendguardloader.so/usr/ local/zend/
[Email protected] opt]# Vi/usr/local/php/etc/php.ini
[Zend Optimizer]
zend_loader.enable = 1
[Zend Guard]
Zend_extension=/usr/local/zend/zendguardloader.so
Zend_loader.enable=1
Zend_loader.disable_licensing=0
Zend_loader.obfuscation_level_support=3
Zend_loader.license_path=
5. Testing
[[email protected] ~]#/etc/init.d/php-fpm start
[[email protected] ~]#/etc/init.d/mysql start
[[email protected] ~]#/etc/init.d/nginxd start650) this.width=650; "title=" 1.jpg "alt=" Wkiol1s2kdljr8lraagrov3-w98806.jpg "src=" Http://s3.51cto.com/wyfs02/M01/58/A0/wKioL1S2KdLjR8LrAAGROV3-W98806.jpg "/>
Nginx Access OK
[Email protected] ~]# echo-e "<?php\nphpinfo ();\n?>" >/usr/local/nginx/html/phpinfo.php
[Email protected] html]# VI mysql.php
<?php
$conn = mysql_connect ("127.0.0.1", "root", "123456") or Die ("Connect err:". Mysql_error ());
echo "The success of MySQL links!";
>650) this.width=650; "title=" 2.jpg "alt=" wkiol1s2keytnshaaacy5umnuzq994.jpg "src=" http://s3.51cto.com/wyfs02/ M02/58/a0/wkiol1s2keytnshaaacy5umnuzq994.jpg "/>
MySQL Link succeeded 650) this.width=650; "title=" 3.jpg "alt=" wkiol1s2kghtse6paagj3wjrime381.jpg "src=" http://s3.51cto.com/ Wyfs02/m00/58/a0/wkiol1s2kghtse6paagj3wjrime381.jpg "/>

APC extended 650) this.width=650; "title=" 4.jpg "alt=" wkiom1s2kuozvci_aaibqh5jfoa879.jpg "src=" http://s3.51cto.com/wyfs02/ M00/58/a3/wkiom1s2kuozvci_aaibqh5jfoa879.jpg "/>
Memcache extended 650) this.width=650; "title=" 5.jpg "alt=" wkiom1s2kvvgn-yzaadxvtxk2xe204.jpg "src=" http://s3.51cto.com/ Wyfs02/m01/58/a3/wkiom1s2kvvgn-yzaadxvtxk2xe204.jpg "/>
Redis Extensions
650) this.width=650; "title=" 6.jpg "alt=" wkiom1s2kwidpe7saajwbmgjyko982.jpg "src=" http://s3.51cto.com/wyfs02/M02/ 58/a3/wkiom1s2kwidpe7saajwbmgjyko982.jpg "/>imagick Extension

650) this.width=650; "title=" 7.jpg "alt=" wkiol1s2km3qtailaaiyos0n5gs932.jpg "src=" http://s3.51cto.com/wyfs02/M02/ 58/a0/wkiol1s2km3qtailaaiyos0n5gs932.jpg "/>magickwand Extension
650) this.width=650; "title=" 8.jpg "alt=" wkiol1s2kxtrsw_uaahb45hu4xw700.jpg "src=" http://s3.51cto.com/wyfs02/M00/ 58/a0/wkiol1s2kxtrsw_uaahb45hu4xw700.jpg "/>eaccelerator Extension

650) this.width=650; "title=" 0000..png "style=" Float:none; "alt=" wkiom1s2kmjcsw-caadblwjmlx0791.jpg "src=" http:/ S3.51cto.com/wyfs02/m00/58/a3/wkiom1s2kmjcsw-caadblwjmlx0791.jpg "/>

650) this.width=650; "title=" 9.jpg "style=" Float:none; "alt=" wkiol1s2kztxn17iaaete8w7ncg688.jpg "src=" http:/ S3.51cto.com/wyfs02/m01/58/a0/wkiol1s2kztxn17iaaete8w7ncg688.jpg "/>



Zendguardloader extension

This article is from the "Linux art (q Group: 1991706)" blog, please be sure to keep this source http://304076020.blog.51cto.com/7503470/1604002

LNMP deployment based on e-commerce platform under Linux

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.