-
Notifications
You must be signed in to change notification settings - Fork 0
creating a linux service with systemd
The following page explains how to setup a rapla service on a linux server. Assumed you logged into your webserver console.
For installing rapla under debian or ubuntu
sudo apt-get install default-jre
Type
java -version
to check installation. At least java 1.8 is required
create folder /opt/rapla with the command
sudo mkdir /opt/rapla
you can change installation folder by just replacing all /opt/rapla occurances in this wiki page with your foldername.
You can do both with the follwing command
sudo wget REPLACE_WITH_DOWNLOAD_LINK_TAR_GZ -O - | sudo tar -xz -C /opt/rapla
sudo /opt/rapla/raplaserver.sh run
watch rapla start and wait for the following line
INFO AbstractConnector.doStart o.e.jetty.server.AbstractConnector - Started SelectChannelConnector@0.0.0.0:8051
rapla started a webservice on port 8051. Go to your browser and type
http://your_server_ip_or_domain:8051
the rapla welcome page should appear. You can stop the server anytime with ctrl-c key in the consloe
Congratulation rapla is running. You can now setup rapla as service and securing the installation with the following steps.
login to rapla via the website and change the password.
sudo useradd --user-group --shell /bin/false --home-dir /opt/rapla rapla
sudo chown -R root:rapla /opt/rapla;sudo chmod -R 750 /opt/rapla;sudo chmod -R 771 /opt/rapla/logs/;sudo chmod -R 770 /opt/rapla/data/;sudo chmod 755 /opt/rapla
sudo vi /etc/systemd/system/rapla.service
[Unit]
Description=Rapla Service
After=network.target
[Service]
WorkingDirectory=/opt/rapla/
User=rapla
ExecStart=/usr/bin/java -cp /opt/rapla/raplabootstrap.jar -Xmx2048M -Duser.language=de -Duser.country=DE -Djava.awt.headless=true -Djetty.home=/opt/rapla org.rapla.bootstrap.RaplaServerLoader
SuccessExitStatus=143
[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload;sudo systemctl enable rapla.service
sudo systemctl start rapla
sudo systemctl stop rapla
sudo systemctl restart rapla
sudo systemctl status rapla