EJB(xml/mail/jms/jdbc)
2018.04.02 / 01:42

AJAX+JAVA기반의 webmail-claros in touch 설치 방법 - 소스 설치 파일 포함

인사이드자바
추천 수 81

터키사람들에 의해 공개된 ajax 기반의 웹메일로 다른 공개버전에 비교해서 기능과 디자인이 우수하다.

설치방법은,

 

다운로드 사이트 : http://www.claros.org

 

1. Download Java SE Development Kit 6u20 for Linux x64, Multi-language

http://java.sun.com/products/archive/j2se/6u2/index.html

 

자신에게 맞는 OS와 비트를 선택하여 다운로드한다.

 

jdk-6u20-linux-x64-rpm.bin (리눅스, 64비트버전) 를 다운로드한다.

 

[root@localhost ~]# chmod +x jdk-6u20-linux-x64-rpm.bin 
[root@localhost ~]# ./jdk-6u20-linux-x64-rpm.bin 
Sun Microsystems, Inc. Binary Code License Agreement

for the JAVA SE DEVELOPMENT KIT (JDK), VERSION 6

SUN MICROSYSTEMS, INC. ("SUN") IS WILLING TO LICENSE THE
SOFTWARE IDENTIFIED BELOW TO YOU ONLY UPON THE CONDITION
THAT YOU ACCEPT ALL OF THE TERMS CONTAINED IN THIS BINARY
CODE LICENSE AGREEMENT AND SUPPLEMENTAL LICENSE TERMS
(COLLECTIVELY "AGREEMENT"). PLEASE READ THE AGREEMENT
CAREFULLY.  BY USING THE SOFTWARE YOU ACKNOWLEDGE THAT 
YOU HAVE READ THE TERMS AND AGREE TO THEM. IF YOU ARE 
AGREEING TO THESE TERMS ON BEHALF OF A COMPANY OR OTHER 
LEGAL ENTITY, YOU REPRESENT THAT YOU HAVE THE LEGAL 
AUTHORITY TO BIND THE LEGAL ENTITY TO THESE TERMS. IF 
YOU DO NOT HAVE SUCH AUTHORITY, OR IF YOU DO NOT WISH 
TO BE BOUND BY THE TERMS, THEN YOU MUST NOT USE THE
SOFTWARE ON THIS SITE OR ANY OTHER MEDIA ON WHICH THE 
SOFTWARE IS CONTAINED.

<생략>

 

상기버전을 설치하면, 다음처럼 에러가 발생한다.

 

Extracting...
./jdk-6u20-linux-x64-rpm.bin: line 547: ./install.sfx.2886: cannot execute binary file
Installing JavaDB

 

 

다음 버전으로 다운로드를 다시하고, 위의 과정을 반복하면 에러 없이 설치가 가능하다.

jdk-6u20-linux-i586-rpm.bin

 

정상설치가 되면 아래 처럼 메시지가 나타난다.

 

<생략>

Installing JavaDB
준비 중...               ########################################### [100%]
   1:sun-javadb-common      ########################################### [ 17%]
   2:sun-javadb-core        ########################################### [ 33%]
   3:sun-javadb-client      ########################################### [ 50%]
   4:sun-javadb-demo        ########################################### [ 67%]
   5:sun-javadb-docs        ########################################### [ 83%]
   6:sun-javadb-javadoc     ########################################### [100%]

Java(TM) SE Development Kit 6 successfully installed.

Product Registration is FREE and includes many benefits:
* Notification of new versions, patches, and updates
* Special offers on Sun products, services and training
* Access to early releases and documentation

Product and system data will be collected. If your configuration
supports a browser, the Sun Product Registration form for 
the JDK will be presented. If you do not register, none of
this information will be saved. You may also register your
JDK later by opening the register.html file (located in 
the JDK installation directory) in a browser.

For more information on what data Registration collects and 
how it is managed and used, see:
http://java.sun.com/javase/registration/JDKRegistrationPrivacy.html

Press Enter to continue.....

 
Done.

 

 

2. 톰캣 다운로드 설치

 

wget http://apache.mirror.cdnetworks.com/tomcat/tomcat-6/v6.0.26/bin/apache-tomcat-6.0.26.tar.gz
tar xzvf apache-tomcat-6.0.26.tar.gz

mv apache-tomcat-6.0.26 /usr/local/tomcat

 

vi tomcat -- 데몬 파일 만들기

#!/bin/bash
#
# tomcat This shell script takes care of starting and stopping
# tomcat.
#
# chkconfig: 35 85 15

 

#!/bin/bash
#
# tomcat This shell script takes care of starting and stopping
# tomcat.
#
# chkconfig: 35 85 15
# description: start/stop Script for the Tomcaat Server
#
# processname: tomcat

# Source function library.
. /etc/rc.d/init.d/functions

export JAVA_HOME=/usr/local/java
export TOMCAT_HOME=/usr/local/tomcat/
export CLASSPATH="."

PRGDIR="$TOMCAT_HOME/bin"
EXECUTABLE=startup.sh
UNEXECUTABLE=shutdown.sh


# Check that target executable exists

if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then
echo "Cannot find $PRGDIR/$EXECUTABLE"
echo "This file is needed to run this program"
exit 1
fi

case "$1" in
start)
echo -n "Starting Tomcat service: "
echo
daemon "$PRGDIR"/"$EXECUTABLE"
;;

stop)
echo -n "Shutting down Tomcat service: "
echo
daemon "$PRGDIR"/"$UNEXECUTABLE"
;;

restart)
$0 stop
sleep 2
$0 start
;;

*)

echo "Usage: $0 {start|stop|restart}"
exit 1
esac
echo
exit 0

"tomcat" [New] 60L, 959C written


[root@localhost JAVA]# chmod 755 tomcat 
[root@localhost JAVA]# cp tomcat /etc/rc.d/init.d/
[root@localhost JAVA]# chkconfig --add tomcat 
[root@localhost JAVA]# chkconfig --level 345 tomcat on
[root@localhost JAVA]# service tomcat start
Starting Tomcat service: 
Using CATALINA_BASE:   /usr/local/tomcat
Using CATALINA_HOME:   /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME:        /usr/local/java
Using CLASSPATH:       /usr/local/tomcat/bin/bootstrap.jar
[  OK  ]

 

 

vi /etc/profile

 

맨 밑에 추가

JAVA_HOME=/usr/java/jdk1.6.0_20
export JAVA_HOME
PATH=$JAVA_HOME/bin:$PATH
CLASSPATH=$CLASSPATH:$JAVA_HOME/lib

저장하고

 

source /etc/profile

set  명령어 실행후, PATH와 CLASSPATH가 들어 있는지를 확인한다.

 

 


3. MYSQL 설치하기



4. Download Claros Intouch 2.2 (개발버전을 다운로드)

claros-intouch-2.2-beta.zip


unzip claros-intouch-2.2-beta.zip

cp claros-intouch2-2.2-beta/intouch2.war /usr/local/tomcat/webapps/

cd /usr/local/tomcat/webapps/

 

압축을 jar 명령어를 사용해서 푼다.

jar xvf intouch2.war

 

5. EDITING THE CONFIG.XML FILE: 

Where you see 0.0.0.0, put the IP address of your email server/s: 

(Server port 143 for imap, and 993 for secure imap) 

localhost 
0.0.0.0 
143 
imap 
0.0.0.0 
25 
true 
 


login>mysqlusername 
mysqlpassword 



6. CREATE YOUR MYSQL DATABASE: 

From terminal: 

localhost#mysql -uroot -p

Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 49290
Server version: 5.0.77 Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>


mysql>create database intouch; 
mysql>grant all privileges on intouch.* to 아이디@localhost identified by '비밀번호'; 
mysql>exit 
localhost#mysql intouch < /claros-intouch-2.1-bin/SQL/intouch-mysql.sql 

Now check to see if the script created the tables: 

localhost#mysql 
mysql>use intouch 
mysql>show tables; 
mysql>exit 


7. 퍼미션 주기
chmod 777 /tmp /usr/local/tomcat/logs /usr/local/tomcat/temp 


8. 톰캣 실행하기

정상 실행하면 아래와 같은 메시지가 나타난다.

 

[root@localhost JAVA]# service tomcat restart
Shutting down Tomcat service: 
Using CATALINA_BASE:   /usr/local/tomcat
Using CATALINA_HOME:   /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME:        /usr/java/jdk1.6.0_20
Using CLASSPATH:       /usr/local/tomcat/bin/bootstrap.jar
2010. 5. 25 오후 5:50:14 org.apache.catalina.startup.Catalina stopServer
심각: Catalina.stop: 
java.net.ConnectException: Connection refused
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
        at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
        at java.net.Socket.connect(Socket.java:529)
        at java.net.Socket.connect(Socket.java:478)
        at java.net.Socket.(Socket.java:375)
        at java.net.Socket.(Socket.java:189)
        at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:408)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:338)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:416)
[  OK  ]
Starting Tomcat service: 
Using CATALINA_BASE:   /usr/local/tomcat
Using CATALINA_HOME:   /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME:        /usr/java/jdk1.6.0_20
Using CLASSPATH:       /usr/local/tomcat/bin/bootstrap.jar
[  OK  ]





8. 브라우저에서 실행하기

아파치 기본 페이지 보기
http://localhost:8080/ 

 

웹메일보기(로칼실행)
http://localhost:8080/intouch2 

웹메일보기(인터넷실행)
http://SERVER-IP-ADDRESS:8080/intouch2 

*안될 경우에는 iptables -L 실행하여 8080포트를 열어주어야 한다.



9. 톰캣 중지하기 

service tomcat stop



10. PROTECT YOUR CONFIG.XML FILE