安装Xray

首先更新系统

1
apt update -y

准备一个域名,做好相关的解析,若是需要套用 CDN,请托管域名到 cloudflare
wulabing:

1
wget -N --no-check-certificate -q -O install.sh "https://raw.githubusercontent.com/wulabing/Xray_onekey/main/install.sh" && chmod +x install.sh && bash install.sh

mack-a:

1
wget -P /root -N --no-check-certificate "https://raw.githubusercontent.com/mack-a/v2ray-agent/master/install.sh" && chmod 700 /root/install.sh && /root/install.sh

甲骨文出现ping: command not found

1
apt install iputils-ping

BBR加速

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

安装 X-ui 面板
申请 SSL 证书
下面环境的安装方式,大家根据自己的系统选择命令安装就好了。

更新及安装组件
#Debian/Ubuntu命令

1
2
3
apt update -y
apt install -y curl
apt install -y socat

#CentOS命令

1
2
3
yum update -y
yum install -y curl
yum install -y socat

安装 Acme 脚本

1
curl https://get.acme.sh | sh

80 端口空闲的证书申请方式
自行更换代码中的域名、邮箱为你解析的域名及邮箱

1
2
~/.acme.sh/acme.sh --register-account -m xxxx@xxxx.com
~/.acme.sh/acme.sh --issue -d mydomain.com --standalone

安装证书到指定文件夹
自行更换代码中的域名为你解析的域名

1
~/.acme.sh/acme.sh --installcert -d mydomain.com --key-file /root/private.key --fullchain-file /root/cert.crt

安装及升级X-ui面板的一键代码

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

路径参考:

1
2
/root/cert.crt
/root/private.key