how do we run Jira as a service in rhel 7. so even after server reboot Jira starts automatically . I have setup Jira using the archive file. please help on this
Hi Padmasree,
Red Hat / CentOS 7 uses systemd which doesn't use the chkconfig command anymore. The .bin installer will configure Jira automatically, but as you installed from the archive you'll need to follow these steps:
sudo touch /lib/systemd/system/jira.service
sudo chmod 664 /lib/systemd/system/jira.service
sudo vim /lib/systemd/system/jira.service
[Unit]
Description=Atlassian Jira
After=network.target
[Service]
Type=forking
User=jira
PIDFile=/opt/atlassian/jira/work/catalina.pid
ExecStart=/opt/atlassian/jira/bin/start-jira.sh
ExecStop=/opt/atlassian/jira/bin/stop-jira.sh
[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable jira.service
sudo systemctl start jira.service
Jira is now running as a systemd service and will start when the server starts. If you need to stop or restart the service, just do so with the systemctl command from now on:
sudo systemctl stop jira.service
sudo systemctl start jira.service
sudo systemctl restart jira.service
Cheers,
Daniel
Boss. I have treied above scripts in multiple environments..Its not working.
It looks fully documentation not updated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Padmasree P
See https://confluence.atlassian.com/jirakb/starting-jira-automatically-on-linux-828796713.html
For more information on running JIRA as a service on linux.
Regards
Dave
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Dave,
I just read the document, will sudo /sbin/chkconfig --add Jira work on rhel 7
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I am not a RHEL specialist but i don't see why not. Atlassian performs all testing on Centos.
A quick google search on centos vs RHEL tells me
CentOS is a community-developed and supported alternative to RHEL. It is similar to Red Hat EnterpriseLinux but lacks the enterprise-level support. CentOS is more or less a free replacement for RHEL with few minor configuration differences. It comes with extended support lifecycle ranging from 6 to 7 years
Regards
Dave
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Dave,
when I try sudo /sbin/chkconfig --add Jira . I get error service Jira does not support chkconfig. please help
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That's because the script is missing this
#chkconfig: 2345 80 05
just add it at the top of the file, then you can run chkconfig, in fact, if you ever get a message saying does not support chkconfig just add
#chkconfig: 2345 80 05
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.