Total de visualizações de página

sábado, 23 de abril de 2016

Oracle Database 12c : Create Systemd file


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
# configure listener service

[root@dlp ~]# 
vi /usr/lib/systemd/system/dlp@lsnrctl.service
# 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

# configure database service

[root@dlp ~]# 
vi /usr/lib/systemd/system/dlp@oracledb.service
# 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

[root@dlp ~]# 
systemctl daemon-reload 

[root@dlp ~]# 
systemctl enable dlp@lsnrctl dlp@oracledb 

Nenhum comentário:

Postar um comentário