Oracle Database 12c : Create Systemd file
2015/07/05
|
Create Systemd file for Oracle Database services.
| |
[1] | Login as root user and create Systemd files. |
[root@dlp ~]#
vi /etc/sysconfig/dlp.oracledb
# create new : define environment variables
ORACLE_BASE=/u01/app/oracle ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1 ORACLE_SID=dlp
# this is an example, modify for free
[Unit] Description=oracle net listener After=network.target [Service] Type=forking EnvironmentFile=/etc/sysconfig/dlp.oracledb ExecStart=/u01/app/oracle/product/12.1.0/dbhome_1/bin/lsnrctl start ExecStop=/u01/app/oracle/product/12.1.0/dbhome_1/bin/lsnrctl stop User=oracle [Install] WantedBy=multi-user.target
# this is an example, modify for free
[Unit] Description=oracle net listener After=network.target lsnrctl.service [Service] Type=forking EnvironmentFile=/etc/sysconfig/dlp.oracledb ExecStart=/u01/app/oracle/product/12.1.0/dbhome_1/bin/dbstart /u01/app/oracle/product/12.1.0/dbhome_1 ExecStop=/u01/app/oracle/product/12.1.0/dbhome_1/bin/dbshut /u01/app/oracle/product/12.1.0/dbhome_1 User=oracle [Install] WantedBy=multi-user.target
systemctl daemon-reload
[root@dlp ~]#
systemctl enable dlp@lsnrctl dlp@oracledb
|
Nenhum comentário:
Postar um comentário