一些代理的设置

来源:互联网 发布:心动网络 绑定手机 编辑:程序博客网 时间:2024/05/22 04:52

git代理设置:

1. 安装socat
   sudo apt-get install socat
2. 编写配置文件gitproxy
(1)找到socat的安装目录,通常才/usr/bin,并在此目录下创建gitproxy文件,文件内容如下:
#!/bin/sh
# Use socat to proxy git through an HTTP CONNECT firewall.
# Useful if you are trying to clone git:// from inside a company.
# Requires that the proxy allows CONNECT to port 9418.
#
# Save this file as gitproxy somewhere in your path (e.g., ~/bin) and then run
# chmod +x gitproxy
# git config --global core.gitproxy gitproxy
#
# More details at http://tinyurl.com/8xvpny
# Configuration. Common proxy ports are 3128, 8123, 8000.

_proxy=172.19.6.47
_proxyport=8080
_proxyauth=username:password

16.exec socat STDIO PROXY:$_proxy:$1:$2,proxyport=$_proxyport,proxyauth=$_proxyauth
(2)增加gitproxy可执行权限
     sudo chmod a+x gitproxy
(3)配置git的全局代理
      git config --global core.gitporxy gitproxy

 

wget代理设置:

修改/etc/wgetrc
http_proxy= 172.19.6.47:8080
proxy-user=q00324898
proxy-passwd=xxx
proxy=on

 

samba设置:

1.检测Samba是否已经安装
#rpm -qa | grep samba
2.安装
#sudo apt-get install samba
3.启动/关闭/重新启动Samba服务器:
#sudo /etc/init.d/samba start
#sudo /etc/init.d/samba stop
#sudo /etc/init.d/samba restart
4.ps命令查看进程:
#ps -aux
5.配置Samba服务
#sudo vim /etc/samba/smb.conf
[share]
comment=this is Linux share directory
path=/home/myth/share
public=yes
writable=yes

注意:centos上需要设置setenforce,否则共享文件不可编辑

0 0