Oracle 11g 单机安装 —— 文件系统

1、解析主机名:

[root@rhel ~]# vim /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.0.200   oracle

2、关闭防火墙及安全策略:

[root@rhel ~]# service iptables stop
[root@rhel ~]# service ip6tables stop
[root@rhel ~]# service NetworkManager stop
[root@rhel ~]# chkconfig iptables off
[root@rhel ~]# chkconfig ip6tables off
[root@rhel ~]# chkconfig NetworkManager off
[root@rhel ~]# setenforce 0
[root@rhel ~]# sed -i 's/=enforcing/=disabled/' /etc/selinux/config

3、配置yum源:

[root@rhel ~]# rm -rf /etc/yum.repos.d/*
[root@rhel ~]# cat >> /etc/yum.repos.d/rhel.repo << EOF
> [rhel]
> name=rhel
> baseurl=file:///mnt
> enable=1
> gpgcheck=0
> EOF
[root@rhel ~]# cat >> /etc/rc.d/rc.local << EOF
> mount /dev/sr0 /mnt
> EOF
[root@rhel ~]# mount /dev/sr0 /mnt
mount: block device /dev/sr0 is write-protected, mounting read-only
[root@rhel ~]# yum repolist
Loaded plugins: product-id, refresh-packagekit, search-disabled-repos, security, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
rhel                                                                                                                            | 4.1 kB     00:00 ... 
rhel/primary_db                                                                                                                 | 3.0 MB     00:00 ... 
repo id                                                                   repo name                                                              status
rhel                                                                      rhel                                                                   3,861
repolist: 3,861

4、安装依赖包:

[root@rhel ~]# yum -y install binutils-* compat-libstdc++-* compat-libstdc++-*.i686 elfutils-libelf* elfutils-libelf-devel* gcc-* gcc-c++-* glibc-* glibc-*.i686 glibc-common* glibc-devel* glibc-devel*.i686 glibc-headers* ksh* libaio* libaio*.i686 libaio* libaio*.i686 libgcc* libgcc*.i686 libstdc++* libstdc++*.i686 libstdc++-devel* make* sysstat* unixODBC* unixODBC*.i686 unixODBC-devel* unixODBC-devel*

5、创建用户和组:

[root@rhel ~]# groupadd -g 501 oinstall
[root@rhel ~]# groupadd -g 502 dba
[root@rhel ~]# groupadd -g 504 asmadmin
[root@rhel ~]# groupadd -g 506 asmdba
[root@rhel ~]# groupadd -g 507 asmoper
[root@rhel ~]# useradd -u 501 -g oinstall -G asmadmin,asmdba,asmoper,dba grid
[root@rhel ~]# useradd -u 502 -g oinstall -G dba,asmdba oracle

6、创建目录:

[root@rhel ~]# mkdir -p /u01/app/oracle
[root@rhel ~]# mkdir -p /u01/app/oracle/cfgtoollogs
[root@rhel ~]# chown -R oracle:oinstall /u01/app/oracle
[root@rhel ~]# chmod -R 775 /u01/app/oracle
[root@rhel ~]# mkdir -p /u01/app/oraInventory
[root@rhel ~]# chown -R grid:oinstall /u01/app/oraInventory
[root@rhel ~]# chmod -R 775 /u01/app/oraInventory
[root@rhel ~]# mkdir -p /u01/app/grid
[root@rhel ~]# chmod -R 775 /u01/app/grid
[root@rhel ~]# chown -R grid:oinstall /u01/app/grid
[root@rhel ~]# mkdir -p /u01/app/11.2.0/grid
[root@rhel ~]# chown -R grid:oinstall /u01/app/11.2.0/grid
[root@rhel ~]# chmod -R 775 /u01/app/11.2.0/grid

7、配置Oracle环境变量:

[root@rhel ~]# su - oracle
[oracle@rhel ~]$ vi .bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2/db_1
export PATH=$PATH:$ORACLE_HOME/bin

export PATH

[oracle@rhel ~]$ . .bash_profile
[root@rhel ~]# vim /etc/oraInst.loc
inventory_loc=/u01/app/oraInventory
inst_group=oinstall

8、上传Oracle11g的database软件:

Oracle 11g 单机安装 —— 文件系统_第1张图片

9、 创建fsdb:

mkdir /oradata
chown oracle: /oradata
chmod 755 /oradata

10、解压database:

[root@rhel soft]# unzip linux.x64_11gR2_database_1of2.zip
...
[root@rhel soft]# unzip linux.x64_11gR2_database_2of2.zip
...

11、执行安装脚本:

[oracle@rhel database]$ /tmp/soft/database/runInstaller

 

你可能感兴趣的:(Oracle)