> For the complete documentation index, see [llms.txt](https://dbi-services.gitbook.io/dmk-oracle-manual/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dbi-services.gitbook.io/dmk-oracle-manual/scripts/o.s-start-stop-script-integration/o.s-start-stop-script-integration-since-red-hat-oracle-linux-7.md).

# O.S Start/Stop script integration since Red Hat/Oracle Linux 7

DMK provides a tiny script, which integrated to the boot procedure serves to start & stop all the oracle services smoothly, source code:

`cat ${DMK_HOME}/templates/systemd/oracle.service`

```
[Unit]
Description=Oracle Database Service
After=network-online.target remote-fs.target local-fs.target
Requires=network-online.target remote-fs.target local-fs.target
[Service]
LimitMEMLOCK=infinity
LimitNOFILE=65535
Type=simple
RemainAfterExit=yes
User=oracle
Group=oinstall
ExecStart=/u01/app/oracle/local/dmk/bin/service_start_stop.ksh start
ExecStop=/u01/app/oracle/local/dmk/bin/service_start_stop.ksh stop
TimeoutStartSec=200s
TimeoutStopSec=200s
[Install]
WantedBy=multi-user.target
```

Below, all steps for the implementation & integration into the boot sequence:

* Firstly, copy the script to the /usr/lib/systemd/system” source code repository and set the correct privileges

```
cp /u01/app/oracle/local/dmk/templates/systemd/oracle.service \\
/usr/lib/systemd/system/
chmod 644 /usr/lib/systemd/system/oracle.service
```

Deploy and adapt the configuration file service\_start\_stop.conf In $DMK\_HOME/etc

```
cp /u01/app/oracle/local/dmk/templates/etc/service_start_stop.conf \\
/u01/app/oracle/local/dmk/etc/
```

* Secondly, reload systemd and enabled the new service

```
[root@svr01 ~]# systemctl daemon-reload
[root@svr01 ~]# systemctl enable oracle.service
```

All necessary systemd link and dependencies are automatically performed by the O.S

* Finally, Verify the integration

```
[root@svr01 ~]# systemctl status oracle.service
● oracle.service - The Oracle Database Service
 Loaded: loaded (/usr/lib/systemd/system/oracle.service; enabled;
 vendor preset: disabled)
Active: inactive (dead)
```

* Tail the systemd logfile

```
[root@svr01 ~]# journalctl --unit=oracle -f
```
