Oracle systemd: differenze tra le versioni
Jump to navigation
Jump to search
Nessun oggetto della modifica |
Nessun oggetto della modifica |
||
Riga 24: | Riga 24: | ||
</pre> |
</pre> |
||
<pre> |
|||
[root@tnbmilgtw02 system]# more oracle_database_test.service |
|||
[Unit] |
|||
Description="Oracle database test" |
|||
After=network.target |
|||
[Service] |
|||
User=oracle |
|||
Group=oinstall |
|||
Type=forking |
|||
WorkingDirectory=/app/oracle/product/11.2.0/dbhome_1 |
|||
Environment=ORACLE_BASE=/app/oracle ORACLE_HOME=/app/oracle/product/11.2.0/dbhome_1 ORACLE_SID=test |
|||
Restart=on-failure |
|||
ExecStart=/bin/sh -c "echo startup | /app/oracle/product/11.2.0/dbhome_1/bin/sqlplus '/ as sysdba'" |
|||
ExecStop=/bin/sh -c "echo shutdown immediate | /app/oracle/product/11.2.0/dbhome_1/bin/sqlplus '/ as sysdba'" |
|||
[Install] |
|||
WantedBy=multi-user.target |
|||
</pre> |
|||
[[Categoria:Database]] |
[[Categoria:Database]] |
Versione delle 00:21, 23 mar 2017
[root@host02 system]# pwd /usr/local/lib/systemd/system [root@host02 system]# more oracle_listener.service [Unit] Description="Oracle Listener" After=network.target [Service] User=oracle Group=oinstall Type=forking WorkingDirectory=/app/oracle/product/11.2.0/dbhome_1 Environment=ORACLE_BASE=/app/oracle ORACLE_HOME=/app/oracle/product/11.2.0/dbhome_1 Restart=on-failure ExecStart=/app/oracle/product/11.2.0/dbhome_1/bin/lsnrctl start LISTENER ExecStop=/app/oracle/product/11.2.0/dbhome_1/bin/lsnrctl stop LISTENER [Install] WantedBy=multi-user.target
[root@tnbmilgtw02 system]# more oracle_database_test.service [Unit] Description="Oracle database test" After=network.target [Service] User=oracle Group=oinstall Type=forking WorkingDirectory=/app/oracle/product/11.2.0/dbhome_1 Environment=ORACLE_BASE=/app/oracle ORACLE_HOME=/app/oracle/product/11.2.0/dbhome_1 ORACLE_SID=test Restart=on-failure ExecStart=/bin/sh -c "echo startup | /app/oracle/product/11.2.0/dbhome_1/bin/sqlplus '/ as sysdba'" ExecStop=/bin/sh -c "echo shutdown immediate | /app/oracle/product/11.2.0/dbhome_1/bin/sqlplus '/ as sysdba'" [Install] WantedBy=multi-user.target