#/bin/bash
#version:1.0
#email:2293558627@qq.com
PHP_PATH=/usr/local/php
LIBZIP_PATH=/usr/local/libzip
DOWNLOAD_PATH=/usr/local/src
LIBZIP_NAME=/usr/local/src/libzip
PHP_NAME=/usr/local/src/php
profile_fist () {
echo "<========>install rely<========>"
yum -y install gcc gcc-c++ gd gd-devel libxml2-devel unzip sqlite-devel libcurl libcurl-devel oniguruma-devel pcre-devel perl perl-devel bison-devel re2c wget vim
id www > /dev/null 2>&1
if [ $? -eq 0 ] ; then
echo "user www existence"
else
useradd www -s /sbin/nologin
fi
}
profile_sencd() {
cd $DOWNLOAD_PATH
echo "<========download libzip-1.2.0========>"
wget https://libzip.org/download/libzip-1.2.0.tar.gz --no-check-certificate
echo "<========>download php-7.4.24<========>"
wget https://www.php.net/distributions/php-7.4.24.tar.gz
echo "<========>Decompressing please wilt<========>"
tar -xf libzip-1.2.0.tar.gz
mv libzip-1.2.0 libzip
tar -xf php-7.4.24.tar.gz
mv php-7.4.24 php
}
install_libzip () {
cd $LIBZIP_NAME
echo "<========>configure ing......<========>"
./configure --prefix=${LIBZIP_PATH}
sleep 10
echo "<========>makeing......<========>"
make && make install
if [ $? -eq 0 ] ; then
echo "<========>install libzip success<========>"
else
echo "<========>install libzip fail<========>"
exit 1;
fi
echo "export PKG_CONFIG_PATH=${LIBZIP_PATH}/lib/pkgconfig/" >> /etc/profile && source /etc/profile
}
install_php () {
cd $PHP_NAME
echo "<========>configure ing......<========>"
./configure --prefix=${PHP_PATH} --with-fpm-user=www --with-fpm-group=www --with-zlib --with-pdo-mysql=mysqlnd --enable-mysqlnd --with-curl --with-jpeg --with-xpm --enable-fpm --enable-ftp --enable-gd --enable-mbstring --enable-sockets --with-zip --with-pcre-jit
sleep 10
echo "<========>makeing......<========>"
make && make install
if [ $? -eq 0 ] ; then
echo "<========>install php success<========>"
else
echo "<========>install php fail<========>"
exit 1;
fi
}
profile_fist
profile_sencd
install_libzip
install_php
php
原创
©著作权归作者所有:来自51CTO博客作者全能动作X的原创作品,请联系作者获取转载授权,否则将追究法律责任
上一篇:telnet端口脚本
下一篇:初始化环境脚本
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
php后门,php木马
地球免杀王收费破解版php木马,无后门开源代码。
php后门 php免杀后门 -
php 如何添加php扩展
在 Windows 上有两种加载 PHP 扩展的方式:1 把扩展编译进 PHP
php 扩展 加载 linux -
java注解里面不能调用静态函数
前言 java反射和注解在java里面很重要,但是很多人对这方面的知识理解不是很好,我来说说我自己对java反射和注解的理解,这两块内容本来应该出在一个博客文章里面讲解,但是由于我的java反射说的内容有点小多,然后我就分开将讲解一下。目录注解的概念注解的类别注解用法通过反射获取注解反射注解一起使用拼写SQL语句实战演练注解的概念java注解:比较官方的说法:从
java注解里面不能调用静态函数 java case用法 java resume过时方法 java 实体类 临时注解 java 注解