-
Notifications
You must be signed in to change notification settings - Fork 0
/
atom.xml
259 lines (224 loc) · 24.5 KB
/
atom.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title><![CDATA[Anker Lee]]></title>
<subtitle><![CDATA[Anker Lee's Blog]]></subtitle>
<link href="/atom.xml" rel="self"/>
<link href="http://ankerlee.github.io/"/>
<updated>2015-05-21T10:15:00.000Z</updated>
<id>http://ankerlee.github.io/</id>
<author>
<name><![CDATA[Anker Lee]]></name>
</author>
<generator uri="http://hexo.io/">Hexo</generator>
<entry>
<title><![CDATA[Linux FTP架设]]></title>
<link href="http://ankerlee.github.io/2015/05/21/Linux-FTP%E6%9E%B6%E8%AE%BE/"/>
<id>http://ankerlee.github.io/2015/05/21/Linux-FTP架设/</id>
<published>2015-05-21T10:15:00.000Z</published>
<updated>2015-05-21T10:15:00.000Z</updated>
<content type="html"><![CDATA[<blockquote>
<p>文章欢迎转载,但转载时请保留本段文字,并置于文章的顶部<br>作者:Anker Lee<br>本文原文地址:<a href="http://ankerlee.github.io/2015/05/21/Linux-FTP架设" target="_blank" rel="external">http://ankerlee.github.io/2015/05/21/Linux-FTP架设</a></p>
</blockquote>
<hr>
<h2 id="FTP安装和配置">FTP安装和配置</h2><h3 id="检测和安装vsftpd">检测和安装vsftpd</h3><pre><code>[root<span class="property">@localhost</span> <span class="reserved">var</span>]<span class="comment"># vsftpd #检测是否已经安装ftp</span>
-<span class="attribute">bash</span>: <span class="attribute">vsftpd</span>: command <span class="keyword">not</span> found
[root<span class="property">@localhost</span> <span class="reserved">var</span>]<span class="comment"># ll /etc/vsftpd</span>
<span class="attribute">ls</span>: 无法访问/etc/<span class="attribute">vsftpd</span>: 没有那个文件或目录
[root<span class="property">@localhost</span> <span class="reserved">var</span>]<span class="comment"># yum install vsftpd #安装ftp</span>
</code></pre><a id="more"></a>
<h3 id="默认配置下启动vsftpd">默认配置下启动vsftpd</h3><pre><code>[root<span class="variable">@localhost</span> ~]<span class="comment"># /etc/init.d/vsftpd start</span>
为 vsftpd 启动 vsftpd: [确定]
[root<span class="variable">@localhost</span> ~]<span class="comment"># netstat -tulnp|grep 21</span>
tcp <span class="number">0</span> <span class="number">0</span> <span class="number">0</span>.<span class="number">0</span>.<span class="number">0</span>.<span class="number">0</span><span class="symbol">:</span><span class="number">21</span> <span class="number">0</span>.<span class="number">0</span>.<span class="number">0</span>.<span class="number">0</span><span class="symbol">:*</span> <span class="constant">LISTEN </span> <span class="number">1399</span>/vsftpd
[root<span class="variable">@localhost</span> ~]<span class="comment">#</span>
</code></pre><h3 id="临时关闭防火墙">临时关闭防火墙</h3><pre><code>[root<span class="property">@localhost</span> ~]<span class="comment"># service iptables stop</span>
</code></pre><h3 id="本机测试ftp连接">本机测试ftp连接</h3><pre><code>[<span class="literal">root</span>@localhost ~]<span class="comment"># ftp localhost</span>
这时候出现报错信息:-bash: ftp: <span class="literal">command</span> not found,原因是未安装ftp客户端,<span class="constant">O</span>K,我们来安装ftp客户端,为了下载ftp客户端的安装包,我们先安装下载组件
[<span class="literal">root</span>@localhost ~]<span class="comment"># yum install wget</span>
接着,我们下载ftp客户端安装包
[<span class="literal">root</span>@localhost ~]<span class="comment"># wget http://mirror.centos.org/centos/6/os/x86_64/Packages/ftp-0.17-54.el6.x86_64.rpm</span>
最后,安装ftp客户端
[<span class="literal">root</span>@localhost ~]<span class="comment"># rpm ftp-0.17-54.el6.x86_64.rpm</span>
再次本机测试ftp连接
[<span class="literal">root</span>@localhost ~]<span class="comment"># ftp localhost</span>
<span class="constant">Trying</span> ::<span class="number">1</span>...
ftp: connect to address ::<span class="number">1</span>拒绝连接
<span class="constant">Trying</span> <span class="number">127.0</span>.<span class="number">0</span>.<span class="number">1</span>...
<span class="constant">Connected</span> to localhost (<span class="number">127.0</span>.<span class="number">0</span>.<span class="number">1</span>).
<span class="number">220</span> (vsFTPd <span class="number">2.2</span>.<span class="number">2</span>)
<span class="constant">Name</span> (localhost:<span class="literal">root</span>): anonymous <span class="comment">#输入匿名账号</span>
<span class="number">331</span> <span class="constant">Please</span> specify the <span class="literal">password</span>.
<span class="constant">Password</span>: <span class="comment">#不需要输入密码,直接回车</span>
<span class="number">230</span> <span class="constant">Login</span> successful.
<span class="constant">Remote</span> <span class="literal">system</span> <span class="built_in">type</span> is <span class="constant">U</span>NIX.
<span class="constant">Using</span> <span class="literal">binary</span> <span class="literal">mode</span> to transfer files.
ftp>
<span class="constant">O</span>K,本地ftp连接成功!
</code></pre><h3 id="非本机测试ftp连接">非本机测试ftp连接</h3><p>浏览器输入: ftp://192.168.16.112,成功自动以匿名账号登陆,如下图所示:<br><img src="http://7xj72a.com1.z0.glb.clouddn.com/centos_ftp_1.png" alt=""></p>
<h3 id="开启并配置防火墙,以允许ftp访问(待续…)">开启并配置防火墙,以允许ftp访问(待续…)</h3>]]></content>
<summary type="html">
<![CDATA[<blockquote>
<p>文章欢迎转载,但转载时请保留本段文字,并置于文章的顶部<br>作者:Anker Lee<br>本文原文地址:<a href="http://ankerlee.github.io/2015/05/21/Linux-FTP架设">http://ankerlee.github.io/2015/05/21/Linux-FTP架设</a></p>
</blockquote>
<hr>
<h2 id="FTP安装和配置">FTP安装和配置</h2><h3 id="检测和安装vsftpd">检测和安装vsftpd</h3><pre><code>[root<span class="property">@localhost</span> <span class="reserved">var</span>]<span class="comment"># vsftpd #检测是否已经安装ftp</span>
-<span class="attribute">bash</span>: <span class="attribute">vsftpd</span>: command <span class="keyword">not</span> found
[root<span class="property">@localhost</span> <span class="reserved">var</span>]<span class="comment"># ll /etc/vsftpd</span>
<span class="attribute">ls</span>: 无法访问/etc/<span class="attribute">vsftpd</span>: 没有那个文件或目录
[root<span class="property">@localhost</span> <span class="reserved">var</span>]<span class="comment"># yum install vsftpd #安装ftp</span>
</code></pre>]]>
</summary>
<category term="FTP" scheme="http://ankerlee.github.io/tags/FTP/"/>
<category term="centos" scheme="http://ankerlee.github.io/tags/centos/"/>
<category term="linux" scheme="http://ankerlee.github.io/tags/linux/"/>
<category term="最小化安装" scheme="http://ankerlee.github.io/tags/%E6%9C%80%E5%B0%8F%E5%8C%96%E5%AE%89%E8%A3%85/"/>
</entry>
<entry>
<title><![CDATA[Linux 时钟同步]]></title>
<link href="http://ankerlee.github.io/2015/05/21/Linux-%E6%97%B6%E9%92%9F%E5%90%8C%E6%AD%A5/"/>
<id>http://ankerlee.github.io/2015/05/21/Linux-时钟同步/</id>
<published>2015-05-21T06:30:59.000Z</published>
<updated>2015-05-21T06:30:59.000Z</updated>
<content type="html"><![CDATA[<blockquote>
<p>文章欢迎转载,但转载时请保留本段文字,并置于文章的顶部<br>作者:Anker Lee<br>本文原文地址:<a href="http://ankerlee.github.io/2015/05/21/Linux-时钟同步" target="_blank" rel="external">http://ankerlee.github.io/2015/05/21/Linux-时钟同步</a></p>
</blockquote>
<hr>
<h2 id="时间同步配置">时间同步配置</h2><h3 id="配置时间服务器">配置时间服务器</h3><pre><code>[root<span class="property">@localhost</span> etc]<span class="comment"># date</span>
<span class="number">2015</span>年 <span class="number">05</span>月 <span class="number">21</span>日 星期四 <span class="number">22</span>:<span class="number">04</span>:<span class="number">18</span> CST <span class="comment">#错误的时间</span>
[root<span class="property">@localhost</span> etc]<span class="comment"># ntpdate</span>
-<span class="attribute">bash</span>: <span class="attribute">ntpdate</span>: command <span class="keyword">not</span> found
</code></pre><a id="more"></a>
<pre><code>[root@localhost etc]<span class="comment"># yum install ntpdate</span>
<span class="keyword">...</span>这里省略安装过程中的输出文本
Complete!
[root@localhost etc]<span class="comment"># ntpdate time.nist.gov</span>
<span class="number">21</span> May <span class="number">14</span>:<span class="number">06</span>:<span class="number">11</span> ntpdate[<span class="number">1316</span>]: step time server <span class="number">128.138</span><span class="number">.141</span><span class="number">.172</span> offset -<span class="number">28801.756893</span> sec
[root@localhost etc]<span class="comment"># date</span>
<span class="number">2015</span>年 <span class="number">05</span>月 <span class="number">21</span>日 星期四 <span class="number">14</span>:<span class="number">06</span>:<span class="number">18</span> CST <span class="comment">#正确的时间</span>
</code></pre><p>推荐几个权威的时间同步服务器:</p>
<blockquote>
<p>time.nist.gov<br>time.nuri.net<br>asia.pool.ntp.org<br>asia.pool.ntp.org<br>asia.pool.ntp.org<br>asia.pool.ntp.org</p>
</blockquote>
<h3 id="自动时间同步设置">自动时间同步设置</h3><pre><code>[root@localhost etc]<span class="comment"># service crond status</span>
crond (pid <span class="number">1129</span>) 正在运行<span class="keyword">...</span>
[root@localhost etc]<span class="comment"># vim /etc/crontab</span>
<span class="comment">#编辑crontab文件,在最后面追加*/10 * * * * ntpdate time.nist.gov,表示没10分钟同步一次时间</span>
[root@localhost etc]<span class="comment"># cat /etc/crontab</span>
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/
For details see man <span class="number">4</span> crontabs
Example of job definition:
.---------------- minute (<span class="number">0</span> - <span class="number">59</span>)
| .------------- hour (<span class="number">0</span> - <span class="number">23</span>)
| | .---------- day of month (<span class="number">1</span> - <span class="number">31</span>)
| | | .------- month (<span class="number">1</span> - <span class="number">12</span>) OR jan,feb,mar,apr <span class="keyword">...</span>
| | | | .---- day of week (<span class="number">0</span> - <span class="number">6</span>) (Sunday=<span class="number">0</span> or <span class="number">7</span>) OR sun,mon,tue,wed,thu,fri,sat
| | | | |
* * * * * user-name command to be executed
*/<span class="number">10</span> * * * * ntpdate time.nist.gov
[root@localhost etc]<span class="comment">#</span>
</code></pre><p>crontab文件格式和含义:<br><img src="http://7xj72a.com1.z0.glb.clouddn.com/linux_time_1.png" alt=""></p>
<blockquote>
<p>minute: 表示分钟,可以是从0到59之间的任何整数。<br>hour:表示小时,可以是从0到23之间的任何整数。<br>day:表示日期,可以是从1到31之间的任何整数。<br>month:表示月份,可以是从1到12之间的任何整数。<br>week:表示星期几,可以是从0到7之间的任何整数,这里的0或7代表星期日。<br>command:要执行的命令,可以是系统命令,也可以是自己编写的脚本文件。</p>
<p>在以上各个字段中,还可以使用以下特殊字符:<br>星号(<em>):代表所有可能的值,例如month字段如果是星号,则表示在满足其它字段的制约条件后每月都执行该命令操作。<br>逗号(,):可以用逗号隔开的值指定一个列表范围,例如,“1,2,5,7,8,9”<br>中杠(-):可以用整数之间的中杠表示一个整数范围,例如“2-6”表示“2,3,4,5,6”<br>正斜线(/):可以用正斜线指定时间的间隔频率,例如“0-23/2”表示每两小时执行一次。同时正斜线可以和星号一起使用,例如</em>/10,如果用在minute字段,表示每十分钟执行一次。</p>
</blockquote>
]]></content>
<summary type="html">
<![CDATA[<blockquote>
<p>文章欢迎转载,但转载时请保留本段文字,并置于文章的顶部<br>作者:Anker Lee<br>本文原文地址:<a href="http://ankerlee.github.io/2015/05/21/Linux-时钟同步">http://ankerlee.github.io/2015/05/21/Linux-时钟同步</a></p>
</blockquote>
<hr>
<h2 id="时间同步配置">时间同步配置</h2><h3 id="配置时间服务器">配置时间服务器</h3><pre><code>[root<span class="property">@localhost</span> etc]<span class="comment"># date</span>
<span class="number">2015</span>年 <span class="number">05</span>月 <span class="number">21</span>日 星期四 <span class="number">22</span>:<span class="number">04</span>:<span class="number">18</span> CST <span class="comment">#错误的时间</span>
[root<span class="property">@localhost</span> etc]<span class="comment"># ntpdate</span>
-<span class="attribute">bash</span>: <span class="attribute">ntpdate</span>: command <span class="keyword">not</span> found
</code></pre>]]>
</summary>
<category term="centos" scheme="http://ankerlee.github.io/tags/centos/"/>
<category term="linux" scheme="http://ankerlee.github.io/tags/linux/"/>
<category term="时钟同步" scheme="http://ankerlee.github.io/tags/%E6%97%B6%E9%92%9F%E5%90%8C%E6%AD%A5/"/>
<category term="最小化安装" scheme="http://ankerlee.github.io/tags/%E6%9C%80%E5%B0%8F%E5%8C%96%E5%AE%89%E8%A3%85/"/>
</entry>
<entry>
<title><![CDATA[CentOS 6.5 最小化安装 网络配置]]></title>
<link href="http://ankerlee.github.io/2015/05/21/CentOS-6-5-%E6%9C%80%E5%B0%8F%E5%8C%96%E5%AE%89%E8%A3%85-%E7%BD%91%E7%BB%9C%E9%85%8D%E7%BD%AE/"/>
<id>http://ankerlee.github.io/2015/05/21/CentOS-6-5-最小化安装-网络配置/</id>
<published>2015-05-21T06:13:04.000Z</published>
<updated>2015-05-21T06:13:04.000Z</updated>
<content type="html"><![CDATA[<blockquote>
<p>文章欢迎转载,但转载时请保留本段文字,并置于文章的顶部<br>作者:Anker Lee<br>本文原文地址:<a href="http://ankerlee.github.io/2015/05/20/CentOS-6-5-最小化安装-网络配置" target="_blank" rel="external">http://ankerlee.github.io/2015/05/20/CentOS-6-5-最小化安装-网络配置</a></p>
</blockquote>
<hr>
<h2 id="相关环境">相关环境</h2><ol>
<li>我用的是Mac book pro,系统是Mac OS X Yosemite</li>
<li><a href="">VMware Fusion</a>(请自行安装,这里不叙述VMware Fusion的安装过程)</li>
<li><a href="">CentOS-6.5-x86_64-minimal.iso</a>(请自行通过VMware Fusion安装,这里不叙述CentOS最小化的安装过程)</li>
</ol>
<h2 id="CentOS网络配置图文详解">CentOS网络配置图文详解</h2><h3 id="尝试连接网络">尝试连接网络</h3><p>例如连接内网网关,我的内网网关是192.168.16.1,<code>ping 192.168.16.1</code>,提示错误:Network is unreachable,见下图所示:<br><img src="http://7xj72a.com1.z0.glb.clouddn.com/centos_net_1.png" alt=""><br><a id="more"></a></p>
<h3 id="查看默认网络配置情况">查看默认网络配置情况</h3><p>以上问题说明,最小化安装后,网络不可用,OK,现在,我们开始配置网络,首先查看网络配置情况(以下图示情况可能因为CentOS安装过程中是否有做网络配置而不同,我在安装过程中有做过配置,当然即使做过配置,也是不可用的,因为最小化安装后,默认不会在系统启动的后自动启动网络配置),输入命令<code>cd /etc/sysconfig/network-scripts/</code>,然后输入<code>cat ifcfg-eth0</code>查看网络配置情况:<br><img src="http://7xj72a.com1.z0.glb.clouddn.com/centos_net_2.png" alt=""><br>可以看到,我这里已经有一些默认配置了,其实是我在CentOS最小化安装过程中有做配置,这里放上我在安装过程中配置网络参数的截图(没有在CentOS安装过程中配置网络参数的,可以直接编辑ifcfg-eth0文件,根据自己的实际情况设置网络参数):<br><img src="http://7xj72a.com1.z0.glb.clouddn.com/centos_net_3.png" alt=""><br><img src="http://7xj72a.com1.z0.glb.clouddn.com/centos_net_4.png" alt=""></p>
<h3 id="修改网络配置">修改网络配置</h3><p>OK,这里的关键点就是ONBOOT这个参数了,表示是否在系统启动的时候自动启用网络配置,可以看到默认是no,我们要将它改为yes,输入命令:<code>vi ifcfg-eth0</code>,进入到vi编辑界面,并且修改ONBOOT值为yes(这里忽略vi编辑器的基本操作方法讲解,请自行查阅vi操作的相关资料):<br><img src="http://7xj72a.com1.z0.glb.clouddn.com/cenos_net_5.png" alt=""></p>
<h3 id="重启网路配置">重启网路配置</h3><p>退出vi编辑后,重启网络配置,输入命令:<code>/etc/init.d/network restart</code>或者<code>service network restart</code><br><img src="http://7xj72a.com1.z0.glb.clouddn.com/centos_net_6.png" alt=""></p>
<h3 id="重试内网连接">重试内网连接</h3><p>OK,现在,可以再次试试ping一下内网ip,例如:<code>ping 192.168.16.1</code><br><img src="http://7xj72a.com1.z0.glb.clouddn.com/centos_net_7.png" alt=""><br>现在可以看到,已经能够成功ping通内网了,说明网络已经成功连接了哦!当然,也可以ping通外网,不过你需要通过ip来ping,而不能通过域名地址,比如<code>ping www.baidu.com</code>这是ping不通的,因为还没有配置域名服务器哦,OK,接下来,我会继续讲解如何设置域名服务器地址</p>
<h3 id="SSH远程连接">SSH远程连接</h3><p>接下来,为了方便从网络上copy东东(比如网址)直接黏贴到CentOS的文本交互界面,我们接下来采用SSH的方式(我们不是已经配置好网络了么,所以我们现在可以通过SSH远程控制来操作CentOS了哦),通过我的物理主机(也就是我的Mac笔记本)来操作我的装载虚拟机里面的CentOS,OK,马上SSH登陆上我的CentOS,输入命令<code>ssh root@192.168.16.112</code>输入密码后,成功登陆!接下来,就让我们通过SSH来继续配置CentOS吧!!!下图为SSH登陆截图:<br><img src="http://7xj72a.com1.z0.glb.clouddn.com/centos_net_8.png" alt=""></p>
<h3 id="修改域名服务器配置">修改域名服务器配置</h3><p>Now,输入命令:<code>vi /etc/resolv.conf</code>,请按照下图编辑(当然你也可以输入其它正确的域名地址):<br><img src="http://7xj72a.com1.z0.glb.clouddn.com/centos_net_9.png" alt=""></p>
<h3 id="重试外网连接">重试外网连接</h3><p>OK,保存并退出vi编辑后,再次重启网络配置,输入命令:<code>/etc/init.d/network restart</code>或者<code>service network restart</code>,然后再次实施<code>ping www.baidu.com</code>,魔法是不是产生了?可以成功ping通百度了,OK,至此,你可以自由翱翔于网络世界了,例如可以通过wget来下载东西了!!!<br><img src="http://7xj72a.com1.z0.glb.clouddn.com/centos_net_10.png" alt=""></p>
]]></content>
<summary type="html">
<![CDATA[<blockquote>
<p>文章欢迎转载,但转载时请保留本段文字,并置于文章的顶部<br>作者:Anker Lee<br>本文原文地址:<a href="http://ankerlee.github.io/2015/05/20/CentOS-6-5-最小化安装-网络配置">http://ankerlee.github.io/2015/05/20/CentOS-6-5-最小化安装-网络配置</a></p>
</blockquote>
<hr>
<h2 id="相关环境">相关环境</h2><ol>
<li>我用的是Mac book pro,系统是Mac OS X Yosemite</li>
<li><a href="">VMware Fusion</a>(请自行安装,这里不叙述VMware Fusion的安装过程)</li>
<li><a href="">CentOS-6.5-x86_64-minimal.iso</a>(请自行通过VMware Fusion安装,这里不叙述CentOS最小化的安装过程)</li>
</ol>
<h2 id="CentOS网络配置图文详解">CentOS网络配置图文详解</h2><h3 id="尝试连接网络">尝试连接网络</h3><p>例如连接内网网关,我的内网网关是192.168.16.1,<code>ping 192.168.16.1</code>,提示错误:Network is unreachable,见下图所示:<br><img src="http://7xj72a.com1.z0.glb.clouddn.com/centos_net_1.png" alt=""><br>]]>
</summary>
<category term="centos" scheme="http://ankerlee.github.io/tags/centos/"/>
<category term="linux" scheme="http://ankerlee.github.io/tags/linux/"/>
<category term="最小化安装" scheme="http://ankerlee.github.io/tags/%E6%9C%80%E5%B0%8F%E5%8C%96%E5%AE%89%E8%A3%85/"/>
<category term="网络配置" scheme="http://ankerlee.github.io/tags/%E7%BD%91%E7%BB%9C%E9%85%8D%E7%BD%AE/"/>
</entry>
<entry>
<title><![CDATA[CentOS 最小化安装 VIM安装和配置]]></title>
<link href="http://ankerlee.github.io/2015/05/21/CentOS-6-5-%E6%9C%80%E5%B0%8F%E5%8C%96%E5%AE%89%E8%A3%85-VIM%E5%AE%89%E8%A3%85/"/>
<id>http://ankerlee.github.io/2015/05/21/CentOS-6-5-最小化安装-VIM安装/</id>
<published>2015-05-21T06:12:57.000Z</published>
<updated>2015-05-21T06:12:57.000Z</updated>
<content type="html"><![CDATA[<blockquote>
<p>文章欢迎转载,但转载时请保留本段文字,并置于文章的顶部<br>作者:Anker Lee<br>本文原文地址:<a href="http://ankerlee.github.io/2015/05/21/CentOS-6-5-最小化安装-VIM安装" target="_blank" rel="external">http://ankerlee.github.io/2015/05/21/CentOS-6-5-最小化安装-VIM安装</a></p>
</blockquote>
<hr>
<h2 id="VIM安装">VIM安装</h2><p>CentOS最小化安装默认自带vi,功能没有vim丰富,安装vim取代vi:<br>输入命令:<code>yum vim-enhanced</code>,安装过程中,多次提示Is this ok y/N:,输入y回车即可,最后提示Complete!表示安装成功!</p>
<h2 id="VIM配置">VIM配置</h2><h3 id="查看VIM版本信息">查看VIM版本信息</h3><p>输入命令<code>vim --version</code>,查看vim版本信息:<br><a id="more"></a></p>
<pre><code><span class="list">[<span class="keyword">root@localhost</span> ~]# vim
<span class="list">[<span class="keyword">root@localhost</span> ~]# vim --version
VIM - Vi IMproved <span class="number">7.2</span> <span class="list">(<span class="keyword">2008</span> Aug <span class="number">9</span>, compiled Apr <span class="number">5</span> <span class="number">2012</span> <span class="number">10</span>:17:30)</span>
包含补丁: <span class="number">1</span><span class="number">-411</span>
修改者 <bugzilla@redhat.com>
编译者 <bugzilla@redhat.com>
巨型版本 无图形界面。 可使用<span class="list">(<span class="keyword"><span class="built_in">+</span></span>)</span>与不可使用<span class="list">(<span class="keyword"><span class="built_in">-</span></span>)</span>的功能:
*这里省略了很多输出信息*
系统 vimrc 文件: <span class="string">"/etc/vimrc"</span>
用户 vimrc 文件: <span class="string">"$HOME/.vimrc"</span>
用户 exrc 文件: <span class="string">"$HOME/.exrc"</span>
$VIM 预设值: <span class="string">"/usr/share/vim"</span>
*这里省略了很多输出信息*</span></span>
</code></pre>]]></content>
<summary type="html">
<![CDATA[<blockquote>
<p>文章欢迎转载,但转载时请保留本段文字,并置于文章的顶部<br>作者:Anker Lee<br>本文原文地址:<a href="http://ankerlee.github.io/2015/05/21/CentOS-6-5-最小化安装-VIM安装">http://ankerlee.github.io/2015/05/21/CentOS-6-5-最小化安装-VIM安装</a></p>
</blockquote>
<hr>
<h2 id="VIM安装">VIM安装</h2><p>CentOS最小化安装默认自带vi,功能没有vim丰富,安装vim取代vi:<br>输入命令:<code>yum vim-enhanced</code>,安装过程中,多次提示Is this ok y/N:,输入y回车即可,最后提示Complete!表示安装成功!</p>
<h2 id="VIM配置">VIM配置</h2><h3 id="查看VIM版本信息">查看VIM版本信息</h3><p>输入命令<code>vim --version</code>,查看vim版本信息:<br>]]>
</summary>
<category term="centos" scheme="http://ankerlee.github.io/tags/centos/"/>
<category term="linux" scheme="http://ankerlee.github.io/tags/linux/"/>
<category term="最小化安装" scheme="http://ankerlee.github.io/tags/%E6%9C%80%E5%B0%8F%E5%8C%96%E5%AE%89%E8%A3%85/"/>
<category term="网络配置" scheme="http://ankerlee.github.io/tags/%E7%BD%91%E7%BB%9C%E9%85%8D%E7%BD%AE/"/>
</entry>
</feed>