Oracle 服务器优化指南

Posted by liuxu379 on March 4, 2020

配置 Root 账户登录

修改密码

sudo -i
passwd

修改登陆配置

vi /etc/ssh/sshd_config

查找#PermitRootLogin yes,去掉#注释符号. 查找#PasswordAuthentication yes,去掉#注释符号. 查找#ClientAliveInterval 0,去掉#注释符号,0改为30. 查找#MaxSessions 10,去掉#注释符号

systemctl restart sshd

卸载无用程序

systemctl stop rpcbind
systemctl stop rpcbind.socket
systemctl disable rpcbind
systemctl disable rpcbind.socket

systemctl stop oracle-cloud-agent
systemctl disable oracle-cloud-agent
systemctl stop oracle-cloud-agent-updater
systemctl disable oracle-cloud-agent-updater

使用 BBR 加速

更换内核

yum -y update
wget https://raw.githubusercontent.com/chiakge/Linux-NetSpeed/master/bbrplus/centos/7/kernel-4.14.129-bbrplus.rpm
yum -y install kernel-4.14.129-bbrplus.rpm
grub2-mkconfig -o /boot/grub2/grub.cfg
grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg
grub2-set-default 0
reboot

开启 BBR & 优化

运行脚本后,选择 7,再选择 10

wget -N --no-check-certificate "https://raw.githubusercontent.com/chiakge/Linux-NetSpeed/master/tcp.sh" && chmod +x tcp.sh && ./tcp.sh

配置科学上网

wget --no-check-certificate -O shadowsocks-all.sh https://raw.githubusercontent.com/teddysun/shadowsocks_install/master/shadowsocks-all.sh

chmod +x shadowsocks-all.sh

./shadowsocks-all.sh 2>&1 | tee shadowsocks-all.log