Skip to content

Commit c8ea335

Browse files
committedApr 5, 2022
[feat] Update lnmp from OneinStack
1 parent 4854e28 commit c8ea335

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+343
-482
lines changed
 

‎README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[![PayPal donate button](https://img.shields.io/badge/paypal-donate-green.svg)](https://paypal.me/yeho) [![支付宝捐助按钮](https://img.shields.io/badge/%E6%94%AF%E4%BB%98%E5%AE%9D-%E5%90%91TA%E6%8D%90%E5%8A%A9-green.svg)](https://static.oneinstack.com/images/alipay.png) [![微信捐助按钮](https://img.shields.io/badge/%E5%BE%AE%E4%BF%A1-%E5%90%91TA%E6%8D%90%E5%8A%A9-green.svg)](https://static.oneinstack.com/images/weixin.png)
22

3-
This script is written using the shell, in order to quickly deploy `LEMP`/`LAMP`/`LNMP`/`LNMPA`/`LTMP`(Linux, Nginx/Tengine/OpenResty, MySQL in a production environment/MariaDB/Percona, PHP, JAVA), applicable to CentOS 7 ~ 8(including redhat,AlmaLinux,Rocky), Debian 8 ~ 11, Ubuntu 16 ~ 21, Fedora 27+ of 32 and 64.
3+
This script is written using the shell, in order to quickly deploy `LEMP`/`LAMP`/`LNMP`/`LNMPA`/`LTMP`(Linux, Nginx/Tengine/OpenResty, MySQL in a production environment/MariaDB/Percona, PHP, JAVA), applicable to CentOS 7 ~ 8(including redhat,AlmaLinux,Rocky), Debian 8 ~ 11, Ubuntu 16 ~ 21, Fedora 27+ of 64.
44

55
Script properties:
66
- Continually updated, Provide Shell Interaction and Autoinstall
@@ -10,7 +10,7 @@ Script properties:
1010
- 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)
1111
- Provide Nginx, Tengine, OpenResty, Apache and ngx_lua_waf
1212
- Providing a plurality of Tomcat version (Tomcat-10, Tomcat-9, Tomcat-8, Tomcat-7)
13-
- Providing a plurality of JDK version (JDK-11.0, JDK-1.8, JDK-1.7, JDK-1.6)
13+
- Providing a plurality of JDK version (OpenJDK-8, OpenJDK-11)
1414
- According to their needs to install PHP Cache Accelerator provides ZendOPcache, xcache, apcu, eAccelerator. And php extensions,include ZendGuardLoader,ionCube,SourceGuardian,imagick,gmagick,fileinfo,imap,ldap,calendar,phalcon,yaf,yar,redis,memcached,memcache,mongodb,swoole,xdebug
1515
- Installation Nodejs, Pureftpd, phpMyAdmin according to their needs
1616
- Install memcached, redis according to their needs

‎backup_setup.sh

+25-34
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,11 @@ fi
182182

183183
if [ -n "`echo ${desc_bk} | grep -w 3`" ]; then
184184
if [ ! -e "/usr/local/bin/ossutil" ]; then
185-
wget -qc https://gosspublic.alicdn.com/ossutil/1.7.8/ossutil${OS_BIT} -O /usr/local/bin/ossutil
185+
if [ "${armplatform}" == 'y' ]; then
186+
wget -qc https://gosspublic.alicdn.com/ossutil/1.7.10/ossutilarm64 -O /usr/local/bin/ossutil
187+
else
188+
wget -qc https://gosspublic.alicdn.com/ossutil/1.7.10/ossutil64 -O /usr/local/bin/ossutil
189+
fi
186190
chmod +x /usr/local/bin/ossutil
187191
fi
188192
while :; do echo
@@ -346,12 +350,12 @@ fi
346350

347351
if [ -n "`echo ${desc_bk} | grep -w 5`" ]; then
348352
if [ ! -e "/usr/local/bin/upx" ]; then
349-
if [ "${OS_BIT}" == '64' ]; then
353+
if [ "${armplatform}" == 'y' ]; then
354+
wget -qc http://collection.b0.upaiyun.com/softwares/upx/upx_0.3.6_linux_arm64.tar.gz -O /tmp/upx_0.3.6_linux_arm64.tar.gz
355+
tar xzf /tmp/upx_0.3.6_linux_arm64.tar.gz -C /tmp/
356+
else
350357
wget -qc http://collection.b0.upaiyun.com/softwares/upx/upx_0.3.6_linux_x86_64.tar.gz -O /tmp/upx_0.3.6_linux_x86_64.tar.gz
351358
tar xzf /tmp/upx_0.3.6_linux_x86_64.tar.gz -C /tmp/
352-
elif [ "${OS_BIT}" == '32' ]; then
353-
wget -qc http://collection.b0.upaiyun.com/softwares/upx/upx_0.3.6_linux_i386.tar.gz -O /tmp/upx_0.3.6_linux_i386.tar.gz
354-
tar xzf /tmp/upx_0.3.6_linux_i386.tar.gz -C /tmp/
355359
fi
356360
/bin/mv /tmp/upx /usr/local/bin/upx
357361
chmod +x /usr/local/bin/upx
@@ -379,21 +383,13 @@ if [ -n "`echo ${desc_bk} | grep -w 5`" ]; then
379383
fi
380384

381385
if [ -n "`echo ${desc_bk} | grep -w 6`" ]; then
382-
if [ ! -e "/usr/local/bin/qrsctl" ]; then
383-
if [ "${OS_BIT}" == '64' ]; then
384-
wget -qc http://devtools.qiniu.com/linux/amd64/qrsctl -O /usr/local/bin/qrsctl
385-
elif [ "${OS_BIT}" == '32' ]; then
386-
wget -qc http://devtools.qiniu.com/linux/386/qrsctl -O /usr/local/bin/qrsctl
387-
fi
388-
chmod +x /usr/local/bin/qrsctl
389-
fi
390386
if [ ! -e "/usr/local/bin/qshell" ]; then
391-
if [ "${OS_BIT}" == '64' ]; then
392-
wget -qc https://devtools.qiniu.com/qshell-v2.5.0-linux-amd64.tar.gz -O /tmp/qshell-v2.5.0-linux-amd64.tar.gz
393-
tar xzf /tmp/qshell-v2.5.0-linux-amd64.tar.gz -C /usr/local/bin/
394-
elif [ "${OS_BIT}" == '32' ]; then
395-
wget -qc https://devtools.qiniu.com/qshell-v2.5.0-linux-386.tar.gz -O /tmp/qshell-v2.5.0-linux-386.tar.gz
396-
tar xzf /tmp/qshell-v2.5.0-linux-386.tar.gz -C /usr/local/bin/
387+
if [ "${armplatform}" == 'y' ]; then
388+
wget -qc https://devtools.qiniu.com/qshell-v2.6.2-linux-arm64.tar.gz -O /tmp/qshell-v2.6.2-linux-arm64.tar.gz
389+
tar xzf /tmp/qshell-v2.6.2-linux-arm64.tar.gz -C /usr/local/bin/
390+
else
391+
wget -qc https://devtools.qiniu.com/qshell-v2.6.2-linux-amd64.tar.gz -O /tmp/qshell-v2.6.2-linux-amd64.tar.gz
392+
tar xzf /tmp/qshell-v2.6.2-linux-amd64.tar.gz -C /usr/local/bin/
397393
fi
398394
chmod +x /usr/local/bin/qshell
399395
rm -f /tmp/qshell*
@@ -402,20 +398,21 @@ if [ -n "`echo ${desc_bk} | grep -w 6`" ]; then
402398
echo 'Please select your backup qiniu datacenter:'
403399
echo -e "\t ${CMSG} 1${CEND}. 华东 ${CMSG}2${CEND}. 华北"
404400
echo -e "\t ${CMSG} 3${CEND}. 华南 ${CMSG}4${CEND}. 北美"
405-
echo -e "\t ${CMSG} 5${CEND}. 东南亚"
401+
echo -e "\t ${CMSG} 5${CEND}. 东南亚 ${CMSG}6${CEND}. 华东-浙江2"
406402
read -e -p "Please input a number:(Default 1 press Enter) " Location
407403
Location=${Location:-1}
408-
if [[ "${Location}" =~ ^[1-5]$ ]]; then
404+
if [[ "${Location}" =~ ^[1-6]$ ]]; then
409405
break
410406
else
411-
echo "${CWARNING}input error! Please only input number 1~5${CEND}"
407+
echo "${CWARNING}input error! Please only input number 1~6${CEND}"
412408
fi
413409
done
414410
[ "${Location}" == '1' ] && zone='z0'
415411
[ "${Location}" == '2' ] && zone='z1'
416412
[ "${Location}" == '3' ] && zone='z2'
417413
[ "${Location}" == '4' ] && zone='na0'
418414
[ "${Location}" == '5' ] && zone='as0'
415+
[ "${Location}" == '6' ] && zone='cn-east-2'
419416
while :; do echo
420417
read -e -p "Please enter the qiniu AccessKey: " AccessKey
421418
[ -z "${AccessKey}" ] && continue
@@ -427,21 +424,13 @@ if [ -n "`echo ${desc_bk} | grep -w 6`" ]; then
427424
[ -z "${QINIU_BUCKET}" ] && continue
428425
echo
429426
/usr/local/bin/qshell account ${AccessKey} ${SecretKey} backup
430-
/usr/local/bin/qrsctl login ${AccessKey} ${SecretKey}
431-
if /usr/local/bin/qrsctl bucketinfo ${QINIU_BUCKET} > /dev/null 2>&1; then
427+
if /usr/local/bin/qshell buckets | grep -w ${QINIU_BUCKET} > /dev/null 2>&1; then
432428
sed -i "s@^qiniu_bucket=.*@qiniu_bucket=${QINIU_BUCKET}@" ./options.conf
433-
echo "${CMSG}AccessKey/SecretKey OK${CEND}"
434-
echo
435-
break
436-
elif /usr/local/bin/qrsctl mkbucket ${QINIU_BUCKET} ${zone} > /dev/null 2>&1; then
437-
/usr/local/bin/qrsctl private ${QINIU_BUCKET} 1
438-
echo "${CMSG}Bucket ${QINIU_BUCKET} created${CEND}"
439-
sed -i "s@^qiniu_bucket=.*@qiniu_bucket=${QINIU_BUCKET}@" ./options.conf
440-
echo "${CMSG}AccessKey/SecretKey OK${CEND}"
429+
echo "${CMSG}AccessKey/SecretKey/Bucket OK${CEND}"
441430
echo
442431
break
443432
else
444-
echo "${CWARNING}input error! AccessKey/SecretKey invalid${CEND}"
433+
echo "${CWARNING}input error! AccessKey/SecretKey/Bucket invalid${CEND}"
445434
fi
446435
done
447436
fi
@@ -531,7 +520,9 @@ fi
531520

532521
if [ -n "`echo ${desc_bk} | grep -w 8`" ]; then
533522
if [ ! -e "/usr/local/bin/dbxcli" ]; then
534-
if [ "${OS_BIT}" == '64' ]; then
523+
if [ "${armplatform}" == 'y' ]; then
524+
wget -qc http://mirrors.linuxeye.com/oneinstack/src/dbxcli-linux-arm -O /usr/local/bin/dbxcli
525+
else
535526
wget -qc http://mirrors.linuxeye.com/oneinstack/src/dbxcli-linux-amd64 -O /usr/local/bin/dbxcli
536527
fi
537528
chmod +x /usr/local/bin/dbxcli

0 commit comments

Comments
 (0)
Please sign in to comment.