Centos 7 64位 minimal 最小化安装的系统中静默安装oracle 11g r2(无图形化安装)
?
?
?
?
一 安裝運(yùn)行環(huán)境(操作系統(tǒng)環(huán)境)
1,最小化安裝 linux CentOS7
我使用的鏡像包:CentOS-7-x86_64-Minimal-1708.iso
操作系統(tǒng)安裝步驟:https://blog.51cto.com/mflag/2300359
2,關(guān)閉selinux、防火墻firewalld
[root@localhost ~]# sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
[root@localhost ~]# systemctl?disable firewalld.service?
二 安裝依賴包
1,安裝依賴前解決YUM源沒(méi)問(wèn)題:
依賴1: yum -y install gcc gcc-c++ make binutils compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel elfutils-libelf-devel-static glibc glibc-common glibc-devel ksh libaio libaio-devel libgcc libstdc++ libstdc++-devel numactl-devel sysstat unixODBC unixODBC-devel kernelheaders pdksh pcre-devel readline依賴2: yum -y install binutils compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel expat gcc gcc-c++ glibc glibc-common glibc-devel glibc-headers libaio libaio-devel libgcc libstdc++ libstdc++-devel make pdksh sysstat unixODBC unixODBC-devel依賴3: yum -y install gcc make binutils gcc-c++ compat-libstdc++-33 elfutils-libelf-devel elfutils-libelf-devel-static ksh libaio libaio-devel numactl-devel sysstat unixODBC unixODBC-devel pcre-devel2,檢查依賴安裝
rpm -q binutils compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel expat gcc gcc-c++ glibc glibc-common glibc-devel glibc-headers libaio libaio-devel libgcc libstdc++ libstdc++-devel make pdksh sysstat unixODBC unixODBC-devel | grep "not installed"3,發(fā)現(xiàn)沒(méi)有?pdksh 包
通過(guò)wget命令直接下載pdksh的rpm包
wget -O /tmp/pdksh-5.2.14-37.el5_8.1.x86_64.rpm http://vault.centos.org/5.11/os/x86_64/CentOS/pdksh-5.2.14-37.el5_8.1.x86_64.rpmrpm -ivh pdksh-5.2.14-37.el5_8.1.x86_64.rpm4,再次檢查依賴
rpm -q binutils compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel expat gcc gcc-c++ glibc glibc-common glibc-devel glibc-headers libaio libaio-devel libgcc libstdc++ libstdc++-devel make pdksh sysstat unixODBC unixODBC-devel | grep "not installed"依賴完全解決,進(jìn)行下一步。
?
三 創(chuàng)建用戶和組、安裝目錄、設(shè)置權(quán)限
1,創(chuàng)建用戶、組
創(chuàng)建用戶組:groupadd oinstall
創(chuàng)建用戶組:groupadd dba
創(chuàng)建用戶并添加到用戶組:useradd -g oinstall -G dba oracle
設(shè)置密碼:echo "123456" | passwd --stdin oracle
2,創(chuàng)建安裝目錄及權(quán)限(? 可根據(jù)情況,選擇比較多空間的目錄創(chuàng)建)
mkdir -p /data/u01/app/oracle/product/11.2.0/dbhome_1
mkdir /data/u01/app/oracle/{oradata,inventory,fast_recovery_area}
chown -R oracle:oinstall /data/u01/app/oracle
chmod -R 775 /data/u01/app/oracle
chown -R oracle.oinstall? /data/u01/? ? ?#給安裝目錄授權(quán)
[root@localhost software]# ll 總用量 3664204 drwxr-xr-x 7 oracle oinstall 136 6月 3 11:26 database drwxr-xr-x 7 oracle oinstall 156 6月 3 11:27 grid -rw-r--r--. 1 oracle oinstall 1395582860 6月 2 14:40 p13390677_112040_Linux-x86-64_1of7.zip -rw-r--r--. 1 oracle oinstall 1151304589 6月 2 14:40 p13390677_112040_Linux-x86-64_2of7.zip -rw-r--r--. 1 oracle oinstall 1205251894 6月 2 14:41 p13390677_112040_Linux-x86-64_3of7.zip四 修改配置文件
1,修改內(nèi)核文件: vim /etc/sysctl.conf
fs.aio-max-nr = 1048576 fs.file-max = 6815744 kernel.shmall = 2097152 kernel.shmmax = 1073741824 kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 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 = 1048576?執(zhí)行:sysctl -p? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? #使配置文件生效;
2,修改用戶限制:vim /etc/security/limits.conf
oracle soft nproc 2047 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536 oracle soft stack 102403,修改/etc/pam.d/login 文件:vim /etc/pam.d/login
(限制oracle用戶的shell權(quán)限)
session required /lib64/security/pam_limits.so session required pam_limits.so4,修改/etc/profile 文件:vim /etc/profile
(限制oracle用戶的shell權(quán)限)
if [ $USER = "oracle" ]; then if [ $SHELL = "/bin/ksh" ]; then ulimit -p 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fi fi?
5, 設(shè)置oracle 用戶環(huán)境變量
先切換到oracle用戶:su - oracle
編輯:vim .bash_profile
[oracle@localhost ~]$ vim ~/.bash_profile
export ORACLE_BASE=/data/u01/app/oracle export ORACLE_HOME=/data/u01/app/oracle/product/11.2.0/dbhome_1 export ORACLE_SID=orcl export ORACLE_UNQNAME=$ORACLE_SID export PATH=$ORACLE_HOME/bin:$PATH export NLS_LANG=american_america.AL32UTF8 alias sqlplus='rlwrap sqlplus' alias rman='rlwrap rman'***:根據(jù)自己安裝環(huán)境情況修改。
[oracle@localhost ~]$ source .bash_profile? ? ? ? ? ? ? ? ? #使變量馬上生效;
?
五 、上傳數(shù)據(jù)庫(kù)安裝包并解壓
1,上傳安裝包到服務(wù)器
搜索命令行上傳工具并安裝
yum search rzyum install lrzsz[oracle@localhost database]$ ls
install ?readme.html ?response ?rpm ?runInstaller ?sshsetup ?stage ?welcome.html
?
2,創(chuàng)建一個(gè)目錄存放安裝包;
mkdir -p /data/u01/software
把安裝包移過(guò)去解壓
3,確認(rèn)安裝目錄權(quán)限
chown -R oracle.oinstall /u01/? ? ? ? ? #給安裝目錄授權(quán)
六? 修改靜默安裝響應(yīng)文件
1,拷貝備份一份響應(yīng)文件:cp -R /data/u01/software/database/response/ .
cd response/
2,修改??/data/u01/software/database/response/db_install.rsp 文件
vim db_install.rsp
oracle.install.option=INSTALL_DB_SWONLY ORACLE_HOSTNAME=自己的主機(jī)名 UNIX_GROUP_NAME=oinstall INVENTORY_LOCATION=/data/u01/app/oracle/inventory SELECTED_LANGUAGES=en,zh_CN ORACLE_HOME=/data/u01/app/oracle/product/11.2.0/dbhome_1 ORACLE_BASE=/data/u01/app/oracle oracle.install.db.InstallEdition=EE oracle.install.db.DBA_GROUP=dba oracle.install.db.OPER_GROUP=dba DECLINE_SECURITY_UPDATES=true執(zhí)行:vim db_install.rsp
修改內(nèi)容:
1,oracle.install.option=INSTALL_DB_SWONLY
2,ORACLE_HOSTNAME=自己的主機(jī)名
3,
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/data/u01/app/oracle/inventory
4,
SELECTED_LANGUAGES=en,zh_CN
ORACLE_HOME=/data/u01/app/oracle/product/11.2.0/dbhome_1
ORACLE_BASE=/data/u01/app/oracle
oracle.install.db.InstallEdition=EE
5,
oracle.install.db.DBA_GROUP=dba
oracle.install.db.OPER_GROUP=dba
6,DECLINE_SECURITY_UPDATES=true
?
七? 執(zhí)行靜默安裝
1, 切換到解壓的安裝包目錄:cd /data/u01/software/database/
執(zhí)行:./runInstaller -silent -responseFile /home/oracle/response/db_install.rsp -ignorePrereq
安裝完成,提示? ?Successfully Setup Software.
2,?安裝成功后有兩個(gè)腳本需要到root身份執(zhí)行,按提示執(zhí)行一下即可;
新開(kāi)一個(gè)終端,使用root登錄執(zhí)行上述腳本即可:
[root@localhost ~]# /data/oracle/inventory/orainstRoot.sh
[root@localhost ~]# /data/oracle/product/11.2.0/db_1/root.sh
?
***常見(jiàn)錯(cuò)誤
常見(jiàn)錯(cuò)誤:
準(zhǔn)備從以下地址啟動(dòng) Oracle Universal Installer /tmp/OraInstall2018-07-11_08-41-22PM. 請(qǐng)稍候...[oracle@oracle11 database]$ [FATAL] [INS-32012] 無(wú)法創(chuàng)建目錄。
? ?原因: 沒(méi)有授予創(chuàng)建目錄的正確權(quán)限, 或卷中沒(méi)有剩余空間。
? ?操作: 請(qǐng)檢查您對(duì)所選目錄的權(quán)限或選擇另一個(gè)目錄。
[FATAL] [INS-32012] 無(wú)法創(chuàng)建目錄。
? ?原因: 沒(méi)有授予創(chuàng)建目錄的正確權(quán)限, 或卷中沒(méi)有剩余空間。
? ?操作: 請(qǐng)檢查您對(duì)所選目錄的權(quán)限或選擇另一個(gè)目錄。
此會(huì)話的日志當(dāng)前已保存為: /tmp/OraInstall2018-07-11_08-41-22PM/installActions2018-07-11_08-41-22PM.log。如果要保留此日志, Oracle 建議將它從臨時(shí)位置移動(dòng)到更持久的位置。
?
解決方法:
chown -R oracle.oinstall? ? ? ? /u01/? ? ? ? ? ? ? #給安裝目錄授權(quán)
?
?
八??以靜默方式配置監(jiān)聽(tīng)
?
1,重新使用oracle用戶登錄
su - oracle netca /silent /responsefile /home/oracle/response/netca.rsp[oracle@oracle11 ~]$ netca -silent -responsefile /home/oracle/response/netca.rsp
正在對(duì)命令行參數(shù)進(jìn)行語(yǔ)法分析:
參數(shù)"silent" = true
參數(shù)"responsefile" = /home/oracle/response/netca.rsp
完成對(duì)命令行參數(shù)進(jìn)行語(yǔ)法分析。
Oracle Net Services 配置:
完成概要文件配置。
Oracle Net 監(jiān)聽(tīng)程序啟動(dòng):
正在運(yùn)行監(jiān)聽(tīng)程序控制:?
?/u01/app/oracle/product/11.2.0/bin/lsnrctl start LISTENER
監(jiān)聽(tīng)程序控制完成。
監(jiān)聽(tīng)程序已成功啟動(dòng)。
監(jiān)聽(tīng)程序配置完成。
成功完成 Oracle Net Services 配置。退出代碼是0
通過(guò)netstat命令可以查看1521端口正在監(jiān)聽(tīng)。
[oracle@oracle11 ~]$ netstat -tnlp
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address ? ? ? ? ? Foreign Address ? ? ? ? State ? ? ? PID/Program name ? ?
tcp ? ? ? ?0 ? ? ?0 0.0.0.0:22 ? ? ? ? ? ? ?0.0.0.0:* ? ? ? ? ? ? ? LISTEN ? ? ?- ? ? ? ? ? ? ? ? ??
tcp ? ? ? ?0 ? ? ?0 127.0.0.1:25 ? ? ? ? ? ?0.0.0.0:* ? ? ? ? ? ? ? LISTEN ? ? ?- ? ? ? ? ? ? ? ? ??
tcp ? ? ? ?0 ? ? ?0 127.0.0.1:6010 ? ? ? ? ?0.0.0.0:* ? ? ? ? ? ? ? LISTEN ? ? ?- ? ? ? ? ? ? ? ? ??
tcp ? ? ? ?0 ? ? ?0 127.0.0.1:6011 ? ? ? ? ?0.0.0.0:* ? ? ? ? ? ? ? LISTEN ? ? ?- ? ? ? ? ? ? ? ? ??
tcp6 ? ? ? 0 ? ? ?0 :::1521 ? ? ? ? ? ? ? ? :::* ? ? ? ? ? ? ? ? ? ?LISTEN ? ? ?2624/tnslsnr ? ? ? ?
tcp6 ? ? ? 0 ? ? ?0 :::22 ? ? ? ? ? ? ? ? ? :::* ? ? ? ? ? ? ? ? ? ?LISTEN ? ? ?- ? ? ? ? ? ? ? ? ??
tcp6 ? ? ? 0 ? ? ?0 ::1:25 ? ? ? ? ? ? ? ? ?:::* ? ? ? ? ? ? ? ? ? ?LISTEN ? ? ?- ? ? ? ? ? ? ? ? ??
tcp6 ? ? ? 0 ? ? ?0 ::1:6010 ? ? ? ? ? ? ? ?:::* ? ? ? ? ? ? ? ? ? ?LISTEN ? ? ?- ? ? ? ? ? ? ? ? ??
tcp6 ? ? ? 0 ? ? ?0 ::1:6011 ? ? ? ? ? ? ? ?:::* ? ? ? ? ? ? ? ? ? ?LISTEN ? ? ?- ? ? ??
成功運(yùn)行后,在/u01/app/oracle/product/11.2.0/network/admin/中生成listener.ora和sqlnet.ora
2, 查看監(jiān)聽(tīng)
netstat -tnulp | grep 1521?
九? ?靜默創(chuàng)建數(shù)據(jù)庫(kù)
1,配置響應(yīng)文件:vim /home/oracle/response/dbca.rsp
TOTALMEMORY 設(shè)置為總內(nèi)存的80%
vim /home/oracle/response/dbca.rsp GDBNAME = "orcl" SID = "orcl" SYSPASSWORD = "oracle" SYSTEMPASSWORD = "oracle" SYSMANPASSWORD = "oracle" DBSNMPPASSWORD = "oracle" DATAFILEDESTINATION =/data/u01/app/oracle/oradata RECOVERYAREADESTINATION=/data/u01/app/oracle/fast_recovery_area CHARACTERSET = "AL32UTF8" TOTALMEMORY = "2048"調(diào)大內(nèi)存,一般1.5-2倍的物理內(nèi)存大小
TOTALMEMORY = "2048"
前面的 # 要?jiǎng)h除,對(duì)應(yīng)用戶設(shè)置密碼;
?
2,檢查修改配置內(nèi)容
egrep -v "(^#|^$)" /home/oracle/response/dbca.rsp
?
3,安裝創(chuàng)建:
dbca -silent -responseFile /home/oracle/response/dbca.rsp
執(zhí)行靜默建庫(kù)
?
4,?建庫(kù)后進(jìn)行實(shí)例進(jìn)程檢查:
[oracle@oracle11 ~]$ ps -ef | grep ora_ | grep -v grep
ps -ef | grep ora_ | grep -v grep查看監(jiān)聽(tīng)狀態(tài)
lsnrctl status5 ,登錄sqlplus,查看實(shí)例狀態(tài)
可以查看默認(rèn)實(shí)例
env|grep ORACLE_UNQNAME
進(jìn)入sqlplus 啟動(dòng)實(shí)例
?
出現(xiàn)以下情況,解決方式如下:輸入startup,根據(jù)提示信息,將$ORACLE_BASE/admin/數(shù)據(jù)庫(kù)名稱(chēng)/pfile目錄下的init.ora.xxx形式的文件copy到$ORACLE_HOME/dbs目錄下initoracle.ora(根據(jù)startup提示)即可。
?
十? 連接測(cè)試
1,sqlplus 連接測(cè)試
查看當(dāng)前SID:echo $ORACLE_SID
#登錄sqlplus,查看實(shí)例狀態(tài) [oracle@oracle11 ~]$ sqlplus / as sysdba SQL> select status from v$instance;STATUS ------------ OPEN#查看數(shù)據(jù)庫(kù)編碼 select userenv('language') from dual;#查看數(shù)據(jù)庫(kù)版本信息 select * from v$version;#激活scott用戶 alter user scott account unlock; alter user scott identified by tiger; select username,account_status from all_users;?
2,? ?Navicat遠(yuǎn)程連接Oracle
開(kāi)放1521端口
firewall-cmd --zone=public --add-port=1521/tcp --permanent firewall-cmd --reloadIP為Oracle服務(wù)器的IP地址,服務(wù)名為Oracle的實(shí)例名,可忽略大小寫(xiě)
select instance_name from v$instance;打開(kāi)Navicat,工具→選項(xiàng)
打開(kāi)OCI界面,在右側(cè)OCI library一欄中選擇instantclient-basic解壓目錄下的oci.dll,然后點(diǎn)擊確定
重啟Navicat,點(diǎn)擊連接,選中Oracle
?
oracle多實(shí)例的啟動(dòng)與關(guān)閉
Oracle/oracle登錄
1、啟監(jiān)聽(tīng)器
lsnrctl start
監(jiān)聽(tīng)一般不需要?jiǎng)?#xff0c;如果機(jī)器重新啟動(dòng)的話需要將監(jiān)聽(tīng)啟動(dòng)。
查看當(dāng)前SID:echo $ORACLE_SID
2、啟動(dòng)數(shù)據(jù)庫(kù)實(shí)例:
設(shè)置需要操作的實(shí)例:export ORACLE_SID=a(需要啟動(dòng)的實(shí)例1)
進(jìn)入sqlplus0:sqlplus/nolog
DBA登錄:conn /as sysdba
啟動(dòng):startup????????
退出sqlplus:quit
?
設(shè)置需要操作的實(shí)例:export ORACLE_SID=b(需要啟動(dòng)的實(shí)例2)
進(jìn)入sqlplus:sqlplus /nolog
DBA登錄:conn /as sysdba
啟動(dòng):startup
退出sqlplus:quit
3、關(guān)閉數(shù)據(jù)庫(kù)實(shí)例:
設(shè)置需要操作的實(shí)例:export ORACLE_SID=a(需要啟動(dòng)的實(shí)例)
進(jìn)入sqlplus:sqlplus /nolog
DBA登錄:conn /as sysdba
關(guān)閉:shutdown immediate
退出sqlplus:quit
?
設(shè)置需要操作的實(shí)例:export ORACLE_SID=b(需要啟動(dòng)的實(shí)例)
進(jìn)入sqlplus:sqlplus /nolog
DBA登錄:conn /as sysdba
關(guān)閉:shutdown immediate
退出sqlplus:quit
?
十一? ?設(shè)置Oracle開(kāi)機(jī)啟動(dòng)
1,根據(jù)自己實(shí)際情況設(shè)置
方法 (一) service服務(wù)類(lèi)型service服務(wù)這樣是centos6之前的版本的,在centos7中也可以用,只不過(guò)centos7采用systemctl這種方式管理 服務(wù),性能更高效,如果兩種方式都有,systemctl的優(yōu)先級(jí)更高。1.修改/u01/app/oracle/product/11.2.0/bin/dbstart [oracle@oracle11 ~]$ vim /u01/app/oracle/product/11.2.0/bin/dbstart 將ORACLE_HOME_LISTNER=$1修改為ORACLE_HOME_LISTNER=$ORACLE_HOME2.修改/u01/app/oracle/product/11.2.0/bin/dbshut [oracle@oracle11 ~]$ vim /u01/app/oracle/product/11.2.0/bin/dbshut 將ORACLE_HOME_LISTNER=$1修改為ORACLE_HOME_LISTNER=$ORACLE_HOME3.修改/etc/oratab文件 [oracle@oracle11 ~]$ vim /etc/oratab 將orcl:/u01/app/oracle/product/11.2.0:N中最后的N改為Y,成為orcl:/u01/app/oracle/product/11.2.0:Y 4.輸入命令dbshut和dbstart測(cè)試 [oracle@oracle11 ~]$ dbshutOracle監(jiān)聽(tīng)停止,進(jìn)程消失。[oracle@oracle11 ~]$ dbstartOracle監(jiān)聽(tīng)啟動(dòng),進(jìn)程啟動(dòng)。5.切換到root賬戶建立自啟動(dòng)腳本 [oracle@oracle11 ~]$ su - [root@oracle11 ~]# vim /etc/rc.d/init.d/oracle 添加以下內(nèi)容(有些值如ORACLE_HOME和ORACLE_USER等根據(jù)實(shí)際情況可以修改):#!/bin/sh #chkconfig: 2345 20 80 #description: Oracle dbstart / dbshut #以上兩行為chkconfig所需 ORA_HOME=/u01/app/oracle/product/11.2.0 ORA_OWNER=oracle LOGFILE=/var/log/oracle.log echo "#################################" >> ${LOGFILE} date +"### %T %a %D: Run Oracle" >> ${LOGFILE} if [ ! -f ${ORA_HOME}/bin/dbstart ] || [ ! -f ${ORA_HOME}/bin/dbshut ]; thenecho "Error: Missing the script file ${ORA_HOME}/bin/dbstart or ${ORA_HOME}/bin/dbshut!" >> ${LOGFILE}echo "#################################" >> ${LOGFILE}exit fi start(){echo "###Startup Database..."su - ${ORA_OWNER} -c "${ORA_HOME}/bin/dbstart ${ORA_HOME}"echo "###Done."echo "###Run database control..."su - ${ORA_OWNER} -c "${ORA_HOME}/bin/emctl start dbconsole"echo "###Done." } stop(){echo "###Stop database control..."su - ${ORA_OWNER} -c "${ORA_HOME}/bin/emctl stop dbconsole"echo "###Done."echo "###Shutdown Database..."su - ${ORA_OWNER} -c "${ORA_HOME}/bin/dbshut ${ORA_HOME}"echo "###Done." } case "$1" in'start')start >> ${LOGFILE};;'stop')stop >> ${LOGFILE};;'restart')stop >> ${LOGFILE}start >> ${LOGFILE};; esac date +"### %T %a %D: Finished." >> ${LOGFILE} echo "#################################" >> ${LOGFILE} echo "" 6.修改/etc/init.d/oracle服務(wù)文件權(quán)限[root@oracle11 ~]# vim /etc/rc.d/init.d/oracle [root@oracle11 ~]# chmod +x /etc/rc.d/init.d/oracle [root@oracle11 ~]# service oracle stop Reloading systemd: [ 確定 ] Stopping oracle (via systemctl): [ 確定 ]7.設(shè)置為開(kāi)機(jī)啟動(dòng) [root@oracle11 ~]# chkconfig oracle on8.進(jìn)行service oracle start/stop測(cè)試9.Reboot重啟查看Oracle監(jiān)聽(tīng)和實(shí)例進(jìn)程均能自動(dòng)啟動(dòng)。方法 (二)systemctl 服務(wù)類(lèi)型注意:采用systemctl服務(wù)啟動(dòng)oracle,啟動(dòng)監(jiān)聽(tīng)的參數(shù)要配置成絕對(duì)路徑,不然1521端口可能無(wú)法啟動(dòng)。 vim /u01/app/oracle/product/11.2.0/bin/dbstart #ORACLE_HOME_LISTNER=$ORACLE_HOME ORACLE_HOME_LISTNER=/u01/app/oracle/product/11.2.01、添加腳本 [root@oracle11 ~]# vim /usr/lib/systemd/system/oracle.service[Unit] Description=The oracle11g database After=network.target remote-fs.target [Service] User=oracle Type=forking # oracle will fail to start if /run/oralce.pid already exists but has the wrong # SELinux context. This might happen when running `oralce -t` from the cmdline. #ExecStart=/bin/bash /home/oracle/start.sh #ExecStartPre=/home/oracle/.bash_profile ExecStart=/u01/app/oracle/product/11.2.0/bin/dbstart ExecStop=/u01/app/oracle/product/11.2.0/bin/dbshut RestartSec=2s[Install] WantedBy=multi-user.target[root@oracle11 ~]# systemctl daemon-reload #重新加載啟動(dòng)腳本,否則可能無(wú)效。 [root@oracle11 ~]# systemctl start oracle [root@oracle11 ~]# systemctl status oracle #查看啟動(dòng)狀態(tài) ● oracle.service - The oracle11g databaseLoaded: loaded (/usr/lib/systemd/system/oracle.service; enabled; vendor preset: disabled)Active: active (running) since 六 2018-07-14 16:29:12 CST; 4s agoProcess: 2154 ExecStop=/u01/app/oracle/product/11.2.0/bin/dbshut (code=exited, status=0/SUCCESS)Process: 2314 ExecStart=/u01/app/oracle/product/11.2.0/bin/dbstart (code=exited, status=0/SUCCESS)CGroup: /system.slice/oracle.service├─2322 /u01/app/oracle/product/11.2.0/bin/tnslsnr LISTENER -inherit├─2480 ora_pmon_orcl├─2482 ora_vktm_orcl├─2486 ora_gen0_orcl├─2488 ora_diag_orcl├─2490 ora_dbrm_orcl├─2492 ora_psp0_orcl├─2494 ora_dia0_orcl├─2496 ora_mman_orcl├─2498 ora_dbw0_orcl├─2500 ora_lgwr_orcl├─2502 ora_ckpt_orcl├─2504 ora_smon_orcl├─2506 ora_reco_orcl├─2508 ora_mmon_orcl├─2510 ora_mmnl_orcl├─2512 ora_d000_orcl├─2514 ora_s000_orcl├─2573 ora_qmnc_orcl└─2651 ora_cjq0_orcl7月 14 16:29:05 oracle11 systemd[1]: Starting The oracle11g database... 7月 14 16:29:07 oracle11 dbstart[2314]: Processing Database instance "orcl": log file /u01/app/oracle/product/11.2.0/startup.log 7月 14 16:29:12 oracle11 systemd[1]: Started The oracle11g database. [root@oracle11 ~]# netstat -tnlp|grep 1521 tcp6 0 0 :::1521 :::* LISTEN 2322/tnslsnr [root@oracle11 ~]# systemctl enable oracle #使oracle服務(wù)開(kāi)機(jī)自啟動(dòng) Created symlink from /etc/systemd/system/multi-user.target.wants/oracle.service to /usr/lib/systemd/system/oracle.service.[root@oracle11 system]# systemctl is-enabled oracle #查看oracle是否開(kāi)機(jī)啟動(dòng) enabled?
總結(jié)
以上是生活随笔為你收集整理的Centos 7 64位 minimal 最小化安装的系统中静默安装oracle 11g r2(无图形化安装)的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: Ubuntu系统安装VNC(VNCVie
- 下一篇: Kotlin极简教程:第4章 基本数据类