手记

php安装

本次采用php5.5.32进行编译安装

首先安装依赖包 

yum install gcc make gd-devel libjpeg-devel libpng-devel libxml2-devel bzip2-devel libcurl-devel -y


下载php文件

在电脑中下载php文件之后,使用lrzsz工具放到系统中 

/usr/local/src


解压、编译、make、make install

tar -zxvf php5.5.32

cd php5.5.32

进行编译,由于此次php用于zabbix系统,因此参数设置较多,64位系统最后 --with-libdir=lib64


./configure  --prefix=/usr/local/php-5.5.32  --with-config-file-path=/usr/local/php-5.5.32/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 --enable-bcmath --with-libdir=lib64

make

无报错则进行make install

make install


安装完成


cp php.ini-production /usr/local/php-5.5.32/etc/php.ini

cp /usr/local/php-5.5.32/etc/php-fpm.conf.default /usr/local/php-5.5.32/etc/php-fpm.conf


启动php
/usr/local/php-5.5.32/sbin/php-fpm




0人推荐
随时随地看视频
慕课网APP