Skip to content

Commit

Permalink
feat: Update lnmp from OneinStack
Browse files Browse the repository at this point in the history
  • Loading branch information
bypanelcom committed Feb 27, 2023
1 parent 6c1d16e commit 903c5e6
Show file tree
Hide file tree
Showing 31 changed files with 437 additions and 232 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Script properties:
- Source compiler installation, most stable source is the latest version, and download from the official site
- Some security optimization
- Providing a plurality of database versions (MySQL-8.0, MySQL-5.7, MySQL-5.6, MySQL-5.5, MariaDB-10.5, MariaDB-10.4, MariaDB-10.3, MariaDB-5.5, Percona-8.0, Percona-5.7, Percona-5.6, Percona-5.5, PostgreSQL, MongoDB)
- Providing multiple PHP versions (PHP-8.1, PHP-8.0, PHP-7.4, PHP-7.3, PHP-7.2, PHP-7.1, PHP-7.0, PHP-5.6, PHP-5.5, PHP-5.4, PHP-5.3)
- Providing multiple PHP versions (PHP-8.2, PHP-8.1, PHP-8.0, PHP-7.4, PHP-7.3, PHP-7.2, PHP-7.1, PHP-7.0, PHP-5.6, PHP-5.5, PHP-5.4, PHP-5.3)
- Provide Nginx, Tengine, OpenResty, Apache and ngx_lua_waf
- Providing a plurality of Tomcat version (Tomcat-10, Tomcat-9, Tomcat-8, Tomcat-7)
- Providing a plurality of JDK version (OpenJDK-8, OpenJDK-11)
Expand Down
3 changes: 3 additions & 0 deletions addons.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ oneinstack_dir=$(dirname "`readlink -f $0`")
# shellcheck disable=SC2164
pushd ${oneinstack_dir} > /dev/null

# get the out ip country
OUTIP_STATE=$(./include/ois.${ARCH} ip_state)

. ./versions.txt
. ./options.conf
. ./include/color.sh
Expand Down
2 changes: 1 addition & 1 deletion backup_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ if [ -n "`echo ${desc_bk} | grep -w 3`" ]; then
[ "${Location}" == '22' ] && Host=oss-eu-west-1-internal.aliyuncs.com
[ "${Location}" == '23' ] && Host=oss-me-east-1-internal.aliyuncs.com
[ "${Location}" == '24' ] && Host=oss-ap-southeast-6-internal.aliyuncs.com
[ "$(./include/check_port.py ${Host} 80)" == "False" ] && Host=`echo ${Host} | sed 's@-internal@@g'`
[ "$(./include/ois.${ARCH} conn_port --host ${Host} --port 80)" == "false" ] && Host=`echo ${Host} | sed 's@-internal@@g'`
[ -e "/root/.ossutilconfig" ] && rm -f /root/.ossutilconfig
while :; do echo
read -e -p "Please enter the aliyun oss Access Key ID: " KeyID
Expand Down
51 changes: 27 additions & 24 deletions include/check_download.sh
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,15 @@ checkDownload() {
[[ "${db_option}" =~ ^[2,5,6,7]$|^10$ ]] && boost_ver=${boost_oldver}
[[ "${db_option}" =~ ^9$ ]] && boost_ver=${boost_percona_ver}
echo "Download boost..."
[ "${IPADDR_COUNTRY}"x == "CN"x ] && DOWN_ADDR_BOOST=${mirrorLink} || DOWN_ADDR_BOOST=https://downloads.sourceforge.net/project/boost/boost/${boost_ver}
[ "${OUTIP_STATE}"x == "China"x ] && DOWN_ADDR_BOOST=${mirrorLink} || DOWN_ADDR_BOOST=https://downloads.sourceforge.net/project/boost/boost/${boost_ver}
boostVersion2=$(echo ${boost_ver} | awk -F. '{print $1"_"$2"_"$3}')
src_url=${DOWN_ADDR_BOOST}/boost_${boostVersion2}.tar.gz && Download_src
fi

case "${db_option}" in
1)
# MySQL 8.0
if [ "${IPADDR_COUNTRY}"x == "CN"x ]; then
if [ "${OUTIP_STATE}"x == "China"x ]; then
DOWN_ADDR_MYSQL=https://cdn.mysql.com/Downloads/MySQL-8.0
DOWN_ADDR_MYSQL_BK=https://repo.huaweicloud.com/mysql/Downloads/MySQL-8.0
DOWN_ADDR_MYSQL_BK2=https://mirrors.tuna.tsinghua.edu.cn/mysql/downloads/MySQL-8.0
Expand Down Expand Up @@ -142,7 +142,7 @@ checkDownload() {
;;
2)
# MySQL 5.7
if [ "${IPADDR_COUNTRY}"x == "CN"x ]; then
if [ "${OUTIP_STATE}"x == "China"x ]; then
DOWN_ADDR_MYSQL=https://cdn.mysql.com/Downloads/MySQL-5.7
DOWN_ADDR_MYSQL_BK=https://repo.huaweicloud.com/mysql/Downloads/MySQL-5.7
DOWN_ADDR_MYSQL_BK2=https://mirrors.tuna.tsinghua.edu.cn/mysql/downloads/MySQL-5.7
Expand Down Expand Up @@ -177,7 +177,7 @@ checkDownload() {
;;
3)
# MySQL 5.6
if [ "${IPADDR_COUNTRY}"x == "CN"x ]; then
if [ "${OUTIP_STATE}"x == "China"x ]; then
DOWN_ADDR_MYSQL=https://mirrors.aliyun.com/mysql/MySQL-5.6
DOWN_ADDR_MYSQL_BK=https://mirrors.tuna.tsinghua.edu.cn/mysql/downloads/MySQL-5.6
DOWN_ADDR_MYSQL_BK2=https://repo.huaweicloud.com/mysql/Downloads/MySQL-5.6
Expand Down Expand Up @@ -212,7 +212,7 @@ checkDownload() {
;;
4)
# MySQL 5.5
if [ "${IPADDR_COUNTRY}"x == "CN"x ]; then
if [ "${OUTIP_STATE}"x == "China"x ]; then
DOWN_ADDR_MYSQL=https://mirrors.aliyun.com/mysql/MySQL-5.5
DOWN_ADDR_MYSQL_BK=https://mirrors.tuna.tsinghua.edu.cn/mysql/downloads/MySQL-5.5
DOWN_ADDR_MYSQL_BK2=https://repo.huaweicloud.com/mysql/Downloads/MySQL-5.5
Expand Down Expand Up @@ -270,7 +270,7 @@ checkDownload() {
FILE_TYPE=source
fi

if [ "${IPADDR_COUNTRY}"x == "CN"x ]; then
if [ "${OUTIP_STATE}"x == "China"x ]; then
DOWN_ADDR_MARIADB=https://mirrors.tuna.tsinghua.edu.cn/mariadb/mariadb-${mariadb_ver}/${FILE_TYPE}
DOWN_ADDR_MARIADB_BK=https://mirrors.ustc.edu.cn/mariadb/mariadb-${mariadb_ver}/${FILE_TYPE}
else
Expand Down Expand Up @@ -303,12 +303,12 @@ checkDownload() {
# Percona 8.0
if [ "${dbinstallmethod}" == '1' ]; then
echo "Download Percona 8.0 binary package..."
FILE_NAME=Percona-Server-${percona80_ver}-Linux.x86_64.glibc2.27.tar.gz
FILE_NAME=Percona-Server-${percona80_ver}-Linux.x86_64.glibc2.28.tar.gz
DOWN_ADDR_PERCONA=https://downloads.percona.com/downloads/Percona-Server-8.0/Percona-Server-${percona80_ver}/binary/tarball
elif [ "${dbinstallmethod}" == '2' ]; then
echo "Download Percona 8.0 source package..."
FILE_NAME=percona-server-${percona80_ver}.tar.gz
if [ "${IPADDR_COUNTRY}"x == "CN"x ]; then
if [ "${OUTIP_STATE}"x == "China"x ]; then
DOWN_ADDR_PERCONA=${mirrorLink}
else
DOWN_ADDR_PERCONA=https://downloads.percona.com/downloads/Percona-Server-8.0/Percona-Server-${percona80_ver}/source/tarball
Expand All @@ -335,12 +335,12 @@ checkDownload() {
# Precona 5.7
if [ "${dbinstallmethod}" == '1' ]; then
echo "Download Percona 5.7 binary package..."
FILE_NAME=Percona-Server-${percona57_ver}-Linux.x86_64.glibc2.12.tar.gz
FILE_NAME=Percona-Server-${percona57_ver}-Linux.x86_64.glibc2.17.tar.gz
DOWN_ADDR_PERCONA=https://downloads.percona.com/downloads/Percona-Server-5.7/Percona-Server-${percona57_ver}/binary/tarball
elif [ "${dbinstallmethod}" == '2' ]; then
echo "Download Percona 5.7 source package..."
FILE_NAME=percona-server-${percona57_ver}.tar.gz
if [ "${IPADDR_COUNTRY}"x == "CN"x ]; then
if [ "${OUTIP_STATE}"x == "China"x ]; then
DOWN_ADDR_PERCONA=${mirrorLink}
else
DOWN_ADDR_PERCONA=https://downloads.percona.com/downloads/Percona-Server-5.7/Percona-Server-${percona57_ver}/source/tarball
Expand Down Expand Up @@ -373,7 +373,7 @@ checkDownload() {
elif [ "${dbinstallmethod}" == '2' ]; then
echo "Download Percona 5.6 source package..."
FILE_NAME=percona-server-${percona56_ver}.tar.gz
if [ "${IPADDR_COUNTRY}"x == "CN"x ]; then
if [ "${OUTIP_STATE}"x == "China"x ]; then
DOWN_ADDR_PERCONA=${mirrorLink}
else
DOWN_ADDR_PERCONA=https://downloads.percona.com/downloads/Percona-Server-5.6/Percona-Server-${percona56_ver}/source/tarball
Expand Down Expand Up @@ -406,7 +406,7 @@ checkDownload() {
elif [ "${dbinstallmethod}" == '2' ]; then
echo "Download Percona 5.5 source package..."
FILE_NAME=percona-server-${percona55_ver}.tar.gz
if [ "${IPADDR_COUNTRY}"x == "CN"x ]; then
if [ "${OUTIP_STATE}"x == "China"x ]; then
DOWN_ADDR_PERCONA=${mirrorLink}
else
DOWN_ADDR_PERCONA=https://downloads.percona.com/downloads/Percona-Server-5.5/Percona-Server-${percona55_ver}/source/tarball
Expand All @@ -431,7 +431,7 @@ checkDownload() {
;;
13)
FILE_NAME=postgresql-${pgsql_ver}.tar.gz
if [ "${IPADDR_COUNTRY}"x == "CN"x ]; then
if [ "${OUTIP_STATE}"x == "China"x ]; then
DOWN_ADDR_PGSQL=https://mirrors.tuna.tsinghua.edu.cn/postgresql/source/v${pgsql_ver}
DOWN_ADDR_PGSQL_BK=https://mirrors.ustc.edu.cn/postgresql/source/v${pgsql_ver}
else
Expand All @@ -457,7 +457,7 @@ checkDownload() {
# MongoDB
echo "Download MongoDB binary package..."
FILE_NAME=mongodb-linux-x86_64-${mongodb_ver}.tgz
if [ "${IPADDR_COUNTRY}"x == "CN"x ]; then
if [ "${OUTIP_STATE}"x == "China"x ]; then
DOWN_ADDR_MongoDB=${mirrorLink}
else
DOWN_ADDR_MongoDB=https://fastdl.mongodb.org/linux
Expand All @@ -481,7 +481,7 @@ checkDownload() {
fi

# PHP
if [[ "${php_option}" =~ ^[1-9]$|^1[0-1]$ ]] || [[ "${mphp_ver}" =~ ^5[3-6]$|^7[0-4]$|^8[0-1]$ ]]; then
if [[ "${php_option}" =~ ^[1-9]$|^1[0-2]$ ]] || [[ "${mphp_ver}" =~ ^5[3-6]$|^7[0-4]$|^8[0-2]$ ]]; then
echo "PHP common..."
src_url=${mirrorLink}/libiconv-${libiconv_ver}.tar.gz && Download_src
src_url=https://curl.haxx.se/download/curl-${curl_ver}.tar.gz && Download_src
Expand Down Expand Up @@ -531,6 +531,11 @@ checkDownload() {
src_url=https://mirrors.linuxeye.com/oneinstack/src/argon2-${argon2_ver}.tar.gz && Download_src
src_url=https://mirrors.linuxeye.com/oneinstack/src/libsodium-${libsodium_ver}.tar.gz && Download_src
src_url=https://mirrors.linuxeye.com/oneinstack/src/libzip-${libzip_ver}.tar.gz && Download_src
elif [ "${php_option}" == '12' ] || [ "${mphp_ver}" == '82' ]; then
src_url=https://secure.php.net/distributions/php-${php82_ver}.tar.gz && Download_src
src_url=https://mirrors.linuxeye.com/oneinstack/src/argon2-${argon2_ver}.tar.gz && Download_src
src_url=https://mirrors.linuxeye.com/oneinstack/src/libsodium-${libsodium_ver}.tar.gz && Download_src
src_url=https://mirrors.linuxeye.com/oneinstack/src/libzip-${libzip_ver}.tar.gz && Download_src
fi

# PHP OPCache
Expand Down Expand Up @@ -632,10 +637,6 @@ checkDownload() {
if [ "${redis_flag}" == 'y' ]; then
echo "Download redis-server..."
src_url=https://download.redis.io/releases/redis-${redis_ver}.tar.gz && Download_src
if [ "${PM}" == 'yum' ]; then
echo "Download start-stop-daemon.c for RHEL..."
src_url=${mirrorLink}/start-stop-daemon.c && Download_src
fi
fi

# pecl_redis
Expand All @@ -652,7 +653,7 @@ checkDownload() {
# memcached-server
if [ "${memcached_flag}" == 'y' ]; then
echo "Download memcached-server..."
[ "${IPADDR_COUNTRY}"x == "CN"x ] && DOWN_ADDR=${mirrorLink} || DOWN_ADDR=https://www.memcached.org/files
[ "${OUTIP_STATE}"x == "China"x ] && DOWN_ADDR=${mirrorLink} || DOWN_ADDR=https://www.memcached.org/files
src_url=${DOWN_ADDR}/memcached-${memcached_ver}.tar.gz && Download_src
fi

Expand All @@ -672,11 +673,13 @@ checkDownload() {
# memcached-server pecl_memcached pecl_memcache
if [ "${pecl_memcache}" == '1' ]; then
if [[ "${php_option}" =~ ^[1-4]$ ]]; then
echo "Download pecl_memcache for php..."
echo "Download pecl_memcache for php 5.x..."
src_url=https://pecl.php.net/get/memcache-3.0.8.tgz && Download_src
elif [[ "${php_option}" =~ ^[5-9]$ ]]; then
echo "Download pecl_memcache for php 7.x..."
src_url=https://pecl.php.net/get/memcache-${pecl_memcache_oldver}.tgz && Download_src
else
echo "Download pecl_memcache for php 7.x..."
# src_url=https://codeload.github.com/websupport-sk/pecl-memcache/zip/php7 && Download_src
echo "Download pecl_memcache for php 8.x..."
src_url=https://pecl.php.net/get/memcache-${pecl_memcache_ver}.tgz && Download_src
fi
fi
Expand All @@ -692,7 +695,7 @@ checkDownload() {
# nodejs
if [ "${nodejs_flag}" == 'y' ]; then
echo "Download Nodejs..."
[ "${IPADDR_COUNTRY}"x == "CN"x ] && DOWN_ADDR_NODE=https://mirrors.tuna.tsinghua.edu.cn/nodejs-release || DOWN_ADDR_NODE=https://nodejs.org/dist
[ "${OUTIP_STATE}"x == "China"x ] && DOWN_ADDR_NODE=https://mirrors.tuna.tsinghua.edu.cn/nodejs-release || DOWN_ADDR_NODE=https://nodejs.org/dist
src_url=${DOWN_ADDR_NODE}/v${nodejs_ver}/node-v${nodejs_ver}-linux-${SYS_ARCH_n}.tar.gz && Download_src
fi

Expand Down
47 changes: 26 additions & 21 deletions include/check_os.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,37 +17,42 @@ fi

# Get OS Version
Platform=${ID,,}
VERSION_ID=${VERSION_ID%%.*}
VERSION_MAIN_ID=${VERSION_ID%%.*}
ARCH=$(arch)
if [[ "${Platform}" =~ ^centos$|^rhel$|^almalinux$|^rocky$|^fedora$|^amzn$|^ol$|^alinux$|^anolis$|^tencentos$|^euleros$|^openeuler$|^kylin$ ]]; then
if [[ "${Platform}" =~ ^centos$|^rhel$|^almalinux$|^rocky$|^fedora$|^amzn$|^ol$|^alinux$|^anolis$|^tencentos$|^euleros$|^openeuler$|^kylin$|^uos$|^kylinsecos$ ]]; then
PM=yum
Family=rhel
RHEL_ver=${VERSION_ID}
RHEL_ver=${VERSION_MAIN_ID}
if [[ "${Platform}" =~ ^centos$ ]]; then
if [ "${VERSION_ID}" == '6' ]; then
if [ "${VERSION_MAIN_ID}" == '6' ]; then
sed -i "s@centos/\$releasever@centos-vault/6.10@g" /etc/yum.repos.d/CentOS-Base.repo
sed -i 's@centos/RPM-GPG@centos-vault/RPM-GPG@g' /etc/yum.repos.d/CentOS-Base.repo
[ -e /etc/yum.repos.d/epel.repo ] && rm -f /etc/yum.repos.d/epel.repo
fi
elif [[ "${Platform}" =~ ^fedora$ ]]; then
Fedora_ver=${VERSION_ID}
[ ${VERSION_ID} -ge 19 ] && [ ${VERSION_ID} -lt 28 ] && RHEL_ver=7
[ ${VERSION_ID} -ge 28 ] && [ ${VERSION_ID} -lt 34 ] && RHEL_ver=8
[ ${VERSION_ID} -ge 34 ] && RHEL_ver=9
Fedora_ver=${VERSION_MAIN_ID}
[ ${VERSION_MAIN_ID} -ge 19 ] && [ ${VERSION_MAIN_ID} -lt 28 ] && RHEL_ver=7
[ ${VERSION_MAIN_ID} -ge 28 ] && [ ${VERSION_MAIN_ID} -lt 34 ] && RHEL_ver=8
[ ${VERSION_MAIN_ID} -ge 34 ] && RHEL_ver=9
elif [[ "${Platform}" =~ ^amzn$|^alinux$|^tencentos$|^euleros$ ]]; then
[[ "${VERSION_ID}" =~ ^2$ ]] && RHEL_ver=7
[[ "${VERSION_ID}" =~ ^3$ ]] && RHEL_ver=8
[[ "${VERSION_MAIN_ID}" =~ ^2$ ]] && RHEL_ver=7
[[ "${VERSION_MAIN_ID}" =~ ^3$ ]] && RHEL_ver=8
elif [[ "${Platform}" =~ ^openeuler$ ]]; then
[[ "${RHEL_ver}" =~ ^20$ ]] && RHEL_ver=7
[[ "${RHEL_ver}" =~ ^2[1,2]$ ]] && RHEL_ver=8
elif [[ "${Platform}" =~ ^kylin$ ]]; then
[[ "${RHEL_ver}" =~ ^V10$ ]] && RHEL_ver=7
elif [[ "${Platform}" =~ ^uos$ ]]; then
[[ "${RHEL_ver}" =~ ^20$ ]] && RHEL_ver=8
elif [[ "${Platform}" =~ ^kylinsecos$ ]]; then
[[ "${VERSION_ID}" =~ ^3.4 ]] && RHEL_ver=7
[[ "${VERSION_ID}" =~ ^3.5 ]] && RHEL_ver=8
fi
elif [[ "${Platform}" =~ ^debian$|^deepin$|^uos$|^kali$ ]]; then
elif [[ "${Platform}" =~ ^debian$|^deepin$|^kali$ ]]; then
PM=apt-get
Family=debian
Debian_ver=${VERSION_ID}
if [[ "${Platform}" =~ ^deepin$|^uos$ ]]; then
Debian_ver=${VERSION_MAIN_ID}
if [[ "${Platform}" =~ ^deepin$ ]]; then
[[ "${Debian_ver}" =~ ^20$ ]] && Debian_ver=10
[[ "${Debian_ver}" =~ ^23$ ]] && Debian_ver=11
elif [[ "${Platform}" =~ ^kali$ ]]; then
Expand All @@ -56,16 +61,16 @@ elif [[ "${Platform}" =~ ^debian$|^deepin$|^uos$|^kali$ ]]; then
elif [[ "${Platform}" =~ ^ubuntu$|^linuxmint$|^elementary$ ]]; then
PM=apt-get
Family=ubuntu
Ubuntu_ver=${VERSION_ID}
Ubuntu_ver=${VERSION_MAIN_ID}
if [[ "${Platform}" =~ ^linuxmint$ ]]; then
[[ "${VERSION_ID}" =~ ^18$ ]] && Ubuntu_ver=16
[[ "${VERSION_ID}" =~ ^19$ ]] && Ubuntu_ver=18
[[ "${VERSION_ID}" =~ ^20$ ]] && Ubuntu_ver=20
[[ "${VERSION_ID}" =~ ^21$ ]] && Ubuntu_ver=22
[[ "${VERSION_MAIN_ID}" =~ ^18$ ]] && Ubuntu_ver=16
[[ "${VERSION_MAIN_ID}" =~ ^19$ ]] && Ubuntu_ver=18
[[ "${VERSION_MAIN_ID}" =~ ^20$ ]] && Ubuntu_ver=20
[[ "${VERSION_MAIN_ID}" =~ ^21$ ]] && Ubuntu_ver=22
elif [[ "${Platform}" =~ ^elementary$ ]]; then
[[ "${VERSION_ID}" =~ ^5$ ]] && Ubuntu_ver=18
[[ "${VERSION_ID}" =~ ^6$ ]] && Ubuntu_ver=20
[[ "${VERSION_ID}" =~ ^7$ ]] && Ubuntu_ver=22
[[ "${VERSION_MAIN_ID}" =~ ^5$ ]] && Ubuntu_ver=18
[[ "${VERSION_MAIN_ID}" =~ ^6$ ]] && Ubuntu_ver=20
[[ "${VERSION_MAIN_ID}" =~ ^7$ ]] && Ubuntu_ver=22
fi
else
echo "${CFAILURE}Does not support this OS ${CEND}"
Expand Down
13 changes: 0 additions & 13 deletions include/check_port.py

This file was deleted.

4 changes: 2 additions & 2 deletions include/check_sw.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ installDepsRHEL() {
[ -z "`grep -w epel /etc/yum.repos.d/*.repo`" ] && yum -y install epel-release
if grep -qw "^\[PowerTools\]" /etc/yum.repos.d/*.repo; then
dnf -y --enablerepo=PowerTools install chrony oniguruma-devel rpcgen
else
elif grep -qw "^\[powertools\]" /etc/yum.repos.d/*.repo; then
dnf -y --enablerepo=powertools install chrony oniguruma-devel rpcgen
fi
fi
Expand All @@ -87,7 +87,7 @@ installDepsRHEL() {

echo "${CMSG}Installing dependencies packages...${CEND}"
# Install needed packages
pkgList="perl-FindBin deltarpm drpm gcc gcc-c++ make cmake autoconf libjpeg libjpeg-devel libjpeg-turbo libjpeg-turbo-devel libpng libpng-devel libxml2 libxml2-devel zlib zlib-devel libzip libzip-devel glibc glibc-devel krb5-devel libc-client libc-client-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel libaio numactl numactl-libs readline-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5-devel libidn libidn-devel openssl openssl-devel net-tools libxslt-devel libicu-devel libevent-devel libtool libtool-ltdl bison gd-devel vim-enhanced pcre-devel libmcrypt libmcrypt-devel mhash mhash-devel mcrypt zip unzip chrony sqlite-devel sysstat patch bc expect expat-devel perl-devel oniguruma oniguruma-devel libtirpc-devel nss libnsl rsync rsyslog git lsof lrzsz psmisc wget which libatomic tmux chkconfig firewalld"
pkgList="perl-FindBin deltarpm drpm gcc gcc-c++ make cmake autoconf libjpeg libjpeg-devel libjpeg-turbo libjpeg-turbo-devel libpng libpng-devel libxml2 libxml2-devel zlib zlib-devel libzip libzip-devel glibc glibc-devel krb5-devel libc-client libc-client-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel ncurses-compat-libs libaio numactl numactl-libs readline-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5-devel libidn libidn-devel openssl openssl-devel net-tools libxslt-devel libicu-devel libevent-devel libtool libtool-ltdl bison gd-devel vim-enhanced pcre-devel libmcrypt libmcrypt-devel mhash mhash-devel mcrypt zip unzip chrony oniguruma-devel rpcgen sqlite-devel sysstat patch bc expect expat-devel perl-devel oniguruma oniguruma-devel libtirpc-devel nss libnsl rsync rsyslog git lsof lrzsz psmisc wget which libatomic tmux chkconfig firewalld"
for Package in ${pkgList}; do
yum -y install ${Package}
done
Expand Down
5 changes: 1 addition & 4 deletions include/composer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@ Install_composer() {
echo "${CWARNING}PHP Composer already installed! ${CEND}"
else
pushd ${oneinstack_dir}/src > /dev/null
# get the IP information
PUBLIC_IPADDR=$(../include/get_public_ipaddr.py)
IPADDR_COUNTRY=$(../include/get_ipaddr_state.py ${PUBLIC_IPADDR})
if [ "${IPADDR_COUNTRY}"x == "CN"x ]; then
if [ "${OUTIP_STATE}"x == "China"x ]; then
wget -c https://mirrors.aliyun.com/composer/composer.phar -O /usr/local/bin/composer > /dev/null 2>&1
${php_install_dir}/bin/php /usr/local/bin/composer config -g repo.packagist composer https://packagist.phpcomposer.com
else
Expand Down
2 changes: 1 addition & 1 deletion include/demo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
DEMO() {
pushd ${oneinstack_dir}/src > /dev/null
if [ ! -e ${wwwroot_dir}/default/index.html ]; then
[ "${IPADDR_COUNTRY}"x == "CN"x ] && /bin/cp ${oneinstack_dir}/config/index_cn.html ${wwwroot_dir}/default/index.html || /bin/cp ${oneinstack_dir}/config/index.html ${wwwroot_dir}/default
[ "${OUTIP_STATE}"x == "China"x ] && /bin/cp ${oneinstack_dir}/config/index_cn.html ${wwwroot_dir}/default/index.html || /bin/cp ${oneinstack_dir}/config/index.html ${wwwroot_dir}/default
fi

if [ -e "${php_install_dir}/bin/php" ]; then
Expand Down
23 changes: 0 additions & 23 deletions include/get_ipaddr.py

This file was deleted.

Loading

0 comments on commit 903c5e6

Please sign in to comment.