SlideShare a Scribd company logo
1 of 42
Installation
Agenda
概述
• 学习linux行之有效的一种方式是在真实环境
  中不断地进行实践, 本章介绍如何通过虚拟
  机的方式安装一个Linux测试环境, 使用虚拟
  机安装的好处是不会对现有的系统造成任
  何的影响;
• 本章使用的虚拟机软件是Oracle VirtualBox,
  该软件可以运行在XP/Win7/Linux等操作系
  统上.
虚拟机
• 通过虚拟机(Virtual Machine)可以在当前的系统上
  运行其它的系统, 比如可以在XP上运行Linux; 创建
  一个虚拟机需要为它指定相应的虚拟资源 , 比如硬
  盘/CPU/内存等. 关于虚拟机更多说明, 参考;
• 本质上来说, 虚拟机软件与其他的操作系统软件没
  有什么差别, 都是运行在宿主系统上的二进制程序;
  其中宿主系统(host)是运行虚拟机的OS, 而客户系
  统(guest)则是指虚拟机系统本身; 比如:

               Linux VM

                XP VM

           Windows 7 Host
Oracle VirtualBox
• VirtualBox是由Oracle公司所有的, 可供免费
  下载使用的虚拟机软件, 进入到下载地址页
  面之后选择合适的版本下载; VirtualBox小巧
  易用, 并且性能表现也比较优秀, 本章选择使
  用它作为虚拟机来安装linux;关于VirutalBox
  的安装, 参考这里;
• 另有其他的虚拟机软件, 比如Vmware ,Xen等,
  相对来说在易用性方面都不及VirtualBox, 有
  需要可作进一步的了解.
安装准备
• 宿主操作系统(Host OS)
示例中使用的是windows 7, 需要在任意分区上空
闲至少10g的磁盘空间;
• 安装介质
选择自己喜欢的发型版本, 这里使用的是Oracle
Enterprise Linux 5.4版本;
• VirtualBox
选择最新版本的VirtualBox, 示例使用的是4.1.20
安装
- 新建虚拟机1
安装
- 新建虚拟机2
安装
- 新建虚拟机3
安装
- 新建虚拟机4
安装
- 新建虚拟机5
安装
- 新建虚拟机6
安装
- 新建虚拟机7
安装
- 新建虚拟机7
安装
- 新建虚拟机8
安装
- Linux 1
安装
- Linux 2
安装
- Linux 3
安装
- Linux 4
安装
- Linux 5
安装
- Linux 6
安装
- Linux 7
安装
- Linux 8
安装
- Linux 9
安装
- Linux 10
安装
- Linux 11
安装
- Linux 12
安装
- Linux 13
安装
- Linux 14
安装
- Linux 15
安装
- Linux 15
安装
- 完毕
配置
- 设置虚拟机启动顺序
配置
- 访问web
配置
- host与guest共享剪贴板
配置
           -安装增强工具包
• Virtualbox针对不同的guest OS提供了对应的增强工具包
  (additions), 该工具包提供了如下功能:
  1, 在host OS和guest之间切换鼠标焦点, 目前两者之间的鼠标是不能够
     自由切换的;
  2, 支持guest OS全屏;
  3, 在host和guest之间共享文件夹.
• 如何安装?
1, 安装gcc编译器和内核源代码, additions的安装需要引用内核源代
   码重新编译. 首先需要设置一个yum源(见Note), 这里使用本地的
   DVD作为yum源:
   # 切换为root用户 su – root
   # 创建/mnt/dvd目录
   mkdir /mnt/dvd
   # 挂载dvd光驱, 并切换到/mnt目录
   mount /dev/dvd /mnt/dvd
   cd /mnt
配置
                       -安装增强工具包
   # 使用createrepo命令创建一个源
       createrepo -g ./dvd/Server/repodata/comps-rhel5-server-core.xml .
   # 配置yum使用本地源,
     ## 创建本地源配置文件
     touch /etc/yum.repos.d/local.repo
     ## 输入本地源的配置信息
        echo "[local]
        Name=local
        baseurl=file:///mnt/
        enable=1
        gpgcheck=0" > /etc/yum.repos.d/local.repo
      ## 更新yum配置, 至此yum本地源创建完毕
      yum clean all
# 安装gcc
yum install gcc
# 安装内核源码
yum install kernel-devel-`uname -r`.`uname -m`
配置
               -安装增强工具包
2, 弹出安装盘, 在虚拟机运行窗口点击菜单Devices -> Install
   guest additions



3, 执行如下命令安装
  # 重新挂载dvd
  mount /dev/dvd /mnt/dvd
  # 创建临时目录, 并切换目录
  mkdir ~/tmp
  cd ~/tmp
  # 拷贝安装文件, 并运行
  cp /mnt/dvd/VBoxLinuxAdditions.run .
  ./VBoxLinuxAdditions.run
配置
           -安装增强工具包
• 至此增强工具包安装完成, 可以尝试一下全屏, host/guest之间鼠
  标切换等;
• 增强工具包提供的一个很有用的功能是在host/guest之间共享文件, 如
下图进行设置, 需要注意的
是这里的目录名为tutorials,
接下来会被使用; 另外需要
勾选auto-mount自动挂载;
• 打开虚拟机系统, 切换到
root用户, 创建目录/mnt/share
编辑/etc/rc.local文件, 添加
如下行:
mount -t vboxsf tutorials
/mnt/share
注: 这里的tutorials正是上面
创建共享目录指定的名称.
这样在以后就可以通过/mnt/share
目录访问宿主机器的文件了.
配置
          - 使用putty连接
• 关于putty, 参考.
• 首先设置VirtualBox host-only网络接口
配置
                  - 使用putty连接
• 启动虚拟机, 使用root用户修改网卡配置文件
  /etc/sysconfig/network-scripts/ifcfg-eth0, 修改或添加如
  下行:
  IPADDR=192.168.56.128
  DEVICE=eth0
  BOOTPROTO=static
  ONBOOT=yes
• 重启网卡
  /etc/init.d/network restart
接下来就可以使用putty登录了
END

More Related Content

What's hot

如何硬盘安装ubuntu8.10
如何硬盘安装ubuntu8.10如何硬盘安装ubuntu8.10
如何硬盘安装ubuntu8.10wensheng wei
 
GHOST系统备份图解
GHOST系统备份图解GHOST系统备份图解
GHOST系统备份图解wensheng wei
 
StackOps step by-step guide
StackOps step by-step guideStackOps step by-step guide
StackOps step by-step guideslmagicbox
 
利用Cent Os快速构建自己的发行版
利用Cent Os快速构建自己的发行版利用Cent Os快速构建自己的发行版
利用Cent Os快速构建自己的发行版xingsu1021
 
Windows引导过程
Windows引导过程Windows引导过程
Windows引导过程Mike Wang
 
The New Process No. 1 of Linux -- SystemD
The New Process No. 1 of Linux -- SystemDThe New Process No. 1 of Linux -- SystemD
The New Process No. 1 of Linux -- SystemDfreedman6022e20
 
Proxmox: 建立自己的虛擬主機
Proxmox: 建立自己的虛擬主機Proxmox: 建立自己的虛擬主機
Proxmox: 建立自己的虛擬主機維泰 蔡
 
Bypat博客出品-利用cent os快速构建自己的发行版
Bypat博客出品-利用cent os快速构建自己的发行版Bypat博客出品-利用cent os快速构建自己的发行版
Bypat博客出品-利用cent os快速构建自己的发行版redhat9
 
[精彩回顾]Linux新手教程
[精彩回顾]Linux新手教程[精彩回顾]Linux新手教程
[精彩回顾]Linux新手教程NJU OPEN
 
遠端Linux桌面程式
遠端Linux桌面程式遠端Linux桌面程式
遠端Linux桌面程式Casper Chen
 
1221 探討 Windows Server 2008 WDS 部署服務
1221 探討 Windows Server 2008 WDS 部署服務1221 探討 Windows Server 2008 WDS 部署服務
1221 探討 Windows Server 2008 WDS 部署服務Timothy Chen
 
Install Hmc 734 V Box
Install Hmc 734 V BoxInstall Hmc 734 V Box
Install Hmc 734 V Boxguest96e3e1
 
3Qmail 安裝步驟 hyper-V
3Qmail 安裝步驟 hyper-V3Qmail 安裝步驟 hyper-V
3Qmail 安裝步驟 hyper-Vsharetech
 
Clonezilla Live Backup Data
Clonezilla Live Backup DataClonezilla Live Backup Data
Clonezilla Live Backup Datamichael hsu
 
網路組-Ubuntu介紹
網路組-Ubuntu介紹網路組-Ubuntu介紹
網路組-Ubuntu介紹maryqute520
 

What's hot (20)

Gentoo linux
Gentoo linuxGentoo linux
Gentoo linux
 
如何硬盘安装ubuntu8.10
如何硬盘安装ubuntu8.10如何硬盘安装ubuntu8.10
如何硬盘安装ubuntu8.10
 
GHOST系统备份图解
GHOST系统备份图解GHOST系统备份图解
GHOST系统备份图解
 
StackOps step by-step guide
StackOps step by-step guideStackOps step by-step guide
StackOps step by-step guide
 
Clonezilla
ClonezillaClonezilla
Clonezilla
 
Vitualbox
VitualboxVitualbox
Vitualbox
 
利用Cent Os快速构建自己的发行版
利用Cent Os快速构建自己的发行版利用Cent Os快速构建自己的发行版
利用Cent Os快速构建自己的发行版
 
Windows引导过程
Windows引导过程Windows引导过程
Windows引导过程
 
The New Process No. 1 of Linux -- SystemD
The New Process No. 1 of Linux -- SystemDThe New Process No. 1 of Linux -- SystemD
The New Process No. 1 of Linux -- SystemD
 
helloTux 2012
helloTux 2012helloTux 2012
helloTux 2012
 
Proxmox: 建立自己的虛擬主機
Proxmox: 建立自己的虛擬主機Proxmox: 建立自己的虛擬主機
Proxmox: 建立自己的虛擬主機
 
Bypat博客出品-利用cent os快速构建自己的发行版
Bypat博客出品-利用cent os快速构建自己的发行版Bypat博客出品-利用cent os快速构建自己的发行版
Bypat博客出品-利用cent os快速构建自己的发行版
 
[精彩回顾]Linux新手教程
[精彩回顾]Linux新手教程[精彩回顾]Linux新手教程
[精彩回顾]Linux新手教程
 
遠端Linux桌面程式
遠端Linux桌面程式遠端Linux桌面程式
遠端Linux桌面程式
 
1221 探討 Windows Server 2008 WDS 部署服務
1221 探討 Windows Server 2008 WDS 部署服務1221 探討 Windows Server 2008 WDS 部署服務
1221 探討 Windows Server 2008 WDS 部署服務
 
Install Hmc 734 V Box
Install Hmc 734 V BoxInstall Hmc 734 V Box
Install Hmc 734 V Box
 
3Qmail 安裝步驟 hyper-V
3Qmail 安裝步驟 hyper-V3Qmail 安裝步驟 hyper-V
3Qmail 安裝步驟 hyper-V
 
Dl
DlDl
Dl
 
Clonezilla Live Backup Data
Clonezilla Live Backup DataClonezilla Live Backup Data
Clonezilla Live Backup Data
 
網路組-Ubuntu介紹
網路組-Ubuntu介紹網路組-Ubuntu介紹
網路組-Ubuntu介紹
 

Viewers also liked

What English Do University Students Really Need
What English Do University Students Really NeedWhat English Do University Students Really Need
What English Do University Students Really NeedHala Nur
 
Internet and Sudan
Internet and SudanInternet and Sudan
Internet and SudanHala Nur
 
7, vnc server
7, vnc server7, vnc server
7, vnc serverted-xu
 
OPM Recipe designer notes
OPM Recipe designer notesOPM Recipe designer notes
OPM Recipe designer notested-xu
 
Português – oraçõs subordinadas adjetivas 01 – 2014 – ifba
Português – oraçõs subordinadas adjetivas 01 – 2014 – ifbaPortuguês – oraçõs subordinadas adjetivas 01 – 2014 – ifba
Português – oraçõs subordinadas adjetivas 01 – 2014 – ifbaJakson Raphael Pereira Barbosa
 
3, users & groups
3, users & groups3, users & groups
3, users & groupsted-xu
 
Making the short story long: An approach to Meeting the Needs of Low Level U...
 Making the short story long: An approach to Meeting the Needs of Low Level U... Making the short story long: An approach to Meeting the Needs of Low Level U...
Making the short story long: An approach to Meeting the Needs of Low Level U...Hala Nur
 
English education: Recent Developments and current Issues
English education: Recent Developments and current IssuesEnglish education: Recent Developments and current Issues
English education: Recent Developments and current Issuesiescomarcalburjassot
 
Current International Developments in English Language Teaching (ELT) and Imp...
Current International Developments in English Language Teaching (ELT) and Imp...Current International Developments in English Language Teaching (ELT) and Imp...
Current International Developments in English Language Teaching (ELT) and Imp...Hala Nur
 
realizacion de llamadas y videollamadas
realizacion de llamadas y videollamadas realizacion de llamadas y videollamadas
realizacion de llamadas y videollamadas karenvela29
 
5кл. "Музика і кіно."
 5кл. "Музика і кіно." 5кл. "Музика і кіно."
5кл. "Музика і кіно."nataliyu roschina
 

Viewers also liked (13)

What English Do University Students Really Need
What English Do University Students Really NeedWhat English Do University Students Really Need
What English Do University Students Really Need
 
Internet and Sudan
Internet and SudanInternet and Sudan
Internet and Sudan
 
7, vnc server
7, vnc server7, vnc server
7, vnc server
 
OPM Recipe designer notes
OPM Recipe designer notesOPM Recipe designer notes
OPM Recipe designer notes
 
Blog
BlogBlog
Blog
 
Português – oraçõs subordinadas adjetivas 01 – 2014 – ifba
Português – oraçõs subordinadas adjetivas 01 – 2014 – ifbaPortuguês – oraçõs subordinadas adjetivas 01 – 2014 – ifba
Português – oraçõs subordinadas adjetivas 01 – 2014 – ifba
 
3, users & groups
3, users & groups3, users & groups
3, users & groups
 
Making the short story long: An approach to Meeting the Needs of Low Level U...
 Making the short story long: An approach to Meeting the Needs of Low Level U... Making the short story long: An approach to Meeting the Needs of Low Level U...
Making the short story long: An approach to Meeting the Needs of Low Level U...
 
English education: Recent Developments and current Issues
English education: Recent Developments and current IssuesEnglish education: Recent Developments and current Issues
English education: Recent Developments and current Issues
 
Current International Developments in English Language Teaching (ELT) and Imp...
Current International Developments in English Language Teaching (ELT) and Imp...Current International Developments in English Language Teaching (ELT) and Imp...
Current International Developments in English Language Teaching (ELT) and Imp...
 
Sifilis terminado
Sifilis terminadoSifilis terminado
Sifilis terminado
 
realizacion de llamadas y videollamadas
realizacion de llamadas y videollamadas realizacion de llamadas y videollamadas
realizacion de llamadas y videollamadas
 
5кл. "Музика і кіно."
 5кл. "Музика і кіно." 5кл. "Музика і кіно."
5кл. "Музика і кіно."
 

Similar to 2, installation

使用 Load Balancer 與 Redis 部署 LAMP Server 高併發架構 - Global Azure Taiwan 20200425 ...
使用 Load Balancer 與 Redis 部署 LAMP Server 高併發架構 - Global Azure Taiwan 20200425 ...使用 Load Balancer 與 Redis 部署 LAMP Server 高併發架構 - Global Azure Taiwan 20200425 ...
使用 Load Balancer 與 Redis 部署 LAMP Server 高併發架構 - Global Azure Taiwan 20200425 ...Laird Cheng
 
A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩
A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩
A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩Wen-Tien Chang
 
CloudStack Installation on Ubuntu
CloudStack Installation on UbuntuCloudStack Installation on Ubuntu
CloudStack Installation on Ubuntu康志強 大人
 
Kick start无人值守批量安装linux
Kick start无人值守批量安装linuxKick start无人值守批量安装linux
Kick start无人值守批量安装linuxYiwei Ma
 
Nagios的安装部署和与cacti的整合(linuxtone)
Nagios的安装部署和与cacti的整合(linuxtone)Nagios的安装部署和与cacti的整合(linuxtone)
Nagios的安装部署和与cacti的整合(linuxtone)Yiwei Ma
 
unix toolbox 中文版
unix toolbox 中文版unix toolbox 中文版
unix toolbox 中文版Jie Bao
 
HPE SimpliVity install mgmt guide 201907-01 (Taiwan-Chinese) ;HPE SimpliVity ...
HPE SimpliVity install mgmt guide 201907-01 (Taiwan-Chinese) ;HPE SimpliVity ...HPE SimpliVity install mgmt guide 201907-01 (Taiwan-Chinese) ;HPE SimpliVity ...
HPE SimpliVity install mgmt guide 201907-01 (Taiwan-Chinese) ;HPE SimpliVity ...裝機安 Angelo
 
How to Install Debian GNU/Linux
How to Install Debian GNU/LinuxHow to Install Debian GNU/Linux
How to Install Debian GNU/LinuxShau-Hung Hsieh
 
現代 IT 人一定要知道的 Ansible 自動化組態技巧 Ⅱ - Roles & Windows
現代 IT 人一定要知道的 Ansible 自動化組態技巧 Ⅱ - Roles & Windows現代 IT 人一定要知道的 Ansible 自動化組態技巧 Ⅱ - Roles & Windows
現代 IT 人一定要知道的 Ansible 自動化組態技巧 Ⅱ - Roles & WindowsChu-Siang Lai
 
Bypat博客出品-利用cent os快速构建自己的发行版-进阶版v1.1
Bypat博客出品-利用cent os快速构建自己的发行版-进阶版v1.1Bypat博客出品-利用cent os快速构建自己的发行版-进阶版v1.1
Bypat博客出品-利用cent os快速构建自己的发行版-进阶版v1.1redhat9
 
自动化运维管理
自动化运维管理自动化运维管理
自动化运维管理frankwsj
 
VMware如何使用,最好用的虚拟机,VMware有哪些功能?关于虚拟机V...
VMware如何使用,最好用的虚拟机,VMware有哪些功能?关于虚拟机V...VMware如何使用,最好用的虚拟机,VMware有哪些功能?关于虚拟机V...
VMware如何使用,最好用的虚拟机,VMware有哪些功能?关于虚拟机V...wensheng wei
 
Docker tutorial
Docker tutorialDocker tutorial
Docker tutorialazole Lai
 
Cognos8.3安装配置For Db2
Cognos8.3安装配置For Db2Cognos8.3安装配置For Db2
Cognos8.3安装配置For Db2Franky Lao
 
5, system admin
5, system admin5, system admin
5, system adminted-xu
 
VMware Rhel5 Oracle10g Rac
VMware Rhel5 Oracle10g RacVMware Rhel5 Oracle10g Rac
VMware Rhel5 Oracle10g Racguest77e407
 
Deployment with Capistrano
Deployment with CapistranoDeployment with Capistrano
Deployment with Capistrano旭 張
 

Similar to 2, installation (20)

使用 Load Balancer 與 Redis 部署 LAMP Server 高併發架構 - Global Azure Taiwan 20200425 ...
使用 Load Balancer 與 Redis 部署 LAMP Server 高併發架構 - Global Azure Taiwan 20200425 ...使用 Load Balancer 與 Redis 部署 LAMP Server 高併發架構 - Global Azure Taiwan 20200425 ...
使用 Load Balancer 與 Redis 部署 LAMP Server 高併發架構 - Global Azure Taiwan 20200425 ...
 
A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩
A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩
A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩
 
CloudStack Installation on Ubuntu
CloudStack Installation on UbuntuCloudStack Installation on Ubuntu
CloudStack Installation on Ubuntu
 
Kick start无人值守批量安装linux
Kick start无人值守批量安装linuxKick start无人值守批量安装linux
Kick start无人值守批量安装linux
 
Nagios的安装部署和与cacti的整合(linuxtone)
Nagios的安装部署和与cacti的整合(linuxtone)Nagios的安装部署和与cacti的整合(linuxtone)
Nagios的安装部署和与cacti的整合(linuxtone)
 
unix toolbox 中文版
unix toolbox 中文版unix toolbox 中文版
unix toolbox 中文版
 
HPE SimpliVity install mgmt guide 201907-01 (Taiwan-Chinese) ;HPE SimpliVity ...
HPE SimpliVity install mgmt guide 201907-01 (Taiwan-Chinese) ;HPE SimpliVity ...HPE SimpliVity install mgmt guide 201907-01 (Taiwan-Chinese) ;HPE SimpliVity ...
HPE SimpliVity install mgmt guide 201907-01 (Taiwan-Chinese) ;HPE SimpliVity ...
 
How to Install Debian GNU/Linux
How to Install Debian GNU/LinuxHow to Install Debian GNU/Linux
How to Install Debian GNU/Linux
 
現代 IT 人一定要知道的 Ansible 自動化組態技巧 Ⅱ - Roles & Windows
現代 IT 人一定要知道的 Ansible 自動化組態技巧 Ⅱ - Roles & Windows現代 IT 人一定要知道的 Ansible 自動化組態技巧 Ⅱ - Roles & Windows
現代 IT 人一定要知道的 Ansible 自動化組態技巧 Ⅱ - Roles & Windows
 
Bypat博客出品-利用cent os快速构建自己的发行版-进阶版v1.1
Bypat博客出品-利用cent os快速构建自己的发行版-进阶版v1.1Bypat博客出品-利用cent os快速构建自己的发行版-进阶版v1.1
Bypat博客出品-利用cent os快速构建自己的发行版-进阶版v1.1
 
Git安裝
Git安裝Git安裝
Git安裝
 
自动化运维管理
自动化运维管理自动化运维管理
自动化运维管理
 
VMware如何使用,最好用的虚拟机,VMware有哪些功能?关于虚拟机V...
VMware如何使用,最好用的虚拟机,VMware有哪些功能?关于虚拟机V...VMware如何使用,最好用的虚拟机,VMware有哪些功能?关于虚拟机V...
VMware如何使用,最好用的虚拟机,VMware有哪些功能?关于虚拟机V...
 
LinuxGuide4F2E
LinuxGuide4F2ELinuxGuide4F2E
LinuxGuide4F2E
 
Linuxguide4f2e
Linuxguide4f2eLinuxguide4f2e
Linuxguide4f2e
 
Docker tutorial
Docker tutorialDocker tutorial
Docker tutorial
 
Cognos8.3安装配置For Db2
Cognos8.3安装配置For Db2Cognos8.3安装配置For Db2
Cognos8.3安装配置For Db2
 
5, system admin
5, system admin5, system admin
5, system admin
 
VMware Rhel5 Oracle10g Rac
VMware Rhel5 Oracle10g RacVMware Rhel5 Oracle10g Rac
VMware Rhel5 Oracle10g Rac
 
Deployment with Capistrano
Deployment with CapistranoDeployment with Capistrano
Deployment with Capistrano
 

More from ted-xu

11, OCP - awr & alert system
11, OCP - awr & alert system11, OCP - awr & alert system
11, OCP - awr & alert systemted-xu
 
10, OCP - flashback
10, OCP - flashback10, OCP - flashback
10, OCP - flashbackted-xu
 
9, OCP - restore and recovery with rman
9, OCP - restore and recovery with rman9, OCP - restore and recovery with rman
9, OCP - restore and recovery with rmanted-xu
 
8, OCP - backup with rman
8, OCP - backup with rman8, OCP - backup with rman
8, OCP - backup with rmanted-xu
 
7, OCP - configure database for backup and recovery
7, OCP - configure database for backup and recovery7, OCP - configure database for backup and recovery
7, OCP - configure database for backup and recoveryted-xu
 
6, OCP - oracle security
6, OCP - oracle security6, OCP - oracle security
6, OCP - oracle securityted-xu
 
5, OCP - oracle storage
5, OCP - oracle storage5, OCP - oracle storage
5, OCP - oracle storageted-xu
 
4, OCP - oracle networking
4, OCP - oracle networking4, OCP - oracle networking
4, OCP - oracle networkingted-xu
 
3, OCP - instance management
3, OCP - instance management3, OCP - instance management
3, OCP - instance managementted-xu
 
2, OCP - installing and creating a database
2, OCP - installing and creating a database2, OCP - installing and creating a database
2, OCP - installing and creating a databaseted-xu
 
1, OCP - architecture intro
1, OCP - architecture intro1, OCP - architecture intro
1, OCP - architecture introted-xu
 
12, OCP - performance tuning
12, OCP - performance tuning12, OCP - performance tuning
12, OCP - performance tuningted-xu
 
7, business event system
7, business event system7, business event system
7, business event systemted-xu
 
6, workflow miscellaneous
6, workflow miscellaneous6, workflow miscellaneous
6, workflow miscellaneousted-xu
 
5, workflow function activity
5, workflow function activity5, workflow function activity
5, workflow function activityted-xu
 
4, workflow tables & api
4, workflow tables & api4, workflow tables & api
4, workflow tables & apited-xu
 
3, workflow in ebs
3, workflow in ebs3, workflow in ebs
3, workflow in ebsted-xu
 
2, a simple workflow
2, a simple workflow2, a simple workflow
2, a simple workflowted-xu
 
1, workflow intro
1, workflow intro1, workflow intro
1, workflow introted-xu
 
8, bes tables & api
8, bes tables & api8, bes tables & api
8, bes tables & apited-xu
 

More from ted-xu (20)

11, OCP - awr & alert system
11, OCP - awr & alert system11, OCP - awr & alert system
11, OCP - awr & alert system
 
10, OCP - flashback
10, OCP - flashback10, OCP - flashback
10, OCP - flashback
 
9, OCP - restore and recovery with rman
9, OCP - restore and recovery with rman9, OCP - restore and recovery with rman
9, OCP - restore and recovery with rman
 
8, OCP - backup with rman
8, OCP - backup with rman8, OCP - backup with rman
8, OCP - backup with rman
 
7, OCP - configure database for backup and recovery
7, OCP - configure database for backup and recovery7, OCP - configure database for backup and recovery
7, OCP - configure database for backup and recovery
 
6, OCP - oracle security
6, OCP - oracle security6, OCP - oracle security
6, OCP - oracle security
 
5, OCP - oracle storage
5, OCP - oracle storage5, OCP - oracle storage
5, OCP - oracle storage
 
4, OCP - oracle networking
4, OCP - oracle networking4, OCP - oracle networking
4, OCP - oracle networking
 
3, OCP - instance management
3, OCP - instance management3, OCP - instance management
3, OCP - instance management
 
2, OCP - installing and creating a database
2, OCP - installing and creating a database2, OCP - installing and creating a database
2, OCP - installing and creating a database
 
1, OCP - architecture intro
1, OCP - architecture intro1, OCP - architecture intro
1, OCP - architecture intro
 
12, OCP - performance tuning
12, OCP - performance tuning12, OCP - performance tuning
12, OCP - performance tuning
 
7, business event system
7, business event system7, business event system
7, business event system
 
6, workflow miscellaneous
6, workflow miscellaneous6, workflow miscellaneous
6, workflow miscellaneous
 
5, workflow function activity
5, workflow function activity5, workflow function activity
5, workflow function activity
 
4, workflow tables & api
4, workflow tables & api4, workflow tables & api
4, workflow tables & api
 
3, workflow in ebs
3, workflow in ebs3, workflow in ebs
3, workflow in ebs
 
2, a simple workflow
2, a simple workflow2, a simple workflow
2, a simple workflow
 
1, workflow intro
1, workflow intro1, workflow intro
1, workflow intro
 
8, bes tables & api
8, bes tables & api8, bes tables & api
8, bes tables & api
 

2, installation

  • 3. 概述 • 学习linux行之有效的一种方式是在真实环境 中不断地进行实践, 本章介绍如何通过虚拟 机的方式安装一个Linux测试环境, 使用虚拟 机安装的好处是不会对现有的系统造成任 何的影响; • 本章使用的虚拟机软件是Oracle VirtualBox, 该软件可以运行在XP/Win7/Linux等操作系 统上.
  • 4. 虚拟机 • 通过虚拟机(Virtual Machine)可以在当前的系统上 运行其它的系统, 比如可以在XP上运行Linux; 创建 一个虚拟机需要为它指定相应的虚拟资源 , 比如硬 盘/CPU/内存等. 关于虚拟机更多说明, 参考; • 本质上来说, 虚拟机软件与其他的操作系统软件没 有什么差别, 都是运行在宿主系统上的二进制程序; 其中宿主系统(host)是运行虚拟机的OS, 而客户系 统(guest)则是指虚拟机系统本身; 比如: Linux VM XP VM Windows 7 Host
  • 5. Oracle VirtualBox • VirtualBox是由Oracle公司所有的, 可供免费 下载使用的虚拟机软件, 进入到下载地址页 面之后选择合适的版本下载; VirtualBox小巧 易用, 并且性能表现也比较优秀, 本章选择使 用它作为虚拟机来安装linux;关于VirutalBox 的安装, 参考这里; • 另有其他的虚拟机软件, 比如Vmware ,Xen等, 相对来说在易用性方面都不及VirtualBox, 有 需要可作进一步的了解.
  • 6. 安装准备 • 宿主操作系统(Host OS) 示例中使用的是windows 7, 需要在任意分区上空 闲至少10g的磁盘空间; • 安装介质 选择自己喜欢的发型版本, 这里使用的是Oracle Enterprise Linux 5.4版本; • VirtualBox 选择最新版本的VirtualBox, 示例使用的是4.1.20
  • 36. 配置 -安装增强工具包 • Virtualbox针对不同的guest OS提供了对应的增强工具包 (additions), 该工具包提供了如下功能: 1, 在host OS和guest之间切换鼠标焦点, 目前两者之间的鼠标是不能够 自由切换的; 2, 支持guest OS全屏; 3, 在host和guest之间共享文件夹. • 如何安装? 1, 安装gcc编译器和内核源代码, additions的安装需要引用内核源代 码重新编译. 首先需要设置一个yum源(见Note), 这里使用本地的 DVD作为yum源: # 切换为root用户 su – root # 创建/mnt/dvd目录 mkdir /mnt/dvd # 挂载dvd光驱, 并切换到/mnt目录 mount /dev/dvd /mnt/dvd cd /mnt
  • 37. 配置 -安装增强工具包 # 使用createrepo命令创建一个源 createrepo -g ./dvd/Server/repodata/comps-rhel5-server-core.xml . # 配置yum使用本地源, ## 创建本地源配置文件 touch /etc/yum.repos.d/local.repo ## 输入本地源的配置信息 echo "[local] Name=local baseurl=file:///mnt/ enable=1 gpgcheck=0" > /etc/yum.repos.d/local.repo ## 更新yum配置, 至此yum本地源创建完毕 yum clean all # 安装gcc yum install gcc # 安装内核源码 yum install kernel-devel-`uname -r`.`uname -m`
  • 38. 配置 -安装增强工具包 2, 弹出安装盘, 在虚拟机运行窗口点击菜单Devices -> Install guest additions 3, 执行如下命令安装 # 重新挂载dvd mount /dev/dvd /mnt/dvd # 创建临时目录, 并切换目录 mkdir ~/tmp cd ~/tmp # 拷贝安装文件, 并运行 cp /mnt/dvd/VBoxLinuxAdditions.run . ./VBoxLinuxAdditions.run
  • 39. 配置 -安装增强工具包 • 至此增强工具包安装完成, 可以尝试一下全屏, host/guest之间鼠 标切换等; • 增强工具包提供的一个很有用的功能是在host/guest之间共享文件, 如 下图进行设置, 需要注意的 是这里的目录名为tutorials, 接下来会被使用; 另外需要 勾选auto-mount自动挂载; • 打开虚拟机系统, 切换到 root用户, 创建目录/mnt/share 编辑/etc/rc.local文件, 添加 如下行: mount -t vboxsf tutorials /mnt/share 注: 这里的tutorials正是上面 创建共享目录指定的名称. 这样在以后就可以通过/mnt/share 目录访问宿主机器的文件了.
  • 40. 配置 - 使用putty连接 • 关于putty, 参考. • 首先设置VirtualBox host-only网络接口
  • 41. 配置 - 使用putty连接 • 启动虚拟机, 使用root用户修改网卡配置文件 /etc/sysconfig/network-scripts/ifcfg-eth0, 修改或添加如 下行: IPADDR=192.168.56.128 DEVICE=eth0 BOOTPROTO=static ONBOOT=yes • 重启网卡 /etc/init.d/network restart 接下来就可以使用putty登录了
  • 42. END

Editor's Notes

  1. TODO
  2. TODO
  3. 菜单栏点击Machine -> New, 弹出新建虚拟的向导, 点击Next
  4. 输入虚拟机操作系统的名称和类型, 点击Next;
  5. 设置虚拟机内存大小,可以根据实际的情况进行设置, 这里设置为2G; 点击Next;
  6. 设置启动盘, 这里勾选”启动盘”, 并选择创建新磁盘. 点击Next;
  7. 这里弹出的是创建虚拟磁盘向导, 第一步选择磁盘类型, 这里选择VDI是VirtualBox专用的一种格式. 点击Next;
  8. 选择磁盘大小是否为动态,这里选择为固定大小, 这样性能较好; 点击Next;
  9. 设置虚拟磁盘的位置和大小,点击Next;
  10. 最后出现的是一个安装总结界面, 点击Create;
  11. 虚拟磁盘创建完毕之后,出现的是虚拟机安装总结界面, 点击Create即完成虚拟机的创建.
  12. 在左边的虚拟机列表中选中刚创建的虚拟机,点击菜单Machine -> Settings;
  13. 在新弹出的窗口中选中”Storage”, 之后选中”IDE Controller”, 点击右边的光碟图标选择下载的安装ISO文件, 点击OK
  14. 选中虚拟机,然后点击上方的start按钮, 就会弹出系统安装界面了(右下图). 直接按Enter键进入下一步.
  15. 按Tab键选择跳过磁盘检查, Enter键; 接下来就是图形化的安装界面了(右下), Next.
  16. 选择安装过程使用的语言,可以选择中文或者English, 这里我选择了英语; 下一步选择键盘类型, 选择美式英语键盘(US English), Next;
  17. 点击下一步会警告找不到分区表,这是正常的因为之前没有对磁盘作分区; 点击Yes, 之后选择删除所有的分区并且创建默认分区; Next(过程中会弹出提示, 选择Yes)
  18. 这一部设置网络,选择默认设置即可, Next;
  19. 设置时区,选择亚洲/上海时区, Next; 设置root(系统管理员)用户的密码, Next;
  20. 选择需要安装的软件包,分以下几类:1, 软件开发工具包括Java等开发工具;2, Web服务器包括Apache等web服务器软件;3, Virtualization 虚拟化软件;4, Clustering 集群软件;5, Storage Clustering 存储工具.这里使用默认, Next;
  21. 点击Next开始安装, 大概持续30分钟.
  22. 最后出现的是安装完成界面,点击Reboot; 此时虚拟光碟会自动被弹出.右下角是系统启动界面.
  23. 初次启动需要进行初始化设置, Next;
  24. 防火墙设置, 选择默认开启防火墙, SSH为可信任服务; Next;
  25. SELinux设置选择为disabled, 略过kdump设置, 核对系统时间; Next;
  26. 创建一个普通用户, 如图; Next;
  27. 声卡测试和选择额外的cd,可略过. 点击Finish, 系统初始化配置完毕, 之后系统会再次重启.
  28. 输入刚创建的用户名和密码,登录系统右下是登录后的系统桌面.到此为止系统安装完毕.
  29. 点击Machine -> settings, 进入到System设定界面, 设置Hard Disk在第一位, 同时在Storage界面设置好CD/DVD介质, 以后将会使用到.
  30. 使用如图的方式打开firefox浏览器(linux默认的浏览器), 尝试是否能访问互联网; 默认情况下虚拟机使用的是NAT虚拟网卡, 这种情况下虚拟机可以通过host上网, host不能访问guest系统;
  31. 通过如上方式配置剪贴板共享
  32. 软件源:可以理解为几种存放软件包的仓库, 可以使本地的也可以是基于网络的;yum:redhat及其他类似版本(centos, oel)下面的包管理工具.