Set up tomcat at CentOS with Apache

Tomcat Download & Install at first, download tomcat refer this site, http://tomcat.apache.org/download-70.cgi. # wget http://apache.mirror.cdnetworks.com/tomcat/tomcat-7/v7.0.37/bin/apache-tomcat-7.0.37.tar.gz # tar xvfz apache-tomcat-7.0.37.tar.gz # mv apache-tomcat-7.0.37 /usr/local/tomcat and make 'init.d/tomcat' file #vi /etc/rc.d/init.d/tomcat insert below. #!/bin/bash # description: Tomcat Start Stop Restart # processname: tomcat # chkconfig: 234 20 80 export JAVA_HOME=/usr/java/jdk1.6.0_35 export ...

CentOS Apache Setting

Apache Install # yum -y install httpd* # /etc/rc.d/init.d/httpd start Apache Setting # vim /etc/httpd/conf/httpd.conf change Home Directory & Setting Virtual Host DirectoryIndex index.html index.html index.php . . <VirtualHost *:80> DocumentRoot /home/user ServerName * </VirtualHost> Add your custom host <VirtualHost proinlab.com> DocumentRoot /home/user ServerName proinlab.com ServerAlias www.proinlab.com </VirtualHost>  Permission Setting change ...

InetAddress를 이용한 특정 도메인의 IP 주소 구하기

www.google.com 의 IP 주소를 구하는 프로그램이다. import java.net.Inet4Address; import java.net.InetAddress; import java.net.UnknownHostException; public class InetAddress_01 { public static void main(String[] ar) throws Exception { String[] StrArr = GetIPAddressByName(); for (int i = 0; i < StrArr.length; i++) System.out.println("IP address : " + StrArr[i]); } public static String[] GetIPAddressByName() { InetAddress[] ia = null; ...