Oracle免费主机
Oracle有提供免费主机学习使用。
#使用xshell生成密匙,工具-用户密匙管理者-生成-设置密码,RSA 2048,随后下一步,复制公匙密码。
#生成Oracle主机时,粘贴公匙,连接时,centos默认用户名为opc,ubuntu默认用户名是ubuntu。
#切换为密码登录
sudo -i
echo root:daniao |sudo chpasswd root #设置root密码为daniao
sudo sed -i 's/^#\?PermitRootLogin.*/PermitRootLogin yes/g' /etc/ssh/sshd_config;
sudo sed -i 's/^#\?PasswordAuthentication.*/PasswordAuthentication yes/g' /etc/ssh/sshd_config;
sudo service sshd restart
#Centos开启BBR
grub2-mkconfig -o /boot/grub2/grub.cfg
wget -N --no-check-certificate "https://raw.githubusercontent.com/chiakge/Linux-NetSpeed/master/tcp.sh" && chmod +x tcp.sh && ./tcp.sh
#开启xray
yum update -y
yum install -y wget && wget -O install.sh http://download.bt.cn/install/install_6.0.sh && sh install.sh
bash -c "$(curl -L https://github.com/XTLS/Xray-install/raw/main/install-release.sh)" @ install -u root
cat /proc/sys/kernel/random/uuid # 粘贴到VPS运行即可生成 UUID
#安装完毕以后,在VPS目录 /usr/local/etc/xray 找到 config,json 文件,贴入下面的配置文件(以下配置中,三处 域名处,必须修改)
{
"log": {
"loglevel": "warning"
},
"inbounds": [
{
"listen": "0.0.0.0",
"port": 443,
"protocol": "vless",
"settings": {
"clients": [
{
"id": "5272bc0d-9852-4af7-b2f0-979b1faf2973", //此处改为你的UUID
"level": 0,
"email": "admin@v2rayssr.com", //此处为邮箱地址,随便修改
"flow":"xtls-rprx-direct"
}
],
"decryption": "none",
"fallbacks": [
{
"alpn": "h2",
"dest": 8002 //此处为回落端口,若更改,请更改后面Nginx的相应配置
}
]
},
"streamSettings": {
"network": "tcp",
"security": "xtls",
"xtlsSettings": {
"serverName": "qq.bozai.us", //修改为你的域名
"alpn": [
"h2",
"http/1.1"
],
"certificates": [
{
"certificateFile": "/www/server/panel/vhost/cert/qq.bozai.us/fullchain.pem", //修改为你的域名
"keyFile": "/www/server/panel/vhost/cert/qq.bozai.us/privkey.pem" //修改为你的域名
}
]
}
}
}
],
"outbounds": [
{
"protocol": "freedom",
"settings": { }
}
]
}
#bt面板申请ssl,不开启强制https,进入网站配置文件,修改如下
#头部加入一下代码
server {
listen 0.0.0.0:80;
server_name qq.bozai.us;
return 301 https://qq.bozai.us$request_uri;
}
#其次删除 listen 80; 这行,并修改 443 端口为 8002 (以上配置文件端口),去除 ssl 字段。
#然后在 root /www/wwwroot/qq.bozai.us; 后面一行插入如下代码
add_header Content-Security-Policy "upgrade-insecure-requests"; #这行代码是为了解决 Xray 回落的时候引起的 WordPress 样式问题
systemctl restart xray
systemctl status xray
参考链接:
https://cloud.oracle.com/compute/instances?region=ap-chuncheon-1
https://51.ruyo.net/14288.html
https://www.daniao.org/6537.html
https://zhuanlan.zhihu.com/p/352736372