Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Logrotate configs #310

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions install/advanced/core/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,24 @@ Let's now configure the ``JAVA_OPTS``, i.e. the parameters to run the Servlet Co

.. 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.

.. code-block:: shell

# Create the Logrotate config
sudo tee /etc/logrotate.d/geoserver <<EOF
/opt/data/geoserver_logs/geoserver.log
/opt/tomcat/apache-tomcat-*/logs/*.log
/opt/tomcat/apache-tomcat-*/logs/*.out
/opt/tomcat/apache-tomcat-*/logs/*.txt
{
copytruncate
daily
rotate 5
delaycompress
missingok
su tomcat tomcat
}
EOF

Conifgure the Geofence DB
............................

Expand Down Expand Up @@ -744,6 +762,21 @@ Serving {“geonode”, “geoserver”} via NGINX
sudo systemctl status geonode-uwsgi.service
sudo systemctl enable geonode-uwsgi.service

.. code-block:: shell

# Create the Logrotate config
sudo tee /etc/logrotate.d/uwsgi-geonode <<EOF
"/var/log/geonode.log" {
copytruncate
daily
rotate 5
delaycompress
missingok
notifempty
su root root
}
EOF

.. code-block:: shell

# Backup the original NGINX config
Expand Down Expand Up @@ -1214,6 +1247,21 @@ Daemonize and configure Celery
[Install]
WantedBy=multi-user.target

.. code-block:: shell

# Create the Logrotate config
sudo tee /etc/logrotate.d/celery <<EOF
"/var/log/celery.log" {
copytruncate
daily
rotate 5
delaycompress
missingok
notifempty
su root root
}
EOF

----

**Manage Celery**
Expand Down