Skip to content

NingQ/rdap

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Install Instruction

Tested Operating environment:Red Hat Enterprise Linux Server release 5.3, CentOS release 5.7, Win7, Win8, OS X 10.8.4.

  1. Install JDK6, or higher version. (Skip this step if already installed)

    [Download JDK6] (http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javase6-419409.html) , Install JDK6, or higher verison.

    For OS X,you should use JDK7 or higher version.

  2. Install Mysql5, or higher version. (Skip this step if already installed)

    Download and Install Mysql5 or higher version.

    You must get (from DBA) or generate an Mysql user/password pair, used to access RDAP database, and this user must has CREATE/DROP/SELECT/INSERT/UPDATE/DELETE/INDEX/ALTER database/table/index privilege. For Mysql privilege please ref here.

  3. Install Tomcat7, or higher version. (Skip this step if already installed)

    Download and Install Tomcat7 or higer version, and HTTP port use default port 8080 (see here if use other port).

    Installed Tomcat root folder called '$TOMCAT_HOME', which contains folders:bin,conf,lib,webapps,etc.

    For OS X,you should use tar.gz formated Binary Distributions.

  4. Get war file 'rdap.war'.

    There are two methods to get war file

    • Get war file builded by JDK6.
    • Build war file from source
        [in Linux/OS X, open a shell and execute command:]
        	cd $WORK_DIR/rdap-master/rdap-webapp		# $WORK_DIR must be replaced by real dir
        	mvn package -Dmaven.test.skip=true	# mvn must in system variable. Option '-Dmaven.compiler.target' can be used for higher jdk version, such as '-Dmaven.compiler.target=1.7' for jdk7
        [in Windows7 or Windows8, open command prompt window and execute command:]
        	cd $WORK_DIR/rdap-master/rdap-webapp		# $WORK_DIR must be replaced by real dir
        	mvn.bat package -Dmaven.test.skip=true # mvn.bat must in system variable
        (target/rdap.war  is the build war file)
      
      
  5. Deploy rdap.war to tomcat.

    • Create folder 'rdap' in dir $TOMCAT_HOME/webapps/
    • Unzip rdap.war to $TOMCAT_HOME/webapps/rdap/
    • Edit database configuration file $TOMCAT_HOME/webapps/rdap/WEB-INF/classes/jdbc.properties, see here
    • Edit global configuration file $TOMCAT_HOME/webapps/rdap/WEB-INF/classes/rdap.properties, see here
  6. Init database.

    This step will create database called 'rdap', and create schema, and you can insert test data into it.

    There are two methods to init, if you are familiar with Mysql, you may use the first method, and if not you should use second.

    • Use Mysql client to init

      • Login mysql server use mysql client, $MYSQL_USERNAME must be replaced by real Mysql username.
        cd $MYSQL_HOME     #$MYSQL_HOME must be replaced by real Mysql home dir
        [in Linux/OS X, open a shell and execute command:]
       		mysql -h127.0.0.1 -u$MYSQL_USERNAME  -p
        [in Windows, open command prompt window and execute command:]
        	mysql.exe -h127.0.0.1 -u$MYSQL_USERNAME  -p	
      
      DROP DATABASE IF EXISTS `rdap`;
      CREATE DATABASE `rdap` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_bin */;
      use `rdap`;
      source init-schema.sql;    # init database schema
      source init-data.sql;	  #init base data 
      
      [If you want load some test data, execute following command:]
      source test-data.sql;    #insert test data
      
    • Use init tool to init

      This step will use database info in jdbc.properties you haved configured before.

      WARN: this step will DROP database of 'jdbc.url.dbName' if it is existing, and then recreate it.

        cd $TOMCAT_HOME/webapps/rdap/WEB-INF/classes
        CLASSPATH=.:$CLASSPATH
        java -Djava.ext.dirs=../lib cn.cnnic.rdap.init.Init initschema      #DROP database 'jdbc.url.dbName', and recreate it, and create table, load base data.
       	[If you want load some test data, execute following command:]
        java -Djava.ext.dirs=../lib cn.cnnic.rdap.init.Init initdata  init/mysql/test-data.sql      
      
  7. Start up tomcat

    • Start up tomcat

        [in Linux/OS X, open a shell and execute command:]
        	cd $TOMCAT_HOME		#$TOMCAT_HOME must be replaced by real dir
        	bin/startup.sh
        [in Windows, open command prompt window and execute command:]
        	cd $TOMCAT_HOME/bin		#$TOMCAT_HOME must be replaced by real dir
        	startup.bat
      
    • Test if it is runing ok

      curl -H Accept:application/rdap+json http://$RDAP_SERVER_IP:$RDAP_SERVER_PORT/rdap/autnum/2100
      

    It's ok if response contains 'rdapConformance'.

Api Doc

Api Doc

Known Issues

Known Issues

License

Simplified BSD License

Contribute

We love contributions! You can fork us on github.Please refer to contribution guidelines for details.

Any questions please create issue with details.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published