對(duì)于LINUX 操作系統(tǒng) 有很多技術(shù)知識(shí)是我們需要學(xué)習(xí)的。這里我就給大家介紹Linux中設(shè)置oracle開(kāi)機(jī)自動(dòng)啟動(dòng)的 方法 。一起來(lái)看看吧。
洛扎網(wǎng)站制作公司哪家好,找創(chuàng)新互聯(lián)!從網(wǎng)頁(yè)設(shè)計(jì)、網(wǎng)站建設(shè)、微信開(kāi)發(fā)、APP開(kāi)發(fā)、響應(yīng)式網(wǎng)站建設(shè)等網(wǎng)站項(xiàng)目制作,到程序開(kāi)發(fā),運(yùn)營(yíng)維護(hù)。創(chuàng)新互聯(lián)于2013年成立到現(xiàn)在10年的時(shí)間,我們擁有了豐富的建站經(jīng)驗(yàn)和運(yùn)維經(jīng)驗(yàn),來(lái)保證我們的工作的順利進(jìn)行。專(zhuān)注于網(wǎng)站建設(shè)就選創(chuàng)新互聯(lián)。
Linux中設(shè)置oracle開(kāi)機(jī)自動(dòng)啟動(dòng)的方法
在terminal中切換到root用戶
查看/etc/oratab文件的內(nèi)容,其內(nèi)容如下
[root@golonglee ~]# cat /etc/oratab | grep -v ^$
#
# This file is used by ORACLE utilities. It is created by root.sh
# and updated by the Database Configuration Assistant when creating
# a database.
# A colon, ':', is used as the field terminator. A new line terminates
# the entry. Lines beginning with a pound sign, '#', are comments.
#
# Entries are of the form:
# $ORACLE_SID:$ORACLE_HOME::
#
# The first and second fields are the system identifier and home
# directory of the database respectively. The third filed indicates
# to the dbstart utility that the database should , "Y", or should not,
# "N", be brought up at system boot time.
#
# Multiple entries with the same $ORACLE_SID are not allowed.
#
#
oel63:/home/oracle/app/oracle/product/11.2.0/dbhome_1:N
使用命令vi /etc/oratab編輯文件/etc/oratab,在最后添加如下內(nèi)容
##### what I have written is as following
oel63:/home/oracle/app/oracle/product/11.2.0/dbhome_1:Y
#####Finished wrote in 2015-12-24
說(shuō)明:/home/oracle/app/oracle/product/11.2.0/dbhome_1為oracle的安裝目錄,要根據(jù)實(shí)際情況進(jìn)行修改。
(注意:圖中我用紅色標(biāo)記的N要改成Y)
找到最后的內(nèi)容
oel63:/home/oracle/app/oracle/product/11.2.0/dbhome_1:N
復(fù)制該行oel63:/home/oracle/app/oracle/product/11.2.0/dbhome_1:N并注釋掉
粘貼該行,并將該行
oel63:/home/oracle/app/oracle/product/11.2.0/dbhome_1:N最后的N
改為Y
最后按2次ESC鍵,并輸入:wq并按下enter保存,退出
使用命令vi /etc/rc.d/rc.local編輯rc.local文件,添加如下內(nèi)容
##### what I have written is as following
su oracle -lc "/home/oracle/app/oracle/product/11.2.0/dbhome_1/bin/lsnrctl start"
su oracle -lc /home/oracle/app/oracle/product/11.2.0/dbhome_1/bin/dbstart
#####Finished wrote in 2015-12-24
說(shuō)明:因?yàn)榈谝恍忻钪杏锌崭袼杂秒p引號(hào)(英文的雙引號(hào))
/home/oracle/app/oracle/product/11.2.0/dbhome_1為oracle的安裝目錄,要根據(jù)實(shí)際情況進(jìn)行修改。
最后按2次ESC鍵,并輸入:wq并按下enter保存,退出,重啟機(jī)器,驗(yàn)證成功。
是不是很簡(jiǎn)單呢~快跟著我一起學(xué)習(xí)吧!!!如果覺(jué)得這篇 文章 不錯(cuò)的話就給我點(diǎn)一個(gè)贊吧。
1) 建立用戶, 組, 目錄
[root@node1 ~]# id oracle
id: oracle: No such user
[root@node1 ~]# groupadd -g 54321 oinstall
[root@node1 ~]# groupadd -g 54322 dba
[root@node1 ~]# useradd -u 54321 -g oinstall -G dba oracle
[root@node1 ~]# passwd oracle
Changing password for user oracle.
New password:
BAD PASSWORD: it is based on a dictionary word
BAD PASSWORD: is too simple
Retype new password:
passwd: all authentication tokens updated successfully.
[root@node1 ~]# mkdir -p /u01/app/oracle
[root@node1 ~]# chown -R oracle:oinstall /u01/
2) 環(huán)境變量
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
export ORACLE_SID=ora11g
export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
LANG=C
3) Cat /etc/sysctl.conf
kernel.shmmax = 4294967295
kernel.shmall = 2097152
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 6815744
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default=1048576
net.core.rmem_max=4194304
net.core.wmem_default=262144
net.core.wmem_max=1048576
fs.aio-max-nr=1048576
4) oracle 開(kāi)機(jī)自啟
[root@node1 ~]# cp /etc/init.d/network /etc/init.d/oracle
[root@node1 ~]# vim /etc/init.d/oracle
[root@node1 ~]# chmod +x /etc/init.d/oracle
[root@node1 ~]# chkconfig oracle on
[root@node1 ~]# cat /etc/init.d/oracle
[oracle@node1 auto_backup]$ cat /etc/init.d/oracle
#! /bin/bash#
chkconfig: 2345 10 90
#
Source function library.
. /etc/init.d/functions
# See how we were called.
case "$1" in
start)
su - oracle -c "/home/oracle/startdb11g"
;;
stop)
su - oracle -c "/home/oracle/stopdb11g"
;;
*)
echo #34;Usage: $0 {start|stop}"
exit 2
esac
exit $rc
[oracle@node1 auto_backup]$ chkconfig oracle on
1.右鍵我的電腦-管理-服務(wù)和應(yīng)用程序-服務(wù)
2.找到Oracle打頭的幾個(gè)服務(wù)(如圖),最占用資源的是OracleServiceDB
右鍵OracleServiceDB-屬性-狀態(tài)-停止即可停止oracle.exe服務(wù)但是下次電腦開(kāi)機(jī)后會(huì)自動(dòng)啟動(dòng)(右鍵OracleServiceDB-屬性-啟動(dòng)類(lèi)型-手動(dòng)該服務(wù)以后不自動(dòng)開(kāi)啟。需要使用oracle的時(shí)候手動(dòng)點(diǎn)擊啟動(dòng)按鈕“屬性-服務(wù)狀態(tài)-啟動(dòng)”)
3.其它服務(wù)可按照該方法依次停止服務(wù)。希望能對(duì)你有幫助!
當(dāng)前標(biāo)題:怎么把開(kāi)機(jī)oracle,怎么把開(kāi)機(jī)pin密碼去掉
文章路徑:http://www.rwnh.cn/article20/dssojco.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供標(biāo)簽優(yōu)化、軟件開(kāi)發(fā)、微信公眾號(hào)、App設(shè)計(jì)、品牌網(wǎng)站設(shè)計(jì)、微信小程序
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)