1、ECS系统环境:CentOS Linux release 7.5.1804 (Core)
2、oracle软件版本
linux.x64_11gR2_database_1of2.zip
linux.x64_11gR2_database_2of2.zip
3、用户、系统、目录配置
1)增加用户组、用户
groupadd -g 501 oinstall
groupadd -g 502 dba
groupadd -g 503 oper
useradd -u 502 -g oinstall -G dba,oper oracle
2)设置oracle用户密码
passwd oracle
3)修改 /etc/sysctl.conf,增加如下内容后,执行sysctl -p
kernel.shmmni = 4096
kernel.shmmax = 4398046511104
kernel.shmall = 1073741824
kernel.sem = 250 32000 100 128
fs.aio-max-nr = 1048576
fs.file-max = 6815744
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586
4)修改/etc/security/limits.conf,增加如下内容
oracle soft nproc 131072
oracle hard nproc 131072
oracle soft nofile 131072
oracle hard nofile 131072
oracle soft core unlimited
oracle hard core unlimited
oracle soft memlock 50000000
oracle hard memlock 50000000
5)修改/etc/hosts
x.x.x.x iZ88cqgc85wZ localhost localhost.localdomain
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
7)修改oracle用户环境变量(!!oracle用户操作)
切换oracle用户,修改 .bash_profile后,执行source .bash_profile
export TMP=/tmp
umask 022
export ORACLE_BASE=/data2/oracle/app
export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
export ORACLE_HOME
PATH=$PATH:$ORACLE_HOME/bin
export PATH
8)创建目录、授权(!!root用户操作)
mkdir -p /data2/oracle/app
mkdir -p /data2/oracle/app/oracle
mkdir -p /data2/oracle/app/oracle/product/11.2.0/db_1
chmod 775 /data2/oracle -R
chown oracle:oinstall -R /data2/oracle
4、安装依赖包+图形界面
yum -y install binutils compat-libcap1 compat-libstdc++-33 compat-libstdc++-33*.i686 elfutils-libelf-devel gcc gcc-c++ glibc*.i686 glibc glibc-devel glibc-devel*.i686 ksh libgcc*.i686 libgcc libstdc++ libstdc++*.i686 libstdc++-devel libstdc++-devel*.i686 libaio libaio*.i686 libaio-devel libaio-devel*.i686 make sysstat unixODBC unixODBC*.i686 unixODBC-devel unixODBC-devel*.i686 libXp xrdp gpm* xorg-x11-drv-evdev
yum groupinstall "GNOME Desktop" "Graphical Administration Tools"
设置服务桌面启动
systemctl set-default graphical.target //设置成图形模式,可能需要重启机器
直接启动服务(可以利用ECS控制台自带VNC,也可以安装vncserver)
startx &
5、登录VNC,安装oracle
1)打开terminal
xdpyinfo #查看
root用户
export DISPLAY=:2
xhost +
su - oracle
export DISPLAY=:2
3)解压两个压缩包
unzip linux.x64_11gR2_database_1of2.zip
unzip linux.x64_11gR2_database_2of2.zip
4)安装
cd database
./runInstaller
5)图形化安装(省略)
注意问题:
1、卡在create inventory(有报错弹框,但是框显示有问题)
解决方法:
./runInstaller -jreLoc /usr/local/jdk1.7.0_80/ ##JDK位置可能有变化
3、登录oracle后,连接管理员失败
解决方法:
export ORACLE_SID=ora11g
有问题请大家私信我,欢迎骚扰