1. 程式人生 > 其它 >甲骨文雲主機ubuntu系統設定

甲骨文雲主機ubuntu系統設定

首先需要搞定root用密碼登入

sudo -i
echo root:admin |chpasswd root
sed -i 's/^#\?PermitRootLogin.*/PermitRootLogin yes/g' /etc/ssh/sshd_config;
sed -i 's/^#\?PasswordAuthentication.*/PasswordAuthentication yes/g' /etc/ssh/sshd_config;
service sshd restart

關閉防火牆

iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables 
-P OUTPUT ACCEPT iptables -F apt-get purge netfilter-persistent

申請SSL證書

apt update -y
apt install -y curl
apt install -y socat
curl https://get.acme.sh | sh
~/.acme.sh/acme.sh --register-account -m [email protected]
~/.acme.sh/acme.sh --issue -d xxx.xxx.xxx --standalone
~/.acme.sh/acme.sh --installcert -d xxx.xxx.xxx --key-file /root/private
.key --fullchain-file /root/cert.crt

安裝BBR

echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf
echo "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.conf
sysctl -p
lsmod | grep bbr

安裝X-ui面板

bash <(curl -Ls https://raw.githubusercontent.com/vaxilu/x-ui/master/install.sh)