search
Homephp教程php手册阿里云Centos 6.3 64位 安全加固版 升级 Php 中的 Curl 7.19 到 7.35

阿里云Centos 6.3 64位 安全加固版 升级 Php 中的 Curl 7.19 到 7.35

Jun 14, 2016 am 12:02 AM
64 bitcentoscurlphpcodeOpen sourceprogrammingprogramming languagesoftware developmentAli Cloud

*注意是使用阿里云一键安装包的升级,升级前快照备份哟,小伙伴!

1.SSH远程到root下下载新版本curl 网址地址:http://curl.haxx.se/download.html

完成curl新版本的编译和安装

[root@AY1312584349346eZ ~]# wget http://curl.haxx.se/download/curl-7.35.0.tar.gz
[root@AY1312584349346eZ ~]# tar -zxvf  curl-7.35.0.tar.gz

[root@AY1312584349346eZ ~]# cd  curl-7.35.0.tar.gz

[root@AY1312584349346eZ ~]#./configure --prefix=/usr/local/curl

[root@AY1312584349346eZ ~]#make

[root@AY1312584349346eZ ~]#make install

  

2.删除原有alidata php版本相关文件

[root@AY1312584349346eZ ~]#cd /alidata/server
[root@AY1312584349346eZ ~]#rm -rf php

 

3.修改原来的安装脚本,我的是

install_php-5.2.17_nginx-1.0.4.sh 

修改为:(修改的地方 --with-curl=/usr/local/curl/)

rm -rf php-5.2.17.tar.gz php-5.2.17 php-5.2.17-fpm-0.5.14.diff.gz
#wget http://mirrors.sohu.com/php/php-5.2.17.tar.gz
#wget http://php-fpm.org/downloads/php-5.2.17-fpm-0.5.14.diff.gz
wget http://soft.phpwind.me/web/php-5.2.17.tar.gz
wget http://soft.phpwind.me/web/php-5.2.17-fpm-0.5.14.diff.gz
tar zxvf php-5.2.17.tar.gz

gzip -cd php-5.2.17-fpm-0.5.14.diff.gz | patch -d php-5.2.17 -p1

patch -d php-5.2.17 -p1 < php-5.2.17-max-input-vars.patch

cd php-5.2.17

./configure --prefix=/alidata/server/php --with-config-file-path=/alidata/server/php/etc --with-mysql=/alidata/server/mysql --with-mysqli=/alidata/server/mysql/bin/mysql_config --with-pdo-mysql=/alidata/server/mysql/bin/mysql_config --enable-fpm --enable-fastcgi --enable-static --enable-maintainer-zts --enable-zend-multibyte --enable-sockets --enable-wddx --enable-zip --enable-calendar --enable-bcmath --enable-soap --with-zlib --with-iconv --with-gd --with-xmlrpc --enable-mbstring --without-sqlite --with-curl=/usr/local/curl/ --enable-ftp --with-mcrypt  --with-freetype-dir=/usr/local/freetype.2.1.10 --with-jpeg-dir=/usr/local/jpeg.6 --with-png-dir=/usr/local/libpng.1.2.8 --disable-ipv6 --disable-debug --with-openssl

 

#make

make ZEND_EXTRA_LIBS='-liconv'

make install

cd ..

cp -f php-5.2.17.ini /alidata/server/php/etc/php.ini

cp -f php-fpm-5.2.17.conf /alidata/server/php/etc/php-fpm.conf

ln -s /alidata/server/php/sbin/php-fpm /etc/init.d/php-fpm

chmod 755 /alidata/server/php/sbin/php-fpm

/etc/init.d/php-fpm start

  

4.重新安装

[root@AY13121717584349346eZ sh]# ./install_php-5.2.17_nginx-1.0.4.sh 

就万事大吉啦!

 

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
Will R.E.P.O. Have Crossplay?
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.