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

相关文章:

  • 2021-09-19
  • 2022-12-23
  • 2022-02-24
  • 2021-10-27
  • 2021-11-18
  • 2021-11-29
  • 2021-09-03
猜你喜欢
  • 2021-11-09
  • 2022-02-02
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-08
  • 2021-12-16
相关资源
相似解决方案