This commit is contained in:
2017-09-06 17:49:23 +08:00
parent fde5d8dead
commit 4512994566
4 changed files with 10 additions and 12 deletions

View File

@@ -2,7 +2,7 @@
# Install script for BBR base on CentOS 7 by xiaosong
CentOS_Version=`cat /etc/redhat-release | grep -oE '[0-9]+\.[0-9]+' | cut -d'.' -f1`
KVersion=4.12.9-1
KVersion=4.13.0-1
if [ -z ${CentOS_Version} ]
then
@@ -78,6 +78,4 @@ echo " "
echo "Installation is completed, now you can reboot the system. "
echo "You should check BBR after the rebooting using command: "
echo " "
echo " sysctl -a|grep congestion_control"
echo " sysctl -a|grep congestion_control"

View File

@@ -7,7 +7,7 @@ if [ -n "`grep 'Aliyun Linux release' /etc/issue`" -o -e /etc/redhat-release ];t
[ -n "`grep ' 7\.' /etc/redhat-release`" ] && CentOS_RHEL_version=7
fi
if [ "$OS" != 'CentOS' ] || [ "$CentOS_RHEL_version" != '7' ];then
if [ $OS != 'CentOS' ] || [ $CentOS_RHEL_version != '7' ];then
echo "${CFAILURE}Error: This script only support CentOS 7${CEND}";
kill -9 $$
fi
@@ -71,4 +71,4 @@ sudo /sbin/iptables -I INPUT -p tcp --dport 22 -j ACCEPT
sudo /sbin/service iptables save
sudo systemctl restart iptables
sudo systemctl enable iptables.service
sudo systemctl enable iptables.service

View File

@@ -6,8 +6,8 @@ sudo yum install -y mariadb-server
# Configure MariaDB
echo "Configuring MariaDB..."
sudo cp `${SCRIPT_ROOT}/conf/my.cnf` /etc/my.cnf
sudo cp `${SCRIPT_ROOT}/conf/server.cnf` /etc/my.cnf.d/server.cnf
sudo cp ${SCRIPT_ROOT}/conf/my.cnf /etc/my.cnf
sudo cp ${SCRIPT_ROOT}/conf/server.cnf /etc/my.cnf.d/server.cnf
echo "Install and start service..."
sudo systemctl restart php-fpm.service
@@ -24,4 +24,4 @@ y
y
y
y
EOF
EOF

View File

@@ -16,8 +16,8 @@ echo "Configuring Nginx for PHP..."
IP=`curl -4 ip.llm.me`
sudo cp /etc/nginx/nginx.conf /etc/nginx/nginx.conf.bak
sudo cp /etc/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf.bak
sudo cp `${SCRIPT_ROOT}/conf/nginx.conf` /etc/nginx/nginx.conf
sudo cp `${SCRIPT_ROOT}/conf/default.conf` /etc/nginx/conf.d/default.conf
sudo cp ${SCRIPT_ROOT}/conf/nginx.conf /etc/nginx/nginx.conf
sudo cp ${SCRIPT_ROOT}/conf/default.conf /etc/nginx/conf.d/default.conf
sudo sed -i "s/localhost/$IP `hostname`/g" /etc/nginx/conf.d/default.conf
echo "Configuring Firewall..."
@@ -28,4 +28,4 @@ sudo systemctl restart iptables
echo "Install and start service..."
sudo systemctl restart nginx.service
sudo systemctl enable nginx.service
sudo systemctl enable nginx.service