Home PC Games Linux Windows Database Network Programming Server Mobile  
  Home \ Server \ Taught you how to build your own VPS server     - Nginx high concurrency optimization ideas (Server)

- Alternative methods of intrusion bundled executable file new thinking (Linux)

- Shorewall firewall settings under Ubuntu (Linux)

- MySQL in order by inaccurate results in problems and solutions (Database)

- Linux system security configuration (Linux)

- 25 Git Advanced Skills (Linux)

- Make command tutorial (Linux)

- Thinking in Java study notes - initialization and cleanup (Programming)

- Linux system performance monitoring with Nmon (Linux)

- C ++ runtime environment built on CentOS 6.6 and Oracle database connection (Database)

- Oracle Database asynchronous IO cause slow query response (Database)

- Use Ambari rapid deployment Hadoop big data environment (Server)

- Installation and Configuration ISC DHCP server on Debian Linux (Server)

- Lenovo E431 notebook CentOS system is installed wireless network card driver (Linux)

- PostgreSQL Select source code analysis (Database)

- Three binary tree traversal (recursive, non-recursive traversal and Morris) (Programming)

- Install Python 3.3.4 under CentOS 6.4 (Linux)

- Java memory area and memory overflow exception (Programming)

- IronPython and C # to interact (Programming)

- in no backup ex: error: Xin Tourou ah backup child process has Singles DAT / US person / bin / in no backup ex (Database)

  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: