The Official BLOG and Wiki for CustomMode.com
[ start | index | login ]
start > linux

linux

Created by dmitry. Last edited by dmitry, one year and 241 days ago. Viewed 488 times. #7
[diff] [history] [edit] [rdf]
labels
attachments

FAQ

How to run a production application on port other then 80.

In order to address security concerns, one might want to run application server on port other then 80, otherwise the appserver will have to be ran as root which will create a potential security whole. Linux command iptables can be used to redirect all requests from port 80 to let's say 8080 (default port for tomcat or jetty). Here is an example iptables command:
/sbin/iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 8080

How to automatically start the appserver when linux boots up.

Modify /etc/rc.d/rc.local . Here is the example fragment of that file wich will execute iptables command (see above), start sshd and then will start tomcat.
# custom changes **********************************************************
/sbin/iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 8080
/etc/init.d/sshd start
/bin/bash -c '. /etc/profile; cd /home/dev/opt/jakarta-tomcat-5.0.27/bin ; ./startup.sh '
# custom changes **********************************************************

Running Yum Manually

To see a list of available updates without installing anything, use yum check-update

To initiate a complete update session for all installed packages on your system, you simply can omit the last argument, the package specification: yum update.

There are some useful linux links.

no comments | post comment
custommode.com | ©2000-2005
webmaster at custommode dot com