CentOS中安裝nginx與socks5Proxy 伺服器dante-server方法

來源:互聯網
上載者:User

通常我們在CentOS裡可以使用 yum install nginx來安裝nginx。但是通常安裝的nginx不是最新的,那麼如何才能用yum安裝最新版本的nginx呢?

1、編輯 /etc/yum.repos.d/nginx.repo 檔案,寫入以下內容:

 代碼如下 複製代碼
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/CentOS/5/$basearch/
gpgcheck=0
enabled=1

如果你是使用RHEL將以上內容中的“OS”更換為rhel即可。如果使用使用的是RHEL6或者CentOS6,則將上面的“5”改成6即可。

2、執行yum update

3、執行 yum install nginx

即可完成安裝最新版本的nginx。

該方法同樣適用於RHEL系統。

安裝socks5Proxy 伺服器dante-server

1、下載源碼:

在dante-server的官方網頁上下載最新穩定版本源碼(目前是1.3.2):

http://www.inet.no/dante/download.html

2、編譯:

 代碼如下 複製代碼
tar -xzf dante-1.3.2.tar.gz
cd dante-1.3.2
./configure
make
make install

3、添加使用者用於socks5代理用戶端的驗證:

 代碼如下 複製代碼

useradd proxyuser

4、給剛添加的使用者佈建密碼:

 代碼如下 複製代碼
passwd proxyuser

5、編輯 /etc/passwd,將proxyuser的shell改成 /bin/nologin,禁止該使用者登入系統的許可權。

6、編輯 /etc/sockd.conf,將內容設定如下:

 代碼如下 複製代碼

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、啟動dante-server

 代碼如下 複製代碼
sockd -D

7、檢查連接埠監聽是否成功:

 代碼如下 複製代碼

netstat -anp | grep LISTEN

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.