::: °­ÁÂ/¼Ò½º/¹®¼­ :::

°­ÁÂ/¼Ò½º/¹®¼­ ¼º°Ý¿¡ ¸ÂÁö ¾Ê´Â ±¤°í,ºñ¹æ,Áú¹®ÀÇ ±ÛÀº Áï½Ã »èÁ¦Çϸç
³»¿ëÀ» º¹»çÇÏ¿© »ç¿ëÇÒ °æ¿ì ¹Ýµå½Ã ÀÌ°÷(http://www.howto.pe.kr)À» Ãâó·Î ¸í½ÃÇÏ¿© ÁÖ¼¼¿ä


Category

  ±è¿µ´ë(2003-11-29 16:33:22, Hit : 7320, Vote : 1784
 http://www.howto.pe.kr
 MCSdemo.java (5.1 KB), Download : 431
 [°­ÁÂ] Metadata Catalog Service (MCS) ¼³Ä¡

// Á¦  ¸ñ: Metadata Catalog Service (MCS) ¼³Ä¡
// ÀÛ¼ºÀÚ: ±è¿µ´ë( http://www.howto.pe.kr )  

  ¼³Ä¡ GT3: GT3 3.0.2
  O/S: Linux 2.4.18-3 (Redhat 7.3)
  È£½ºÆ®¸í: myhome.ssu.ac.kr

1.¼³Ä¡ÇÒ ÆÄÀÏ ´Ù¿î¹Þ±â
.j2sdk-1_4_2_02-linux-i586.rpm ( http://java.sun.com )
.tomcat-4.1.27.tar.gz ( http://jakarta.apache.org )
.Xerces-J-bin.2.6.0.tar.gz ( http://xml.apache.org )
.axis-1_1.tar.gz ( http://ws.apache.org )
.mysql-4.1.0-alpha.tar.gz ( http://www.mysql.com/downloads/mysql-4.1.html )
.mcs.tar.gz ( http://gaul.isi.edu/mcs/v2 )
.mcsschema.txt ( http://gaul.isi.edu/mcs/v2 )
  
2.tomcat ¼³Ä¡
¸¸¾à J2SDK °¡ ¼³Ä¡µÇ¾î ÀÖÁö ¾Ê´Ù¸é ¸ÕÀú J2SDK ¸¦ ¼³Ä¡ÇÑ´Ù
¾Æ·¡¿Í °°ÀÌ ¼³Ä¡ÇÑ´Ù¸é /usr/java/j2sdk1.4.2_02 µð·ºÅ丮°¡ »ý¼ºµÈ´Ù
   [root root]# rpm -ivh j2sdk-1_4_2_02-linux-i586.rpm

¸¶Âù°¡Áö·Î tomcat ÀÌ ¼³Ä¡µÇ¾î ÀÖÁö ¾Ê´Ù¸é ¸ÕÀú tomcat À» /usr/java ¾Æ·¡¿¡ ¼³Ä¡ÇÑ´Ù
¾Æ·¡¿Í °°ÀÌ ¼³Ä¡ÇÑ´Ù¸é /usr/java/jakarta-tomcat-4.1.27 µð·ºÅ丮°¡ »ý¼ºµÈ´Ù
   [root root]# tar xvfz tomcat-4.1.27.tar.gz -C /usr/java

j2sdk ¿Í tomcat À» À§ÇÑ È¯°æº¯¼ö¸¦ µî·ÏÇÏ°í ¹Ý¿µÇÑ´Ù
   export JAVA_HOME=/usr/java/j2sdk1.4.2_02
   export CATALINA_HOME=/usr/java/jakarta-tomcat-4.1.27

tomcatÀ» ¾Æ·¡¿Í °°Àº ¸í·É¾î·Î ½ÇÇàÇÑ´Ù (Á¾·á´Â shutdown.sh ÀÌ´Ù)
   [root root]# $CATALINA_HOME/bin/startup.sh
À¬ºê¶ó¿ìÀú¸¦ ÀÌ¿ëÇÏ¿© ÇØ´ç ¼­¹öÀÇ 8080 Æ÷Æ®(¿¹, http://localhost:8080) ·Î Á¢¼ÓÇØ º»´Ù
È­¸éÀÇ Examples ÀÇ JSP Examples/Servlet Examples µîÀ» Ŭ¸¯ÇÏ¿© ¿¹Á¦°¡ ½ÇÇàµÇ´ÂÁö Å×½ºÆ®ÇÑ´Ù
Âü°í·Î tomcat ÀÇ È¨ÆäÀÌÁö´Â $CATALINA_HOME/webapps/ROOT/index.jsp ¹®¼­ÀÌ´Ù

3.axis(SOAP, WSDL), Xerces(XML parser) ¼³Ä¡
axis ¸¦ /usr/java ¾Æ·¡¿¡ ¼³Ä¡ÇÑ´Ù
¾Æ·¡¿Í °°ÀÌ ¼³Ä¡ÇÑ´Ù¸é /usr/java/axis-1_1 µð·ºÅ丮°¡ »ý¼ºµÈ´Ù
   [root root]# tar xvfz axis-1_1.tar.gz -C /usr/java

Xerces ¸¦ /usr/java ¾Æ·¡¿¡ ¼³Ä¡ÇÑ´Ù
¾Æ·¡¿Í °°ÀÌ ¼³Ä¡ÇÑ´Ù¸é /usr/java/xerces-2_6_0 µð·ºÅ丮°¡ »ý¼ºµÈ´Ù
   [root root]# tar xvfz Xerces-J-bin.2.6.0.tar.gz -C /usr/java

/usr/java/xerces-2_6_0 ¿¡ ÀÖ´Â ¸ðµç jar ÆÄÀÏÀ» axis ÀÇ WEB-INF/lib ¿¡ º¹»çÇÑ´Ù
   [root root]# cp /usr/java/xerces-2_6_0/*.jar /usr/java/axis-1_1/webapps/axis/WEB-INF/lib

¾Æ·¡¿¡¼­ tomcat À¬¼­ºñ½º¿¡ º¯µ¿ÀÌ »ý±æ°ÍÀ̹ǷΠ½ÇÇàµÈ tomcat À» Àá½Ã Á¾·áÇÑ´Ù
   [root root]# $CATALINA_HOME/bin/shutdown.sh

/usr/java/axis-1_1/webappsÀÇ axis ¸¦ /usr/java/jakarta-tomcat-4.1.27/webapps µð·ºÅ丮 ¾Æ·¡¿¡ º¹»çÇÑ´Ù
   [root root]# cp -R /usr/java/axis-1_1/webapps/axis /usr/java/jakarta-tomcat-4.1.27/webapps

http://localhost:8080/axis/index.html ¸¦ ¹æ¹®ÇÏ¿© "Hello! Welcome to Apache-Axis"
  ¸¦ È®ÀÎÇÏ°í È­¸éÀÇ "Validate the local installation's configuration" ºÎºÐÀ» Ŭ¸¯ÇÑ´Ù
  ÀÌ°ÍÀº axis ¸¦ À§ÇÑ needed(core) ÄÞÆ÷³ÍÆ®¿Í ¿É¼Ç ÄÞÆ÷³ÍÆ®°¡ ¾î¶»°Ô ¼³Ä¡µÇ¾î ÀÖ´ÂÁö º¸¿©ÁØ´Ù
  "Warning: could not find class org.apache.xml.security.Init from file xmlsec.jar" ºÎºÐÀº MCS ¿Í´Â
  °ü·Ã »çÇ×ÀÌ ¾øÀ¸¹Ç·Î ¹«½ÃÇÑ´Ù
  
´Ù½Ã http://localhost:8080/axis/index.html ¸¦ ¹æ¹®ÇÏ¿© "View the list of deployed Web services"
ºÎºÐÀ» Ŭ¸¯Çغ»´Ù. ÀÌ°ÍÀº ÇöÀç axis ¿¡¼­ Á¦°øÇÏ´Â À¬¼­ºñ½º¿Í Á¦°øÇÏ´Â ¸Þ¼Òµå ¸®½ºÆ®¸¦ º¸¿©ÁØ´Ù
±âº»À¸·Î 2°¡Áö À¬¼­ºñ½º°¡ º¸ÀÏ°ÍÀÌ´Ù
MCS ¼­¹ö´Â À¬¼­ºñ½º ÇüÅ·Π¿î¿µµÉ°ÍÀ̹ǷΠ³ªÁß¿¡ MCS ¸¦ ¼³Ä¡ÇÏ°í ³ª¸é ÀÌ°÷¿¡ "MetaDataCatalogService"
À¬¼­ºñ½º°¡ Ãß°¡µÊÀ» º¸°ÔµÉ°ÍÀÌ´Ù
  .AdminService (wsdl)
    AdminService
  .Version (wsdl)
    getVersion  

4.MySQL ¼³Ä¡
´Ù¿î¹ÞÀº ÆÄÀÏÀÌ ¼Ò½º ¹èÆ÷º»ÀÎÁö ±×¸®°í 4.1.0-alpha ÀÌ»óÀÎÁö ´Ù½ÃÇѹø È®ÀÎÇÑ´Ù
4.1.0-alpha ÀÌ»óÀ̾î¾ß MCS ÀÇ spatial attributes ±â´ÉÀ» »ç¿ëÇÒ ¼ö ÀÖ´Ù
¾ÐÃàÀ» ÀÓÀÇ µð·ºÅ丮¿¡¼­ Ç®°í ¾ÐÃàÀ» Ǭ mysql µð·ºÅ丮·Î À̵¿ÇÏ¿© configure ÇÕ´Ï´Ù
   [root root]# tar xvfz mysql-4.1.0-alpha.tar.gz
   [root root]# cd mysql-4.1.0-alpha
   [root mysql-4.1.0-alpha]# ./configure --prefix=/usr/local/mysql --with-extra-character-sets=complex
   --localstatedir=/home/mysql/data

   --prefix=/usr/local/mysql  ¼³Ä¡ µð·ºÅ丮 ÁöÁ¤
   --with-extra-character-sets=complex   mysql ¿¡¼­ multi-byte character set À» Áö¿ø
   --localstatedir=/home/mysql/data  DBÀÇ µ¥ÀÌÅÍ tableÀ» ÆÄÀÏ·Î ÀúÀåÇÒ µð·ºÅ丮¸¦ ÁöÁ¤

configure ÇÑ ÈÄ "Thank you for choosing MySQL!" À̶ó´Â ¸Þ½ÃÁö°¡ ³ª¿Â´Ù¸é MySQLÀ» ÄÄÆÄÀÏÇÒ Áغñ°¡
´Ù µÇ¾ú´Ù´Â °ÍÀÌ´Ù

¾Æ·¡¿Í °°ÀÌ ÄÄÆÄÀÏÀ» ½ÃÀÛÇϸç ÄÄÇ»ÅÍ »ç¾ç¿¡ µû¶ó ¼öºÐ¿¡¼­ ¼ö½ÊºÐ ¼Ò¿äµÈ´Ù
   [root mysql-4.1.0-alpha]# make    

¿©±â±îÁö µÇ¾ú´Ù¸é mysql À̶ó´Â »ç¿ëÀÚ group°ú id¸¦ ¸¸µé¾î¾ß ÇÑ´Ù
   [root mysql-4.1.0-alpha]# groupadd mysql
   [root mysql-4.1.0-alpha]# useradd -g mysql mysql
   [root mysql-4.1.0-alpha]# mkdir /home/mysql/data
   [root mysql-4.1.0-alpha]# chown -R mysql.mysql /home/mysql/data
   [root mysql-4.1.0-alpha]# cp support-files/my-medium.cnf /etc/my.cnf

¾Æ·¡¿Í °°ÀÌ ¼³Ä¡ÀÛ¾÷À» ÇÑ´Ù
   [root mysql-4.1.0-alpha]# make install

MySQL ÀÇ µ¥ÀÌÅ͸¦ °ü¸®ÇÒ ±âÃÊÀûÀÎ DB(mysql,test)¿Í Å×À̺í(db,user,func µî)À» ½ºÅ©¸³Æ®·Î »ý¼ºÇÑ´Ù
   [root mysql-4.1.0-alpha]# scripts/mysql_install_db      
mysql_install_db Àº ¹Ýµå½Ã Çѹø¸¸ ½ÇÇà½ÃÄÑ¾ß ÇÑ´Ù

¸î°¡Áö DB ÆÄÀÏÀÌ root ·Î µÇ¾î ÀÖÀ¸¹Ç·Î ´Ù½ÃÇѹø ±ÇÇÑÀ» ¹Ù²ãÁØ´Ù
   [root mysql-4.1.0-alpha]# chown -R mysql.mysql /home/mysql/data

MySQL ¼­¹öÀÇ ½ÃÀÛ°ú Á¾·á ±×¸®°í °ü·Ã ¸í·É¾î¸¦ »ç¿ëÇϱâ ÆíÇÏ°Ô ÇϱâÀ§Çؼ­ ºÎÆÃȯ°æ¿¡ PATH¸¦ Ãß°¡ÇÑ´Ù
   [root mysql-4.1.0-alpha]# vi /root/.bash_profile
   PATH=$PATH:/usr/local/mysql/bin

½Ã½ºÅÛ ºÎÆýÿ¡ ÀÚµ¿ ½ÇÇàµÇµµ·Ï ÇØÁØ´Ù
   [root root]# cp -p /usr/local/mysql/share/mysql/mysql.server /etc/rc.d/init.d/mysqld
   [root root]# ln -s /etc/rc.d/init.d/mysqld /etc/rc.d/rc3.d/S90mysqld
   [root root]# ln -s /etc/rc.d/init.d/mysqld /etc/rc.d/rc5.d/S90mysqld

¼³Ä¡°¡ ¿Ï·áµÇ¾úÀ¸¹Ç·Î MySQL ¼­¹öÀÇ ±¸µ¿À» Å×½ºÆ® Çغ»´Ù
   [root root]# /etc/rc.d/init.d/mysqld start

MySQL ¼­¹ö°¡ Á¤»óÀûÀ¸·Î °¡µ¿ÁßÀÎÁö ¾Æ·¡¿Í °°ÀÌ Å×½ºÆ®ÇÑ´Ù
   [root root]# mysqladmin version
   mysqladmin  Ver 8.40 Distrib 4.1.0-alpha, for pc-linux on i686
   Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
   This software comes with ABSOLUTELY NO WARRANTY. This is free software,
   and you are welcome to modify and redistribute it under the GPL license

   Server version          4.1.0-alpha-log
   Protocol version        10
   Connection              Localhost via UNIX socket
   UNIX socket             /tmp/mysql.sock
   Uptime:                 5 min 40 sec

   Threads: 1  Questions: 4  Slow queries: 0  Opens: 6  Flush tables: 1  Open tables: 0  
   Queries per second avg: 0.012

MySQL À» ¼³Ä¡½Ã(Ãʱ⼳Á¤ ½ºÅ©¸³Æ®ÆÄÀÏ mysql_install_dbÀ» ½ÇÇàÇÏ¸é »ý¼ºµÊ) MySQLÀÇ DBA ¸¦ À§ÇÑ
À¯Àú Çϳª¸¦ ÀÚµ¿À¸·Î ¸¸µå´Âµ¥ root (UNIX »ç¿ëÀÚ °èÁ¤ÀÌ ¾Æ´Ô)¶ó´Â DBA À¯ÀúÀÌ´Ù.
ÀÌ root À¯Àú·Î MySQL À» ·Î±×ÀÎÇغ¸ÀÚ
   [root root]# mysql -uroot
   Welcome to the MySQL monitor.  Commands end with ; or g.
   Your MySQL connection id is 2 to server version: 4.1.0-alpha-log

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

MySQL ¿¡ ±âº»À¸·Î »ý¼ºµÈ database µéÀ» º¸·Á¸é ¾Æ·¡¿Í °°ÀÌ ÇÏ¸é µÈ´Ù
mysql Àº MySQL ÀÚü¸¦ °ü¸®Çϱâ À§ÇÑ °ÍÀÌ°í test ´Â ±×³É Å×½ºÆ®¿ë database ÀÌ´Ù
   mysql> show databases;
   +----------+
   | Database |
   +----------+
   | mysql    |
   | test     |
   +----------+
   2 rows in set (0.02 sec)

mysql À̶ó´Â database ¸¦ Á¢±ÙÇϱâ À§Çؼ­´Â ¾Æ·¡¿Í °°ÀÌ use ¸í·É¾î¸¦ ÀÌ¿ëÇÏ¿© »ç¿ëÀ» ¾Ë¸°´Ù
ÀÌ use ¸í·É¾î´Â ÇϳªÀÇ DB¸¦ »ç¿ëÇÏ´Ù°¡ ´Ù¸¥ DB ·Î ÀüȯÇÒ°æ¿ì ÁÖ·Î »ç¿ëµÈ´Ù
   mysql> use mysql;
   Database changed  
  
±×·³ mysql batabase¿¡ ÀÖ´Â table µéÀ» º¸ÀÚ
   mysql> show tables;
   +-----------------+
   | Tables_in_mysql |
   +-----------------+
   | columns_priv    |
   | db              |
   | func            |
   | host            |
   | tables_priv     |
   | user            |
   +-----------------+
   6 rows in set (0.00 sec)  

mysql database ÀÇ use Å×À̺íÀ» select Çغ¸¸é ´ÙÀ½°ú °°´Ù
Áö±Ý±îÁö »ç¿ëÇÑ mysql ÀÇ °ü¸® À¯ÀúÀÎ root °¡ º¸ÀÏ°ÍÀÌ´Ù
   mysql> select host, user from user;
   +----------------------+------+
   | host                 | user |
   +----------------------+------+
   | myhome.ssu.ac.kr     |      |
   | myhome.ssu.ac.kr     | root |
   | localhost            |      |
   | localhost            | root |
   +----------------------+------+
   4 rows in set (0.00 sec)

5.MCS ¸¦ À§ÇÑ MySQL ¼³Á¤
http://gaul.isi.edu/mcs/v2/mcsschema.txt ¸¦ ´Ù¿î¹Þ´Â´Ù
ÀÌ ÆÄÀÏÀº MySQL ¿¡ MCS ¸¦ À§ÇÑ µ¥ÀÌŸº£À̽º(mcs_2) ¿Í °¢Á¾ Å×À̺íÀ» »ý¼ºÇÏ´Â ½ºÅ©¸³Æ®ÀÌ´Ù
¾Æ·¡¿Í °°ÀÌ ½ÇÇàÇÏ¸é µÈ´Ù
   [root root]# wget http://gaul.isi.edu/mcs/v2/mcsschema.txt
   [root root]# mysql -uroot < mcsschema.txt

MySQL ÀÇ DBA À¯ÀúÀÎ root °¡ ¾Æ´Ñ MCS ¸¦ À§ÇÑ »õ·Î¿î À¯ÀúÀ» Çϳª ¸¸µç´Ù
ÇöÀç MySQL ¿¡ Á¢¼ÓÇØ ÀÖ´Ù¸é ´ÙÀ½°ú °°ÀÌ ÇÏ¿© database ¸¦ mysql ·Î º¯°æÇÑ´Ù
mysql database ´Â MySQL ÀÚü¸¦ °ü¸®Çϱâ À§ÇÑ database ·Î user Å×ÀÌºí¿¡ À¯ÀúÀ» insert ÇÏ¿© »õ·Î¿î À¯Àú¸¦
¸¸µé ¼ö ÀÖ´Ù. ¾Æ·¡´Â localhost ¿¡¼­ Á¢¼ÓÇÏ´Â mcs/mcs À¯Àú¸¦ ¸¸µå´Â °ÍÀÌ´Ù
   mysql> use mysql;
   mysql> insert into user
       -> (host,user,password,
       -> Select_priv, Insert_priv, Update_priv, Delete_priv, Create_priv, Drop_priv, Reload_priv,
       -> Shutdown_priv, Process_priv, File_priv, Grant_priv, References_priv, Index_priv, Alter_priv,
       -> Show_db_priv, Super_priv, Create_tmp_table_priv, Lock_tables_priv, Execute_priv, Repl_slave_priv, Repl_client_priv)
       -> values ('localhost', 'mcs', password('mcs'),
       -> 'Y','Y','Y','Y','Y','Y','Y',
       -> 'Y','Y','Y','Y','Y','Y','Y',
       -> 'Y','Y','Y','Y','Y','Y','Y');
   Query OK, 1 row affected (0.00 sec)

¸¸¾à ¿ø°ÝÀ¸·Î MySQL ¼­¹ö¿¡ Á¢¼ÓÇÏ·Á¸é Á¢±ÙÇÒ IP¸¦ host ·Î ÇÏ¿© À¯ÀúÀ» Ãß°¡ µî·ÏÇÏ¿©¾ß ÇÑ´Ù
¾Æ·¡´Â ¿¹Á¦·Î IP '211.204.10.72' ¿¡¼­ mcs/mcs ·Î MySQL ¼­¹ö¿¡ Á¢±ÙÇÔÀ» Çã¶ôÇϴ°ÍÀÌ´Ù  
   mysql> insert into user
       -> (host,user,password,
       -> Select_priv, Insert_priv, Update_priv, Delete_priv, Create_priv, Drop_priv, Reload_priv,
       -> Shutdown_priv, Process_priv, File_priv, Grant_priv, References_priv, Index_priv, Alter_priv,
       -> Show_db_priv, Super_priv, Create_tmp_table_priv, Lock_tables_priv, Execute_priv, Repl_slave_priv, Repl_client_priv)
       -> values ('211.204.10.72', 'mcs', password('mcs'),
       -> 'Y','Y','Y','Y','Y','Y','Y',
       -> 'Y','Y','Y','Y','Y','Y','Y',
       -> 'Y','Y','Y','Y','Y','Y','Y');
   Query OK, 1 row affected (0.00 sec)

Àß µé¾î°¬´ÂÁö ´ÙÀ½°ú °°ÀÌ È®ÀÎÇÑ´Ù
   mysql> select host, user, password from user;
   +----------------------+------+-----------------------------------------------+
   | host                 | user | password                                      |
   +----------------------+------+-----------------------------------------------+
   | localhost            | root |                                               |
   | localhost            |      |                                               |
   | myhome.ssu.ac.kr     | root |                                               |
   | myhome.ssu.ac.kr     |      |                                               |
   | localhost            | mcs  | *64bca9a399a9bd47c56eaf65b6707a3fa3f5ea7d3e41 |
   | 211.204.10.72        | mcs  | *52d3de87ce3911963c9a013706e6ed11b8b2d1910687 |
   +----------------------+------+-----------------------------------------------+
   6 rows in set (0.00 sec)

Áö±Ý±îÁö root ¶ó´Â À¯ÀúÀº ºñ¹Ð¹øÈ£¾øÀÌ MySQL ¿¡ Á¢±ÙÇߴµ¥ À§¿Í °°ÀÌ root »ý¼º½Ã ºñ¹Ð¹øÈ£°¡ ¾øÀÌ
¸¸µé¾îÁ³±â 떄¹®ÀÌ´Ù

±× ´ÙÀ½ ÀÌ »ç¿ëÀÚ°¡ Á¢±ÙÇÒ ¼ö ÀÖ´Â database ¸¦ ÁöÁ¤ÇØ¾ß ÇÑ´Ù
¾Æ·¡´Â mcs_2 ¶ó´Â database ¸¦ mcs À¯Àú°¡ Á¢±ÙÇÒ ¼ö ÀÖµµ·Ï ±ÇÇÑ°ª ÁöÁ¤ÇÏ´Â °ÍÀÌ´Ù
   mysql> insert into db
       -> (host, db, user,
       -> Select_priv, Insert_priv, Update_priv, Delete_priv, Create_priv, Drop_priv,
       -> Grant_priv, References_priv, Index_priv, Alter_priv, Create_tmp_table_priv, Lock_tables_priv)
       -> values ('%', 'mcs_2', 'mcs',
       -> 'Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y');
   Query OK, 1 row affected (0.00 sec)
  
mysql ÀÇ À¯Àú ȯ°æÀÌ º¯°æµÇ¾úÀ¸¹Ç·Î reload ½ÃŲ´Ù  
   [root root]# mysqladmin -uroot reload
  
¹æ±Ý ¸¸µç mcs À¯Àú·Î mcs_2 µ¥ÀÌÅͺ£À̽º¿¡ Á¢¼ÓÇؼ­ ½ºÅ©¸³Æ®¿¡ À§ÇØ »ý¼ºµÈ Å×À̺íÀ» º»´Ù
   [root root]# mysql -umcs -pmcs mcs_2
  
   mysql> show tables;
   +------------------------------+
   | Tables_in_mcs_2              |
   +------------------------------+
   | mcs_annotations              |
   | mcs_audit                    |
   | mcs_coll_date_attributes     |
   | mcs_coll_datetime_attributes |
   | mcs_coll_float_attributes    |
   | mcs_coll_int_attributes      |
   | mcs_coll_spatial_attributes  |
   | mcs_coll_string_attributes   |
   | mcs_coll_time_attributes     |
   | mcs_collection               |
   | mcs_creation_log             |
   | mcs_data_permissions         |
   | mcs_external_catalogs        |
   | mcs_file_date_attributes     |
   | mcs_file_datetime_attributes |
   | mcs_file_float_attributes    |
   | mcs_file_int_attributes      |
   | mcs_file_spatial_attributes  |
   | mcs_file_string_attributes   |
   | mcs_file_time_attributes     |
   | mcs_logical_file             |
   | mcs_view                     |
   | mcs_view_date_attributes     |
   | mcs_view_datetime_attributes |
   | mcs_view_float_attributes    |
   | mcs_view_int_attributes      |
   | mcs_view_mappings            |
   | mcs_view_spatial_attributes  |
   | mcs_view_string_attributes   |
   | mcs_view_time_attributes     |
   | mcs_writer                   |
   | mcs_xml_data                 |
   | mcs_xml_path                 |
   +------------------------------+
   33 rows in set (0.01 sec)  
  
6.MCS ¼³Ä¡
mcs.tar.gz À» /usr/local ¾Æ·¡¿¡ ¼³Ä¡ÇÑ´Ù
¾Æ·¡¿Í °°ÀÌ ¼³Ä¡ÇÑ´Ù¸é /usr/local/mcs µð·ºÅ丮°¡ »ý¼ºµÈ´Ù
   [root root]# tar xvfz mcs.tar.gz -C /usr/local

MCS ¸¦ ¼³Ä¡ÇÑ µð·ºÅ丮·Î À̵¿ÇÏ¿© setenv.sh À» ¼öÁ¤ÇÑ´Ù
(¸Ç À§ÁÙÀÇ MCS_HOME='pwd' ¸¦ MCS_HOME=/usr/local/mcs ·Î¸¸ ¹Ù²Ùµµ ÀúÀåÇÑ´Ù)
   [root root]# cd /usr/local/mcs
   [root mcs]# vi setenv.sh
   MCS_HOME=/usr/local/mcs
   ...
  
ÀÌ setenv.sh ¸¦ ·Î±×ÀÎ ¶§¸¶´Ù ½ÇÇàÇÒ ¼ö ÀÖµµ·Ï .bash_profile ¿¡ ´ÙÀ½À» µî·ÏÇÑ´Ù
   . /usr/local/mcs/setenv.sh

MCS ÀÇ lib ·Î À̵¿ÇÏ¿© ¾î¶² ÆÄÀϵéÀÌ ÀÖ´ÂÁö º»´Ù
   [root root]# cd /usr/local/mcs/lib
   [root lib]# ls -la

lib µð·ºÅ丮¿¡¼­ ´ÙÀ½ 4°³ÀÇ ÆÄÀÏÀ» Á¦¿ÜÇÑ ³ª¸ÓÁö ÆÄÀϵéÀ» »èÁ¦ÇÑ´Ù
(ÀÌÀ¯´Â mcs.tar.gz ¿¡ axis, xerces °¡ ÇÔ²² µé¾îÀִµ¥ ¿À·¡µÈ ¹öÀüÀ̸ç À§¿¡¼­ ÀÌ¹Ì ÃÖ½ÅÆÇÀ» ¼³Ä¡Çß´Ù)
   java-getopt-1.0.9.jar
   mcs.jar
   mysql-connector-java-3.0.8-stable-bin.jar
   ogsadai.jar

À§ lib ÀÇ 4°³ ÆÄÀÏÀ» ¸ðµÎ tomcat ÀÇ webapps/axis/WEB-INF/lib ·Î À̵¿ ½ÃŲ´Ù
   [root lib]# mv * /usr/java/jakarta-tomcat-4.1.27/webapps/axis/WEB-INF/lib

tomcat ÀÇ webapps/axis/WEB-INF/lib ÀÇ ¸ðµç ÆÄÀÏÀ» mcs ÀÇ lib ·Î º¹»çÇÑ´Ù
   [root lib]# cp /usr/java/jakarta-tomcat-4.1.27/webapps/axis/WEB-INF/lib/* /usr/local/mcs/lib

MCS ÀÇ etc ·Î À̵¿ÇÏ¿© mcs.properties ÆÄÀÏÀ» ¾Æ·¡Ã³·³ ¼öÁ¤ÇÑ´Ù
ÀÌ°ÍÀº Á¢¼ÓÇÏ·Á´Â tomcat ÁÖ¼Ò¿Í MySQL Á¤º¸ÀÌ´Ù
   [root root]# cd /usr/local/mcs/etc
   [root etc]# vi mcs.properties
   mcs_host = localhost
   mcs_port = 8080  
   mysql_host = localhost
   mysql_user = mcs
   mysql_pass = mcs
   mysql_database = mcs_2
   mysql_port = 3306

¹æ±Ý ¼öÁ¤ÇÑ mcs.properties ÆÄÀÏÀ» tomcat ÀÇ conf ÆÄÀÏ·Î º¹»çÇÑ´Ù
   [root etc]# cp mcs.properties /usr/java/jakarta-tomcat-4.1.27/conf

MCS ÀÇ etc ¿¡ ÀÖ´Â deploy.wsdd ÆÄÀÏÀ» ¾Æ·¡Ã³·³ ¼öÁ¤ÇÑ´Ù
(value="conf/MCS.bindas" À» ã¾Æ value="conf/mcs.properties" ·Î ¼öÁ¤Çϴ°ÍÀÌ´Ù)
   [root etc]# vi deploy.wsdd
   <parameter name="PropertyFilePath" value="conf/mcs.properties"/>

MCS ÀÇ setenv.sh ¸¦ ½ÇÇàÇÏ¿© CLASSPATH ¸¦ ¼³Á¤ÇÑ´Ù
   [root etc]# source /usr/local/mcs/setenv.sh

tomcat ÀÌ Á¾·áµÇ¾î ÀÖ´Ù¸é ´Ù½Ã ½ÇÇà½ÃŲ´Ù
   [root etc]# $CATALINA_HOME/bin/startup.sh

MCS ¸¦ ¾Æ·¡¿Í °°ÀÌ tomcat ÀÇ axis À¬¼­ºñ½º·Î deploy ½ÃŲ´Ù  
   [root etc]# java org.apache.axis.client.AdminClient
   -lhttp://localhost:8080/axis/services/AdminService deploy.wsdd
   Processing file deploy.wsdd
   <Admin>Done processing</Admin>
  
´Ù½Ã http://localhost:8080/axis/index.html ¸¦ ¹æ¹®ÇÏ¿© "View the list of deployed Web services"
ºÎºÐÀ» Ŭ¸¯Çغ»´Ù. Á»Àü¿¡ deploy ½ÃŲ MCS À¬¼­ºñ½º¿Í ±×°ÍÀÇ ¸Þ¼Òµå ¸®½ºÆ®°¡ Ãß°¡µÇ¾î º¸ÀÏ°ÍÀÌ´Ù
  .AdminService (wsdl)
    AdminService
  .Version (wsdl)
    getVersion  
  .MetaDataCatalogService (wsdl)
    mdcGetAttributes
    mdcGetUserAttributes
    mdcQuery
    mdcList
    mdcParent
    mdcCreate
    mdcModifyAttributes
    mdcModifyXML
    mdcDelete
    mdcAnnotate
    mdcAuthorize
    mdcViewAdd
    mdcCollAdd
    mdcGetXML
    mdcCreateDB  
Âü°í·Î undeploy ½ÃÅ°·Á¸é ¾Æ·¡¿Í °°ÀÌ ÇÏ¸é µÈ´Ù
   [root etc]# java org.apache.axis.client.AdminClient
   -lhttp://localhost:8080/axis/services/AdminService undeploy.wsdd
      
7.MCS command line ¸í·É¾î Å×½ºÆ®
logical file »ý¼º
   [root root]# java -Dmcs.home=/usr/local/mcs org.globus.mcs.client.noweb.toolkit.create -l lfn0
  
logical file ¸®½ºÆ® º¸±â
   [root root]# java -Dmcs.home=/usr/local/mcs org.globus.mcs.client.noweb.toolkit.list -l

logical file ¿¡ user defined attribute Ãß°¡Çϱâ
   [root root]# java -Dmcs.home=/usr/local/mcs org.globus.mcs.client.noweb.toolkit.add_att -l lfn0 location string seoul
  
logical file ÀÇ ¸ðµç attributes º¸±â
   [root root]# java -Dmcs.home=/usr/local/mcs org.globus.mcs.client.noweb.toolkit.listattributes -l lfn0

logical file ÀÇ Æ¯Á¤ attribute ·Î °Ë»öÇϱâ
   [root root]# java -Dmcs.home=/usr/local/mcs org.globus.mcs.client.noweb.toolkit.query -l location string seoul
  
logical file »èÁ¦
   [root root]$ java -Dmcs.home=/usr/local/mcs org.globus.mcs.client.noweb.toolkit.delete -l lfn0
  
8.MCS ¿¹Á¦¼Ò½º Å×½ºÆ®
÷ºÎÇÑ ¼Ò½ºÆÄÀÏ(MCSdemo.java)À» ÀÓÀÇÀÇ µð·ºÅ丮¿¡¼­ ÄÄÆÄÀÏÇÏ¿© ½ÇÇàÇغ»´Ù
   [root root]# javac MCSdemo.java
   [root root]# java -Dmcs.home=/usr/local/mcs MCSdemo
  
* MCS ´Â ¿ø·¡ À¬¼­ºñ½º ÇüÅ·Π¿î¿µµÇ¾î¾ß Çϴµ¥ ¼³Ä¡¹®¼­¸¦ ¸¸µé ´ç½Ã±îÁöµµ ¼º°øÇÏÁö ¸øÇß½À´Ï´Ù
À§ÀÇ ¿¹Á¦µµ noweb ¸¸ ½ÇÇàÇÏ´Â ÀÌÀ¯°¡ web ºÎºÐÀº NullPoint Exception ÀÌ ¹ß»ýÇÏ¿© Å×½ºÆ® Çغ¸Áö
¸øÇ߱⠶§¹®ÀÔ´Ï´Ù. mcs ¹èÆ÷ »çÀÌÆ®¿¡ ÀÖ´Â ¸ÞÀÏ·Î ¹®ÀǸ¦ ÇÏ¸é ´äº¯À» Àß ÁÖ±â´Â Çϳª ÀÚ¼¼ÇÑ
¼³¸íÀÌ ¾ø¾î tomcat ÀÇ È¯°æ¼³Á¤ ¹®Á¦ÀÎÁö mcs ÀÇ ¹®Á¦ÀÎÁö´Â ÆÇ´ÜÇÒ ¼ö ¾ø¾ú½À´Ï´Ù
Ȥ½Ã mcs ¸¦ web À¸·Î ½ÇÇàÇϴµ¥ ¼º°øÇϽŠºÐÀÌ °è½Ã´Ù¸é Àú¿¡°Ôµµ ÇѼö °¡¸£Ä§À» ÁÖ¼¼¿ä...^^






4   [GRID] [°­ÁÂ] Globus Toolkit 3.0.2 + SimpleCA ¼³Ä¡  ±è¿µ´ë 2003/11/27 8100 1472
3   [GRID] [°­ÁÂ] GridFTP ¸¦ xinetd ¼­ºñ½º·Î µî·ÏÇÏ¿© »ç¿ëÇÏ±â  ±è¿µ´ë 2003/12/02 7681 1978
2   [GRID] [°­ÁÂ] Replica Location Service (RLS) ¼³Ä¡  ±è¿µ´ë 2003/11/29 7428 1903
  [GRID] [°­ÁÂ] Metadata Catalog Service (MCS) ¼³Ä¡  ±è¿µ´ë 2003/11/29 7320 1784

1
 

Copyright 1999-2024 Zeroboard / skin by zero