当前位置:文档之家› centos7安装oracle11过程

centos7安装oracle11过程

centos7下oracle11g详细的安装一、oracle的安装,在官网下载oracle11g R21、进入终端输入命令:su输入ROOT密码:创建用户组oinstall:groupadd oinstall创建用户组dba:groupadd dba创建oracle用户,并加入到oinstall和dba用户组:useradd -g oinstall -g dba -m oracle设置用户oracle登录密码,需要确认一次,注意两次密码要一样(注意:此处的密码是oracle 账户登录密码):passwd oracle查看新建的oracle用户:id oracle[root@localhost ~]# groupadd oinstall[root@localhost ~]# groupadd dba[root@localhost ~]# useradd -g oinstall -g dba -m oracle[root@localhost ~]# passwd oracleChanging password for user oracle.New password:BAD PASSWORD: The password is shorter than 8 charactersRetype new password:passwd: all authentication tokens updated successfully.[root@localhost ~]# id oracleuid=1000(oracle) gid=1001(dba) groups=1001(dba)[root@localhost ~]#查看空间大小[root@localhost ~]# df -hFilesystem Size Used Avail Use% Mounted on/dev/mapper/centos-root 21T 3.2G 21T 1% /devtmpfs 7.7G 0 7.7G 0% /devtmpfs 7.7G 16K 7.7G 1% /dev/shmtmpfs 7.7G 18M 7.7G 1% /runtmpfs 7.7G 0 7.7G 0% /sys/fs/cgroup/dev/sda1 194M 112M 83M 58% /boottmpfs 1.6G 32K 1.6G 1% /run/user/02、创建oracle数据库安装目录oracle数据库安装目录:mkdir -p /data/oracleoracle数据库配置文件目录:mkdir -p /data/oraInventoryoracle数据库软件包解压目录:mkdir -p /data/database再输入:cd /data创建完毕检查一下:ls设置目录所有者为oinstall用户组的oracle用户:chown -R oracle:oinstall /data/oracle再输入:chown -R oracle:oinstall /data/oraInventory再输入:chown -R oracle:oinstall /data/database[root@localhost /]# mkdir -p /data/oracle[root@localhost /]# mkdir -p /data/oraInventory[root@localhost /]# mkdir -p /data/database[root@localhost /]# cd data[root@localhost data]# lsdatabase oracle oraInventory[root@localhost data]#[root@localhost data]# chown -R oracle:oinstall /data/oracle[root@localhost data]# chown -R oracle:oinstall /data/oraInventory[root@localhost data]# chown -R oracle:oinstall /data/database[root@localhost data]#3、修改os系统标识因为oracle默认不支持Centos系统安装,需要修改为对应的RedHat版本。

查看当前系统版本:cat /proc/version输入:vi /etc/redhat-release进入到编辑模式了,点击键盘上的“insert”按钮,再将第一行替换为redhat-7,按Esc按钮,输入:wq,注意这里有一个冒号,再回车,保存并退出(注意:后面所有修改文件的方法均如此,故不再赘述)。

#CentOS Linux release 7.2.1511 (Core)redhat-74、关闭防火墙关闭防火墙:systemctl stop firewalld.service禁止使用防火墙:systemctl disable firewalld.service[root@localhost data]# systemctl stop firewalld.service[root@localhost data]# systemctl disable firewalld.serviceRemoved symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service. Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service.5、关闭selinux进入编辑状态:vi /etc/selinux/config将SELINUX的值改为disabled,保存并退出。

# This file controls the state of SELinux on the system.# SELINUX= can take one of these three values:# enforcing - SELinux security policy is enforced.# permissive - SELinux prints warnings instead of enforcing.# disabled - No SELinux policy is loaded.#SELINUX=enforcingSELINUX=disabled# SELINUXTYPE= can take one of three two values:# targeted - Targeted processes are protected,# minimum - Modification of targeted policy. Only selected processes are protected.# mls - Multi Level Security protection.SELINUXTYPE=targeted6、修改内核参数进入编辑状态:vi /etc/sysctl.conf在最后添加如下代码:net.ipv4.icmp_echo_ignore_broadcasts = 1net.ipv4.conf.all.rp_filter = 1fs.file-max = 6815744fs.aio-max-nr = 1048576kernel.shmall = 2097152kernel.shmmax = 2147483648kernel.shmmni = 4096kernel.sem = 250 32000 100 128net.ipv4.ip_local_port_range = 9000 65500net.core.rmem_default = 262144net.core.rmem_max= 4194304net.core.wmem_default= 262144net.core.wmem_max= 1048576保存并退出。

[root@localhost data]# vi /etc/sysctl.conf# System default settings live in /usr/lib/sysctl.d/00-system.conf.# To override those settings, enter new settings here, or in an /etc/sysctl.d/<name>.conf file ## For more information, see sysctl.conf(5) and sysctl.d(5).net.ipv4.icmp_echo_ignore_broadcasts = 1net.ipv4.conf.all.rp_filter = 1fs.file-max = 6815744fs.aio-max-nr = 1048576kernel.shmall = 4294967295kernel.shmmax = 2147483648kernel.shmmni = 4096kernel.sem = 250 32000 100 128net.ipv4.ip_local_port_range = 9000 65500net.core.rmem_default = 262144net.core.rmem_max= 4194304net.core.wmem_default= 262144net.core.wmem_max= 1048576使配置参数立即生效:sysctl -p[root@localhost data]# sysctl -pnet.ipv4.icmp_echo_ignore_broadcasts = 1net.ipv4.conf.all.rp_filter = 1fs.file-max = 6815744fs.aio-max-nr = 1048576kernel.shmall = 2097152kernel.shmmax = 2147483648kernel.shmmni = 4096kernel.sem = 250 32000 100 128net.ipv4.ip_local_port_range = 9000 65500net.core.rmem_default = 262144net.core.rmem_max = 4194304net.core.wmem_default = 262144net.core.wmem_max = 10485767、对oracle用户设置限制,提高软件运行性能进入编辑状态:vi /etc/security/limits.conf找到最后一行# End of file,在它上面空行处添加如下代码:oracle soft nproc 2047oracle hard nproc 16384oracle soft nofile 1024oracle hard nofile 65536保存并退出。

相关主题