oracle开机自启
1、oracle用户
vi /u01/app/oracle/start_ora.sh
#!/bin/sh
lsnrctl start
echo "Oracle just have been started!"
echo "Begin to start the oracle!"
sqlplus /nolog <<EOF
connect / as sysdba
startup
exit
EOF
exit
2、root用户
vi /etc/rc.d/rc.local
su - oracle -c "/u01/app/oracle/start_ora.sh"
3、root用户
root用户,增加执行权限:
chmod 755 /etc/rc.d/rc.local
chmod 755 /u01/app/oracle/start_ora.sh
4、重启测试下
如果不能自启,oracle用户执行下面试试
source /home/oracle/.bash_profile