<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>centos - 十步回眸一笑 - 个人技术笔记</title>
	<atom:link href="https://www.hishd.top/archives/tag/centos/feed" rel="self" type="application/rss+xml" />
	<link>https://www.hishd.top</link>
	<description></description>
	<lastBuildDate>Sun, 01 Jan 2023 14:33:03 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>国内服务器通过V2ray加速Github</title>
		<link>https://www.hishd.top/archives/75</link>
					<comments>https://www.hishd.top/archives/75#respond</comments>
		
		<dc:creator><![CDATA[DB.Russell]]></dc:creator>
		<pubDate>Fri, 16 Dec 2022 19:13:24 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[linux]]></category>
		<guid isPermaLink="false">https://www.hishd.top/?p=75</guid>

					<description><![CDATA[最近遇到很尴尬的一个问题，国内的服务器在访问GitHub拉项目的时候经常等待连接等很久很久，而且速度只有可怜的 [&#8230;]]]></description>
										<content:encoded><![CDATA[
<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>最近遇到很尴尬的一个问题，国内的服务器在访问GitHub拉项目的时候经常等待连接等很久很久，而且速度只有可怜的几十KB/s，既然v2ray有Linux客户端，那就用来做代理加速吧！</p>
</blockquote>



<ul class="wp-block-list">
<li>前提，你首先需要有”梯子“！</li>
</ul>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p>首先，把V2Ray的Linux客户端文件下载到服务器上</p>



<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained">
<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained">
<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained">
<pre class="wp-block-code"><code>wget https://github.com/v2fly/v2ray-core/releases/download/v5.1.0/v2ray-linux-64.zip #Linux-x86-64-v5.1.0
wget https://github.com/v2fly/v2ray-core/releases/download/v5.1.0/v2ray-linux-32.zip #Linux-x86-32-v5.1.0</code></pre>
</div></div>
</div></div>
</div></div>



<p>创建文件夹并使用unzip解压：</p>



<pre class="wp-block-code"><code>mkdir v2ray &amp; unzip -d v2ray v2ray-linux-64.zip #32位自行替换文件名</code></pre>



<p>获取v2ray的json配置文件</p>



<figure class="wp-block-image size-full"><img fetchpriority="high" decoding="async" width="657" height="799" src="https://photo.hishd.top/2022/12/20221216182102579.png" alt="" class="wp-image-92"/></figure>



<p>把json配置文件上传到服务器上</p>



<p>测试配置文件是否有错误</p>



<figure class="wp-block-image size-full"><img decoding="async" width="531" height="108" src="https://photo.hishd.top/2022/12/20221216182430663.png" alt="" class="wp-image-93"/></figure>



<p>显示“Configuration OK”表示测试没有问题，接下来就运行v2ray</p>



<pre class="wp-block-code"><code>./v2ray run -c 配置文件名</code></pre>



<figure class="wp-block-image size-full"><img decoding="async" width="530" height="119" src="https://photo.hishd.top/2022/12/20221216183003849.png" alt="" class="wp-image-94"/></figure>



<p>没有提示报错的话，v2ray就已经在终端前台运行。如果终端连接断开的话，v2ray也会断开。</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p>设置代理：（只在当前终端生效）</p>



<pre class="wp-block-code"><code>export http_proxy="socks5://127.0.0.1:自定端口" #设置http通过socks5代理
export https_proxy="socks5://127.0.0.1:自定端口" #设置https通过socks5代理
export no_proxy="内网IP段" #设置本地地址不走代理</code></pre>



<p>除了可以使用socks5代理外，还可以使用http或http2来代理</p>



<p>通过curl命令来测试连通性</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1113" height="465" src="https://photo.hishd.top/2022/12/20221216190358236.png" alt="" class="wp-image-99"/></figure>



<p>查看当前代理：</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="281" height="65" src="https://photo.hishd.top/2022/12/20221216190637858.png" alt="" class="wp-image-100"/></figure>



<p> 取消当前代理：</p>



<pre class="wp-block-code"><code>unset http_proxy
unset https_proxy</code></pre>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-vivid-red-color">注意！！！</mark> 发现有一些脚本在使用代理后会提示“当前连接无法通过代理”，建议尝试使用其他连接方式</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.hishd.top/archives/75/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Centos Yum提示No URLs in mirrorlist错误</title>
		<link>https://www.hishd.top/archives/48</link>
					<comments>https://www.hishd.top/archives/48#respond</comments>
		
		<dc:creator><![CDATA[DB.Russell]]></dc:creator>
		<pubDate>Wed, 16 Nov 2022 20:24:25 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[yum]]></category>
		<guid isPermaLink="false">https://www.hishd.top/?p=48</guid>

					<description><![CDATA[当yum时提示 “Failed to download metadata for repo 'appstrea [&#8230;]]]></description>
										<content:encoded><![CDATA[
<ul class="wp-block-list">
<li>CentOS环境为 8.9 64bit</li>
</ul>



<p>当yum时提示 “Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist”</p>



<figure class="wp-block-image size-large"><img decoding="async" src="https://photo.hishd.top/20221117033416.png" alt=""/></figure>



<p>解决办法如下：</p>



<pre class="wp-block-code"><code>sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-Linux-*
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-Linux-*</code></pre>
]]></content:encoded>
					
					<wfw:commentRss>https://www.hishd.top/archives/48/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
