作者:IT邦德
中国DBA联盟(ACDU)成员,目前从事DBA及程序编程
(Web\java\Python)工作,主要服务于生产制造
现拥有 Oracle 11g OCP/OCM、
Mysql、Oceanbase(OBCA)认证
分布式TBase\TDSQL数据库、
国产达梦数据库以及红帽子认证
从业8年DBA工作,在数据库领域有丰富的经验
擅长Oracle数据库运维开发,备份恢复,安装迁移,
性能优化、故障应急处理等
微信;jem_db
QQ交流群:168797397
RedHat6.4操作系统部署
可以在安装 linux 系统之前,规划好磁盘分区情况
创建虚拟机时分配足够大的磁盘空间,安装系统时直接分区,增加/u01 分区
链接:https://pan.baidu.com/s/18eJKvDWqsvDyLyTZywy10Q
提取码:sjes
1.新建虚拟机
![](https://img6.php1.cn/3cdc5/999c/5a0/fdebcdb800a1a107.png)
![](https://img6.php1.cn/3cdc5/999c/5a0/d9f122953835a363.png)
![](https://img6.php1.cn/3cdc5/999c/5a0/90644fd3dc7d6e81.png)
解决方法
如果不支持,点击取消并关闭虚拟机软件。
重新启动电脑,进入 BIOS,将虚拟机选项打开(F2 或者Delete键)
不同品牌、型号电脑进入 BIOS 方法、虚拟化选项有所不同
![](https://img6.php1.cn/3cdc5/999c/5a0/f6c04e686a73ef1c.png)
![](https://img6.php1.cn/3cdc5/999c/5a0/fcc660aa34837608.png)
此处分配60G的磁盘空间
![](https://img6.php1.cn/3cdc5/999c/5a0/f504dad3b61ae12e.png)
![](https://img6.php1.cn/3cdc5/999c/5a0/fa32e15b994370dc.png)
![](https://img6.php1.cn/3cdc5/999c/5a0/3c52129b936afe0f.png)
![](https://img6.php1.cn/3cdc5/999c/5a0/0c9f76779bf208da.png)
OS:Red Hat Enterprise Linux 6.4-64bit
IP:192.168.6.10
hostname:rhel64
root:beijing
oracle:oracle
DB:oracle 11.2.0.4
SID:PROD
sys:oracle
system:oracle
scott:tiger
2.RedHat Enterprise Linux 6.4 64 位系统安装
2.1 启动虚拟机安装
![](https://img6.php1.cn/3cdc5/999c/5a0/9832547fad6b5c6d.png)
默认第一项按回车 进入图形化安装界面
![](https://img6.php1.cn/3cdc5/999c/5a0/3cef4b81a5e3905c.png)
Skip 跳过安装介质检测
![](https://img6.php1.cn/3cdc5/999c/5a0/a9cdb127f3852cf1.png)
![](https://img6.php1.cn/3cdc5/999c/5a0/a18c68a4e16b9944.png)
![](https://img6.php1.cn/3cdc5/999c/5a0/5f42e19e1db891ff.png)
![](https://img6.php1.cn/3cdc5/999c/5a0/210360801593f06f.png)
键盘布局 默认 U.S.English
![](https://img6.php1.cn/3cdc5/999c/5a0/7f8f61ae6f3052f1.png)
默认第一项 基本存储设备 Next
![](https://img6.php1.cn/3cdc5/999c/5a0/7b058452bdd777b4.png)
Yes ,discard any data,丢弃数据
![](https://img6.php1.cn/3cdc5/999c/5a0/eae278e50e18c94f.png)
主机名:rhel64
![](https://img6.php1.cn/3cdc5/999c/5a0/9ec46270b50121dc.png)
默认是 DHCP 修改手动设置 Manual 配置静态 ip Apply
![](https://img6.php1.cn/3cdc5/999c/5a0/d206769a38a2afe8.png)
close -Next,选择 Asia/Shanghai
![](https://img6.php1.cn/3cdc5/999c/5a0/d4131315949394a3.png)
设置超级用户 root 密码
![](https://img6.php1.cn/3cdc5/999c/5a0/45061487561ce06f.png)
Use ALL Space,勾选 Review,Use All Space:使用整块硬盘 自动分区
![](https://img6.php1.cn/3cdc5/999c/5a0/c7d8ec6d4cc3cd83.png)
查看操作系统默认分区
![](https://img6.php1.cn/3cdc5/999c/5a0/188c20318ddc5e82.png)
![](https://img6.php1.cn/3cdc5/999c/5a0/341a4109e96f63f8.png)
修改分区大小 增加/u01
![](https://img6.php1.cn/3cdc5/999c/5a0/9ac998017ea6fca6.png)
/ 20G
swap 4G
/u01 56G
![](https://img6.php1.cn/3cdc5/999c/5a0/2e97ba4bc70468fb.png)
![](https://img6.php1.cn/3cdc5/999c/5a0/38622d65ff397c7f.png)
Format 格式化-Write changes to disk
![](https://img6.php1.cn/3cdc5/999c/5a0/49b0a163d7ae5c24.png)
系统装在本地磁盘/dev/sda
![](https://img6.php1.cn/3cdc5/999c/5a0/143f4ad756ed3a6b.png)
Desktop - Customize now,桌面和软件开发平台默认有图形化
![](https://img6.php1.cn/3cdc5/999c/5a0/958e267b00883dc2.png)
软件包组,
Compatibility libraries 兼容性库,向下兼容,通常装 oracle 必选
![](https://img6.php1.cn/3cdc5/999c/5a0/b8ef9102fe2db712.png)
![](https://img6.php1.cn/3cdc5/999c/5a0/4ca0ef24814d4938.png)
语言可以勾选中文支持 登录时输入用户名后可更改语言
![](https://img6.php1.cn/3cdc5/999c/5a0/02151d4975bbbd03.png)
检查包依赖关系 开始安装
![](https://img6.php1.cn/3cdc5/999c/5a0/98df524d01418c61.png)
安装完成重启 reboot
![](https://img6.php1.cn/3cdc5/999c/5a0/294717173b06d9c8.png)
2.2 初始化操作系统
两次 Forward
不注册 No- Register later
![](https://img6.php1.cn/3cdc5/999c/5a0/e507bde6bfd44978.png)
不创建用户
![](https://img6.php1.cn/3cdc5/999c/5a0/be3bb44ae0ad4862.png)
![](https://img6.php1.cn/3cdc5/999c/5a0/2a47b9a6acd89874.png)
![](https://img6.php1.cn/3cdc5/999c/5a0/7d1b212b0eb5a2f0.png)
2.3.系统安装完成初始配置
配置本地主机名解析/etc/hosts
[root@rhel64 ~]# cat etc/sysconfig/network
NETWORKING=yes
HOSTNAME=rhel64
GATEWAY=192.168.6.1
![](https://img6.php1.cn/3cdc5/999c/5a0/33697395d63b4099.png)
禁用防火墙、NetworkManager
[root@rhel64 ~]# chkconfig iptables off
[root@rhel64 ~]# chkconfig NetworkManager off
[root@rhel64 ~]# chkconfig --list iptables
iptables 0:off 1:off 2:off 3:off 4:off 5:off 6:off
[root@rhel64 ~]# chkconfig --list NetworkManager
NetworkManager 0:off 1:off 2:off 3:off 4:off 5:off 6:off
禁用 selinux
![](https://img6.php1.cn/3cdc5/999c/5a0/75c4d925c18044fe.png)
重启验证
[root@rhel64 ~]# reboot
[root@rhel64 ~]# getenforce
[root@rhel64 ~]# service iptabels stastus
[root@rhel64 ~]# service NetworkManager status
配置 yum 软件仓库
[root@rhel64 ~]# mkdir mnt/dvd
[root@rhel64 ~]# mount dev/sr0 mnt/dvd
[root@rhel64 ~]# df -Th
[root@rhel64 ~]# cp etc/yum.repos.d/rhel-source.repo etc/yum.repos.d/rhel-source.repo.bak
[root@rhel64 ~]# vi etc/yum.repos.d/rhel-source.repo
[rhel6.4]
name=rhel6.4
baseurl=file:///mnt/dvd/Server
gpgcheck=0
注解:
enabled=1 #这个选项表示这个repo中定义的源是启用的,0为禁用
gpgcheck=1 #这个选项表示这个repo中下载的rpm将进行gpg的校验,已确定rpm包的来源是有效和安全的
验证
[root@rhel64 ~]# yum clean all
[root@rhel64 ~]# yum list
[root@rhel64 ~]# yum install lrzsz
安装 vmware tools
安装前先将挂载的光盘弹出,安装后方便全屏虚拟机控制台界面以及进行文件传输
![](https://img6.php1.cn/3cdc5/999c/5a0/5fde59759a465cc7.png)
![](https://img6.php1.cn/3cdc5/999c/5a0/a2bf80b01309ccdf.png)
[root@rhel64 ~]# cd /media/VMware\ Tools/
[root@rhel64 VMware Tools]# ll
[root@rhel64 VMware Tools]# mkdir /tmp/tools
[root@rhel64 VMware Tools]# tar -xvf VMwareTools-10.0.10-4301679.tar.gz -C /tmp/tools/
[root@rhel64 ~]# cd /tmp/tools/vmware-tools-distrib/
[root@rhel64 vmware-tools-distrib]# ll
[root@rhel64 vmware-tools-distrib]# sh vmware-install.pl
默认回车,安装完成重启验证