Oracle systemd: differenze tra le versioni
Jump to navigation
Jump to search
Nessun oggetto della modifica |
Nessun oggetto della modifica |
||
Riga 56: | Riga 56: | ||
</pre> |
</pre> |
||
<pre> |
|||
[Unit] |
|||
Description="Oracle database SIGMA" |
|||
After=network.target |
|||
[Service] |
|||
User=oracle |
|||
Group=oinstall |
|||
Type=forking |
|||
WorkingDirectory=/app/oracle/product/11.2.0/dbpe_1 |
|||
Environment="ORACLE_BASE=/app/oracle" "ORACLE_HOME=/app/oracle/product/11.2.0/dbpe_1" "ORACLE_SID=SID01" |
|||
"PATH=/app/oracle/product/11.2.0/dbpe_1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin" |
|||
Restart=on-failure |
|||
ExecStart=/bin/bash -c "echo -e 'startup' | sqlplus -s '/ as sysdba'" |
|||
ExecStop=/bin/bash -c "echo -e 'shutdown immediate' | sqlplus -s '/ as sysdba'" |
|||
LimitNOFILE=65536 |
|||
LimitNPROC=16384 |
|||
#LimitSTACK=131072 |
|||
LimitMEMLOCK=134217728 |
|||
[Install] |
|||
WantedBy=multi-user.target |
|||
</pre> |
|||
[[Categoria:Database]] |
[[Categoria:Database]] |
Versione delle 16:08, 29 mag 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 LimitNOFILE=65536 LimitNPROC=16384 #LimitSTACK=unlimited LimitMEMLOCK=134217728 [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'" LimitNOFILE=65536 LimitNPROC=16384 #LimitSTACK=unlimited LimitMEMLOCK=134217728 [Install] WantedBy=multi-user.target
[Unit] Description="Oracle database SIGMA" After=network.target [Service] User=oracle Group=oinstall Type=forking WorkingDirectory=/app/oracle/product/11.2.0/dbpe_1 Environment="ORACLE_BASE=/app/oracle" "ORACLE_HOME=/app/oracle/product/11.2.0/dbpe_1" "ORACLE_SID=SID01" "PATH=/app/oracle/product/11.2.0/dbpe_1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin" Restart=on-failure ExecStart=/bin/bash -c "echo -e 'startup' | sqlplus -s '/ as sysdba'" ExecStop=/bin/bash -c "echo -e 'shutdown immediate' | sqlplus -s '/ as sysdba'" LimitNOFILE=65536 LimitNPROC=16384 #LimitSTACK=131072 LimitMEMLOCK=134217728 [Install] WantedBy=multi-user.target