This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
centos7系统环境搭建(温馨提示:请使用centos7系统搭建,如果学习能力强可以Google搜索Debian或其他系统搭建方法,只是部分代码不一样而已)(V2Ray+WebSocket+TLS+Nginx)前几期视频分别提到过 TLS 和 WebSocket 的配置方法,而本文搭配 Web 服务并同时实现 TLS | |
和 WebSocket浏览器域名访问自动跳转https有简单前端网页。关于 Web 的软件官方给出Nginx,Caddy 和 Apache 三个例子,三选一即可 | |
本期只讲Nginx,因为以后视频会用到Nginx | |
一.安装v2ray官方脚本和BBR加速 | |
第一步 V2RAY官方脚本搭建 | |
(1)更新服务器 yum -y update(部分系统提示NO packages marked for update则无需更新) | |
(2)设置硬件时钟调整为与本地时钟一致 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1.安装v2ray官方脚本 centos7系统搭建 | |
1.更新服务器 yum -y update | |
#设置硬件时钟调整为与本地时钟一致 | |
timedatectl set-local-rtc 1 | |
#设置时区为上海 | |
timedatectl set-timezone Asia/Shanghai | |
2.安装v2ray官方代码 bash <(curl -L -s https://install.direct/go.sh) | |
vim /etc/v2ray/config.json: 配置文件 | |
service v2ray start|stop|status|reload|restart|force-reload 控制 V2Ray 的运行 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1.V2Ray 提供了一个在 Linux 中的自动化安装脚本。这个脚本会自动检测有没有安装过 V2Ray,如果没有,则进行完整的安装和配置;如果之前安装过 V2Ray,则只更新 V2Ray 二进制程序而不更新配置。 | |
以下指令假设已在 su 环境下,如果不是,请先运行 sudo su。 | |
运行下面的指令下载并安装 V2Ray。当 yum 或 apt-get 可用的情况下,此脚本会自动安装 unzip 和 daemon。这两个组件是安装 V2Ray 的必要组件。如果你使用的系统不支持 yum 或 apt-get,请自行安装 unzip 和 daemon | |
2.(1)debian系统vps时间同步本地时间 (先输入sudo -i在同步时间 必须同步时间切记) | |
rm -rf /etc/localtime | |
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime | |
(2)centos7系统vps时间同步本地时间(先输入dudo -i在同步时间 必须同步时间切记) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
centos7系统配置和Debian系统配置 [视频中我讲错了acme.sh脚本所有证书将每60天自动更新一次,大家无需执行第9部操作(如果你非要手动更新随意)] | |
第一步 V2RAY官方脚本搭建 | |
更新服务器 yum -y update(部分系统提示NO packages marked for update则无需更新) | |
#设置硬件时钟调整为与本地时钟一致 | |
timedatectl set-local-rtc 1 | |
#设置时区为上海 | |
timedatectl set-timezone Asia/Shanghai | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
Green_font="\033[32m" && Yellow_font="\033[33m" && Red_font="\033[31m" && Font_suffix="\033[0m" | |
Info="${Green_font}[Info]${Font_suffix}" | |
Error="${Red_font}[Error]${Font_suffix}" | |
reboot="${Yellow_font}重启${Font_suffix}" | |
echo -e "${Green_font} | |
#======================================= | |
# Project: tcp_nanqinlang general | |
# Platform: --Debian --KVM | |
# Branch: --fool |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
debian9 复制这条代码安装bbr加速如下: | |
方法一wget -N --no-check-certificate https://bit.ly/2VWUksq && chmod + hasan.sh && bash hasan.sh | |
备用代码:wget -N --no-check-certificate https://raw.githubusercontent.com/ComeBey/bbr/master/hasan.sh && chmod + hasan.sh && bash hasan.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
以下同步时间选择其中一种,如果无法同步本地时间请google下(关键字centos7或者centos6或者debian时间同步本地时间等关键字) | |
方法一.校准时间同步本地时间 date -R 查看vps时间 | |
sudo -i root权限进入 | |
(一) yum -y install ntp ntpdate 安装ntpdate工具 | |
(二) ntpdate cn.pool.ntp.org 设置系统时间与本地网络时间同步 | |
(三) hwclock --systohc 将系统时间写入硬件时间 | |
方法二.校准时间同步本地时间 date -R 查看vps时间 | |
(1)yum install ntp //安装ntp服务 | |
(2)systemctl enable ntpd //开机启动服务 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
一>校准时间同步本地时间 | |
1.date -s "2019-09-21 19:00:38" | |
2.cp空格 /usr/share/zoneinfo/Asia/Shanghai 空格/etc/localtime | |
3.(一) yum -y install ntp ntpdate 安装ntpdate工具 | |
(二) ntpdate cn.pool.ntp.org 设置系统时间与网络时间同步 | |
(三) hwclock --systohc 将系统时间写入硬件时间 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. 输入sudo -i 进来root权限, 可自行选择升级内核, yum update 升级内核 | |
2. yum install wget 下载wget工具 | |
3. wget https://github.com/txthinking/brook/releases/download/v20190205/brook 下载brook服务器版本 | |
4. 输入cp brook /usr/bin 把brook拷贝到bin目录下 | |
5. chmod +x /usr/bin/brook 给予当前路径brook可执行权限 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. sudo -i | |
2. yum update 升级系统 | |
4. curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py" 下载pip | |
5. python get-pip.py 安装pip | |
6. pip install shadowsocks 安装ss |
NewerOlder