① linux服务器如何使用代理
不同的代理服务器设置略有 不同,具体分类操作如下:
设置HTTP及HTTPS代理
对于http及https类型的请求,可以通过设置http_proxy或。方法是export http_proxy=http://proxyaddress:port。
可以写在$HOME/.bash_profile或/etc/profile中。
设置tsocks代理
见:http://renyongjie668.blog.163.com/blog/static/16005312011824112410588/
有了tsocks代理,其实后面其他设置方式都不是很重要了,几乎都可以用tsocks来做。
设置SSH代理
同样用tsocks来实现代理。
Ubuntu中apt-get代理设置
新版的Ubuntu已经不支持export http_proxy就能给apt-get设置代理的方式了。这种方法要用到/etc/apt/文件夹下的apt.conf文件。注意: 某些情况下,系统安装过程中没有建立apt配置文件。下面的操作将视情况修改现有的配置文件或者新建配置文件。
sudo vi /etc/apt/apt.conf
在您的apt.conf文件中加入下面这行(根据你的实际情况替换yourproxyaddress和proxyport)。
Acquire::http::Proxy "http://proxyaddress:port";
如果需要用户名密码登陆:
Acquire::http::Proxy "http://username:password@proxyaddress:port";
保存apt.conf文件。(其他的协议自己可以适当修改)
② 如何将linux设置为代理服务器
linux自带firefox 打开FireFox,编辑->首选项->常规->连接 设置FF访问因特网的方式 连接设置 手动配置代理 然后输入代理服务器IP和端口号即可。
③ linux 如何设置代理
linux设置代理linux系统设置yum,wget,rpm命令使用代理:1.Using
yum
with
a
proxyserver---------------------------------------To
enable
yum
operations
to
use
aproxy
server
you
should
first
add
the
following
parameter
to
/etc/yum.conf
proxy=http://yourproxy:8080/
where
yourproxy
is
the
name
of
the
proxy
server
you
want
to
access
and
8080
isthe
proxy
port.
If
the
server
requires
authentication
you
can
specify
the
logincredentials
like:proxy=http://username:password@yourproxy:8080/---------------------------------------2.
The
rpm
package
manager
makesuse
of
the
proxy
environment
variable.
This
can
be
set
system
wide
in
/etc/profile
or
user
specific
in
~/.bash_profile:export
http_proxy=http://yourproxy:8080/export
ftp_proxy=http://yourproxy:8080/---------------------------------------3.
To
use
wget
throug
a
proxy
serveradd
the
following
lines
to
/etc/wgetrc
http_proxy
=
http://yourproxy:8080/
ftp_proxy
=
http://yourproxy:8080/
④ Linux上如何搭建代理给其他电脑用
可以配置单网卡代理服务器。
安装squid代理服务器之后,需要设置Linux的主机名为FQDN的格式,并且要保证能够解析出来。
首先运行squid -z进行初始化,然后要修改squid的配置文件:/etc/squid/squid.conf
加入如下条目:
acl mynet 192.168.1.0/24
http_access allow mynet
启动服务:service squid start
图形化的工具可以尝试webmin