win7-64bit下基于VMware12.5安装rhel-server-6.3-i386

Posted naedzq

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了win7-64bit下基于VMware12.5安装rhel-server-6.3-i386相关的知识,希望对你有一定的参考价值。

/*************************************************************************************
宿主PC:win7-64bit
虚拟软件:VMware12.5
虚拟PC:rhel-server-6.3-i386
时间:2016-10-02
*************************************************************************************/

1、安装rhel6

安装英文版,添加简体中文字体
登录时切换到中文,选择不改文件夹名称
如下修改,并重启,可做到英文系统显示中文。
关闭防火墙和SELinux
  1. #关闭防火墙
  2. /etc/init.d/iptables stop
  3. #关闭Selinux
  4. setenforce permissive

 

2、启用网络设备

修改eth0网卡的配置文件,将ONBOOT=“no”改为”yes”,文件位置:/etc/sysconfig/network-scripts/ifcfg-eth0
/etc/init.d/network restart 重新启动网络
 

3、安装VMware-Tools

安装VMware-Tools
  1. ./vmware-install.pl

4、安装vim

检查是否安装
  1. [root@localhost 桌面]# rpm -qa |grep vim
  2. vim-minimal-7.2.411-1.8.el6.i686
  3. vim-common-7.2.411-1.8.el6.i686
  4. vim-enhanced-7.2.411-1.8.el6.i686
  5. [root@localhost 桌面]#


5、安装ctags

检查
  1. [root@localhost 桌面]# rpm -qa |grep tag
  2. taglib-1.6.1-1.1.el6.i686
  3. ctags-5.8-2.el6.i686
  4. [root@localhost 桌面]#

6、安装cscope

检查
  1. [root@localhost 桌面]# rpm -qa |grep cscope
  2. cscope-15.6-6.el6.i686
  3. [root@localhost 桌面]#


7、更新yum为网易源

下载rpm包的地址
http://mirrors.163.com/centos/6/os/i386/Packages/

查看rhel是否安装python

python-2.6.6-64.el6.i686
python-iniparse-0.3.1-2.1.el6.noarch
没有安装的话,重新安装

查看rhel是否安装yum

yum-3.2.29-73.el6.centos.noarch
yum-metadata-parser-1.1.2-16.el6.i686
yum-plugin-fastestmirror-1.1.30-37.el6.noarch
没有安装的话,重新安装

更换yum源 使用163的源

#cd /etc/yum.repos.d/
#wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
#vim CentOS6-Base-163.repo
把文件里面的$releasever全部替换为版本号,即6 最后保存!

清除原有缓存

#yum clean all

重建缓存

以提高搜索安装软件的速度
#yum makecache
有可能第一遍不起作用,需要多做几遍
此时,网易yum源已经配置好。各位可以享受高质量且免费的yum服务了!

构建多个yum源

yum源可用
/etc/yum.repos.d/rhel-source.repo
  1. # CentOS-Base.repo
  2. #
  3. # The mirror system uses the connecting IP address of the client and the
  4. # update status of each mirror to pick mirrors that are updated to and
  5. # geographically close to the client. You should use this for CentOS updates
  6. # unless you are manually picking other mirrors.
  7. #
  8. # If the mirrorlist= does not work for you, as a fall back you can try the
  9. # remarked out baseurl= line instead.
  10. #
  11. #
  12. [base]
  13. name=CentOS-6 - Base - 163.com
  14. baseurl=http://mirrors.163.com/centos/6/os/$basearch/
  15. #mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=os
  16. gpgcheck=1
  17. gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
  18. #released updates
  19. [updates]
  20. name=CentOS-6 - Updates - 163.com
  21. baseurl=http://mirrors.163.com/centos/6/updates/$basearch/
  22. #mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=updates
  23. gpgcheck=1
  24. gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
  25. #additional packages that may be useful
  26. [extras]
  27. name=CentOS-6 - Extras - 163.com
  28. baseurl=http://mirrors.163.com/centos/6/extras/$basearch/
  29. #mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=extras
  30. gpgcheck=1
  31. gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
  32. #additional packages that extend functionality of existing packages
  33. [centosplus]
  34. name=CentOS-6 - Plus - 163.com
  35. baseurl=http://mirrors.163.com/centos/6/centosplus/$basearch/
  36. #mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=centosplus
  37. gpgcheck=1
  38. enabled=0
  39. gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
  40. #contrib - packages by Centos Users
  41. [contrib]
  42. name=CentOS-6 - Contrib - 163.com
  43. baseurl=http://mirrors.163.com/centos/6/contrib/$basearch/
  44. #mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=contrib
  45. gpgcheck=1
  46. enabled=0
  47. gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
  48. # CentOS-Base.repo
  49. #
  50. # The mirror system uses the connecting IP address of the client and the
  51. # update status of each mirror to pick mirrors that are updated to and
  52. # geographically close to the client. You should use this for CentOS updates
  53. # unless you are manually picking other mirrors.
  54. #
  55. # If the mirrorlist= does not work for you, as a fall back you can try the
  56. # remarked out baseurl= line instead.
  57. #
  58. #
  59. [base]
  60. name=CentOS-6 - Base - mirrors.aliyun.com
  61. failovermethod=priority
  62. baseurl=http://mirrors.aliyun.com/centos/6/os/$basearch/
  63. http://mirrors.aliyuncs.com/centos/6/os/$basearch/
  64. #mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=os
  65. gpgcheck=1
  66. gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-6
  67. #released updates
  68. [updates]
  69. name=CentOS-6 - Updates - mirrors.aliyun.com
  70. failovermethod=priority
  71. baseurl=http://mirrors.aliyun.com/centos/6/updates/$basearch/
  72. http://mirrors.aliyuncs.com/centos/6/updates/$basearch/
  73. #mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=updates
  74. gpgcheck=1
  75. gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-6
  76. #additional packages that may be useful
  77. [extras]
  78. name=CentOS-6 - Extras - mirrors.aliyun.com
  79. failovermethod=priority
  80. baseurl=http://mirrors.aliyun.com/centos/6/extras/$basearch/
  81. http://mirrors.aliyuncs.com/centos/6/extras/$basearch/
  82. #mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=extras
  83. gpgcheck=1
  84. gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-6
  85. #additional packages that extend functionality of existing packages
  86. [centosplus]
  87. name=CentOS-6 - Plus - mirrors.aliyun.com
  88. failovermethod=priority
  89. baseurl=http://mirrors.aliyun.com/centos/6/centosplus/$basearch/
  90. http://mirrors.aliyuncs.com/centos/6/centosplus/$basearch/
  91. #mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=centosplus
  92. gpgcheck=1
  93. enabled=0
  94. gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-6
  95. #contrib - packages by Centos Users
  96. [contrib]
  97. name=CentOS-6 - Contrib - mirrors.aliyun.com
  98. failovermethod=priority
  99. baseurl=http://mirrors.aliyun.com/centos/6/contrib/$basearch/
  100. http://mirrors.aliyuncs.com/centos/6/contrib/$basearch/
  101. #mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=contrib
  102. gpgcheck=1
  103. enabled=0
  104. gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-6


3、导入KEY
rpm --import http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
rpm --import http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-6
 
4、安装自动源选择插件--自动选择最快的源
 
yum install yum-fastestmirror -y
 
5、如何确认正在使用的是哪个源?
 
cd /var/cache/yum
cat timedhosts.txt
 
如果我在那个目录里放了很多源,怎么知道当前用的是那个呢?如果你没有改yum.conf,那么看/var/cache/yum/文件夹里的一个time开头的文件,就知道了
  如果在使用yum install安装找不到某些包的时候,可以使用下面办法试试
  wget http://dag.wieers.com/rpm/packages/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
  rpm -Uvh rpmforge-release-0.3.6-1.el5.rf.i386.rpm

yum常用命令

yum -y install 包名(支持*) :自动选择y,全自动
yum install 包名(支持*) :手动选择y or n
yum remove 包名(不支持*)
rpm -ivh 包名(支持*):安装rpm包
rpm -e 包名(不支持*):卸载rpm包

更新和升级

yum update 全部更新
yum update package1 更新指定程序包package1
yum check-update 检查可更新的程序
yum upgrade package1 升级指定程序包package1
yum groupupdate group1 升级程序组group1

1 安装

yum install 全部安装
yum install package1 安装指定的安装包package1
yum groupinsall group1 安装程序组group1

2 更新和升级

yum update 全部更新
yum update package1 更新指定程序包package1
yum check-update 检查可更新的程序
yum upgrade package1 升级指定程序包package1
yum groupupdate group1 升级程序组group1

3 查找和显示

yum info package1 显示安装包信息package1
yum list 显示所有已经安装和可以安装的程序包
yum list package1 显示指定程序包安装情况package1
yum groupinfo group1 显示程序组group1信息yum search string 根据关键字string查找安装包

4 删除程序

yum remove | erase package1 删除程序包package1
yum groupremove group1 删除程序组group1
yum deplist package1 查看程序package1依赖情况

5 清除缓存

yum clean packages 清除缓存目录下的软件包
yum clean headers 清除缓存目录下的 headers
yum clean oldheaders 清除缓存目录下旧的 headers
yum clean, yum clean all (= yum clean packages; yum clean oldheaders) 清除缓存目录下的软件包及旧的headers


8、安装tree

  1. yum -y install tree dos2unix

9、安装vimrc

vimrc
  1. "=========================================================================
  2. " DesCRiption: 适合自己使用的vimrc文件,for Linux/Windows, GUI/Console
  3. "
  4. " Last Change: 20100802 1513
  5. "
  6. " Version: 1.80
  7. "
  8. "=========================================================================
  9. set nocompatible " 关闭 vi 兼容模式
  10. syntax on " 自动语法高亮
  11. colorscheme molokai " 设定配色方案
  12. set number " 显示行号
  13. set cursorline " 突出显示当前行
  14. set ruler " 打开状态栏标尺
  15. set shiftwidth=4 " 设定 << >> 命令移动时的宽度为 4
  16. set softtabstop=4 " 使得按退格键时可以一次删掉 4 个空格
  17. set tabstop=4 " 设定 tab 长度为 4
  18. set nobackup " 覆盖文件时不备份
  19. set autochdir " 自动切换当前目录为当前文件所在的目录
  20. filetype plugin indent on " 开启插件
  21. set backupcopy=yes " 设置备份时的行为为覆盖
  22. set ignorecase smartcase " 搜索时忽略大小写,但在有一个或以上大写字母时仍保持对大小写敏感
  23. set nowrapscan " 禁止在搜索到文件两端时重新搜索
  24. set incsearch " 输入搜索内容时就显示搜索结果
  25. set hlsearch " 搜索时高亮显示被找到的文本
  26. set noerrorbells " 关闭错误信息响铃
  27. set novisualbell " 关闭使用可视响铃代替呼叫
  28. set t_vb= " 置空错误铃声的终端代码
  29. " set showmatch " 插入括号时,短暂地跳转到匹配的对应括号
  30. " set matchtime=2 " 短暂跳转到匹配括号的时间
  31. set magic " 设置魔术
  32. set hidden " 允许在有未保存的修改时切换缓冲区,此时的修改由 vim 负责保存
  33. set guioptions-=T " 隐藏工具栏
  34. set guioptions-=m " 隐藏菜单栏
  35. set smartindent " 开启新行时使用智能自动缩进
  36. set backspace=indent,eol,start
  37. " 不设定在插入状态无法用退格键和 Delete 键删除回车符
  38. set cmdheight=1 " 设定命令行的行数为 1
  39. set laststatus=2 " 显示状态栏 (默认值为 1, 无法显示状态栏)
  40. set statusline=\\ %<%F[%1*%M%*%n%R%H]%=\\ %y\\ %0(%{&fileformat}\\ %{&encoding}\\ %c:%l/%L%)\\
  41. " 设置在状态行显示的信息
  42. set foldenable " 开始折叠
  43. set foldmethod=syntax " 设置语法折叠
  44. set foldcolumn=0 " 设置折叠区域的宽度
  45. setlocal foldlevel=1 " 设置折叠层数为
  46. " set foldclose=all " 设置为自动关闭折叠
  47. " nnoremap <space> @=((foldclosed(line(\'.\')) < 0) ? \'zc\' : \'zo\')<CR>
  48. " 用空格键来开关折叠
  49. " return OS type, eg: windows, or linux, mac, et.st..
  50. function! MySys()
  51. if has("win16") || has("win32") || has("win64") || has("win95")
  52. return "windows"
  53. elseif has("unix")
  54. return "linux"
  55. endif
  56. endfunction
  57. " 用户目录变量$VIMFILES
  58. if MySys() == "windows"
  59. let $VIMFILES = $VIM.\'/vimfiles\'
  60. elseif MySys() == "linux"
  61. let $VIMFILES = $HOME.\'/.vim\'
  62. endif
  63. " 设定doc文档目录
  64. let helptags=$VIMFILES.\'/doc\'
  65. " 设置字体 以及中文支持
  66. if has("win32")
  67. set guifont=Inconsolata:h12:cANSI
  68. endif
  69. " 配置多语言环境
  70. if has("multi_byte")
  71. " UTF-8 编码
  72. set encoding=utf-8
  73. set termencoding=utf-8
  74. set formatoptions+=mM
  75. set fencs=utf-8,gbk
  76. if v:lang =~? \'^\\(zh\\)\\|\\(ja\\)\\|\\(ko\\)\'
  77. set ambiwidth=double
  78. endif
  79. if has("win32")
  80. source $VIMRUNTIME/delmenu.vim
  81. source $VIMRUNTIME/menu.vim
  82. language messages zh_CN.utf-8
  83. endif
  84. else
  85. echoerr "Sorry, this version of (g)vim was not compiled with +multi_byte"
  86. endif
  87. " Buffers操作快捷方式!
  88. nnoremap <C-RETURN> :bnext<CR>
  89. nnoremap <C-S-RETURN> :bprevious<CR>
  90. " Tab操作快捷方式!
  91. nnoremap <C-TAB> :tabnext<CR>
  92. nnoremap <C-S-TAB> :tabprev<CR>
  93. "关于tab的快捷键
  94. " map tn :tabnext<cr>
  95. " map tp :tabprevious<cr>
  96. " map td :tabnew .<cr>
  97. " map te :tabedit
  98. " map tc :tabclose<cr>
  99. "窗口分割时,进行切换的按键热键需要连接两次,比如从下方窗口移动
  100. "光标到上方窗口,需要<c-w><c-w>k,非常麻烦,现在重映射为<c-k>,切换的
  101. "时候会变得非常方便.
  102. nnoremap <C-h> <C-w>h
  103. PowerBuilder 12.5 Classic PDF SaveAs 在 Win7 x64 上创建 0 大小的文件

    django+xadmin在win7-64bit下安装记录

    win7-64bit下安装mysql-5.7.16

    win7 64 怎样安装虚拟机

    win7 64bit 安装tensorflow 小随笔

    1.VMware Workstation 12.5下Ubuntu16.04环境搭建