Register direct
Home Software Registrar Installation Advice
CoCCA Registrar | Install Advice

Centos/Redhat/Fedora
Tested on Centos5

Prerequisites
- Postgresql (Database)
- Java (Java JDK)
- Resin (Websever)

1.0 Installing Prerequisites

Create a folder and work inside it to keep things tidy

mkdir cocca
cd cocca

1.1 POSTGRESQL
Info on Postgresql can be found: yum info postgresql

We need Postgres 8.3 at least, so wget http://yum.pgsqlrpms.org/reporpms/8.3/pgdg-centos-8.3-7.noarch.rpm, and install it (rpm -i pgdg-centos-8.3-7.noarch.rpm )

Then..

yum -y install postgresql-server
yum -y install postgresql-contrib
chkconfig postgresql on
service postgresql start

1.2 JAVA
JDK ( NOT JRE - to get from a browser go to - http://java.sun.com/javase/downloads/index.jsp look for "JDK 6 Update "X" - get the latest)

Java - Linux RPM (self-extracting file) can be found here: http://java.sun.com/javase/downloads/index.jsp

Download the JDK version (eg. JDK 6 Update "X"), by clicking on Download
Change Platform to Linux and accept the License Agreement
Download the Linux RPM in self-extracting file (eg. jdk-6u10-linux-i586-rpm.bin)
cd ~/cocca
wget -O java.bin -c "<Paste Java JDK Download Link Here>"
chmod +x java.bin
./java.bin

1.3 RESIN
Info on Resin can be found here http://caucho.com/resin/doc/

1.3.1 Installing Resin

wget "http://caucho.com/download/resin-3.1.6.tar.gz"
tar -zxvf resin-3.1.6.tar.gz
Setting Up Resin in /usr/local directory
mv resin-3.1.6 /usr/local/resin
cd /usr/local/resin/
./configure --with-java-home="/usr/java/jdk1.6.0_10"
make && make install

1.3.2 Testing Resin

export JAVA_HOME="/usr/java/jdk1.6.0_10/"
export CLASSPATH="/usr/java/jdk1.6.0_10/bin"
/usr/local/resin/bin/httpd.sh

Test resin by browsing to: http://your-server-ip:8080

1.3.3 Creating Resin start up script

cp contrib/init.resin /etc/rc.d/init.d/resin
vi /etc/rc.d/init.d/resin
verify that: JAVA_HOME="/usr/java/jdk1.6.0_10"
chmod +x /etc/rc.d/init.d/resin
chkconfig resin on
service resin start

For those who have the following error: log_daemon_msg: command not found

vim /etc/rc.d/init.d/resin
comment the following lines:
30,32 and 59
that is:
#if test -r /lib/lsb/init-functions; then
. /lib/lsb/init-functions
#else
#fi
service resin restart



 

2.0 Installing CoCCa Registar Software

cd ~/cocca

2.1 Database preparation
Create two databases, one for a dns server and one for the main registrar functionality.

su - postgres
createdb registrar
createdb pdns
createuser -P -s -e cocca (any username of your choice, please make note of the username/password)
psql
create role pdns; (role is needed, do not change !!!)
\q
exit

Allowing network connection

vim /var/lib/pgsql/data/pg_hba.conf
At the end of the file comment out:
local all all ident sameuser
host all all 127.0.0.1/32 ident sameuser
host all all ::1/128 ident sameuser
replace with:
local all all trust
host all all 127.0.0.1/32 trust
host all postgres 127.0.0.1/32 trust
host registrar cocca 127.0.0.1/32 trust
host pdns cocca 127.0.0.1/32 trust

Restart postgresql

service postgresql restart

2.2 Download registrar software

Download CoCCA Registrar software - https://ote.coccaregistry.net/downloads/

unzip CoCCARegistrarTools-v1.x_Production.zip
cd CoCCARegistrarTools/lib/
cp dependencies/postgresql-8.3-603.jdbc4.jar /usr/local/resin/lib/
mv /usr/local/resin/webapps/ROOT /usr/local/resin/webapps/ROOT.old
cp Registrar.war /usr/local/resin/webapps/ROOT.war

2.3 Configure Resin
Configure resin to use ssl

2.3.1 Creating Web Server Certificate

cd /usr/local/resin/
mkdir keys
cd keys

Create a keystore file that will expire in 5 years (1825 days)

/usr/java/jdk1.6.0_10/bin/keytool -genkey -keyalg RSA -validity 1825 -keystore server.keystore

2.3.2 Configure Resin to use HTTP and HTTPS

vim /usr/local/resin/conf/resin.conf
change:
<server-default>
<!-- The http port -->
<http address="*" port="8080"/>
to:
<server-default>
<!-- The http port -->
<http server-id="" host="*" port="80"/>
<http server-id="" host="*" port="443">
<jsse-ssl>
<key-store-type>jks</key-store-type>
<key-store-file>/usr/local/resin/keys/server.keystore</key-store-file>
<password>password-used-to-generate-file</password>
</jsse-ssl>
</http>

2.3.3 Include database elements and certificate in Resin
You can put database elements inside a specific <host> element (e.g. <host id="" root-directory=".">), or just before the <host-default> element.
Place certificate elements anywhere beneath the resin tag, but not in a place enclosed by another tag

Here an example (snippet from resin.conf)

<!--
- For security, set the HttpOnly flag in cookies.
- <cookie-http-only/>
-->
</web-app-default>
<!-- includes the app-default for default web-app behavior -->
<resin:import path="${resin.home}/conf/app-default.xml"/>
<!-- ********************** Begin - required for CoCCA Registrar ***************** -->

<context-param>
<param-name>RegistrarID</param-name>
<param-value>1</param-value>
</context-param>

<database>
<jndi-name>jdbc/registrar</jndi-name>
<driver>
<type>org.postgresql.Driver</type>
<url>jdbc:postgresql://localhost/registrar</url>
<user>cocca</user>
<password>cocca_password</password>
</driver>
</database>
<database>
<jndi-name>jdbc/pdns</jndi-name>
<driver>
<type>org.postgresql.Driver</type>
<url>jdbc:postgresql://localhost/pdns</url>
<user>cocca</user>
<password>cocca_password</password>
</driver>
</database>

<system-property javax.net.ssl.trustStoreType="jks"/>
<system-property javax.net.ssl.trustStore="/usr/local/CoCCAtools/EPP Server/epp/cert/cocca.tools.keystore"/>
<system-property javax.net.ssl.trustStorePassword="123456"/>

<!-- ********************** End - required for CoCCA Registrar ***************** -->
<!--
- Sample database pool configuration
-
- The JDBC name is java:comp/env/jdbc/test

Restart Resin

service resin restart

Access your site by browsing to https://your-server-ip or by https://your-server-address