一些代理的设置

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,否则共享文件不可编辑

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值