mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-10 01:39:25 +08:00
@@ -102,6 +102,7 @@ http
|
|||||||
|
|
||||||
server_tokens off;
|
server_tokens off;
|
||||||
access_log /dev/null;
|
access_log /dev/null;
|
||||||
|
more_set_headers "Server: mdserver-web";
|
||||||
|
|
||||||
include {$SERVER_PATH}/web_conf/nginx/vhost/*.conf;
|
include {$SERVER_PATH}/web_conf/nginx/vhost/*.conf;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,9 +9,9 @@ serverPath=$(dirname "$rootPath")
|
|||||||
sourcePath=${serverPath}/source
|
sourcePath=${serverPath}/source
|
||||||
sysName=`uname`
|
sysName=`uname`
|
||||||
|
|
||||||
version=8.3.29
|
version=8.3.30
|
||||||
PHP_VER=83
|
PHP_VER=83
|
||||||
md5_file_ok=f7950ca034b15a78f5de9f1b22f4d9bad1dd497114d175cb1672a4ca78077af5
|
md5_file_ok=67f084d36852daab6809561a7c8023d130ca07fc6af8fb040684dd1414934d48
|
||||||
Install_php()
|
Install_php()
|
||||||
{
|
{
|
||||||
#------------------------ install start ------------------------------------#
|
#------------------------ install start ------------------------------------#
|
||||||
|
|||||||
@@ -9,9 +9,9 @@ serverPath=$(dirname "$rootPath")
|
|||||||
sourcePath=${serverPath}/source
|
sourcePath=${serverPath}/source
|
||||||
sysName=`uname`
|
sysName=`uname`
|
||||||
|
|
||||||
version=8.4.16
|
version=8.4.20
|
||||||
PHP_VER=84
|
PHP_VER=84
|
||||||
md5_file_ok=f66f8f48db34e9e29f7bfd6901178e9cf4a1b163e6e497716dfcb8f88bcfae30
|
md5_file_ok=e454c6f7c89a42f41ebb06dc5c3578e8c8b5f1a3f0da6675665affab04e221f7
|
||||||
Install_php()
|
Install_php()
|
||||||
{
|
{
|
||||||
#------------------------ install start ------------------------------------#
|
#------------------------ install start ------------------------------------#
|
||||||
|
|||||||
@@ -9,9 +9,9 @@ serverPath=$(dirname "$rootPath")
|
|||||||
sourcePath=${serverPath}/source
|
sourcePath=${serverPath}/source
|
||||||
sysName=`uname`
|
sysName=`uname`
|
||||||
|
|
||||||
version=8.5.2
|
version=8.5.5
|
||||||
PHP_VER=85
|
PHP_VER=85
|
||||||
md5_file_ok=cb75a9b00a2806f7390dd64858ef42a47b443b3475769c8af6af33a18b1381f1
|
md5_file_ok=95bec382f4bd00570a8ef52a58ec04d8d9b9a90494781f1c106d1b274a3902f2
|
||||||
Install_php()
|
Install_php()
|
||||||
{
|
{
|
||||||
#------------------------ install start ------------------------------------#
|
#------------------------ install start ------------------------------------#
|
||||||
|
|||||||
Executable
+110
@@ -0,0 +1,110 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin
|
||||||
|
export PATH=$PATH:/opt/homebrew/bin
|
||||||
|
|
||||||
|
curPath=`pwd`
|
||||||
|
|
||||||
|
rootPath=$(dirname "$curPath")
|
||||||
|
rootPath=$(dirname "$rootPath")
|
||||||
|
rootPath=$(dirname "$rootPath")
|
||||||
|
rootPath=$(dirname "$rootPath")
|
||||||
|
serverPath=$(dirname "$rootPath")
|
||||||
|
sourcePath=${serverPath}/source/php
|
||||||
|
SYS_ARCH=`arch`
|
||||||
|
|
||||||
|
actionType=$1
|
||||||
|
version=$2
|
||||||
|
|
||||||
|
LIBNAME=pgsql
|
||||||
|
LIBV=0
|
||||||
|
|
||||||
|
LIB_PATH_NAME=lib/php
|
||||||
|
if [ -d $serverPath/php/${version}/lib64 ];then
|
||||||
|
LIB_PATH_NAME=lib64
|
||||||
|
fi
|
||||||
|
|
||||||
|
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/${LIB_PATH_NAME}/extensions | grep no-debug-non-zts`
|
||||||
|
extFile=$serverPath/php/${version}/${LIB_PATH_NAME}/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so
|
||||||
|
|
||||||
|
sysName=`uname`
|
||||||
|
if [ "$sysName" == "Darwin" ];then
|
||||||
|
BAK='_bak'
|
||||||
|
else
|
||||||
|
BAK=''
|
||||||
|
fi
|
||||||
|
|
||||||
|
OPTIONS=''
|
||||||
|
Install_lib()
|
||||||
|
{
|
||||||
|
|
||||||
|
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"`
|
||||||
|
if [ "${isInstall}" != "" ];then
|
||||||
|
echo "php-$version 已安装${LIBNAME},请选择其它版本!"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -f "$extFile" ];then
|
||||||
|
|
||||||
|
if [ ! -d $sourcePath/php${version}/ext ];then
|
||||||
|
cd ${rootPath}/plugins/php && /bin/bash ${rootPath}/plugins/php/versions/${version}/install.sh install
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd $sourcePath/php${version}/ext/${LIBNAME}
|
||||||
|
if [ "${SYS_ARCH}" == "aarch64" ] && [ "$version" -lt "56" ];then
|
||||||
|
OPTIONS="$OPTIONS --build=aarch64-unknown-linux-gnu --host=aarch64-unknown-linux-gnu"
|
||||||
|
fi
|
||||||
|
|
||||||
|
$serverPath/php/$version/bin/phpize
|
||||||
|
./configure --with-php-config=$serverPath/php/$version/bin/php-config $OPTIONS
|
||||||
|
make clean && make && make install && make clean
|
||||||
|
|
||||||
|
if [ -d $sourcePath/php${version} ];then
|
||||||
|
cd ${sourcePath} && rm -rf $sourcePath/php${version}
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -f "$extFile" ];then
|
||||||
|
echo "ERROR!"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
echo "" >> $serverPath/php/$version/etc/php.ini
|
||||||
|
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
|
||||||
|
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
|
||||||
|
|
||||||
|
cd ${curPath} && bash ${rootPath}/plugins/php/versions/lib.sh $version restart
|
||||||
|
echo '==========================================================='
|
||||||
|
echo 'successful!'
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Uninstall_lib()
|
||||||
|
{
|
||||||
|
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then
|
||||||
|
echo "php-$version 未安装,请选择其它版本!"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -f "$extFile" ];then
|
||||||
|
echo "php-$version 未安装${LIBNAME},请选择其它版本!"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo $serverPath/php/$version/etc/php.ini
|
||||||
|
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini
|
||||||
|
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
|
||||||
|
|
||||||
|
rm -f $extFile
|
||||||
|
cd ${curPath} && bash ${rootPath}/plugins/php/versions/lib.sh $version restart
|
||||||
|
echo '==============================================='
|
||||||
|
echo 'successful!'
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if [ "$actionType" == 'install' ];then
|
||||||
|
Install_lib
|
||||||
|
elif [ "$actionType" == 'uninstall' ];then
|
||||||
|
Uninstall_lib
|
||||||
|
fi
|
||||||
@@ -729,6 +729,16 @@
|
|||||||
"shell": "phalcon.sh",
|
"shell": "phalcon.sh",
|
||||||
"check": "phalcon.so"
|
"check": "phalcon.so"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "pgsql",
|
||||||
|
"versions": [
|
||||||
|
"84"
|
||||||
|
],
|
||||||
|
"type": "扩展",
|
||||||
|
"msg": "PostgreSQL扩展",
|
||||||
|
"shell": "pgsql.sh",
|
||||||
|
"check": "pgsql.so"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "yaf",
|
"name": "yaf",
|
||||||
"versions": [
|
"versions": [
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
"coexist": false,
|
"coexist": false,
|
||||||
"install_pre_inspection":true,
|
"install_pre_inspection":true,
|
||||||
"uninstall_pre_inspection":true,
|
"uninstall_pre_inspection":true,
|
||||||
"versions":["14","15","16","17"],
|
"versions":["14","15","16","17","18"],
|
||||||
"shell":"install.sh",
|
"shell":"install.sh",
|
||||||
"checks":"server/postgresql",
|
"checks":"server/postgresql",
|
||||||
"path":"server/postgresql",
|
"path":"server/postgresql",
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ sysName=`uname`
|
|||||||
|
|
||||||
postgreDir=${serverPath}/source/postgresql
|
postgreDir=${serverPath}/source/postgresql
|
||||||
|
|
||||||
VERSION=17.5
|
VERSION=17.9
|
||||||
|
|
||||||
# su - postgres -c "/www/server/postgresql/bin/pg_ctl start -D /www/server/postgresql/data"
|
# su - postgres -c "/www/server/postgresql/bin/pg_ctl start -D /www/server/postgresql/data"
|
||||||
|
|
||||||
|
|||||||
Executable
+128
@@ -0,0 +1,128 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
|
||||||
|
export PATH
|
||||||
|
|
||||||
|
#https://www.postgresql.org/ftp/source/
|
||||||
|
|
||||||
|
curPath=`pwd`
|
||||||
|
rootPath=$(dirname "$curPath")
|
||||||
|
rootPath=$(dirname "$rootPath")
|
||||||
|
serverPath=$(dirname "$rootPath")
|
||||||
|
sysName=`uname`
|
||||||
|
|
||||||
|
postgreDir=${serverPath}/source/postgresql
|
||||||
|
|
||||||
|
VERSION=18.3
|
||||||
|
|
||||||
|
# su - postgres -c "/www/server/postgresql/bin/pg_ctl start -D /www/server/postgresql/data"
|
||||||
|
|
||||||
|
Install_App()
|
||||||
|
{
|
||||||
|
mkdir -p ${postgreDir}
|
||||||
|
echo '正在安装脚本文件...'
|
||||||
|
|
||||||
|
if id postgres &> /dev/null ;then
|
||||||
|
echo "postgres uid is `id -u postgres`"
|
||||||
|
echo "postgres shell is `grep "^postgres:" /etc/passwd |cut -d':' -f7 `"
|
||||||
|
else
|
||||||
|
groupadd postgres
|
||||||
|
useradd -g postgres postgres
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -d /home/postgres ];then
|
||||||
|
mkdir -p /home/postgres
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if [ "$sysName" != "Darwin" ];then
|
||||||
|
# mkdir -p /var/log/mariadb
|
||||||
|
# touch /var/log/mariadb/mariadb.log
|
||||||
|
# fi
|
||||||
|
|
||||||
|
# ----- cpu start ------
|
||||||
|
if [ -z "${cpuCore}" ]; then
|
||||||
|
cpuCore="1"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f /proc/cpuinfo ];then
|
||||||
|
cpuCore=`cat /proc/cpuinfo | grep "processor" | wc -l`
|
||||||
|
fi
|
||||||
|
|
||||||
|
MEM_INFO=$(free -m|grep Mem|awk '{printf("%.f",($2)/1024)}')
|
||||||
|
if [ "${cpuCore}" != "1" ] && [ "${MEM_INFO}" != "0" ];then
|
||||||
|
if [ "${cpuCore}" -gt "${MEM_INFO}" ];then
|
||||||
|
cpuCore="${MEM_INFO}"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
cpuCore="1"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# for stable installation
|
||||||
|
if [ "$cpuCore" -gt "1" ];then
|
||||||
|
cpuCore=`echo "$cpuCore" | awk '{printf("%.f",($1)*0.8)}'`
|
||||||
|
fi
|
||||||
|
# ----- cpu end ------
|
||||||
|
|
||||||
|
if [ ! -f ${postgreDir}/postgresql-${VERSION}.tar.bz2 ];then
|
||||||
|
wget --no-check-certificate -O ${postgreDir}/postgresql-${VERSION}.tar.bz2 --tries=3 https://ftp.postgresql.org/pub/source/v${VERSION}/postgresql-${VERSION}.tar.bz2
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -d ${postgreDir}/postgresql-${VERSION} ];then
|
||||||
|
cd ${postgreDir} && tar -jxvf ${postgreDir}/postgresql-${VERSION}.tar.bz2
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
if [ ! -d $serverPath/postgresql ];then
|
||||||
|
cd ${postgreDir}/postgresql-${VERSION} && ./configure \
|
||||||
|
--prefix=$serverPath/postgresql \
|
||||||
|
--with-openssl
|
||||||
|
# --with-pgport=33206
|
||||||
|
|
||||||
|
echo "cd ${postgreDir}/postgresql-${VERSION} && ./configure \
|
||||||
|
--prefix=$serverPath/postgresql \
|
||||||
|
--with-openssl"
|
||||||
|
# --with-pgport=33206
|
||||||
|
make -j${cpuCore} && make install && make clean
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -d $serverPath/postgresql ];then
|
||||||
|
echo "${VERSION}" > $serverPath/postgresql/version.pl
|
||||||
|
echo '安装postgresql成功'
|
||||||
|
else
|
||||||
|
echo '安装postgresql失败'
|
||||||
|
rm -rf ${postgreDir}/postgresql-${VERSION}.tar.bz2
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
Uninstall_App()
|
||||||
|
{
|
||||||
|
if [ -f /usr/lib/systemd/system/postgresql.service ];then
|
||||||
|
systemctl stop postgresql
|
||||||
|
systemctl disable postgresql
|
||||||
|
rm -rf /usr/lib/systemd/system/postgresql.service
|
||||||
|
systemctl daemon-reload
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f /lib/systemd/system/postgresql.service ];then
|
||||||
|
systemctl stop postgresql
|
||||||
|
systemctl disable postgresql
|
||||||
|
rm -rf /lib/systemd/system/postgresql.service
|
||||||
|
systemctl daemon-reload
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f $serverPath/postgresql/initd/postgresql ];then
|
||||||
|
$serverPath/postgresql/initd/postgresql stop
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -d $serverPath/postgresql ];then
|
||||||
|
rm -rf $serverPath/postgresql
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo '卸载[postgresql]完成'
|
||||||
|
}
|
||||||
|
|
||||||
|
action=$1
|
||||||
|
if [ "${1}" == "install" ];then
|
||||||
|
Install_App
|
||||||
|
else
|
||||||
|
Uninstall_App
|
||||||
|
fi
|
||||||
@@ -21,6 +21,7 @@ yum install -y ncurses-compat-libs
|
|||||||
yum install -y numactl
|
yum install -y numactl
|
||||||
yum install -y sshpass
|
yum install -y sshpass
|
||||||
yum install -y libzstd-devel
|
yum install -y libzstd-devel
|
||||||
|
yum install -y postgresql-devel
|
||||||
|
|
||||||
SSH_PORT=`netstat -ntpl|grep sshd|grep -v grep | sed -n "1,1p" | awk '{print $4}' | awk -F : '{print $2}'`
|
SSH_PORT=`netstat -ntpl|grep sshd|grep -v grep | sed -n "1,1p" | awk '{print $4}' | awk -F : '{print $2}'`
|
||||||
if [ "$SSH_PORT" == "" ];then
|
if [ "$SSH_PORT" == "" ];then
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ yum install -y ncurses-compat-libs
|
|||||||
yum install -y numactl
|
yum install -y numactl
|
||||||
yum install -y sshpass
|
yum install -y sshpass
|
||||||
yum install -y libzstd-devel
|
yum install -y libzstd-devel
|
||||||
|
yum install -y postgresql-devel
|
||||||
|
|
||||||
# if [ -f /usr/sbin/iptables ];then
|
# if [ -f /usr/sbin/iptables ];then
|
||||||
|
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ yum install -y ncurses-compat-libs
|
|||||||
yum install -y numactl
|
yum install -y numactl
|
||||||
yum install -y sshpass
|
yum install -y sshpass
|
||||||
yum install -y libzstd-devel
|
yum install -y libzstd-devel
|
||||||
|
yum install -y postgresql-devel
|
||||||
|
|
||||||
|
|
||||||
# if [ -f /usr/sbin/iptables ];then
|
# if [ -f /usr/sbin/iptables ];then
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ yum install -y ncurses-compat-libs
|
|||||||
yum install -y numactl
|
yum install -y numactl
|
||||||
yum install -y sshpass
|
yum install -y sshpass
|
||||||
yum install -y libzstd-devel
|
yum install -y libzstd-devel
|
||||||
|
yum install -y postgresql-devel
|
||||||
dnf install crontabs -y
|
dnf install crontabs -y
|
||||||
|
|
||||||
SSH_PORT=`netstat -ntpl|grep sshd|grep -v grep | sed -n "1,1p" | awk '{print $4}' | awk -F : '{print $2}'`
|
SSH_PORT=`netstat -ntpl|grep sshd|grep -v grep | sed -n "1,1p" | awk '{print $4}' | awk -F : '{print $2}'`
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ $PKGMGR install -y mmap-devel
|
|||||||
$PKGMGR install -y libncurses*
|
$PKGMGR install -y libncurses*
|
||||||
$PKGMGR install -y sshpass
|
$PKGMGR install -y sshpass
|
||||||
$PKGMGR install -y libzstd-devel
|
$PKGMGR install -y libzstd-devel
|
||||||
|
$PKGMGR install -y postgresql-devel
|
||||||
|
|
||||||
echo "install remi source"
|
echo "install remi source"
|
||||||
if [ "$VERSION_ID" == "9" ];then
|
if [ "$VERSION_ID" == "9" ];then
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ yum install -y ncurses-compat-libs
|
|||||||
yum install -y numactl
|
yum install -y numactl
|
||||||
yum install -y sshpass
|
yum install -y sshpass
|
||||||
yum install -y libzstd-devel
|
yum install -y libzstd-devel
|
||||||
|
yum install -y postgresql-devel
|
||||||
|
|
||||||
if [ -f /usr/sbin/iptables ];then
|
if [ -f /usr/sbin/iptables ];then
|
||||||
|
|
||||||
|
|||||||
@@ -71,6 +71,7 @@ if panel_ssl_data['open']:
|
|||||||
keyfile = panel_private
|
keyfile = panel_private
|
||||||
ciphers = 'TLSv1 TLSv1.1 TLSv1.2 TLSv1.3'
|
ciphers = 'TLSv1 TLSv1.1 TLSv1.2 TLSv1.3'
|
||||||
ssl_version = 2
|
ssl_version = 2
|
||||||
|
http2 = True
|
||||||
|
|
||||||
if workers > 2:
|
if workers > 2:
|
||||||
workers = 2
|
workers = 2
|
||||||
|
|||||||
Reference in New Issue
Block a user