Normally we can use Yum install Nginx to install Nginx in CentOS. But usually the installed nginx is not up to date, so how do you install the latest version of Nginx with Yum?
1, edit/etc/yum.repos.d/nginx.repo file, 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 are using Rhel to change the "OS" in the above content to Rhel. If using RHEL6 or CentOS6, then change the above "5" to 6.
2, the implementation of Yum update
3, the implementation of Yum install Nginx
You can finish installing the latest version of Nginx.
The method is also suitable for rhel system.
Install the SOCKS5 proxy server Dante-server
1, download the source code:
Download the latest stable version source (currently 1.3.2) on Dante-server's official web page:
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 users to the SOCKS5 proxy client authentication:
The code is as follows |
Copy Code |
Useradd Proxyuser |
4, to just add the user set Password:
The code is as follows |
Copy Code |
passwd Proxyuser
|
5, edit/etc/passwd, the Proxyuser shell into/bin/nologin, prohibit the user login system permissions.
6, edit/etc/sockd.conf, 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 monitoring success:
The code is as follows |
Copy Code |
NETSTAT-ANP | grep LISTEN |