标签:chown status splay ase glibc limit gnome oracle 用户 11.2
新到的云主机环境,系统是CentOS 7 x86_64,需要安装上安装Oracle11.2g。摸索很长时间,终于折腾搞定了。
下载下来之后是有两个压缩包:
linux.x64_11gR2_database_2of2.zip
解压
unzip linux.x64_11gR2_database_1of2.zip
unzip linux.x64_11gR2_database_2of2.zip
切换到root用户
su - root
增加用户组
--required groups
/usr/sbin/groupadd -g 501 oinstall
/usr/sbin/groupadd -g 502 dba
/usr/sbin/groupadd -g 503 oper
增加用户
/usr/sbin/useradd -u 502 -g oinstall -G dba,oper oracle
设置oracle用户的密码
passwd oracle
然后输入想要设置的密码。
修改 /etc/sysctl.conf
vim /etc/sysctl.conf
增加以下内容:
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
使修改生效:
/sbin/sysctl -p
修改 /etc/security/limits.conf
vim /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
确保/etc/hosts
中含有服务器机器名称,像这样(如果已经含有了,就略过此步):
<IP-address> <fully-qualified-machine-name> <machine-name>
比如服务器名称是centos7-001,曾可以配置成这样:
127.0.0.1 centos7-001 localhost localhost.localdomain
然后ping一下试试:
ping -c 1 centos7-001
正确的结果:
--- centos7 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
修改/etc/profile
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
修改oracle用户环境变量
切换到 oracle 用户
su - oracle
修改 .bash_profile
,添加以下内容:
# Oracle Settings
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
使之生效:
source .bash_profile
创建安装路径并授权给oracle用户
su - root
mkdir -p /data2/oracle/app
chown oracle:oinstall /data2/oracle/app
chmod 775 /data2/oracle/app
mkdir -p /data2/oracle/app/oracle
chown oracle:oinstall /data2/oracle/app/oracle
chmod 775 /data2/oracle/app/oracle
mkdir -p /data2/oracle/app/oracle/product/11.2.0/db_1
chown oracle:oinstall -R /data2/oracle/app/oracle
> 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
CentOS 7 安装GNOME
图形界面
yum groupinstall "GNOME Desktop" "Graphical Administration Tools"
安装Gnome GUI使用时报错:
Transaction check error:
file /usr/lib/systemd/system/blk-availability.service from install of device-mapper-7:1.02.107-5.el7.x86_64 conflicts with file from package lvm2-7:2.02.105-14.el7.x86_64
file /usr/sbin/blkdeactivate from install of device-mapper-7:1.02.107-5.el7.x86_64 conflicts with file from package lvm2-7:2.02.105-14.el7.x86_64
file /usr/share/man/man8/blkdeactivate.8.gz from install of device-mapper-7:1.02.107-5.el7.x86_64 conflicts with file from package lvm2-7:2.02.105-14.el7.x86_64
Error Summary
-------------
解决办法,先升级lvm2:
yum -y install lvm2
因为使用的是远程主机,所以要远程Linux图形桌面,我这里使用的是VNC
在远程主机上安装vnc:
yum -y install vnc-server
设置密码:
vncpasswd
启动vncserver:
vncserver
设置DISPLAY:
export DISPLAY=:1
设置图形桌面访问权限
xhost +
vncserver默认端口是5900 + 序号,第一个即5901
。
在本地的windows环境下安装并运行vnc客户端,下载地址: https://www.realvnc.com/download/vnc/
使用vnc连接到远程主机,在桌面上右键打开命令行,进入到oracle所在路径,然后:
cd database
export DISPLAY=:1
./runInstaller
然后就可以启动oracle图形界面安装向导了。
安装Gnome GUI使用时报错:
Transaction check error:
file /usr/lib/systemd/system/blk-availability.service from install of device-mapper-7:1.02.107-5.el7.x86_64 conflicts with file from package lvm2-7:2.02.105-14.el7.x86_64
file /usr/sbin/blkdeactivate from install of device-mapper-7:1.02.107-5.el7.x86_64 conflicts with file from package lvm2-7:2.02.105-14.el7.x86_64
file /usr/share/man/man8/blkdeactivate.8.gz from install of device-mapper-7:1.02.107-5.el7.x86_64 conflicts with file from package lvm2-7:2.02.105-14.el7.x86_64
Error Summary
-------------
解决办法,先升级lvm2:
yum -y install lvm2
安装oracle时报错memcpy@GLIBC_2.14未找到:
INFO: /lib64/libstdc++.so.5: undefined reference to `memcpy@GLIBC_2.14‘
collect2: error: ld returned 1 exit status
INFO: make: *** [ctxhx] Error 1
INFO: End output from spawned process.
解决办法,先查看 /usr/lib64/libc.a是否存在:
ls /usr/lib64 | grep libc.a
如果查找不到先安装:glibc-static,如果有则略过此步
yum -y install glibc-static
修改oracle安装目录下 $ORACLE_HOME/ctx/lib/ins_ctx.mk
将
ctxhx: $(CTXHXOBJ)
$(LINK_CTXHX) $(CTXHXOBJ) $(INSO_LINK)
修改为:
ctxhx: $(CTXHXOBJ)
-static $(LINK_CTXHX) $(CTXHXOBJ) $(INSO_LINK) /usr/lib64/libc.a
然后点击retry通过
安装oracle时报错Error in invoking target ‘agent nmhs‘:
Error in invoking target ‘agent nmhs‘ of makefile ‘/data2/oracle/app/oracle/product/11.2.0/dbhome_1/sysman/lib/ins_emagent.mk‘
解决办法:修改 $ORACLE_HOME/sysman/lib/ins_emagent.mk
将
$(MK_EMAGENT_NMECTL)
修改为
$(MK_EMAGENT_NMECTL) -lnnz11
然后点击retry通过
至此,就可以使用sqldevelper等客户端连接oracle了
标签:chown status splay ase glibc limit gnome oracle 用户 11.2
原文地址:http://www.cnblogs.com/andy6/p/6226794.html