Contents
see List[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
Comments ( 0 )