假如校 園網(wǎng)內(nèi)的代理服務器為 192.168.0.1:3128,那么在終端設置代理設置,在文件.bash_profile(在root目錄下)文件中添加: //---------------------- http_proxy=192.168.0.1:3128 ftp_proxy=192.168.0.1:3128 export http_proxy export ftp_proxy //------------------ 
假如校園網(wǎng)內(nèi)的代理服務器為 192.168.0.1:3128,那么在終端設置代理設置,在文件.bash_profile(在root目錄下)文件中添加:
//----------------------
http_proxy=192.168.0.1:3128
ftp_proxy=192.168.0.1:3128
export http_proxy
export ftp_proxy
//----------------------
然后執(zhí)行
source .bash_profile
查看一下是否設置成功
[root@localhost ~]# echo $http_proxy
192.168.0.1:3128
[root@localhost ~]#
測試一下是否成功,使用wget這個下載工具測試。
[root@localhost ~]# wget http://mdsx./teacher/lulp/pic/04.mp3 
--10:06:01-- http://mdsx./teacher/lulp/pic/04.mp3
=> `04.mp3'
正在連接 192.168.0.1:3128... 已連接。
已發(fā)出 Proxy 請求,正在等待回應... 200 OK,長度:
4,701,622 [audio/mpeg]
100%[============>] 4,701,622 635.27K/s ETA 00:00
10:06:09 (584.74 KB/s) - `04.mp3' saved [4,701,622/4,701,622]
注意:其中代理服務器192.168.0.1要根據(jù)你的局域網(wǎng)具體情況而設置,從上面可以看到,測試成功。