เมื่อทำตาม พรบ. คอมฯ อะไรที่เคยง่ายๆ ก็ลำบากขึ้น ไม่ว่าจะต้องใส่ username, password ก่อนเล่นเวบ
port 80 ก็ต้องปิดลง เพราะให้ผ่าน proxy Authen
apt-get update ที่เคยใช้งานผ่าน 80 อย่างสะดวกก็ต้องจบลง แล้วต้องทำไงหว่า.... ถึงจะ apt-get ผ่าน Proxy ก็ต้องพึ่ง google ตามระเบียบ ได้ความมาว่า
Setting up apt-get to use a http-proxy
These are three methods of using apt-get with a http-proxy.
Temporary proxy session
This
is a temporary method that you can manually use each time you want to
use apt-get through a http-proxy. This method is useful if you only
want to temporarily use a http-proxy.
Enter this line in the terminal prior to using apt-get (substitute your details for yourproxyaddress and proxyport).
export http_proxy=http://yourproxyaddress:proxyport
APT configuration file method
This method uses the apt.conf file which is found in your /etc/apt/ directory. This method is useful if you only want apt-get (and not other applications) to use a http-proxy permanently.
|
On some installations there will be no apt-conf file set up. This |
gksudo gedit /etc/apt/apt.conf
Add this line to your /etc/apt/apt.conf file (substitute your details for yourproxyaddress and proxyport).
Acquire::http::Proxy "http://yourproxyaddress:proxyport";
Save the apt.conf file.
BASH rc method
This
method adds a two lines to your .bashrc file in your $HOME directory.
This method is useful if you would like apt-get and other applications
for instance wget, to use a http-proxy.
gedit ~/.bashrc
Add these lines to the bottom of your ~/.bashrc file (substitute your details for yourproxyaddress and proxyport)
http_proxy=http://yourproxyaddress:proxyport export http_proxy
Save the file. Close your terminal window and then open another terminal window or source the ~/.bashrc file:
source ~/.bashrc
Test
your proxy with sudo apt-get update and whatever networking tool you
desire. You can use firestarter or conky to see active connections.
If you make a mistake and go back to edit the file again, you can close the terminal and reopen it or you can source ~/.bashrc as shown above.
source ~/.bashrc
How to login a proxy user
If
you need to login to the Proxy server this can be achieved in most
cases by using the following layout in specifying the proxy address in
http-proxy. (substitute your details for username, password, yourproxyaddress and proxyport)
http_proxy=http://username:password@yourproxyaddress:proxyport
ที่มา : https://help.ubuntu.com/community/AptGet/Howto?action=show&redirect=AptGetHowto
- sothorn's blog
- อ่าน 2602 ครั้ง
