tinyproxy
2017-07-31tinyproxy用来实现http或https代理
1、下载
#!/bin/sh
#wget ftp://ftp.jp.netbsd.org/pub/pkgsrc/distfiles/tinyproxy-1.8.4.tar.bz2
#wget https://fossies.org/linux/www/tinyproxy-1.8.4.tar.gz
#wget http://jaist.dl.sourceforge.net/project/asciidoc/asciidoc/8.6.9/asciidoc-8.6.9.tar.gz
2、实例错误:a2x no
configure: error: Test for asciidoc failed
yum install asciidoc
If asciidoc is not in your linux distribution or you are not root. you have to install it manually. download the asciidoc tarball from http://www.methods.co.nz/asciidoc/ and do the usual:
configure --prefix=${HOME} && make && make install
a2x - A toolchain manager for AsciiDoc (converts Asciidoc text files to other file formats)
#172.10.1.169 tinyproxy
#service tinyproxy restart
cd /opt
wget wallcopper.com/tar/asciidoc-8.6.9.tar.gz
wget wallcopper.com/tar/tinyproxy-1.8.4.tar.gz
3、安装
tar zxf asciidoc-8.6.9.tar.gz
pushd asciidoc-8.6.9
./configure;make;make install
popd
4、安装
tar zxf tinyproxy-1.8.4.tar.gz
pushd tinyproxy-1.8.4
./configure --prefix=/usr/local/tinyproxy
make;
make install;
popd
5、启动
/usr/local/tinyproxy/sbin/tinyproxy -c /etc/tinyproxy.conf
6、客户端/etc/bashrc
export http_proxy=http://172.16.1.9:8888/
export https_proxy=https://172.16.1.9:8888/
7、如果只是暂时使用代理,在命令行输入下面一条命令:
export http_proxy="http://210.45.72.XX:808"
8、对于长久使用代理的情况:
yum里面可以单独设置代理
就是yum源的参数加proxy=“http://ip:PORT”
即在/etc/yum.conf中加入下面几句.
proxy=http://210.45.72.XX:808
proxy_username=username
proxy_password=password
另外:
/root/.bashrc中加入:
export http_proxy="http://username:password@210.45.72.XX:808"