CentOS 系统内置的官方源软件更新较慢,而且缺少一些常用软件包,建议安装epel源,EPEL 是 Extra Packages for Enterprise Linux 的缩写(EPEL),是用于 Fedora-based Red Hat Enterprise Linux (RHEL) 的一个高质量软件源,所以同时也适用于 CentOS 或者 Scientific Linux 等发行版。
a. 因为我们使用的是minimal版本的ISO安装,所以系统默认没有wget,我们可以直接用yum安装:[wget是Linux常用的命令行下载工具]
[root@vm02 ~]# yum install -y vim Loaded plugins: fastestmirror Setting up Install Process Determining fastest mirrors * base: mirrors.aliyun.com * extras: mirrors.aliyun.com * updates: mirrors.aliyun.com Resolving Dependencies --> Running transaction check ---> Package vim-enhanced.x86_64 2:7.4.629-5.el6 will be installed --> Processing Dependency: vim-common = 2:7.4.629-5.el6 forpackage:2:vim-enhanced-7.4.629-5.el6.x86_64 --> Processing Dependency: perl(:MODULE_COMPAT_5.10.1) forpackage:2:vim-enhanced-7.4.629-5.el6.x86_64 --> Processing Dependency: libperl.so()(64bit) forpackage:2:vim-enhanced-7.4.629-5.el6.x86_64 --> Processing Dependency: libgpm.so.2()(64bit) forpackage:2:vim-enhanced-7.4.629-5.el6.x86_64 --> Running transaction check ---> Package gpm-libs.x86_64 0:1.20.6-12.el6 will be installed ---> Package perl.x86_64 4:5.10.1-141.el6_7.1 will be installed --> Processing Dependency: perl(version) forpackage:4:perl-5.10.1-141.el6_7.1.x86_64 --> Processing Dependency: perl(Pod::Simple) forpackage:4:perl-5.10.1-141.el6_7.1.x86_64 --> Processing Dependency: perl(Module::Pluggable) forpackage:4:perl-5.10.1-141.el6_7.1.x86_64 ---> Package perl-libs.x86_64 4:5.10.1-141.el6_7.1 will be installed ---> Package vim-common.x86_64 2:7.4.629-5.el6 will be installed --> Processing Dependency: vim-filesystem forpackage:2:vim-common-7.4.629-5.el6.x86_64 --> Running transaction check ---> Package perl-Module-Pluggable.x86_64 1:3.90-141.el6_7.1 will be installed ---> Package perl-Pod-Simple.x86_64 1:3.13-141.el6_7.1 will be installed --> Processing Dependency: perl(Pod::Escapes) >= 1.04forpackage:1:perl-Pod-Simple-3.13-141.el6_7.1.x86_64 ---> Package perl-version.x86_64 3:0.77-141.el6_7.1 will be installed ---> Package vim-filesystem.x86_64 2:7.4.629-5.el6 will be installed --> Running transaction check ---> Package perl-Pod-Escapes.x86_64 1:1.04-141.el6_7.1 will be installed --> Finished Dependency Resolution
Dependencies Resolved
============================================================================================================================================================================= Package Arch Version Repository Size ============================================================================================================================================================================= Installing: vim-enhanced x86_64 2:7.4.629-5.el6 base 1.0 M Installing fordependencies: gpm-libs x86_64 1.20.6-12.el6 base 28 k perl x86_64 4:5.10.1-141.el6_7.1 updates 10 M perl-Module-Pluggable x86_64 1:3.90-141.el6_7.1 updates 40 k perl-Pod-Escapes x86_64 1:1.04-141.el6_7.1 updates 33 k perl-Pod-Simple x86_64 1:3.13-141.el6_7.1 updates 213 k perl-libs x86_64 4:5.10.1-141.el6_7.1 updates 579 k perl-version x86_64 3:0.77-141.el6_7.1 updates 52 k vim-common x86_64 2:7.4.629-5.el6 base 6.7 M vim-filesystem x86_64 2:7.4.629-5.el6 base 15 k
[root@vm02 ~]# vim /etc/selinux/config # This file controls the state of SELinux on the system. # SELINUX= can take one of these three values: # enforcing - SELinux security policy is enforced. # permissive - SELinux prints warnings instead of enforcing. # disabled - No SELinux policy is loaded. SELINUX=enforcing # SELINUXTYPE= can take one of these two values: # targeted - Targeted processes are protected, # mls - Multi Level Security protection. SELINUXTYPE=targeted