百度输入法华为版法

博客访问: 1995320
博文数量: 276
博客积分: 9440
博客等级: 少将
技术积分: 6921
注册时间:
认证徽章:
-- linux爱好者,业余时间热衷于分析linux内核源码
-- 目前主要研究云计算和虚拟化相关的技术,主要包括libvirt/qemu,openstack,opennebula架构和源码分析。
-- 第五届云计算大会演讲嘉宾
微博:@Marshal-Liu
APP发帖 享双倍积分
IT168企业级官微
微信号:IT168qiye
系统架构师大会
微信号:SACC2013
分类: LINUX
&&& 有些公司上网会有统一的http proxy服务器,一般公司会给你http的代理配置,这样你就可以通过http协议上网了,如果git server提供了http访问的方式,是没有问题的,但是如果git server只提供ssh访问,此时,就不能进行git 操作了,需要做一些配置才行。
1. 安装socat
sudo apt-get install socat
2. 编写配置文件gitproxy
& (1)找到socat的安装目录,通常才/usr/bin,并在此目录下创建gitproxy文件,文件内容如下:
# 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=proxy.yourcompany.com& #贵公司的代理服务器地址
_proxyport=3128&&&&&&&&&&&&&& #端口&
exec socat STDIO PROXY:$_proxy:$1:$2,proxyport=$_proxyport
(2)增加gitproxy可执行权限
&&&& sudo chmod a+x gitproxy
(3)配置git的全局代理
&&&&& git config --global core.gitporxy gitproxy
经过以上步骤,就可以执行git clone操作了。
阅读(8286) | 评论(0) | 转发(2) |
相关热门文章
给主人留下些什么吧!~~
请登录后评论。下次自动登录
现在的位置:
& 综合 & 正文
ubuntu下http代理设置
这是一种临时的手段,如果您仅仅是暂时需要通过http代理使用apt-get,您可以使用这种方式。
在使用apt-get之前,在终端中输入以下命令(根据您的实际情况替换yourproxyaddress和proxyport)。
export http_proxy=http://yourproxyaddress:proxyport
方法二这种方法要用到/etc/apt/文件夹下的apt.conf文件。如果您希望apt-get(而不是其他应用)一直使用http代理,您可以使用这种方式。注意: 某些情况下,系统安装过程中没有建立apt配置文件。下面的操作将视情况修改现有的配置文件或者新建配置文件。
sudo gedit /etc/apt/apt.conf在您的apt.conf文件中加入下面这行(根据你的实际情况替换yourproxyaddress和proxyport)。
Acquire::http::Proxy “http://yourproxyaddress:proxyport”;保存apt.conf文件。
方法三这种方法会在您的主目录下的.bashrc文件中添加两行。如果您希望apt-get和其他应用程序如wget等都使用http代理,您可以使用这种方式。gedit ~/.bashrc在您的.bashrc文件末尾添加如下内容(根据你的实际情况替换yourproxyaddress和proxyport)。
http_proxy=http://yourproxyaddress:proxyport
export http_proxy保存文件。关闭当前终端,然后打开另一个终端。使用apt-get update或者任何您想用的网络工具测试代理。我使用firestarter查看活动的网络连接。如果您为了纠正错误而再次修改了配置文件,记得关闭终端并重新打开,否自新的设置不会生效。或者通过source命令。
&&&&推荐文章:
【上篇】【下篇】在ubuntu中,如何设置通过代理服务器访问网络
一、临时设置代理服务的方式export http_proxy=http://yourproxyaddress:proxyport这种方式在你退出当前的shell之前,会影响到所有网络命令,包括wget,但一旦退出了这个shell,设置就失效了二、永久地使用代理服务器的方式需要在/etc/apt/apt.conf.d目录下创建一个配置文件30proxy:& & & &sudo vi /etc/apt/apt.conf.d/30proxy系统默认情况下没有这个文件,所以如果第一次运行这个命令,那么你打开的应该是一个空文件。请写入下边的设置:Acquire::http::Proxy &http://yourproxyaddress:proxyport&;然后保存退出文件,再运行apt-get相关命令时,这个代理服务器设置就可以生效了
最新教程周点击榜
微信扫一扫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/
(window.slotbydup=window.slotbydup || []).push({
id: '2467140',
container: s,
size: '1000,90',
display: 'inlay-fix'
(window.slotbydup=window.slotbydup || []).push({
id: '2467141',
container: s,
size: '1000,90',
display: 'inlay-fix'
(window.slotbydup=window.slotbydup || []).push({
id: '2467142',
container: s,
size: '1000,90',
display: 'inlay-fix'
(window.slotbydup=window.slotbydup || []).push({
id: '2467143',
container: s,
size: '1000,90',
display: 'inlay-fix'
(window.slotbydup=window.slotbydup || []).push({
id: '2467148',
container: s,
size: '1000,90',
display: 'inlay-fix'ubuntu:(设置终端代理IP)简单有效地设置全局代理上网 - 极乐鸟网站(Will)
现在位置:
>正文_ubuntu:(设置终端代理IP)简单有效地设置全局代理上网
ubuntu:简单有效地设置全局代理上网因为要在ubuntu系统上安装很多软件,但ubuntu系统所在的网络环境是需要使用http代理才能连接网络的。正常使用火狐等浏览器上网时,可以很简单的设置网络代理服务器,但若是在ubuntu的终端中使用sudo apt-get install 。。。这样的命令,浏览器中设置的代理就不能用了,因此我们必须对ubuntu的终端设置代理,使其能够在apt-get install 时联通网络。&1.通过export http代理使用apt-get(临时有效)& & 在使用apt-get之前,在终端中输入以下命令& & export http_proxy=& & 取消代理使用& & export http_proxy=""&2.apt.conf文件中配置http代理信息(永久有效)& & sudo gedit /etc/apt/apt.conf在您的apt.conf文件中加入下面这行& & Acquire::http::Proxy "";& & 保存apt.conf文件即可&3..bashrc文件中配置代理信息(apt-get, wget 等等)(全局有效)& & gedit ~/.bashrc 在.bashrc文件末尾添加如下内容& & export http_proxy=""& & 保存文件,重新开启终端。但我通过上述三种方法均没有成功,但我在系统设置的网络中设置了代理信息,重启终端后,apt-get便可以联通网络能够安装软件了。有图有真相,具体操作步骤参见下面的图示。ubuntu系统的右上角设置中的System Settings…Network设置中,右侧红框内,填入自己相关代理的地址和端口后,保存即可。提醒:如上保存完代理信息后,终端的窗口要重新打开才会有效的。
分享本文至:
WRITTEN BY
极乐鸟博客http://jileniao.net
看了本文是不是觉得很赞,那就赶紧点击下面按钮分享给身边的朋友吧!

我要回帖

更多关于 手机输入法哪个最好 的文章

 

随机推荐