Oracle Database 12c Release 2 : Create Systemd Setting2015/07/05 |
Create Systemd Setting file for Oracle Database services.
|
|
[1] | Login as root user and create Systemd files. |
[root@dlp ~]#
vi /etc/sysconfig/db01.oracledb # create new : define environment variables ORACLE_BASE=/u01/app/oracle ORACLE_HOME=/u01/app/oracle/product/12.2.0/dbhome_1 ORACLE_SID=db01 # this is an example, modify for free [Unit] Description=Oracle Net Listener After=network.target [Service] Type=forking EnvironmentFile=/etc/sysconfig/db01.oracledb ExecStart=/u01/app/oracle/product/12.2.0/dbhome_1/bin/lsnrctl start ExecStop=/u01/app/oracle/product/12.2.0/dbhome_1/bin/lsnrctl stop User=oracle [Install] WantedBy=multi-user.target # this is an example, modify for free [Unit] Description=Oracle Database service After=network.target lsnrctl.service [Service] Type=forking EnvironmentFile=/etc/sysconfig/db01.oracledb ExecStart=/u01/app/oracle/product/12.2.0/dbhome_1/bin/dbstart $ORACLE_HOME ExecStop=/u01/app/oracle/product/12.2.0/dbhome_1/bin/dbshut $ORACLE_HOME User=oracle [Install] WantedBy=multi-user.target systemctl daemon-reload [root@dlp ~]# systemctl enable db01@lsnrctl db01@oracledb |
Sponsored Link |