Shell学习成果之一键自动安装PHP7.3

瘦欲@ 提交于 2019-12-05 02:33:14

系统:CentOS7.7.1908

PHP:

*********************************************************************START****************************************************************************

#!/bin/bash
#auto install php
#by 网络虾米哥 2019-11-20

yum -y install gcc gcc-c++ make zlib zlib-devel pcre pcre-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers

wget -c http://mirrors.sohu.com/php/php-7.3.9.tar.bz2 && tar -jxvf php-7.3.9.tar.bz2 && cd php-7.3.9 &&./configure --prefix=/usr/local/php7 --with-config-file-path=/usr/local/php7/etc

if [ $? -eq 0 ];then
        make &&make install
        echo -e "\033[32mThe php server isntall successfully!\033[0m"
else
        echo -e "\033[32mThe php server install Failed,Please check it.\033[0m"
        exit
fi

************************************************************************END***************************************************************************

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!