![oracle开机自启动-超简单 oracle开机自启动-超简单](https://image.shishitao.com:8440/aHR0cHM6Ly9ia3FzaW1nLmlrYWZhbi5jb20vdXBsb2FkL2NoYXRncHQtcy5wbmc%2FIQ%3D%3D.png?!?w=700&webp=1)
1、 在/etc/oratab中作如下修改
$ORACLE_SID:$ORACLE_HOME:Y
例如
vi /etc/oratab
orcl:/u01/app/oracle/product/10.2.0/db_1:Y
$ORACLE_SID:$ORACLE_HOME:Y
例如
vi /etc/oratab
orcl:/u01/app/oracle/product/10.2.0/db_1:Y
2、 修改/etc/rc.local
su - oracle -c "$ORACLE_HOME/bin/lsnctl start"
su - oracle
-c "$ORACLE_HOME/bin/dbstart start"
例如
vi /etc/rc.local
su - oracle -c
"/u01/app/oracle/product/10.2.0/db_1/bin/lsnctl start"
su - oracle -c
"/u01/app/oracle/product/10.2.0/db_1/bin/dbstart start"
su - oracle -c "$ORACLE_HOME/bin/lsnctl start"
su - oracle
-c "$ORACLE_HOME/bin/dbstart start"
例如
vi /etc/rc.local
su - oracle -c
"/u01/app/oracle/product/10.2.0/db_1/bin/lsnctl start"
su - oracle -c
"/u01/app/oracle/product/10.2.0/db_1/bin/dbstart start"