Skip to content

Commit 0d113e3

Browse files
committed
Create Logrotate configs
1 parent 6026d65 commit 0d113e3

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

install/advanced/core/index.rst

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -569,6 +569,24 @@ Let's now configure the ``JAVA_OPTS``, i.e. the parameters to run the Servlet Co
569569

570570
.. warning:: The default options we are going to add to the Servlet Container, assume you can reserve at least ``4GB`` of ``RAM`` to ``GeoServer`` (see the option ``-Xmx4096m``). You must be sure your machine has enough memory to run both ``GeoServer`` and ``GeoNode``, which in this case means at least ``4GB`` for ``GeoServer`` plus at least ``2GB`` for ``GeoNode``. A total of at least ``6GB`` of ``RAM`` available on your machine. If you don't have enough ``RAM`` available, you can lower down the values ``-Xms512m -Xmx4096m``. Consider that with less ``RAM`` available, the performances of your services will be highly impacted.
571571

572+
.. code-block:: shell
573+
574+
# Create the Logrotate config
575+
sudo tee /etc/logrotate.d/geoserver <<EOF
576+
/opt/data/geoserver_logs/geoserver.log
577+
/opt/tomcat/apache-tomcat-*/logs/*.log
578+
/opt/tomcat/apache-tomcat-*/logs/*.out
579+
/opt/tomcat/apache-tomcat-*/logs/*.txt
580+
{
581+
copytruncate
582+
daily
583+
rotate 5
584+
delaycompress
585+
missingok
586+
su tomcat tomcat
587+
}
588+
EOF
589+
572590
Conifgure the Geofence DB
573591
............................
574592
@@ -762,6 +780,21 @@ Serving {“geonode”, “geoserver”} via NGINX
762780
sudo systemctl status geonode-uwsgi.service
763781
sudo systemctl enable geonode-uwsgi.service
764782
783+
.. code-block:: shell
784+
785+
# Create the Logrotate config
786+
sudo tee /etc/logrotate.d/uwsgi-geonode <<EOF
787+
"/var/log/geonode.log" {
788+
copytruncate
789+
daily
790+
rotate 5
791+
delaycompress
792+
missingok
793+
notifempty
794+
su root root
795+
}
796+
EOF
797+
765798
.. code-block:: shell
766799
767800
# Backup the original NGINX config
@@ -1232,6 +1265,21 @@ Daemonize and configure Celery
12321265
[Install]
12331266
WantedBy=multi-user.target
12341267
1268+
.. code-block:: shell
1269+
1270+
# Create the Logrotate config
1271+
sudo tee /etc/logrotate.d/celery <<EOF
1272+
"/var/log/celery.log" {
1273+
copytruncate
1274+
daily
1275+
rotate 5
1276+
delaycompress
1277+
missingok
1278+
notifempty
1279+
su root root
1280+
}
1281+
EOF
1282+
12351283
----
12361284
12371285
**Manage Celery**

0 commit comments

Comments
 (0)