分享web开发知识

注册/登录|最近发布|今日推荐

主页 IT知识网页技术软件开发前端开发代码编程运营维护技术分享教程案例
当前位置:首页 > 技术分享

一键安装php5.6.40脚本

发布时间:2023-09-06 02:35责任编辑:白小东关键词:暂无标签
#!/bin/bash#安装依赖软件yum -y install libxml2-devel curl-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel net-snmp net-snmp-devel#安装libiconv-1.14(下面使用sed增加2行,不增加会报错,详细查看www.cnblogs.com/blog-tim/p/10537708.html)cd /usr/local/src/wget -c http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gztar -xf libiconv-1.14.tar.gz sed -i ‘697a #if defined(__GLIBC__) && !defined(__UCLIBC__) && !__GLIBC_PREREQ(2, 16)‘ /usr/local/src/libiconv-1.14/srclib/stdio.in.hsed -i ‘699a #endif‘ /usr/local/src/libiconv-1.14/srclib/stdio.in.hcd libiconv-1.14./configure --prefix=/usr/local/php/libiconv && make && make install#安装libmcrypt-2.5.8cd /usr/local/src/wget -c http://nchc.dl.sourceforge.net/project/mcrypt/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.gztar -xf libmcrypt-2.5.8.tar.gzcd libmcrypt-2.5.8./configure && make && make install/sbin/ldconfig && cd libltdl/./configure --enable-ltdl-install && make && make install#安装mhash-0.9.9.9cd /usr/local/src/wget -c http://nchc.dl.sourceforge.net/project/mhash/mhash/0.9.9.9/mhash-0.9.9.9.tar.gztar -xf mhash-0.9.9.9.tar.gzcd mhash-0.9.9.9./configure && make && make install#安装mcrypt-2.6.8cd /usr/local/src/wget -c http://nchc.dl.sourceforge.net/project/mcrypt/MCrypt/2.6.8/mcrypt-2.6.8.tar.gztar -xf mcrypt-2.6.8.tar.gzcd mcrypt-2.6.8/sbin/ldconfig && export LD_LIBRARY_PATH=/usr/local/lib: LD_LIBRARY_PATH./configure && make && make install#编译安装php-5.6.40cd /usr/local/src/wget -c http://jp2.php.net/distributions/php-5.6.40.tar.gztar -xf php-5.6.40.tar.gzcd php-5.6.40./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-iconv=/usr/local/php/libiconv --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-gd --with-jpeg-dir --with-png-dir --with-pear --with-freetype-dir --with-zlib --with-libxml-dir --with-iconv-dir --with-xmlrpc --with-mhash --with-mcrypt --with-curl --with-openssl --with-snmp --with-gettext --enable-pdo --enable-mbstring --enable-ctype --enable-simplexml --enable-ftp --enable-sockets --enable-gd-native-ttf --enable-sysvsem --enable-exif --enable-sysvshm --enable-xml --enable-dom --enable-simplexml --enable-shmop --enable-zip --enable-mbregex --enable-bcmath --enable-inline-optimization --enable-soapmake && make install#配置php和环境变量,关闭httpd服务cp php.ini-production /usr/local/php/etc/php.iniecho "export PATH=/usr/local/php/bin:$PATH" >>/etc/profilesource /etc/profilekillall -9 httpd#配置php首页,然后重新启动httpd服务rm -f /var/www/html/index.htmlcat > /var/www/html/index.php << EOF<?phpphpinfo()?>EOF/usr/local/apache/bin/apachectl start

一键安装php5.6.40脚本

原文地址:https://www.cnblogs.com/blog-tim/p/10538573.html

知识推荐

我的编程学习网——分享web前端后端开发技术知识。 垃圾信息处理邮箱 tousu563@163.com 网站地图
icp备案号 闽ICP备2023006418号-8 不良信息举报平台 互联网安全管理备案 Copyright 2023 www.wodecom.cn All Rights Reserved