linux(php)

来源:互联网 发布:matlab 知乎 编辑:程序博客网 时间:2024/06/06 07:49

安装

wget http://cn2.php.net/distributions/php-5.5.29.tar.gz安装依赖包确保安装之前有安装gd,png,curl,xml等等lib开发库。如果不确定,执行以下命令:yum install gcc make gd-devel libjpeg-devel libpng-devel libxml2-devel bzip2-devel libcurl-devel -y解压:tar zxvf php-5.5.29.tar.gz以下参数支持,ftp,图片函数,pdo等支持,因为使用了php自带的mysqlnd,所以不需要额外安装mysql的lib库了.如果你是64位系统,参数后面加上--with-libdir=lib64,如果不是可以跳过。进入解压目录执行以下命令:./configure --prefix=/usr/local/php-5.5.29 --with-config-file-path=/usr/local/php-5.5.29/etc --with-bz2 --with-curl --enable-ftp --enable-sockets --disable-ipv6 --with-gd --with-jpeg-dir=/usr/local --with-png-dir=/usr/local --with-freetype-dir=/usr/local --enable-gd-native-ttf --with-iconv-dir=/usr/local --enable-mbstring --enable-calendar --with-gettext --with-libxml-dir=/usr/local --with-zlib --with-pdo-mysql=mysqlnd --with-mysqli=mysqlnd --with-mysql=mysqlnd --enable-dom --enable-xml --enable-fpm --with-libdir=lib64备注:如果PHP不需要curl和ftp的支持,可以将以上的--with-curl --enable-ftp去掉. make&&make install
0 0
原创粉丝点击