Centos 中 PHP安装方法步骤
2021-04-02 23:25
标签:ini ash freetype etc 目录 依赖 libc pos php安装 yum install zlib-devel libxml2-devel libjpeg-devel libjpeg-turbo-devel libiconv-devel -y cd /tools/ make install wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo yum install -y libmcrypt-devel mhash mcrypt 下载PHP包到/tools/目录下 ./configure \ ln -s /application/mysql/lib/libmysqlclient.so.18 /usr/lib64/ touch ext/phar/phar.phar ###在下载减压后的php-x.x.目录 make echo $? make install echo $? ln -s /application/php-5.5.3/ /application/php 安装完成 cd /tools/php-5.3.3 #此目录为php的解压目录,比较php的2个配置文件的不同 vimdiff php.ini* cp /tools/php-5.5.3/php.ini-production /application/php/lib/php.ini ##"php.ini-production"为生产环境的默认配置(关掉大部分报错提示) 切入进程目录:cd /application/php/etc/ ##(php-fpm.conf.default ) 修改文件:cp php-fpm.conf.default php-fpm.conf 启动进程:/application/php/sbin/php-fpm 查看端口:lsof -i :9000 查看进程:ps -ef |grep php-fpm Centos 中 PHP安装方法步骤 标签:ini ash freetype etc 目录 依赖 libc pos php安装 原文地址:https://blog.51cto.com/12289801/2480822
yum install freetype-devel libpng-devel gd-devel libcurl-devel libxslt-devel libxslt-devel -y单独安装依赖 libiconv-devel
wget http://mirrors.ustc.edu.cn/gnu/libiconv/libiconv-1.14.tar.gz
tar zxf libiconv-1.14.tar.gz
cd libiconv-1.14
./configure --prefix=/application/libiconv
make
echo $?
echo $?安装PHP需要的依赖服务
tar xf php-5.5.3.tar.gz
cd /php-5.5.3编译 安装"\"后不能有空格
--prefix=/application/php-5.5.3 \
--enable-mysqlnd \
--with-mysql=/application/mysql \
--with-pdo-mysql=mysqlnd \
--with-iconv-dir=/usr/local/libiconv \
--with-freetype-dir \
--with-jpeg-dir \
--with-png-dir \
--with-zlib \
--with-libxml-dir=/usr \
--enable-xml \
--disable-rpath \
--enable-bcmath \
--enable-shmop \
--enable-sysvsem \
--enable-inline-optimization \
--with-curl \
--enable-mbregex \
--enable-fpm \
--enable-mbstring \
--with-gd \
--with-openssl \
--with-mhash \
--enable-pcntl \
--enable-sockets \
--with-xmlrpc \
--enable-soap \
--enable-short-tags \
--enable-static \
--with-xsl \
--with-fpm-user=nginx \
--with-fpm-group=nginx \
--enable-ftp \
--enable-opcache=no预防报错预先配置
php配置
文章标题:Centos 中 PHP安装方法步骤
文章链接:http://soscw.com/index.php/essay/71583.html