Home PC Games Linux Windows Database Network Programming Server Mobile  
  Home \ Server \ Taught you how to build your own VPS server     - Android LayoutInflater source parsing (Programming)

- Oracle database physical file backup / restore (Database)

- Make full use of the Raspberry Pi SD card space (Linux)

- Linux / Unix desktops interesting: Christmas tree on the terminal (Linux)

- Install RAID 6 (Striping double distributed parity) (Linux)

- Difference between TCP and UDP protocols (Linux)

- Physical backup and recovery SYSTEM table space (Database)

- ORA-38856: Unable instance UNNAMED_INSTANCE_2 (redo thread 2) marked enabled (Database)

- Spring AOP for logging (Programming)

- Changes in C # asynchronous programming model (Programming)

- How to install CentOS CentOS web page (Server)

- SSH automatic disconnection problem solving (Linux)

- CentOS7 install JDK (Linux)

- Normal start Lazarus 1.0.8 under Ubuntu (Linux)

- impdp error ORA-31631, ORA-39122 (Database)

- RabbitMQ Getting Started Tutorial (Linux)

- Upgrading to MySQL 5.7.9 MySQL 5.6.23 (Database)

- Ubuntu derivative version of the user and how to install SmartGit / HG 6.0.0 (Linux)

- ASM Management - How to Rename diskgroup (Database)

- Linux pwd command learning experience (Linux)

  Taught you how to build your own VPS server
  Add Date : 2018-11-21      
  There are always times that you want to own a VPS. Share this article the author in practice some experience, we can give those who build their own VPS friends a little help.



Need to buy a VPS with root privileges, then it purchased 512 M memory 5 G SSD, 500 G flow / month, 9.99 knife each year, but it seems now that low-cost packages over. Interested friends can look at other companies or other packages of VPS. Some friends said that some very fast, watch YouTube directly to 1440p, but I have not tested, currently my VPS speed can meet my needs, and DO the price is more expensive.

The figure is the use of SS and take IPsec VPN services, for reference only:



After the server purchase, installation CentOS7, because these tutorials are based CentOS7, install a new OS, moving tile union Tell your SSH port and root password, which they can not be customized, if you really want to remember the forgotten You can also reset the root password, or directly using sSH to log online to move bricklayer operation can also be provided, that is, the reaction is relatively slow, so after we commonly ssh login to configure the VPS, Mac is like under the direct use of the terminal, the next win on their own Looking for a tool like ssh.

Login ssh command:

$ Ssh-p vps port number address root @ vpsIP
After the login as equivalent in local operation, you can use various Linux commands to operate.


Configure the firewall

If SSH can not sign, it means the firewall turned off SSH port, you need to log in via SSH online turn off the firewall reconfiguration.


Clear Firewall Configuration

$ Iptables -F
Clear iptabels all entries, while nat did not set, but we will follow the script configuration, do not worry. If SSH login normally do not control the firewall.

Installation firewalld

$ Yum install firewalld firewall-config
$ Systemctl start firewalld
P.S. I was in after installing firewalld then start the service has failed is displayed, and then restart the server can again start firewalld normal service, and have friends in similar situations can restart the server.


Modify the SSH port

$ Vi / usr / lib / firewalld / services / ssh.xml
Will appear the following contents:

Secure Shell (SSH) is a protocol for logging into and executing commands on remote machines. It provides secure encrypted communications. If you plan on accessing your machine remotely via SSH over a firewalled interface, enable this option. You need the openssh -server package installed for this option to be useful.

The port = "22", modified to move bricklayer gives you the port number, and then reload firewalld on OK.

vi command: Press the "i" is in edit mode, after editing press "esc" to exit edit mode, then press Shift enter ":" and "wq" to save and exit vi.

$ Firewall-cmd --permanent --add-service = ssh
$ Firewall-cmd --reload
OK, now preparations are in place, the installation source, install a firewall is configured, the next step began to build the service.


Build Shadowsocks Service

This service is the simplest and most commonly used.


Mounting assembly

$ Yum install m2crypto python-setuptools
$ Easy_install pip
$ Pip install shadowsocks
When you install some components need to enter Y to confirm. VPS small memory components can be installed separately.


Server configuration parameters after installation

$ Vi / etc / shadowsocks.json
Written as follows:

"Server": "",
"Server_port": 8388,
"Local_address": "",
"Local_port": 1080,
"Password": "mypassword",
"Timeout": 300,
"Method": "aes-256-cfb",
"Fast_open": false,
"Workers": 1
Will replace the above mypassword as your password, server_port also can be modified, for example, 443 is Shadowsocks client default port number.

If you need to change the port, you need to open ports in the firewall in response, with firewalld operation is relatively simple:

$ Vi / usr / lib / firewalld / services / ss.xml
Paste the following code into it: