虚拟主机的玩法

Catalogue   

代理神器Shadowsocks

安装

wget --no-check-certificate -O shadowsocks.sh https://raw.githubusercontent.com/teddysun/shadowsocks_install/master/shadowsocks.sh
chmod +x shadowsocks.sh
./shadowsocks.sh 2>&1 | tee shadowsocks.log

操作

启动:/etc/init.d/shadowsocks start
停止:/etc/init.d/shadowsocks stop
重启:/etc/init.d/shadowsocks restart
状态:/etc/init.d/shadowsocks status

设置密码

查看ss服务器所开放的端口
ss -lntp | grep ssserver
查看ss的配置文件
ps aux | grep ssserver
修改对应的配置文件,重启

什么是socks代理

Socks 是个电路级的底层网关,是 DavidKoblas 在 1990 年开发的, 此后就一直作为 Internet RFC 标准的开放标准。Socks 不要求应用程序遵循特定的操作系统平台,
Socks 代理与应用层代理、 HTTP 层代理不同,Socks 代理只是简单地传递数据包,而不必关心是何种应用协议(比如 FTP、HTTP 和 NNTP 请求)。
所以,Socks 代理比其他应用层代理要快得多。

云储存工具seafile

docker run -d --name seafile -e SEAFILE_SERVER_HOSTNAME=seafile.example.com -e SEAFILE_ADMIN_EMAIL=xxxj@gmail.com -e SEAFILE_ADMIN_PASSWORD=123456 -v /opt/seafile-data:/shared -p 8088:80 seafileltd/seafile:latest

搭建Maven仓库

docker pull sonatype/
docker run -d -p 8081:8081 --name nexus -v /home/alone/nexus-data:/nexus-data sonatype/nexus3

/home/alone/nexus-data:/nexus-data表示数据存储目录

搭建FTP服务器

修改ssh端口

vim /etc/ssh/sshd_config
修改
Port 2222
重启服务
/etc/init.d/ssh restart

安装v2ray

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
卸载v2ray
systemctl stop v2ray
systemctl disable v2ray
service v2ray stop
update-rc.d -f v2ray remove

rm -rf /etc/v2ray/* #(配置文件)
rm -rf /usr/bin/v2ray/* #(程序)
rm -rf /var/log/v2ray/* #(日志)
rm -rf /lib/systemd/system/v2ray.service #(systemd 启动项)
rm -rf /etc/init.d/v2ray #(sysv 启动项)



wget https://install.direct/go.sh
sudo bash go.sh

wget https://git.io/v2ray.sh

## 启动
systemctl start v2ray

## 停止
systemctl stop v2ray

## 重启
systemctl restart v2ray

## 开机自启
systemctl enable v2ray

查看状态
service v2ray status

center os使用
## 查看已开放端口
firewall-cmd --zone=public --list-ports

## 添加开放端口
firewall-cmd --zone=public --add-port=80/tcp --permanent