balmaster (balmaster) wrote,
balmaster
balmaster

install oracle 12 service on systemd

Create file /lib/systemd/system/dbora.service
[Unit]
Description=The Oracle Database Service
After=syslog.target network.target

[Service]
# systemd ignores PAM limits, so set any necessary limits in the service.
# Not really a bug, but a feature.
# https://bugzilla.redhat.com/show_bug.cgi?id=754285
LimitMEMLOCK=infinity
LimitNOFILE=65535

#Type=simple
# idle: similar to simple, the actual execution of the service binary is delayed
#       until all jobs are finished, which avoids mixing the status output with shell output of services.
RemainAfterExit=yes
User=oracle
Group=oinstall
ExecStart=/u01/app/oracle/product/12.1.0.2/db_1/bin/dbstart /u01/app/oracle/product/12.1.0.2/db_1
ExecStop=/u01/app/oracle/product/12.1.0.2/db_1/bin/dbshut /u01/app/oracle/product/12.1.0.2/db_1

[Install]
WantedBy=multi-user.target


Загружаем конфигурацию сервисов
systemctl daemon-reload


Стартуем сервис
systemctl start dbora.service


Регистрируем сервис для автостарта
systemctl enable dbora.service

Tags: linux, oracle, systemd
Subscribe
  • Post a new comment

    Error

    default userpic

    Your reply will be screened

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 0 comments