This article introduces how to install the latest nginx and socks5 Proxy server dante-server method in CentOS.
Generally, we can use yum install nginx in CentOS to install nginx. However, the nginx installed is not the latest. How can I use yum to install the latest nginx version?
1. Edit the/etc/yum. repos. d/nginx. repo file and write the following content:
The Code is as follows: |
Copy code |
[Nginx] Name = nginx repo Baseurl = http://nginx.org/packages/centos/5/?basearch/ Gpgcheck = 0 Enabled = 1
|
If you use RHEL to replace "OS" in the above content with rhel. If RHEL6 or CentOS6 is used, change "5" to "6.
2. Execute yum update
3. Execute yum install nginx
You can install the latest nginx version.
This method is also applicable to the RHEL system.
Install the dans5 Proxy server dante-server
1. Download the source code:
Download the latest stable version source code from the dante-server official website (currently 1.3.2 ):
Http://www.inet.no/dante/download.html
2. Compile:
The Code is as follows: |
Copy code |
Tar-xzf dante-1.3.2.tar.gz Cd dante-1.3.2 ./Configure Make Make install
|
3. Add a user for socks5 proxy client Verification:
The Code is as follows: |
Copy code |
Useradd proxyuser |
4. Set a password for the newly added user:
The Code is as follows: |
Copy code |
Passwd proxyuser
|
5. edit/etc/passwd and change the shell of proxyuser to/bin/nologin to prohibit the user from logging on to the system.
6. edit/etc/sockd. conf and set the content as follows:
The Code is as follows: |
Copy code |
Logoutput:/var/log/sockd. log Internal: eth0 port = 10080 External: eth0 Method: username Clientmethod: none User. privileged: root User. notprivileged: proxyuser User. libwrap: nobody Compatibility: sameport # Compatibility: reuseaddr Extension: bind Client pass { From: 0.0.0.0/0 to: 0.0.0.0/0 } Pass { From: 0.0.0.0/0 to: 0.0.0.0/0 Protocol: tcp } |
6. Start dante-server
The Code is as follows: |
Copy code |
Sockd-D
|
7. Check whether the port listening is successful:
The Code is as follows: |
Copy code |
Netstat-anp | grep LISTEN |