Compilation and install php5.6.2

Compilation and installation php5.6.2

  1. Preparatory work # MKDIR / home / Download && CD / Home / Download # Yum Install GCC PCRE PCRE-DEVEL GCC-C ++ AutoConf libxml2 libxml2-devel zlib zlib-devel glibc libjpeg libjpeg-devel libpng libpng-devel glibc-devel glib2 glib2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel openssl openssl-devel openldap openldap-devel openldap-clients openldap-servers freetype FreeType-devel Mhash-debMcrypt-debiconv】 Download libiconv 1.14 and install libiconv url: http://ftp.gnu.org/pub/gnu/fibiconv/# wget http://ftp.gnu.org/pub/ GNU / libiconv / libiconv-1.14.tar.gz && tar zxvf libiconv-1.14.tar.gz && cd libiconv-1.14 && ./configure --prefix = / usr / local && make && make install # ln -s / usr / Local / lib / libiconv. * / usr / lib / # ldconfig # cd ..2. Compile installation PHP # wget hTTP: //php.net/get/php-5.6.2.tar.gz/from/this/mirror -o php-5.6.2.tar.gz && tar zxvf php-5.6.2.tar.gz && CD PHP-5.6.2 # ./configure --prefix = / usr / local / pHP \ - with-config-file-path = / usr / local / php / etc \ - with-pdo-sqlite \ - with -mySQL = mysqlnd \ - with-mysqli = mysqlnd \ - with-pdo-mysql = mysqlnd \ - with-mysql-sock \ - with-mcrypt \ - with-mhash \ - with-iconv-dir = / usr / local \ - with-gd \ - with-gettext \ - with-freetype-dir \ - with-jpeg-dir \ - with-png-dir \ - with-libXML-DIR = / usr \ - with-curl \ - with-xmlrpc \ - with-zlib \ - with-pear \ - with-openssl \ - with-libdir \ - with-kerberos \ - enable-CGI \ - Enable-fpm \ - enable-pdo \ - enable-opcache \ - enable-mbstring \ - enable-gd-native-ttf \ - enable-xml \ - enable-exif \ - enable -zip \ - enable-soap \ - enable-sockets \ - enable-sysVMSG \ - enable-sysvsem \ - enable-sysvshm \ - enable-shmop \ - enable-json \ - enable-bcmath \ - enable-calendar \ - enable-ftp \ - enable-inline- Optimization \ - enable-pcntl \ - enable-mbregex \ - disable-rpath # cp -a ext / phar.php ext / phar.phar # make zend_extra_libs = '- liconv' # make install # CP SAPI / FPM / Init.d.php-fpm /etc/init.d/php-fpm# chmod + x /etc/init.d/php-fpm# chkconfig php-fpm on # ln -s / usr / local / PHP / BIN / * / USR / BIN / # ln -s /usr/local/php/etc/php.ini / etc / # php -VPHP 5.6.2 (CLI) (Built: APR 7 2015 10:53:08 ) Copyright (C) 1997-2014 The PHP Groupze ENGINE V2.6.0, Copyright (c) 1998-2014 Zend Technologies # cp /usr/local/php/etc/php-fpm.conf.default / usr / local / php / ETC / PHP-fpm.conf # cp php.ini-production /usr/local/php/etc/php.ini# cd .. 3. PHP modeMounting block and corresponding service increases php module: memcache: libmemcached-develimagick: ImageMagick-develgearman: libgearman-develsphinx: libsphinxclient-develredis: hiredis-devel1) using pecl installation module: [memcache] # yum install libmemcached-devel # pecl install memcache [imagick] # yum install ImageMagick-devel # pecl install imagick [gearman] # yum install libgearman-devel # pecl install gearman [sphinx] # yum install libsphinxclient-devel # pecl install sphinx [redis] # yum install hiredis-devel # PECL Install Redis2) Service Installation and Start: # Yum Install Memcached # memcached -d -m 512 -l localhost -u root # yum install gearmand # gearmand -l 127.0.0.1 -d4. Profile [php.ini] # Vim / USR / local / php / etc / php.ini expose_php = offmax_execution_time = 300max_input_time = 600POST_MAX_SIZE = 100mdate.timezone = asia / Shanghai increases to the end of the file: EXtension_dir = "/ usr / local / php / lib / php / extensions / no-debug-non-zts - 20131226 /" extension = "memcache.so" extension = "imagick.so" extension = "gearman.so" Extension = "Sphinx.so" extension = "redis.so" Zend_extension = "/usr-local/php/lib/php/extensions/no-debug-non-zts-20131226/opcache.so" opcache.enable = 1OpCache.Nable_Cli = 1opcache.memory_consumption = 128opcache.interned_strings_buffer = 8opcache.max_accelerated_files = 4000opcache.save_comments = 0opcache.fast_shutdown = 1 after updating the configuration file to reload at # service php-fpm reload [php-fpm.conf] # vim / usr / local / php /etc/php-fpm.confuser = wwwgroup = www # service php-fpm start  







© Copyright Notice
THE END
Just support it if you like
like0
share
comment Grab the couch

Please log in to comment