Oracle学习笔记(2)--Centos 7 下11gR2部署

Oracle图形化安装过程

准备好VM虚拟机,以GUI服务器安装,安装必要的桌面工具。安装完成做好基础优化,如关闭selinux、firealld,修改ulimit、内核参数等等。这里使用xmanager的xstart进行远程连接,需要在服务器上安装xterm:yum install -y xterm

安装过程遇到的问题,记录到底部!!!!!!!!!!!!!!!!!!!!!

1、配置Hosts

echo "10.64.160.189 OracleTest" >> /etc/hosts

2、关闭防火墙、selinux

sed -i 's#SELINUX=enforcing#SELINUX=disabled#g' /etc/sysconfig/selinux
setenforce 0
systemctl stop firewalld
systemctl disable firewalld

3、创建用户、组、目录、权限

groupadd dba
useradd oracle
passwd oracle
mkdir -pv /oracle/app/oracle
chown -R oracle.dba /oracle
chmod -R 755 /oracle

4、配置环境变量

su - oracle
vim ~/.bash_profile
  export LANG=en_US
  export ORACLE_BASE=/oracle/app/oracle
  export ORACLE_HOME=/oracle/app/oracle/product/11.2.0.4/db_1
  export ORACLE_UNQNAME=itpuxdb
  export ORACLE_SID=itpuxdb
  NLS_LANG=AMERICAN_AMERICA.ZHS16GBK;export NLS_LANG
  export PATH=$PATH:/oracle/app/oracle/product/11.2.0.4/db_1/bin
source ~/.bash_profile

5、解压安装包

su - oracle
cd /oracle
unzip linux.x64_11gR2_database_1of2.zip
unzip linux.x64_11gR2_database_2of2.zip

通过xmanager xstart进行远程连接:

cd /oracle/database
./runInstaller -jreLoc /etc/alternatives/jre_1.8.0



















登录服务器,在root用户下,执行脚本进行修复




在root账户下,执行上面2个脚本。执行完成点ok,Next

到此,Oracle安装完成,上面的链接是oracle 的web管理器EM。
https://10.64.160.189:1158/em

安装过程中遇到的问题:

(1)提示ins_ctx.mk编译错误。

修改ins_ctx.mk文件

vim /oracle/app/oracle/product/11.2.0.4/db_1/ctx/lib/ins_ctx.mk 

ctxhx: $(CTXHXOBJ)
        -static $(LINK_CTXHX) $(CTXHXOBJ) $(INSO_LINK) /usr/lib64/stdc.a

修改如下:

修改为

(2)错误:Error in invoking target ‘agent nmhs’ of makefile

在makefile中添加链接libnnz11库的参数

vim /oracle/app/oracle/product/11.2.0.4/db_1/sysman/lib/ins_emagent.mk

$(SYSMANBIN)emdctl:
        $(MK_EMAGENT_NMECTL) -lnnz11

点击Retry继续安装。

(3)错误:信号量问题,参考:https://blog.csdn.net/hkyw000/article/details/53486940
ORA-27154:post/wait create failed
ORA-27300:OS system dependent operation:semget failed with status 28
ORA-27301:OS failure message:No space left on device
ORA-27302:failure occurred at: sskgpcreates

修改内核参数:
# vim /etc/sysctl.conf
kernel.sem =5010 641280 5010 128
# sysctl -p

(4)安装完成发现登录oracle数据库,发现无法使用退格进行删除操作

安装rlwrap解决无法使用退格删除的问题:

# yum install -y readline*
# wget https://github.com/hanslub42/rlwrap/releases/download/v0.45.2/rlwrap-0.45.2.tar.gz
# tar -zxf rlwrap-0.45.2.tar.gz
# cd rlwrap-0.45.2/
# ./configure
# make && make install
# vim /home/oracle/.bash_profile
alias sqlplus=’rlwrap sqlplus’
alias rman=’rlwrap rman’
# su – oracle
# source .bash_profile
posted @ 2021-08-31 17:10  烟雨浮华  阅读(256)  评论(0编辑  收藏  举报