0

I do ssh on my terminal to run my liferay.

I use this command

ssh user@server.com
password: *****

cd tomcat/bin/

./catalina.sh run

Now when I run this command this will run my liferay just fine but when I exit my terminal it will also shut down my Liferay. causing my site to return "Service Temporarily Unavailable"

What is the proper way to run catalina script? Do I really need to keep my Terminal open to keep my server running? I think there's something wrong to what I did.

Using Liferay 6.0

Please advice.

Thank You!

Pennf0lio
  • 3,888
  • 8
  • 46
  • 70

1 Answers1

3

You can either use the startup.sh script that usually ships with Tomcat (runs tomcat in the background) or use one of the many popular backgrounding techniques (nohup, screen, etc).

Chris Eberle
  • 47,994
  • 12
  • 82
  • 119
  • Do you have an explanation to what is happening to my approach? Is it really normal that when ever I run that line and I close my terminal it will also end my server? Thanks for the suggestion, really appreciate it. – Pennf0lio Feb 25 '12 at 22:59
  • @Pennf0lio Yes, basically when you close your window it sends the `HUP` signal to your program (meaning hangup). If a process doesn't know how to deal with this, it's usually just killed. You can use the `nohup` program to ignore the `HUP` signal, or the other methods described above. – Chris Eberle Feb 25 '12 at 23:29