一、安装OEL 5.6
二、安装VMware Tools
1) 选择菜单里的VM选项,里面有一个子选项是installVMware Tools,选择它。
2) 回到操作系统,将光驱挂载到/mnt 下
[root@tyger~]# mount /dev/cdrom /mnt
mount:block device /dev/cdrom is write-protected, mounting read-only
[root@tyger~]#
3) 解压安装tools压缩包
[root@tyger~]# pwd
/root
[root@tyger~]# tar -xzvf /mnt/VMwareTools-9.2.0-799703.tar.gz
……
[root@tyger~]# ls
anaconda-ks.cfg Desktop install.log install.log.syslog vmware-tools-distrib
[root@tyger~]# cd vmware-tools-distrib/
[root@tygervmware-tools-distrib]# ls
bin doc etc FILES INSTALL installer lib vmware-install.pl
[root@tygervmware-tools-distrib]# ./vmware-install.pl
回车
回车
回车
……
三、关闭一些不是必需的服务(自己练习阶段)
service NetworkManager stop
service acpid stop
service anacron stop
service apmd stop
service atd stop
service auditd stop
service autofs stop
service avahi-daemon stop
service avahi-dnsconfd stop
service bluetooth stop
service conman stop
service cpuspeed stop
service cups stop
service dnsmasq stop
service dund stop
service firstboot stop
service gpm stop
service haldaemon stop
service hidd stop
service ip6tables stop
service ipmi stop
service ipmievd stop
service iptables stop
service irda stop
service irqbalance stop
service kdump stop
service kudzu stop
service mcstrans stop
service mdmpd stop
service microcode_ctl stop
service netconsole stop
service netfs stop
service netplugd stop
service nfs stop
service nfslock stop
service nscd stop
service ntpd stop
service pand stop
service pcscd stop
service portmap stop
service psacct stop
service rawdevices stop
service rdisc stop
service readahead_early stop
service readahead_later stop
service restorecond stop
service rhnsd stop
service rpcgssd stop
service rpcidmapd stop
service rpcsvcgssd stop
service saslauthd stop
service sendmail stop
service setroubleshoot stop
service smartd stop
service vncserver stop
service wdaemon stop
service winbind stop
service wpa_supplicant stop
service xfs stop
service xinetd stop
service ypbind stop
service yum-updatesd stop
四、设置不是必需的服务开机不启动
chkconfig NetworkManager off
chkconfig acpid off
chkconfig anacron off
chkconfig apmd off
chkconfig atd off
chkconfig auditd off
chkconfig autofs off
chkconfig avahi-daemon off
chkconfig avahi-dnsconfd off
chkconfig bluetooth off
chkconfig conman off
chkconfig cpuspeed off
chkconfig cups off
chkconfig dnsmasq off
chkconfig dund off
chkconfig firstboot off
chkconfig gpm off
chkconfig haldaemon off
chkconfig hidd off
chkconfig ip6tables off
chkconfig ipmi off
chkconfig ipmievd off
chkconfig iptables off
chkconfig irda off
chkconfig isdn off
chkconfig irqbalance off
chkconfig kdump off
chkconfig kudzu off
chkconfig mcstrans off
chkconfig mdmpd off
chkconfig microcode_ctl off
chkconfig netconsole off
chkconfig netfs off
chkconfig netplugd off
chkconfig nfs off
chkconfig nfslock off
chkconfig nscd off
chkconfig ntpd off
chkconfig pand off
chkconfig pcscd off
chkconfig portmap off
chkconfig psacct off
chkconfig rawdevices off
chkconfig rdisc off
chkconfig readahead_early off
chkconfig readahead_later off
chkconfig restorecond off
chkconfig rhnsd off
chkconfig rpcgssd off
chkconfig rpcidmapd off
chkconfig rpcsvcgssd off
chkconfig saslauthd off
chkconfig sendmail off
chkconfig setroubleshoot off
chkconfig smartd off
chkconfig vncserver off
chkconfig wdaemon off
chkconfig winbind off
chkconfig wpa_supplicant off
chkconfig xfs off
chkconfig xinetd off
chkconfig ypbind off
chkconfig yum-updatesd off
五、改动版本号支持
经过oracle验证的redhat操作系统版本号最高为4,4以后的版本号都没有经过oracle验证。没有验证的版本号假设不改动的话,是无法安装的。
[root@tyger ~]# vi /etc/redhat-release
Red Hat Enterprise Linux Server release 5.6 (Tikanga) |
改为
Red Hat Enterprise Linux Server release 4.6 (Tikanga) |
[root@tyger ~]# cat/etc/redhat-release
cat /etc/redhat-release
Red Hat Enterprise LinuxServer release 4.6 (Tikanga)
六、YUM安装软件包
用YUM的工具来安装所需软件包(先将OEL5.6安装镜像文件载入到虚拟机光驱中)
[root@tyger ~]# mount /dev/cdrom /mnt
mount: block device /dev/cdrom is write-protected,mounting read-only
[root@tyger ~]#
[root@tyger ~]# vi/etc/yum.repos.d/public-yum-el5.repo
[root@tyger ~]#
[oel5] name = Enterprise Linux 5.6 DVD baseurl=file:///mnt/Server/ gpgcheck=0 enabled=1 |
[root@tyger etc]#
[root@tyger etc]# yum install oracle-validated
……略……
Total download size: 36 M
Is this ok [y/N]:y
Downloading Packages:
--------------------------------------------------------------------------
Total 1.8GB/s | 36 MB 00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : unixODBC 1/18
Installing : libXp 2/18
Installing : sysstat 3/18
Installing : compat-db 4/18
Installing : gdb 5/18
Installing :kernel-headers 6/18
Installing :glibc-headers 7/18
Installing : glibc-devel 8/18
Installing :libstdc++-devel 9/18
Installing :unixODBC-devel 10/18
Installing : libaio-devel 11/18
Installing :compat-gcc-34 12/18
Installing : gcc 13/18
Installing : gcc-c++ 14/18
Installing :compat-gcc-34-c++ 15/18
Installing :elfutils-libelf-devel 16/18
Installing : elfutils-libelf-devel-static 17/18
Installing :oracle-validated 18/18
Installed:
oracle-validated.i386 0:1.0.0-24.el5
Dependency Installed:
compat-db.i386 0:4.2.52-5.1
compat-gcc-34.i386 0:3.4.6-4.1
compat-gcc-34-c++.i386 0:3.4.6-4.1
elfutils-libelf-devel.i3860:0.137-3.el5
elfutils-libelf-devel-static.i386 0:0.137-3.el5
gcc.i3860:4.1.2-50.el5
gcc-c++.i386 0:4.1.2-50.el5
gdb.i3860:7.0.1-32.el5
glibc-devel.i386 0:2.5-58
glibc-headers.i386 0:2.5-58
kernel-headers.i386 0:2.6.18-238.el5
libXp.i3860:1.0.0-8.1.el5
libaio-devel.i386 0:0.3.106-5
libstdc++-devel.i386 0:4.1.2-50.el5
sysstat.i386 0:7.0.2-3.el5_5.1
unixODBC.i386 0:2.2.11-7.1
unixODBC-devel.i386 0:2.2.11-7.1
Complete!
[root@tyger ~]#
1.1. 改动/etc/sysctl.conf文件
在安装oracle软件的验证步骤,会明白的告诉你以下的设置,所以,我们能够提前将其改之,假设有兴趣的同学,能够先安装,验证的时候,再改也是一样的。
[root@tyger soft]# vi/etc/sysctl.conf
将 net.ipv4.ip_local_port_range = 9000 65500 改为 net.ipv4.ip_local_port_range = 1024 65000 |
--使上面改动生效
[root@tyger soft]#/sbin/sysctl -p
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter= 2
net.ipv4.conf.default.accept_source_route= 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies =1
fs.file-max = 6815744
kernel.msgmni = 2878
kernel.msgmax = 8192
kernel.msgmnb = 65536
kernel.sem = 250 32000100 142
kernel.shmmni = 4096
kernel.shmall =1073741824
kernel.shmmax =4294967295
kernel.sysrq = 1
net.core.rmem_default =262144
net.core.rmem_max =4194304
net.core.wmem_default =262144
net.core.wmem_max =1048576
fs.aio-max-nr = 3145728
net.ipv4.ip_local_port_range= 1024 65000
vm.min_free_kbytes =51200
[root@tyger soft]#
1) 改动oracle用户的password(我们使用YUM安装了相关的程序包的同一时候,也为我们创建了Oracle账户和相关的组)
[root@tyger ~]# passwdoracle
Changing password foruser oracle.
New UNIX password:
BAD PASSWORD: it is basedon a dictionary word
Retype new UNIX password:
passwd: allauthentication tokens updated successfully.
2) 创建相关文件夹并赋权
[root@tyger ~]# mkdir/soft
[root@tyger ~]# chown -Roracle:oinstall /soft
[root@tyger ~]# chmod -R755 /soft
[root@comu ~]# mkdir -p/u01/app/oracle
[root@tyger ~]# chown -Roracle:oinstall /u01
[root@tyger ~]# chmod -R755 /u01
1.3. 主机名及IP的设定
[root@tyger ~]# vi/etc/hosts
# Do not remove thefollowing line, or various programs
# that require networkfunctionality will fail.
127.0.0.1 tygerlocalhost.localdomain localhost
(注意:本行的tyger要删除,由于以下添加的一行已经存在了)
::1 localhost6.localdomain6 localhost6
192.168.1.32 tyger
(注:添加此行,由于在安装的过程中,oracle会依据ip地址去做一些操作,假设此处没有计算机的ip地址及计算机名,则在验证的过程中会有警告)
1.4. 设置oracle用户环境变量
[root@tyger ~]# su -oracle
[oracle@tyger ~]$
[oracle@tyger ~]$ vi.bash_profile
注:在文件的最下方添加例如以下内容 export ORACLE_BASE=/u01/app/oracle export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1 export ORACLE_SID=ORCL export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib |
改动完毕,使其改动生效,例如以下:
[oracle@tyger ~]$ ..bash_profile
[oracle@tyger ~]$
或者
[oracle@tyger ~]$ source.bash_profile
[oracle@tyger ~]$
再或者注销又一次登录
注:
ORACLE_BASE:oracle产品基文件夹
ORACLE_HOME:数据库产品文件夹通常情况下HOME文件夹是BASE的子文件夹
ORACLE_SID:操作系统和oracle实例关联的纽带
PATH:将安装后的oracle命令追加到运行搜索路径
LD_LIBRARY_PATH:动态库的位置
1.5. 上传oracle安装介质
(通过工具ssh进行上传)
1、 连接ssh得先配置一下你的linux
① VM-----settings------NetworkAdapter
设置为host-only模式 Devicestatus中的都勾选
OK
② Edit------VirtualNetwork Editor-----
设置VMnet1 为host-only且将Subnet IP设置与你linuxIP地址在同一个网段(我的IP:192.168.12.70所以我设置为:192.168.12.0)
====================================================
补充:假设你不知道你的liunxIP地址你能够打开一个终端查一下
[root@tyger ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0C:29:2A:24:66
inet addr:192.168.12.70 Bcast:192.168.12.255 Mask:255.255.255.0
inet6 addr:fe80::20c:29ff:fe2a:2466/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3030 errors:0 dropped:0overruns:0 frame:0
TX packets:1739 errors:0 dropped:0overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:302428 (295.3 KiB) TX bytes:274398 (267.9 KiB)
Interrupt:67 Base address:0x2024
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:1026 errors:0 dropped:0overruns:0 frame:0
TX packets:1026 errors:0 dropped:0overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1359652 (1.2 MiB) TX bytes:1359652 (1.2 MiB)
[root@tyger ~]#
============================================================================
OK
2、 连接SSH上传文件10201_database_linux32到linux的 /soft 文件夹下
上传完毕
1) 解压刚刚上传文件
[root@tyger ~]# xhost +
access control disabled,clients can connect from any host
[root@tyger ~]# su -oracle
[oracle@tyger ~]$ cd/soft
[oracle@tyger soft]$ ls
10201_database_linux32.zip linux-oracle-needed-software
[oracle@tyger soft]$unzip 10201_database_linux32.zip
…………
inflating:database/stage/oracle.server.10_2_0_1_0_dep_default.properties
inflating:database/stage/oracle.server.10_2_0_1_0_1120187896411.bak
inflating: database/stage/fastcopy.xml
inflating: database/welcome.html
[oracle@tyger soft]$
[oracle@tyger soft]$ ls
10201_database_linux32.zip database linux-oracle-needed-software
2) 開始安装oracle软件(启动图形化界面)
[oracle@tyger soft]$ cddatabase/
[oracle@tyger database]$ls
doc install response runInstaller stage welcome.html
[oracle@tyger database]$ ./runInstaller
3) 以下開始就跟着图片做,刚開始不须要管由于什么,仅仅知道怎么做。
Next
Next
Next
出现以下时是自己主动加入的,和设置环境变量是一样的
Next
能够看到所有通过,perfect!!!
Next
选择Install database Software only 就好,之后我们会创建数据库
Next
此时能够整体看一下你的配置信息,接下去就要開始安装oracle数据库软件了
Install…….
手下留情!!!!!
此时会弹出两个须要运行的脚本文件,还是打开一个新的终端运行了吧,要不还得自己去找脚本运行,
[root@tyger ~]#/u01/app/oracle/oraInventory/orainstRoot.sh
Changing permissions of/u01/app/oracle/oraInventory to 770.
Changing groupname of /u01/app/oracle/oraInventoryto oinstall.
The execution of the script is complete
[root@tyger ~]#/u01/app/oracle/product/10.2.0/root.sh
Running Oracle10 root.sh script...
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/10.2.0
Enter the full pathname of the local bin directory:[/usr/local/bin]:
Copyingdbhome to /usr/local/bin ...
Copyingoraenv to /usr/local/bin ...
Copyingcoraenv to /usr/local/bin ...
Creating /etc/oratab file...
Entries will be added to the /etc/oratab file asneeded by
Database Configuration Assistant when a database iscreated
Finished running generic part of root.sh script.
Now product-specific root actions will beperformed.
[root@tyger ~]#
OK……
EXIT
Yes
1.7. 创建oracle数据库
接着開始用图形化界面创建oracle数据库(DBCA)
[oracle@tyger ~]$ dbca
-bash: dbca: command not found
假设出现上面的问题,是由于设置环境变量的有问题
[oracle@tyger ~]$ vi .bash_profile
将路径:
exportORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
改为
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0
改动完毕,使其改动生效,例如以下:
[oracle@tyger ~]$ ..bash_profile
[oracle@tyger ~]$
或者
[oracle@tyger ~]$ source.bash_profile
[oracle@tyger ~]$
再或者注销又一次登录
准备工作做好了,好了……開始图形化界面
[oracle@tyger ~]$ dbca
Next
…
Next
…
Next
…
输入你的Global Database Name (全局数据库名称),以下的SID会自己主动补全,这个SID一定要和你设置环境变量的SID同样。
环境变量的SID设置例如以下:
export ORACLE_SID=ORCL
next
接下来这个界面问你是否要安装oracle的EM ,这里能够不安装,到后来我们学习自己手动安装EM(oracle的一个图形化界面管理工具)
你能够创建完数据库,接着配置EM,要问怎么办,给你网址你懂得~~
我自己总结的 tyger tyger tyger ~~~~~~~~~~~~~~~~~~
http://blog.csdn.net/wanghui5767260/article/details/15506419
NEXT
这里统一设置password为:oracle
Next
..
Next
..
Next
….
仅仅有选中后,数据库安装时才会将SCOTT、HR等用户创建上,否则是没有此用户的。另注意,默认情况下,这些用户都是锁定的,须要人工解锁。
1.71_内存、块大小、字符集、连接模式设置
1) 内存,能够分配百分比,也能够手工指定SGA和PGA的大小
2) 数据库默认块大小
3) 字符集设置,能够採用默认的(默认字符集是什么跟操作系统有关系),也能够使用UTF8或者选择你指定的字符集
4) 连接模式,选择,专用模式
1.72_确认数据库存储信息,下一步
1.73_默认仅仅有创建数据库是选中状态
能够将我们眼下全部创建的步骤保存为模板,同一时候也能够将这些步骤保存为脚本
1.74_全部安装的组件
1.75_点击OK后,首先弹出模板保存成功对话框
1.76_然后弹出,脚本保存成功对话框
1.77_点击OK,開始创建数据库
依据机器的情况不同,时间也有所差异,请慢慢等待
1.78_点击EXIT,安装完毕
安装orcle10g oel5.6,布布扣,bubuko.com
原文:http://www.cnblogs.com/mfrbuaa/p/3811487.html