代理客户端设置
CCProxy的代理目标服务器 192.0.0.232
用户密码 lcyy
http 端口58080
socket 端口61080
一、永久设置
编辑配置文件
vi /etc/profile
在文件后添加以下内容:
export http_proxy=’http://代理服务器IP:端口号’
export https_proxy=’http://代理服务器IP:端口号’
例:
export http_proxy=10.50.101.148:38888
export https_proxy=10.50.101.148:38888
1.全局的代理设置:
vi /etc/profile
添加下面内容
http_proxy = http://username:password@yourproxy:8080/
ftp_proxy = http://username:password@yourproxy:8080/
export http_proxy
export ftp_proxy
http_proxy = http://lcyy:lcyy@192.0.0.232:58080/
https_proxy = http://lcyy:lcyy@192.0.0.232:58080/
export http_proxy
export https_proxy
2.yum的代理设置:
vi /etc/yum.conf
添加下面内容
proxy = http://username:password@yourproxy:8080/
或者
proxy=http://yourproxy:808
proxy=ftp://yourproxy:808
proxy_username=username
proxy_password=password
proxy = http://lcyy:lcyy@192.0.0.232:58080/
source /etc/profile
debian常用代理设置(有效)
https://blog.csdn.net/weixin_44071721/article/details/127162380
echo ‘export https_proxy=”http://127.0.0.1:7890″‘ >> ~/.bashrc
echo ‘export http_proxy=$https_proxy’ >> ~/.bashrc
echo ‘export ftp_proxy=$https_proxy’ >> ~/.bashrc
echo ‘export proxy=$https_proxy’ >> ~/.bashrc
echo ‘export HTTPS_PROXY=$https_proxy’ >> ~/.bashrc
echo ‘export HTTP_PROXY=$https_proxy’ >> ~/.bashrc
echo ‘export FTP_PROXY=$https_proxy’ >> ~/.bashrc
echo ‘export PROXY=$https_proxy’ >> ~/.bashrc
取消代理;
vi ~/.bashrc # 编辑.bashrc文件删除或注释代理设置;
重启服务器
reboot now