标签:path usr shel schema root har new group 结果
一、安装环境主机名:slave.com
OS: centos7.5
软件版本:Oracle 11.2.0.4
CPU: 1个
内存: 8G
swap: 16G
/u01 : 20G
/data: 50G
/backup: 50G
安装方式:CentOS 7为Gnome
二、安装rpm包
binutils-2.20.51.0.2-5.11.el6 (x86_64)
compat-libstdc++-33-3.2.3-69.el6 (x86_64)
gcc-4.4.4-13.el6 (x86_64)
gcc-c++-4.4.4-13.el6 (x86_64)
glibc-2.12-1.7.el6 (i686)
glibc-2.12-1.7.el6 (x86_64)
glibc-devel-2.12-1.7.el6 (x86_64)
glibc-devel-2.12-1.7.el6.i686
libgcc-4.4.4-13.el6 (i686)
libgcc-4.4.4-13.el6 (x86_64)
libstdc++-4.4.4-13.el6 (x86_64)
libstdc++-4.4.4-13.el6.i686
libstdc++-devel-4.4.4-13.el6 (x86_64)
libstdc++-devel-4.4.4-13.el6.i686
libaio-0.3.107-10.el6 (x86_64)
libaio-0.3.107-10.el6.i686
libaio-devel-0.3.107-10.el6 (x86_64)
libaio-devel-0.3.107-10.el6.i686
elfutils-libelf-devel-0.164-2.el6 (x86_64)
pdksh-5.2.14-37.el5_8.1 (x86_64)
三、数据库安装
编辑文件/etc/hosts添加主机名及IP地址
[root@slave ~]# vim /etc/hosts
193.192.168.4.185 slave.com
2.创建用户和组
[root@slave ~]# groupadd -g 500 oinstall
[root@slave ~]# groupadd -g 501 dba
[root@slave ~]# useradd -g oinstall -G dba -u 500 oracle
[root@slave ~]# passwd oracle
Changing password for user oracle.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
创建目录
[root@slave ~]# mkdir -p /u01/app/oracle
[root@slave ~]# mkdir -p /data/oradata
[root@slave ~]# mkdir -p /backup/{expdbbackup,rmanbackup,onlinelog,archivelog,backupsh}
[root@slave ~]# chown -R oracle:oinstall /u01
[root@slave ~]# chown -R oracle:oinstall /data
[root@slave ~]# chown -R oracle:oinstall /backup
2) 编辑/etc/fstab
[root@slave ~]# vim /etc/fstab
tmpfs /dev/shm tmpfs defaults,size=18432M 0 0
3) 重新挂载
[root@slave ~]# mount -o remount /dev/shm
5.修改内核参数
1) 编辑/etc/sysctl.conf添加以下内容
[root@slave ~]# vim /etc/sysctl.conf
#oracle
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 8388608
kernel.shmmax = 4294967295
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 6815744
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default=262144
net.core.wmem_default=262144
net.core.rmem_max=4194304
net.core.wmem_max=1048576
#end
2) 执行sysctl -p命令使文件生效
[root@slave ~]# sysctl -p
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 8388608
kernel.shmmax = 4294967295
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 6815744
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.wmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_max = 1048576
2) 执行source .bash_profile命令使环境变量生效
[oracle@slave ~]$ source .bash_profile
2)执行setenforce 0不重启操作系统临时关闭selinux模式
[oracle@slave ~]$ setenforce 0
9.安装oracle
1) 上传安装文件
[root@slave ~]# cd /home/oracle/
[root@slave oracle]# ls
p13390677_112040_Linux-x86-64_1of7.zip p13390677_112040_Linux-x86-64_2of7.zip
2) 解压
[root@slave oracle]# unzip p13390677_112040_Linux-x86-64_1of7.zip
[root@slave oracle]# unzip p13390677_112040_Linux-x86-64_2of7.zip
[root@slave oracle]# ls
database p13390677_112040_Linux-x86-64_1of7.zip p13390677_112040_Linux-x86-64_2of7.zip
3) 使用Xshell远程登录执行runInstaller开始安装
[root@slave ~]# export DISPLAY=192.168.4.56:0.0
[root@slave ~]# su - oracle
Last login: Fri Jan 18 19:24:18 CST 2019 on pts/1
[oracle@slave ~]$ export DISPLAY=192.168.4.56:0.0
4)测试结果
[root@slave ~]# xhost +
access control disabled, clients can connect from any host
Last login: Fri Jan 18 19:30:13 CST 2019 on pts/0
[oracle@slave ~]$ cd database/
[oracle@slave database]$ ./runInstaller
Starting Oracle Universal Installer...
Checking Temp space: must be greater than 120 MB. Actual 44343 MB Passed
Checking swap space: must be greater than 150 MB. Actual 16383 MB Passed
Checking monitor: must be configured to display at least 256 colors. Actual 16777216 Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2019-01-18_07-43-51PM. Please wait ...[oracle@slave da
tabase]$
4) 启动安装界面
5) 取消 I wish to receive security updates via my Oracle Support.勾选,点击下一步
6) 此报错可以忽略,点击Yes,并点击下一步
7) 选择Skip software updates,点击下一步
8) 选择Create and configure a database,点击下一步
9) 选择Server Class,点击下一步
10) 选择Single instance database installation,点击下一步
11) 选择Advanced install,点击下一步
12) 选择语言English,点击下一步
13) 选择Enterprise Edition,点击下一步
14) 选择Oracle Base、Software Location路径,点击下一步
15) 选择Inventory Directory,点击下一步
16) 选择General Purpose/Transaction Processing,点击下一步
17) 设置Global database name、Oracle Service Identifier,Global database name和Oracle Service Identifier保持一致,点击下一步
18) 设置Memory,选择Enable Automatic Memory Management
19) 设置Character sets,选择Use Unicode(AL32UTF8)
20) 设置Security,保持默认选项
21) 设置Sample Schemas,保持默认选项,点击下一步
22) 保持默认选项,点击下一步
23) 保持默认选项,点击下一步
24) 保持默认选项,点击下一步
25) 选择Use the same password for all accounts,设置密码(密码需参考密码管理规范),点击下一步
26) Database Operator(OSOPER) Group(Optional)选择oinstall,点击下一步
27) 安装程序进行配置检查
28) 配置检查通过,点击Install
39) 开始安装
30) 报错
解决办法:
[oracle@slave database]$ vi $ORACLE_HOME/sysman/lib/ins_emagent.mk
Search for the line
$(MK_EMAGENT_NMECTL)
Change it to:
$(MK_EMAGENT_NMECTL) -lnnz11
31) 创建数据库
32) 创建数据库完成,点击Password Management修改sys,system用户密码,并确定OK。
33)提示使用root用户执行两个shell脚本
34) 执行shell脚本
[root@slave ~]# /u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.
Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.
[root@slave ~]# /u01/app/oracle/product/11.2.0/dbhome_1/root.sh
Performing root user operation for Oracle 11g
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/11.2.0/dbhome_1
Enter the full pathname of the local bin directory: [/usr/local/bin]:
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...
Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Finished product-specific roo
35) 单击OK,安装完成。
标签:path usr shel schema root har new group 结果
原文地址:http://blog.51cto.com/437549/2344357