It is very difficult to install services on servers that are not connected to the Internet directly or through a proxy (critical servers), for example It happens in production environments, in this case we have to previously download the packages, transport them on USB flash drive and repeat this process as many times as packages and dependencies we have forgotten.
The situation is compounded when these critical servers are virtualized. If this is your case, I recommend you use the DVD / CD ISO images and mount them as your CentOS repositories.
If you are in doubt, follow this example for Tomcat:
- Mount DVD Iso image as a media-repo in your CentOS Guest Virtual Box
- Verify if you have Java installed in your Guest
[root@svdapp95 ~]# java -version java version "1.6.0" OpenJDK Runtime Environment (build 1.6.0-b09) OpenJDK Client VM (build 1.6.0-b09, mixed mode)
- Install Tomcat5 from your media-repo already mounted
* It is not recommended to install Tomcat as ROOT, especially if It is for production environments.
[root@svdapp95 ~]# yum --disablerepo=\* --enablerepo=c5-media -y install tomcat5 tomcat5-webapps tomcat5-admin-webapps
- Verify Tomcat5’s packages installed
[root@svdapp95 ~]# rpm -ql tomcat5 /etc/logrotate.d/tomcat5 /etc/rc.d/init.d/tomcat5 /etc/sysconfig/tomcat5 /etc/tomcat5 [...] /var/log/tomcat5 /var/log/tomcat5/catalina.out
- Start Tomcat5’s service
[root@svdapp95 ~]# service tomcat5 start Starting tomcat5: [ OK ]
- Put follow URL http://localhost:8080, now you can see Tomcat’s welcomepage.
- You can see Tomcat’s log with:
[root@svdapp95 ~]# tail -f /var/log/tomcat5/catalina.out