Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
minerva
core
Commits
2e8ba43c
Commit
2e8ba43c
authored
5 years ago
by
Piotr Gawron
Browse files
Options
Downloads
Plain Diff
Merge branch '980-rpm-package' into 'master'
Resolve "rpm package" Closes #980 See merge request
minerva/core!954
parents
4d41b225
da419034
No related branches found
No related tags found
1 merge request
!954
Resolve "rpm package"
Pipeline
#14783
passed
5 years ago
Changes
3
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
rpm/INSTALL.rst
+80
-15
80 additions, 15 deletions
rpm/INSTALL.rst
rpm/buildrpm.sh
+1
-1
1 addition, 1 deletion
rpm/buildrpm.sh
rpm/minerva.spec.in
+7
-4
7 additions, 4 deletions
rpm/minerva.spec.in
with
88 additions
and
20 deletions
rpm/INSTALL.rst
+
80
−
15
View file @
2e8ba43c
...
@@ -15,14 +15,15 @@ The main steps are
...
@@ -15,14 +15,15 @@ The main steps are
* Install `PostgreSQL <https://www.postgresql.org/>`_ and set up a
* Install `PostgreSQL <https://www.postgresql.org/>`_ and set up a
database.
database.
* Install and configure `Apache Tomcat <https://tomcat.apache.org/>`_.
* Install and configure `Apache Tomcat
8.5 or higher
<https://tomcat.apache.org/>`_.
* Install the MINERVA RPM.
* Install the MINERVA RPM.
* Data migration from version 13.2.x and lower.
PostgreSQL
PostgreSQL
----------
----------
Install PostgreSQL and initiali
s
e it with
Install PostgreSQL and initiali
z
e it with
.. code:: shell
.. code:: shell
...
@@ -58,17 +59,72 @@ Create the MINERVA database user and the database
...
@@ -58,17 +59,72 @@ Create the MINERVA database user and the database
Apache Tomcat
Apache Tomcat
-------------
-------------
Install Apache T
omcat
with
Create a new tomcat group and t
omcat
user
.. code:: shell
.. code:: shell
yum install -y tomcat
sudo groupadd tomcat
sudo useradd -M -s /bin/nologin -g tomcat -d /opt/tomcat tomcat
In ``/etc/sysconfig/tomcat``, adjust the memory settings, e.g.
Download Tomcat Binary
.. code::
.. code:: shell
wget https://www-eu.apache.org/dist/tomcat/tomcat-8/v8.5.46/bin/apache-tomcat-8.5.46.tar.gz
sudo mkdir /opt/tomcat
sudo tar xvf apache-tomcat-8*tar.gz -C /opt/tomcat --strip-components=1
Update Permissions
.. code:: shell
cd /opt/tomcat
sudo chgrp -R tomcat /opt/tomcat
sudo chmod -R g+r conf
sudo chmod g+x conf
sudo chown -R tomcat webapps/ work/ temp/ logs/
Install Systemd Unit File. Create a file `/etc/systemd/system/tomcat.service` (you might want to change memory settings specified in CATALINA_OPTS):
# Systemd unit file for tomcat
[Unit]
Description=Apache Tomcat Web Application Container
After=syslog.target network.target
JAVA_OPTS="-Xms2048M -Xmx4096M"
[Service]
Type=forking
Environment=JAVA_HOME=/usr/lib/jvm/jre
Environment=CATALINA_PID=/opt/tomcat/temp/tomcat.pid
Environment=CATALINA_HOME=/opt/tomcat
Environment=CATALINA_BASE=/opt/tomcat
Environment='CATALINA_OPTS=-Xms2048M -Xmx4096M -server -XX:+UseParallelGC'
Environment='JAVA_OPTS=-Djava.awt.headless=true -Djava.security.egd=file:/dev/./urandom'
ExecStart=/opt/tomcat/bin/startup.sh
ExecStop=/bin/kill -15 $MAINPID
User=tomcat
Group=tomcat
UMask=0007
RestartSec=10
Restart=always
[Install]
WantedBy=multi-user.target
Reload Systemd to load the Tomcat unit file
.. code:: shell
sudo systemctl daemon-reload
Enable and start Tomcat
.. code:: shell
sudo systemctl enable tomcat
sudo systemctl start tomcat
Make sure to open the port (by default port 8080) to allow incoming
Make sure to open the port (by default port 8080) to allow incoming
connections, e.g. using ``firewalld`` this can be accomplished with
connections, e.g. using ``firewalld`` this can be accomplished with
...
@@ -83,14 +139,6 @@ connections, e.g. using ``firewalld`` this can be accomplished with
...
@@ -83,14 +139,6 @@ connections, e.g. using ``firewalld`` this can be accomplished with
hardcoded, therefore make sure the MINERVA cannot be accessed from
hardcoded, therefore make sure the MINERVA cannot be accessed from
distrusted hosts until the password was changed.
distrusted hosts until the password was changed.
Enable and start Tomcat
.. code:: shell
systemctl enable tomcat
systemctl start tomcat
MINERVA
MINERVA
-------
-------
...
@@ -118,3 +166,20 @@ e.g. on a local network this could be
...
@@ -118,3 +166,20 @@ e.g. on a local network this could be
Login with the username ``admin`` and the password ``admin``. Click on
Login with the username ``admin`` and the password ``admin``. Click on
the ``INFO`` tab in the left panel, and click on ``MANUAL`` to get
the ``INFO`` tab in the left panel, and click on ``MANUAL`` to get
more information about administrating and using MINERVA.
more information about administrating and using MINERVA.
Migration from MINERVA 13.2 and lower
-------
MINERVA 13.2 and earlier versions used tomcat7 that was in most cases installed
from rpm. Starting from MINERVA 14.0.0 tomcat8 or higher is required. Before
you install new version of minerva you would need to remove old tomcat:
.. code::
sudo yum remove tomcat
And install new tomcat manually as described in the section above. Tomcat7
stored data in different place than manually installed tomcat8. Move the data
to tomcat8 folder:
.. code::
sudo mv /var/lib/tomcat/webapps/map_images /opt/tomcat/webapps/
sudo mv /var/lib/tomcat/webapps/minerva-big /opt/tomcat/webapps/
This diff is collapsed.
Click to expand it.
rpm/buildrpm.sh
+
1
−
1
View file @
2e8ba43c
...
@@ -36,7 +36,7 @@ if [[ "$RPMBUILD_TEMP" =~ ' ' ]]; then
...
@@ -36,7 +36,7 @@ if [[ "$RPMBUILD_TEMP" =~ ' ' ]]; then
fi
fi
# current date (for automatic changelog)
# current date (for automatic changelog)
CURDATE
=
$(
date
+
"%a %b %d %Y"
)
CURDATE
=
$(
LC_ALL
=
C
date
+
"%a %b %d %Y"
)
# clean build directories
# clean build directories
rm
-rf
"
$RPMBUILD_TEMP
"
rm
-rf
"
$RPMBUILD_TEMP
"
...
...
This diff is collapsed.
Click to expand it.
rpm/minerva.spec.in
+
7
−
4
View file @
2e8ba43c
...
@@ -7,7 +7,7 @@ License: AGPLv3
...
@@ -7,7 +7,7 @@ License: AGPLv3
URL: http://r3lab.uni.lu/web/minerva-website/
URL: http://r3lab.uni.lu/web/minerva-website/
Source0: https://git-r3lab.uni.lu/piotr.gawron/minerva/repository/archive.tar.gz?ref=v%{version}
Source0: https://git-r3lab.uni.lu/piotr.gawron/minerva/repository/archive.tar.gz?ref=v%{version}
Require
s:
tomcat
, postgresql
Conflict
s: tomcat
< 8.0
BuildArch: noarch
BuildArch: noarch
%description
%description
...
@@ -18,7 +18,10 @@ used and managed via a webbrowser.
...
@@ -18,7 +18,10 @@ used and managed via a webbrowser.
%preun -p /bin/bash
%preun -p /bin/bash
if [ $1 == 1 ]; then
if [ $1 == 1 ]; then
# remove old unpacked ("exploded") directory of war file
# remove old unpacked ("exploded") directory of war file
# version 13.2 and below
rm -rf %{_sharedstatedir}/tomcat/webapps/%{name}
rm -rf %{_sharedstatedir}/tomcat/webapps/%{name}
# version 14.0 and upper
rm -rf /opt/tomcat/webapps/%{name}
fi
fi
%install
%install
...
@@ -27,15 +30,15 @@ mkdir -p %{buildroot}/%{_datadir}/%{name}
...
@@ -27,15 +30,15 @@ mkdir -p %{buildroot}/%{_datadir}/%{name}
install -m 0644 %{name}.war %{buildroot}/%{_datadir}/%{name}/%{name}.war
install -m 0644 %{name}.war %{buildroot}/%{_datadir}/%{name}/%{name}.war
mkdir -p %{buildroot}/%{_sysconfdir}/logrotate.d
mkdir -p %{buildroot}/%{_sysconfdir}/logrotate.d
install -m 0644 logrotate_minerva %{buildroot}/%{_sysconfdir}/logrotate.d/minerva
install -m 0644 logrotate_minerva %{buildroot}/%{_sysconfdir}/logrotate.d/minerva
mkdir -p %{buildroot}/
%{_sharedstatedir}
/tomcat/webapps
mkdir -p %{buildroot}/
opt
/tomcat/webapps
ln -s %{_datadir}/%{name}/%{name}.war %{buildroot}/
%{_sharedstatedir}
/tomcat/webapps/
ln -s %{_datadir}/%{name}/%{name}.war %{buildroot}/
opt
/tomcat/webapps/
%files
%files
%defattr(-,root,root,-)
%defattr(-,root,root,-)
%doc README.md CHANGELOG INSTALL.rst
%doc README.md CHANGELOG INSTALL.rst
%{_datadir}/%{name}/%{name}.war
%{_datadir}/%{name}/%{name}.war
%config(noreplace) %{_sysconfdir}/logrotate.d/minerva
%config(noreplace) %{_sysconfdir}/logrotate.d/minerva
%attr(-,tomcat,tomcat)
%{_sharedstatedir}
/tomcat/webapps/%{name}.war
%attr(-,tomcat,tomcat)
/opt
/tomcat/webapps/%{name}.war
%changelog
%changelog
* __DATE__ - %{version}-%{release}
* __DATE__ - %{version}-%{release}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment