Site Sponsors:
LTM on Godaddy (CentOS 6 : Tomcat 6 : MySQL 5.5) 
NOTE: GODADDY Cloud Servers GONE as of December 31, 2017.



In as much as it is now extremely affordable to toss server installs around in-the-cloud, we decided to set up a Linux, Tomcat & MySQL (LTM) stack on CentOS.

Why CentOS, you might ask?

Easy: Those SCLs make the job far too easy!

Here is what we had to do:
    sudo bash
yum install centos-release-SCL
yum update
yum install mysql55
yum update
yum -y install tomcat6 tomcat6-webapps tomcat6-admin-webapps
yum update
Thereafter, editing /etc/tomcat6/tomcat-users.xml to add an 8080 login:
  <role rolename="manager"/>
<role rolename="admin"/>
<user username="admin" password="admin" roles="admin,manager"/>
... followed by ...
    service tomcat6 start
Worked great!

Also, if your browsing to 8080 did not work (mine did - just had to wait for a 'few the first time! (Java ... ... ... yo!)), then don't forget to unblock those ports!

MySQL


For those who are convinced that they will need access to MySQL under Tomcat:
    yum -y install mysql-connector-java



[ view entry ] ( 671 views )   |  permalink  |  related link
Tomcat 7 on Ubuntu 
NOTE: GODADDY Cloud Servers GONE as of December 31, 2017



In an earlier post I mentioned that - while capable - that AWS was a box of frogs. While we might wonder aloud as we hear-tell of what is bumping around inside, once the 'pandora has been braved one will surely crave a far more native-English way of getting things done!

So it was with no little trepidation that I created a cloud server on GoDaddy today. While the prohibition on the static IP address remains, please allow me to report that - for a mere $5 a month - that the Open Stack experience is presently far, far easier to work with.

For those of you whom might be wanting to get Tomcat7 up and running on Ubuntu, please note that doing so was a breeze!

sudo bash
apt-get update
apt-get install openjdk-7-jdk
apt-get update
javac # Just for laughs ...
sync
apt-get install tomcat7
apt-get update
sync

Thereafter, editing /etc/tomcat7/tomcat-users.xml to add those 8080 login-roles worked after Tomcat was restarted, as usual.

When it came time to switch from the default port of 8080 however, try as I might there was no way to do so without re-directing the port. Even that classical:
nano /etc/default/tomcat7
#AUTHBIND=no
~ changed to ~
AUTHBIND=yes

As well as:
nano /etc/default/server.xml
8080
~ changed to ~
80

Followed by the obligatory:
sudo /etc/init.d/tomcat7 restart

-as well as a server reset or three, simply did not work as expected on 14.04 LTS. (*)

For those facing a similar conundrum, note that port mapping was one way to get the job done:

/sbin/iptables -A INPUT -i eth0 -p tcp --dport 80 -j ACCEPT

/sbin/iptables -A INPUT -i eth0 -p tcp --dport 8080 -j ACCEPT

/sbin/iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080

While I feel certain that there is a far, far better way to get the job done, so far forwarding ports at the iptable-level is the best way to map Tomcat's default (and much beloved :) port 8080 over to 80 on my new 'experimentals.

Ultimately, never forget to
shutdown -r 0
-as your user community permits!


Sharing is caring,

-Rn


p.s: CentOS / RedHat users can do this.

(*) NOTE: authbind works only with IPv4. Do not enable it when using IPv6.

[ view entry ] ( 551 views )   |  permalink  |  related link
Dropping that firewall: CentOS & RedHat! 
When you are working on your own cluster - behind your own firewall - then having ANY type of port-security on an on-demand server is just plain 'ol annoying.

Here is how to allow access to ALL of those ports on your R&D server. -Wherever iptables is 'empestered:

su
service iptables save
service iptables stop
chkconfig iptables off
service iptables restart

Now Tomcat, 8080, 80, and (etc, etc,) will respond as most software developers are used to.


Sharing is caring,

-Rn


p.s: Ubuntu Tomcat users can do this.

[ view entry ] ( 803 views )   |  permalink  |  related link

<<First <Back | 1 | 2 | 3 | 4 | Next> Last>>