1. 修改 oracle 的启动脚本配置 vi /etc/oratab root@localhost ~]# cat /etc/oratab # # This file is used by ORACLE utilities. It is created by root.sh # and updated by either Database Configuration Assistant while creating # a database or ASM Configuration Assistant while creating ASM instance. # 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:<N|Y>: # # The first and second fields are the system identifier and home # directory of the database respectively. The third field 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. # # orcl:/u01/app/oracle/product/19.0.0/dbhome_1:Y [root@localhost ~]# 2.新增一个关于oracle19c的服务 [root@localhost ~]# cat /etc/systemd/system/oracle.service [Unit] Description=Oracle Database and Listener After=network.target [Service] Type=forking User=oracle Group=oinstall Environment="ORACLE_HOME=/u01/app/oracle/product/19.0.0/dbhome_1" Environment="ORACLE_SID=orcl" Environment="PATH=/usr/local/bin:/usr/bin:/bin:/u01/app/oracle/product/19.0.0/dbhome_1/bin" ExecStartPre=/bin/bash -c "/u01/app/oracle/product/19.0.0/dbhome_1/bin/lsnrctl status || /u01/app/oracle/product/19.0.0/dbhome_1/bin/lsnrctl start" ExecStart=/bin/bash -c "/u01/app/oracle/product/19.0.0/dbhome_1/bin/dbstart u01/app/oracle/product/19.0.0/dbhome_1" ExecStop=/bin/bash -c "/u01/app/oracle/product/19.0.0/dbhome_1/bin/lsnrctl stop && /u01/app/oracle/product/19.0.0/dbhome_1/bin/dbshut /u01/app/oracle/product/19.0.0/dbhome_1" Restart=on-abort TimeoutSec=300 [Install] WantedBy=multi-user.target 3.# 重新加载并启动服务 sudo systemctl daemon-reload sudo systemctl stop oracle.service # 确保停止残留进程 # sudo pkill -9 -u oracle -f "ora_" # 强制清理Oracle相关进程 sudo systemctl start oracle.service sudo systemctl enable oracle.service # 设置开机自启 sudo systemctl status oracle.service
保姆级教程-麒麟arm环境下部署oracle19c并设置开机自启
来源:这里教程网
时间:2026-03-03 22:39:12
作者:
编辑推荐:
下一篇:
相关推荐
-
雷神推出 MIX PRO II 迷你主机:基于 Ultra 200H,玻璃上盖 + ARGB 灯效
2 月 9 日消息,雷神 (THUNDEROBOT) 现已宣布推出基于英
-
制造商 Musnap 推出彩色墨水屏电纸书 Ocean C:支持手写笔、第三方安卓应用
2 月 10 日消息,制造商 Musnap 现已在海外推出一款 Oce
热文推荐
- 上半年交付暴增超去年全年,禾赛如何交出这份超预期财报?
上半年交付暴增超去年全年,禾赛如何交出这份超预期财报?
26-03-03 - 上半年营收3630万美元的康迪科技,凭什么股价大涨?
上半年营收3630万美元的康迪科技,凭什么股价大涨?
26-03-03 - 数据库管理-第354期 实战RAC下Service的Failback(20250807)
- 监听故障案例
监听故障案例
26-03-03 - 数据库管理-第357期 23ai:试玩Extended Cluster(20250814)
- 当varchar和Nvarchar关联
当varchar和Nvarchar关联
26-03-03 - 记一次Oracle物化视图自动刷新异常案例分析
记一次Oracle物化视图自动刷新异常案例分析
26-03-03 - Oracle DDL不可以直接在数据字典上的场景
Oracle DDL不可以直接在数据字典上的场景
26-03-03 - TFA引起的端口漏洞处理
TFA引起的端口漏洞处理
26-03-03 - 故障是试金石:从一次Oracle宕机看成熟IT系统的韧性
故障是试金石:从一次Oracle宕机看成熟IT系统的韧性
26-03-03
