php5.2.17 Upgrade php-5.6.14

Source: Internet
Author: User
Keep a record, upgrade successfully


TAR-ZVXF php-5.6.14.tar.gz

cd/www/src/php-5.6.14

./configure--prefix=/www/lnmp/php--with-config-file-path=/www/lnmp/php/etc--with-mysql=/www/lnmp/mysql-- With-mysqli=/www/lnmp/mysql/bin/mysql_config--WITH-ICONV-DIR=/WWW/LNMP--with-freetype-dir--with-jpeg-dir-- With-png-dir--with-zlib--with-libxml-dir=/usr--enable-xml--disable-rpath--enable-discard-path--enable-bcmath-- Enable-shmop--enable-sysvsem--enable-inline-optimization--with-curl--with-curlwrappers--with-bz2-- Enable-mbregex--enable-fastcgi--enable-fpm--enable-force-cgi-redirect--enable-mbstring--with-mcrypt--WITH-GD-- Enable-gd-native-ttf--with-openssl--with-mhash--enable-pcntl--enable-sockets--with-xmlrpc--enable-zip-- Enable-soap--enable-json--without-pear--disable-debug


Make

Make install


CP Php.ini-production/www/lnmp/php/etc/php.ini

Cp/www/lnmp/php/etc/php-fpm.conf.default/www/lnmp/php/etc/php-fpm.conf


Vi/www/lnmp/php/etc/php-fpm.conf #编辑


user = www #设置php-fpm run account is www


Group = www #设置php-fpm run Group is www


PID = Run/php-fpm.pid #取消前面的分号


: wq! #保存退出


Set PHP-FPM boot up


CP/WWW/SRC/PHP-5.6.14/SAPI/FPM/INIT.D.PHP-FPM/ETC/RC.D/INIT.D/PHP-FPM #拷贝php-fpm to startup directory


chmod +x/etc/rc.d/init.d/php-fpm #添加执行权限


Chkconfig PHP-FPM on #设置开机启动


Vi/www/lnmp/php/etc/php.ini #编辑配置文件


Found: Disable_functions =


Modified to: Disable_functions = Passthru,exec,system,chroot,scandir,chgrp,chown,shell_exec,proc_open,proc_get_status,ini _alter,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server, Escapeshellcmd,dll,popen,disk_free_space,checkdnsrr,checkdnsrr,getservbyname,getservbyport,disk_total_space, POSIX_CTERMID,POSIX_GET_LAST_ERROR,POSIX_GETCWD, Posix_getegid,posix_geteuid,posix_getgid, Posix_getgrgid,posix_ Getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid, Posix_getppid,posix_getpwnam, Posix_getpwuid, Posix_getrlimit, Posix_getsid,posix_getuid,posix_isatty, Posix_kill,posix_mkfifo,posix_setegid, Posix_seteuid,posix_setgid, Posix_setpgid,posix_setsid,posix_setuid,posix_strerror,posix_times,posix_ttyname, Posix_uname


#列出PHP可以禁用的函数, if some programs need to use this function, you can delete, cancel disable.


Found:;d Ate.timezone =


Modified to: Date.timezone = PRC #设置时区


Found: expose_php = On


Modified to: expose_php = Off #禁止显示php版本的信息


Found: Short_open_tag = Off


Modified to: Short_open_tag = on #支持php短标签


Find Opcache.enable=0


Modified to Opcache.enable=1 #php支持opcode缓存


Found in:; Opcache.enable_cli=1 #php支持opcode缓存


Modified to: opcache.enable_cli=0


Added on last line: Zend_extension=opcache.so #开启opcode缓存功能


: wq! #保存退出



Configure boot-up

Vi/etc/rc.local

At the end, remove the following:

/WWW/LNMP/PHP/SBIN/PHP-FPM start



Modify a scheduled task

Crontab-e


Reboot

Restart

  • 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.