Oracle systemd: differenze tra le versioni

Da Emigar.
Jump to navigation Jump to search
Nessun oggetto della modifica
Nessun oggetto della modifica
Riga 1: Riga 1:
Systemd ignora i limiti assegnati nel file <code>/etc/security/limits.d/*</code>. Per evitare problemi è caldamente consigliabile configurare i limiti di processi, numero files e memoria a livello di systemd.


<pre>
<pre>
[root@host02 system]# pwd
[root@host02 system]# pwd

Versione delle 15:55, 11 mar 2019

Systemd ignora i limiti assegnati nel file /etc/security/limits.d/*. Per evitare problemi è caldamente consigliabile configurare i limiti di processi, numero files e memoria a livello di systemd.


[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@host02 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