Ubuntu 16.04 LTS install oracle 11g
#A = https://www.jianshu.com/p/add03c2d9b10
#B = https://www.linuxidc.com/Linux/2017-01/139074.htm
jdk环境没验证,反正是装了
1.useradd
A //Oracle用户创建--T
|__sudo groupadd oinstall
|__sudo groupadd dba
|__sudo useradd -g oinstall -G dba oracle -d /home/oracle
|__sudo passwd oracle
2.install 依赖--T
sudo apt-get update
sudo apt-get dist-upgrade
B //安装依赖
3.检查系统变量--T
B //修改系统变量--T
kernel.sem = 32000 1024000000 500 32000
kernel.shmall = 18446744073692774399
kernel.shmmax = 18446744073692774399
net.ipv4.ip_local_port_range = 1024 65535
kernel.shmmni = 4096
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576
fs.file-max = 6815744
vm.hugetlb_shm_group = 1002
A //内核-limit--login--T
/etc/security/limits.conf
|
|__oracle soft nproc 2047
|__oracle hard nproc 16384
|__oracle soft nofile 1024
|__oracle hard nofile 65536
|__oracle soft stack 10240
/etc/pam.d/login
|
|__session required /lib/security/pam_limits.so
|__session required pam_limits.so
4.欺骗oracle--T
A //欺骗oracle--T
|
sudo mkdir /usr/lib64
sudo ln -s /etc /etc/rc.d
sudo ln -s /lib/x86_64-linux-gnu/libgcc_s.so.1 /lib64/
sudo ln -s /usr/bin/awk /bin/awk
sudo ln -s /usr/bin/basename /bin/basename
sudo ln -s /usr/bin/rpm /bin/rpm
sudo ln -s /usr/lib/x86_64-linux-gnu/libc_nonshared.a /usr/lib64/
sudo ln -s /usr/lib/x86_64-linux-gnu/libpthread_nonshared.a /usr/lib64/
sudo ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6 /lib64/
sudo ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6 /usr/lib64/
vim /etc/redhat-release >> Red Hat Linux release 5
|__
A //配置环境变量--T
|
~/.bashrc
#oracle安装目录,第6步创建的文件夹
export ORACLE_BASE=/home/oracle/oracle
#网上说可以随便写
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
#数据库的sid
export ORACLE_SID=orcl
export ORACLE_UNQNAME=orcl
#默认字符集
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
#环境变量
export PATH=${PATH}:${ORACLE_HOME}/bin/:$ORACLE_HOME/lib64;
|__
5.安装oracle
A and B //error处理
|__oracle乱码
|__error in invoking target ‘install’ of makefile
|Error in invoking target ‘agent nmhs’ of makefile -----1
|Error in invoking target ‘all_no_orcl’ of makefile -----2
|之后是Retry继续安装
|成功之后执行俩脚本()
6.创建开机自动启动数据库的脚本
A //略过
7./etc/oratab
|__sed -i 's/db:N/dn:Y/' /etc/oratab
-----1
Error in invoking target ‘agent nmhs’ of makefile ‘/home/dong/tools/oracle11g/product/11.2.0/dbhome_1/sysman/lib/ins_emagent.mk’
解决方法:
打开新的终端窗口
使用vi命令,打开/home/dong/tools/oracle11g/product/11.2.0/dbhome_1/sysman/lib/ins_emagent.mk文件,将$(MK_EMAGENT_NMECTL)修改成$(MK_EMAGENT_NMECTL)-lnnz11 即可,
然后点击retry ,接着往下执行
-----2
Error in invoking target ‘all_no_orcl’ of makefile ‘/home/dong/tools/oracle11g/product/11.2.0/dbhome_1/rdbms/lib/ins_rdbms.mk’. See ‘/home/dong/tools/Inventory/logs/installActions2016-03-19_02-37-44PM.log’ for details.
解决办法:
打开一个新的终端,输入如下四个命令:
sed -i 's/^(TNSLSNR_LINKLINE.$(TNSLSNR_OFILES)) ($(LINKTTLIBS))/\1 -Wl,--no-as-needed \2/g' $ORACLE_HOME/network/lib/env_network.mk
sed -i 's/^(ORACLE_LINKLINE.$(ORACLE_LINKER)) ($(PL_FLAGS))/\1 -Wl,--no-as-needed \2/g' $ORACLE_HOME/rdbms/lib/env_rdbms.mk
sed -i 's/^($LD $LD_RUNTIME) ($LD_OPT)/\1 -Wl,--no-as-needed \2/g' $ORACLE_HOME/bin/genorasdksh
sed -i 's/^(\s*)($(OCRLIBS_DEFAULT))/\1 -Wl,--no-as-needed \2/g' $ORACLE_HOME/srvm/lib/ins_srvm.mk
然后在图形界面点击‘Retry’就能继续安装了。
Error in invoking target 'all_no_orcl' of makefile '/home/oracle/oracle/product/11.2.0/dbhome_1/rdbms/lib/ins_rdbms.mk'.
compat-libstdc++-33-3.2.3-61.i386.rpm --后来选择跳过
https://jingyan.baidu.com/article/cbcede077f59bf02f40b4ddb.html --vncserver--gnome 需重启 YES
Ubuntu安装compat-libstdc++-22-2.2.3-61.i386.rpm_疯狂地追逐_新浪博客
http://blog.sina.com.cn/s/blog_7099ca0b0100w639.html