centos7.4如何測試安裝oracle成功?#将下面文字保存io.sh腳本文件,選擇unix編碼格式保存腳本和oracle壓縮包傳入linux, linux進入io.sh 所在目錄,下面我們就來聊聊關于centos7.4如何測試安裝oracle成功?接下來我們就一起去了解一下吧!
#将下面文字保存io.sh腳本文件,選擇unix編碼格式保存。腳本和oracle壓縮包傳入linux, linux進入io.sh 所在目錄。
##chmod x io.sh 賦予執行權限, ./io.sh 運行腳本。更多内容看視頻。
linux-centos7.5,xshell腳本安裝oracle11g全程
setenforce 0 #臨時關閉selinux
systemctl stop firewalld.service #關閉firewalld
yum -y install iptables-services #安裝iptables
systemctl restart iptables.service
systemctl enable iptables.service
#安裝依賴
yum -y install binutils compat compat-libstdc gcc gcc-c glibc glibc-devel ksh libaio libaio-devel libgcc libstdc libstdc -devel libXi libXtst make sysstat unixODBC unixODBC-devel unzip net-tools telnet
#chmod x
#、創建用戶
groupadd oinstall
groupadd dba
useradd -g oinstall -G dba -m oracle
#passwd oracle
#、創建安裝目錄,解壓文件
mkdir -p /ora/oracle
chown -R oracle:oinstall /ora
chmod 755 -R /ora
unzip -d /ora/ /home/io/linux.x64_11gR2_database_1of2.zip
unzip -d /ora/ /home/io/linux.x64_11gR2_database_2of2.zip
#修改内核
echo 'fs.aio-max-nr = 1048576' >>/etc/sysctl.conf
echo 'fs.file-max = 6815744' >>/etc/sysctl.conf
echo 'kernel.shmall = 2097152' >>/etc/sysctl.conf
echo 'kernel.shmmax = 4294967295' >>/etc/sysctl.conf
echo 'kernel.shmmni = 4096' >>/etc/sysctl.conf
echo 'kernel.sem = 250 32000 100 128' >>/etc/sysctl.conf
echo 'net.ipv4.ip_local_port_range = 9000 65500' >>/etc/sysctl.conf
echo 'net.core.rmem_default = 262144' >>/etc/sysctl.conf
echo 'net.core.rmem_max = 4194304' >>/etc/sysctl.conf
echo 'net.core.wmem_default = 262144' >>/etc/sysctl.conf
echo 'net.core.wmem_max = 1048576' >>/etc/sysctl.conf
#修改認證模塊
echo 'oracle soft nproc 131072' >>/etc/security/limits.conf
echo 'oracle hard nproc 131072' >>/etc/security/limits.conf
echo 'oracle soft nofile 131072' >>/etc/security/limits.conf
echo 'oracle hard nofile 131072' >>/etc/security/limits.conf
echo 'oracle soft core unlimited' >>/etc/security/limits.conf
echo 'oracle hard core unlimited' >>/etc/security/limits.conf
echo 'oracle soft memlock 50000000' >>/etc/security/limits.conf
echo 'oracle hard memlock 50000000' >>/etc/security/limits.conf
#修改Oracle用戶環境變量,或者改.bash_profile
echo 'export PATH' >>/home/oracle/.bashrc
echo 'export ORACLE_BASE=/ora/oracle' >>/home/oracle/.bashrc
echo 'export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1' >>/home/oracle/.bashrc
echo 'export ORACLE_SID=orcl' >>/home/oracle/.bashrc
echo 'export ORACLE_UNQNAME=orcl' >>/home/oracle/.bashrc
echo 'export PATH=$ORACLE_HOME/bin:/usr/sbin:$PATH' >>/home/oracle/.bashrc
echo 'export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib' >>/home/oracle/.bashrc
echo 'export LANG=C' >>/home/oracle/.bashrc
echo 'export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK' >>/home/oracle/.bashrc
#環境變量生效
sysctl -p
source /home/oracle/.bashrc
,更多精彩资讯请关注tft每日頭條,我们将持续为您更新最新资讯!