0

Is it possible to change the port for catalina.sh run command?

By default it runs on 8080.

I know i can change it in the servers.xml , but on upgrade one has to continuously fiddle with that.

mmm
  • 18,431
  • 26
  • 99
  • 165
  • 6
    Possibly, question duplicates http://stackoverflow.com/questions/15555838/how-to-pass-tomcat-port-number-on-command-line – Gregory.K Dec 25 '16 at 18:11
  • is your steps like below link below link: http://stackoverflow.com/questions/18415578/how-to-change-tomcat-port-number – Elham_Jahani Dec 26 '16 at 04:18
  • @elham_jahani i want to do it through the command line, changing through the server.xml is awkward and not as easy. I think gregories way might the best option though, although I have to repeat the step when i download a new tomcat version. – mmm Dec 26 '16 at 16:05

1 Answers1

3

you use the link below :

How to change tomcat port number

and if you want to change it with command line, you can use this command :

sed -i -e 's/8080/8081/' /TOMCAT_HOME/conf/server.xml
Community
  • 1
  • 1
Elham_Jahani
  • 314
  • 1
  • 7