1.准备安装文件
   VirtualBox-5.2.8
   Oracle Linux 6.5 iso镜像文件
   xmanager5


2.创建虚拟机

    VirtualBox-5.2.8的安装略过

    2.1 在 菜单 管理->主机网络管理器中设置全局ip,设置与主机ip为同一网段。这里选择host-only的连接方式。

oracle 11g之一 oracle linux 6.5 安装_oracle_02

oracle 11g之一 oracle linux 6.5 安装_安装_03


2.2 新建虚拟机

      菜单 新建

oracle 11g之一 oracle linux 6.5 安装_安装_04

2.3分配内存

     单实例的话两个g就可以了

oracle 11g之一 oracle linux 6.5 安装_oracle_05


2.3分配磁盘

    oracle 11g之一 oracle linux 6.5 安装_安装_06


2.4选择磁盘类型,默认即可

oracle 11g之一 oracle linux 6.5 安装_安装_07

oracle 11g之一 oracle linux 6.5 安装_oracle_08


2.5分配磁盘大小

oracle 11g之一 oracle linux 6.5 安装_oracle_09


三 安装Oracle Linux 6.5

    3.1设置虚拟机网络

oracle 11g之一 oracle linux 6.5 安装_安装_10


3.2选择存储,设置文件系统

    选择oracle linux6.5 的iso镜像文件,点击ok

oracle 11g之一 oracle linux 6.5 安装_oracle_11


3.3 启动虚拟机,选择第一项如图

oracle 11g之一 oracle linux 6.5 安装_安装_12


3.4选择skip跳过介质检查

oracle 11g之一 oracle linux 6.5 安装_oracle_13

选择OK

oracle 11g之一 oracle linux 6.5 安装_安装_14

3.5 选择Next

oracle 11g之一 oracle linux 6.5 安装_oracle_15

3.6选择语言,默认为英语即可

    选择键盘,默认U.S English即可

oracle 11g之一 oracle linux 6.5 安装_安装_16

oracle 11g之一 oracle linux 6.5 安装_oracle_17

3.7 选择存储设备,默认

     接下来的提示信息表示要清空磁盘,为格式化磁盘做准备

oracle 11g之一 oracle linux 6.5 安装_安装_18

oracle 11g之一 oracle linux 6.5 安装_安装_19

3.8 设置主机名称

 oracle 11g之一 oracle linux 6.5 安装_oracle_20


3.9 选择网卡编辑

oracle 11g之一 oracle linux 6.5 安装_安装_21

oracle 11g之一 oracle linux 6.5 安装_oracle_22


3.11 选择市区设置,亚洲-上海

oracle 11g之一 oracle linux 6.5 安装_oracle_23


3.12 设置root用户密码

oracle 11g之一 oracle linux 6.5 安装_安装_24


3.13 选择安装类型

oracle 11g之一 oracle linux 6.5 安装_安装_25


3.14 磁盘分区设置

oracle 11g之一 oracle linux 6.5 安装_oracle_26

3.15 设置交换分区 swap

大小为内存两倍

oracle 11g之一 oracle linux 6.5 安装_安装_27

3.16创建/u01,用于安装oracle,大小30g

oracle 11g之一 oracle linux 6.5 安装_oracle_28


3.17 创建根分区,使用剩余存储空间

oracle 11g之一 oracle linux 6.5 安装_安装_29


3.18 格式化磁盘

oracle 11g之一 oracle linux 6.5 安装_安装_30

oracle 11g之一 oracle linux 6.5 安装_oracle_31

oracle 11g之一 oracle linux 6.5 安装_安装_32


3.19 选择desktop

oracle 11g之一 oracle linux 6.5 安装_oracle_33


3.20 安装linux系统

oracle 11g之一 oracle linux 6.5 安装_oracle_34


3.21点击Reboot进入欢迎界面

      前两步默认,第三步选择不注册软件更新

oracle 11g之一 oracle linux 6.5 安装_oracle_35


oracle 11g之一 oracle linux 6.5 安装_安装_36

3.22 创建用户跳过

oracle 11g之一 oracle linux 6.5 安装_安装_37

3.23 设置日期和时间默认,最后一步kdump默认

oracle 11g之一 oracle linux 6.5 安装_安装_38

3.24 进入系统安装结束。

       在宿主机里测试是否ping通虚拟机。

       设置虚拟机的系统启动顺序:硬盘在第一位

oracle 11g之一 oracle linux 6.5 安装_oracle_39

oracle 11g之一 oracle linux 6.5 安装_安装_40

oracle 11g之一 oracle linux 6.5 安装_oracle_41


四 安装Xmanager Enterprise 5

     安装略过

     1.打开xshell

     2.使用ssh连接linux

oracle 11g之一 oracle linux 6.5 安装_安装_42

oracle 11g之一 oracle linux 6.5 安装_安装_43

3 搭建yum仓库

   3.1 检查系统的iso文件是否在光盘驱动器内,没有则添加进去,否则第一步挂在镜像文件会报错

oracle 11g之一 oracle linux 6.5 安装_安装_44


3.2 挂载镜像文件

[root@xiaofeng ~]# mount /dev/cdrom /mnt/

mount: block device /dev/sr0 is write-protected, mounting read-only

--切换目录

[root@xiaofeng ~]# cd /etc/yum.repos.d/

[root@xiaofeng yum.repos.d]# ls

public-yum-ol6.repo

---在创建serve.repo文件时,要把该文件目录下.repo文件修改名称,因为linux默认不从自己

--创建的serve.repo找。删除public-yum-ol6.repo,使yum不使用该默认的资源库

[root@xiaofeng yum.repos.d]# mv public-yum-ol6.repo public-yum-ol6.repo.bak

--创建server.repo,并编辑

[root@xiaofeng yum.repos.d]# vim server.repo

[server]

name=Oracle Linux

baseurl=file:///mnt/

gpgcheck=0

enabled=1

[root@xiaofeng yum.repos.d]# yum clean all

Loaded plugins: refresh-packagekit, security

Cleaning repos: server

Cleaning up Everything

[root@xiaofeng yum.repos.d]# yum list

5 安装虚拟终端XTERM

[root@xiaofeng yum.repos.d]# yum install xterm

[root@xiaofeng yum.repos.d]# yum install xclock


五 基本Linux操作

1 文件和目录操作

  • cd:切换目录;

  • ls:列出文件列表;

  • touch:创建文件;

  • cp:复制文件;

  • mv:重命名、移动文件;

  • rm:删除文件;

  • mkdir:创建目录;

  • rmdir:删除目录;

  • stat:查看文件统计数据;

  • file:查看文件类型;

  • cat/more/less/head/tail:查看文件内容;

2 绝对路径&相对路径

  • 绝对文件路径:定义目录在虚拟文件结构中的确切位置,以虚拟目录的根为开头;

  • 相对文件路径:相对当前的位置指定目标文件路径,无须从根目录开始;

  • 点(.):表示当前目录;

  • 双点(..):表示父目录;

3 磁盘操作

  • mount:挂载介质;

  • umount:卸载介质;

  • df:查看磁盘空间;

  • du:查看目录占用空间;

4 vim操作

  • 正常模式——>插入模式:i或o键;

  • 插入模式——>正常模式:ESC键;

  • q:直接退出;

  • q!:强制退出,不保存;

  • wq:保存并退出;

  • x:删除当前光标位置的字符;

  • dd:删除当前光标位置的行;

  • dw:删除当前光标位置的单词;

  • d$:删除当前光标位置到行末的所有内容;

  • a:将数据附加到当前光标位置后面;

  • A:将数据附加到当前光标位置所在行后面;

5 RPM以及YUM

  • RPM:Redhat Package Manager;

  • YUM:Yellow dog Updater, Modified;