返回首页

阿里云 - trojan-web 服务器部署步骤

0 条评论

==============服务器更名==============

hostnamectl set-hostname 主机名
例:hostnamectl set-hostname ALiYun-SEA
==============停止阿里云盾AliYunDun============

wget http://update.aegis.aliyun.com/download/uninstall.sh && chmod +x uninstall.sh && ./uninstall.sh && wget http://update.aegis.aliyun.com/download/quartz_uninstall.sh && chmod +x quartz_uninstall.sh && ./quartz_uninstall.sh && pkill aliyun-service && rm -fr /etc/init.d/agentwatch /usr/sbin/aliyun-service && rm -rf /usr/local/aegis*

============更新所有包============
yum update && yum -y install unzip && yum -y install zip

 

=================设置SWAP==================
cat /proc/sys/vm/swappiness
确认是0

 

=================trojan-web=================
https://github.com/Jrohy/trojan

#安装/更新
source <(curl -sL https://git.io/trojan-install)

#卸载
source <(curl -sL https://git.io/trojan-install) --remove

 

============BBR加速=Linux-NetSpeed=============
https://github.com/chiakge/Linux-NetSpeed
wget -N --no-check-certificate "https://raw.githubusercontent.com/chiakge/Linux-NetSpeed/master/tcp.sh"
chmod +x tcp.sh
./tcp.sh
**使用基础BBR加速

 

================Netflix检测==================
https://github.com/sjlleo/netflix-verify
wget -O nf https://github.com/sjlleo/netflix-verify/releases/download/2.6/nf_2.6_linux_amd64 && chmod +x nf && clear && ./nf

 

================单独安装nginx==============
一. gcc 安装
yum install gcc-c++

二. PCRE pcre-devel 安装
yum install -y pcre pcre-devel

三. zlib 安装
yum install -y zlib zlib-devel

四. OpenSSL 安装
yum install -y openssl openssl-devel

官网下载
1.下载.tar.gz安装包,地址:https://nginx.org/en/download.html
wget -c https://nginx.org/download/*****

解压
tar -zxvf nginx-*****
cd nginx-*****

配置
./configure

编译安装
make
make install

查找安装路径
whereis nginx

启动、停止nginx
cd /usr/local/nginx/sbin/
./nginx
./nginx -s stop
./nginx -s quit
./nginx -s reload

查询nginx进程:
ps aux|grep nginx

重启 nginx
1.先停止再启动(推荐):
对 nginx 进行重启相当于先停止再启动,即先执行停止命令再执行启动命令。如下:

./nginx -s quit
./nginx

2.nginx.conf修改后重新加载配置文件:
./nginx -s reload

开机自启动
vi /etc/rc.local
增加一行 /usr/local/nginx/sbin/nginx
设置执行权限:
chmod 755 /etc/rc.local

本站原创版权所有

评论

暂无评论

提交评论