Я пытаюсь создать служебный файл, который позволит мне автоматически запускать базу данных Oracle 12C и автоматически слушать слушателя при перезагрузке.Я написал файл сервиса, который содержит следующее:
# /etc/systemd/system/oracle-rdbms.service
# Invoking Oracle scripts to start/shutdown Instances defined in /etc/oratab
# and starts Listener
[Unit]
Description=Oracle Database(s) and Listener
Requires=network.target
[Service]
Type=forking
Restart=no
ExecStart=/u01/app/oracle/product/12.2.0/dbhome_1/bin/dbstart /u01/app/oracle/product/12.2.0/dbhome_1/
ExecStop=/u01/app/oracle/product/12.2.0/dbhome_1/bin/dbshut /u01/app/oracle/product/12.2.0/dbhome_1/
User=oracle
[Install]
WantedBy=multi-user.target
Когда я включил сервис и проверил статус, я получаю следующую ошибку:
● oracle-rdbms.service - Oracle Database(s) and Listener
Loaded: loaded (/etc/systemd/system/oracle-rdbms.service; enabled; vendor preset: disabled)
Active: inactive (dead) since Mon 2018-10-22 11:45:02 EDT; 1 day 23h ago
Process: 1377 ExecStop=/u01/app/oracle/product/12.2.0/dbhome_1/bin/dbshut /u01/app/oracle/product/12.2.0/dbhome_1 (code=exited, status=0/SUCCESS)
Process: 615 ExecStart=/u01/app/oracle/product/12.2.0/dbhome_1/bin/dbstart /u01/app/oracle/product/12.2.0/dbhome_1 (code=exited, status=0/SUCCESS)
Oct 22 11:45:00 oracle-dev dbstart[615]: /u01/app/oracle/product/12.2.0/dbhome_1/bin/dbstart: line 94: /u01/app/oracle/product/12.2.0/dbhome_1/listener.log: Permission denied
Oct 22 11:45:02 oracle-dev dbstart[615]: touch: cannot touch ‘/u01/app/oracle/product/12.2.0/dbhome_1/startup.log’: Permission denied
Oct 22 11:45:02 oracle-dev dbstart[615]: chmod: changing permissions of ‘/u01/app/oracle/product/12.2.0/dbhome_1/startup.log’: Operation not permitted
Oct 22 11:45:02 oracle-dev dbstart[615]: Processing Database instance "orcl": log file /u01/app/oracle/product/12.2.0/dbhome_1/startup.log
Oct 22 11:45:02 oracle-dev dbstart[615]: /u01/app/oracle/product/12.2.0/dbhome_1/bin/dbstart: line 346: /u01/app/oracle/product/12.2.0/dbhome_1/startup.log: Permission denied
Oct 22 11:45:02 oracle-dev dbshut[1377]: /u01/app/oracle/product/12.2.0/dbhome_1/bin/dbshut: line 63: /u01/app/oracle/product/12.2.0/dbhome_1/listener.log: Permission denied
Oct 22 11:45:02 oracle-dev dbshut[1377]: /u01/app/oracle/product/12.2.0/dbhome_1/bin/dbshut: line 64: /u01/app/oracle/product/12.2.0/dbhome_1/listener.log: Permission denied
Oct 22 11:45:02 oracle-dev dbshut[1377]: Processing Database instance "orcl": log file /u01/app/oracle/product/12.2.0/dbhome_1/shutdown.log
Oct 22 11:45:02 oracle-dev dbshut[1377]: /u01/app/oracle/product/12.2.0/dbhome_1/bin/dbshut: line 160: /u01/app/oracle/product/12.2.0/dbhome_1/shutdown.log: Permission denied
Oct 22 11:45:02 oracle-dev systemd[1]: Started Oracle Database(s) and Listener.
Я вошел какroot и я до сих пор не уверен в чем проблема.Спасибо