Overview

DNS cache poisoning to redirect a site to alternate address using dnscache and tinydns

Requirements

  • Centos ( or any other Unix/Linux ) Server running dnscache and tinydns
  • Atleast 1 configured IP address on which dnscache/tinydns is running :: Let it be 192.168.1.2
  • A domain that we want to redirect :: Let it be exampledomain.com

Configuration

Step 1

Install tinydns and dnscache, click on below links for help

Step 2

Add the site you want to direct to dnscache as below, so that it will look up the IP inside

root@serv:~# echo “192.168.1.2” > /etc/dnscache/root/servers/exampledomain.com

Step 3

Make records for the domain on tinydns to redirect it to the desired address ( here i’m pointing it to 192.168.1.2 itself )

root@serv:~# cd /etc/tinydns/root/
root@serv:~# add-ns ns1.exampledomain.com 192.168.1.2
root@serv:~# add-host exampledomain.com 192.168.1.2
root@serv:~# make

Step 3

Kill and restart the services and bring the changes into effect

root@serv:~# svc -t /service/*

With this the machines that are using 192.168.1.2 as dns server will get pointed to the IP 192.168.1.2 when accessing exampledomain.com

Overview

Installing tinydns server and setting up a domain on it .

Requirements

  • Centos server ( any other Linux/Unix distro can be used )
  • Atleast 1 configured IP address :: Let it be 192.168.1.2
  • A domain :: Let it be exampledomain.com

Installation

ucspi-tcp is a public domain Unix TCP command-line tool it must be installed for running tinydns. Daemontools must be installed for monitoring and supervising tinydns.

Step 1

Install ucspitcp and daemontools

root@serv:~# yum install make gcc

root@serv:~# cd /usr/src
root@serv:~# wget http://www.qmail.org/moni.csi.hu/pub/glibc-2.3.1/daemontools-0.76.errno.patch
root@serv:~# wget http://www.qmail.org/moni.csi.hu/pub/ucspi-tcp-0.88.errno.patch

root@serv:~# wget http://cr.yp.to/ucspi-tcp/ucspi-tcp-0.88.tar.gz
root@serv:~# tar -vxzf ucspi-tcp-0.88.tar.gz
root@serv:~# cd ucspi-tcp-0.88
root@serv:~# echo “gcc -O2 -include /usr/include/errno.h” > conf-cc
root@serv:~# patch -p1 < /usr/src/ucspi-tcp-0.88.errno.patch
root@serv:~# make
root@serv:~# make install

root@serv:~# mkdir -p /package
root@serv:~# chmod 1755 /package
root@serv:~# cd /package
root@serv:~# wget http://cr.yp.to/daemontools/daemontools-0.76.tar.gz
root@serv:~# tar -zxvf daemontools-0.76.tar.gz
root@serv:~# rm daemontools-0.76.tar.gz
root@serv:~# cd admin/daemontools-0.76
root@serv:~# patch -p1 < /usr/src/daemontools-0.76.errno.patch
root@serv:~# package/install

Step 2

Install djbdns package

root@serv:~# cd /usr/src/
root@serv:~# wget http://cr.yp.to/djbdns/djbdns-1.05.tar.gz
root@serv:~# tar -xf djbdns-1.05.tar.gz
root@serv:~# cd djbdns-1.05
root@serv:~# echo gcc -O2 -include /usr/include/errno.h > conf-cc
root@serv:~# make
root@serv:~# make setup check

Configuration

Configure tinydns to listen on IP 192.168.1.2

root@serv:~# useradd dnslog
root@serv:~# useradd tinydns
root@serv:~# tinydns-conf tinydns dnslog /etc/tinydns 192.168.1.2

Add a domain to tinydns

root@serv:~# cd /etc/tinydns/root/
root@serv:~# add-ns ns1.exampledomain.com 192.168.1.2
root@serv:~# add-host exampledomain.com 192.168.1.2
root@serv:~# make

Add it to svscan to keep the service under monitoring

root@serv:~# ln -s /etc/tinydns /service/tinydns
root@serv:~# svc -d /service/tinydns
root@serv:~# svc -u /service/tinydns

Main Log file

/service/tinydns/log/main/current

External DNS cache and resolver using djbdns

Overview

A howto on building a DNS caching and Resolving server with dnscache. This server will resolve and cache DNS requests from root servers for other networks/machines.

Scenario : For example all machines of network 10.20.x.x will be using this server with IP 192.168.2.1 for DNS resolution.

Requirements

  • Centos server ( any other Linux/Unix distro can be used )
  • Atleast 1 configured public IP address :: Let it be 192.168.2.1 ( you need to do configure a proper IP )

Installation

daemontools must be installed for monitoring and supervising dnscache

Step 1

Install daemontools

root@serv:~# yum install make gcc

root@serv:~# cd /usr/src
root@serv:~# wget http://www.qmail.org/moni.csi.hu/pub/glibc-2.3.1/daemontools-0.76.errno.patch

root@serv:~# mkdir -p /package
root@serv:~# chmod 1755 /package
root@serv:~# cd /package
root@serv:~# wget  http://cr.yp.to/daemontools/daemontools-0.76.tar.gz
root@serv:~# tar -zxvf daemontools-0.76.tar.gz
root@serv:~# rm daemontools-0.76.tar.gz
root@serv:~# cd admin/daemontools-0.76
root@serv:~# patch -p1 < /usr/src/daemontools-0.76.errno.patch
root@serv:~# package/install

Step 2

Install djbdns package

root@serv:~# cd /usr/src/
root@serv:~# wget http://cr.yp.to/djbdns/djbdns-1.05.tar.gz
root@serv:~# tar -xf djbdns-1.05.tar.gz
root@serv:~# cd djbdns-1.05
root@serv:~# echo gcc -O2 -include /usr/include/errno.h > conf-cc
root@serv:~# make
root@serv:~# make setup check

Configuration

You need to configure dnscache to listen to the IP configured on your server so that external machines can use it as resolver IP

root@serv:~# useradd dnslog
root@serv:~# useradd dnscache
root@serv:~# dnscache-conf dnscache dnslog /etc/dnscache 192.168.2.1

Add it to svscan to keep the service under monitoring

root@serv:~# ln -s /etc/dnscache /service/dnscache
root@serv:~# svc -d /service/dnscache
root@serv:~# svc -u /service/dnscache

Authorize the external network that want to use the server as a DNS resolver ( as an example  10.20.x.x )

root@serv:~# touch /etc/dnscache/root/ip/10.20

Client Configuration

You will be able to use the IP 192.168.2.1 as DNS nameserver on all machine of network 10.20.x.x

Log file

/service/dnscache/log/main/current

OCFS2 cluster filesystem

Overview

Setting up a shared file system on SAN with OCFS2

Requirements & Scenario

Two High Availability Centos servers sharing same SAN partition

Server 1 (192.168.1.1) |————| SAN |————-| ( 192.168.1.2) Server 2

Objective

Installation of OCFS2 filesystem, a shared cluster file system on SAN partition for parallel I/O

Configuration

Follow all these steps on the two server except the one step specifically mentioned.

Step 1

Install OCFS2 packages. You have to follow the same steps on the two clustered servers.

root@serv:~# yum install glib2-devel.x86_64 e2fsprogs-devel.x86_64

root@serv:~# wget http://oss.oracle.com/projects/ocfs2/dist/files/RedHat/RHEL5/x86_64/1.4.7-1/2.6.18-194.el5/ocfs2-2.6.18-194.el5-1.4.7-1.el5.x86_64.rpm

root@serv:~# wget http://oss.oracle.com/projects/ocfs2-tools/dist/files/RedHat/RHEL5/x86_64/1.4.4-1/ocfs2-tools-1.4.4-1.el5.x86_64.rpm

root@serv:~# wget http://oss.oracle.com/projects/ocfs2-tools/dist/files/RedHat/RHEL5/x86_64/1.4.4-1/ocfs2-tools-devel-1.4.4-1.el5.x86_64.rpm

root@serv:~# rpm -ivh ocfs2-tools-devel-1.4.4-1.el5.x86_64.rpm ocfs2-tools-1.4.4-1.el5.x86_64.rpm ocfs2-2.6.18-194.el5-1.4.7-1.el5.x86_64.rpm

Step 2

Formatting partition. Format the san partition from one of the nodes ( do this from only one of the servers )

root@serv:~# mkfs.ocfs2 /dev/sdc1

Step 3

Edit fstab and add the partition

root@serv:~# vi /etc/fstab

/dev/sdc1	/dir	ocfs2	_netdev		0	0

Step 4

Configuring the ocfs2 . Add the below lines to /etc/ocfs2/cluster.conf

root@serv:~# mkdir /etc/ocfs2
root@serv:~# vi /etc/ocfs2/cluster.conf

node:
ip_port = 7777
ip_address = 192.168.1.1
number = 0
name = node1.cluster.com
cluster = ocfs2

node:
ip_port = 7777
ip_address = 192.168.1.2
number = 1
name = node2.cluster.com
cluster = ocfs2
cluster:
node_count = 2
name = ocfs2

set O2CB_ENABLED as true on /etc/default/o2cb

root@serv:~# vi /etc/default/o2cb
O2CB_ENABLED=true

Step 5

Configure o2cb, O2CB is the cluster stack of ocfs2 and it need to be configured before starting ocfs2

remove the below lines from /etc/init.d/o2cb

root@serv:~# vi /etc/init.d/o2cb

### BEGIN INIT INFO
# Provides: o2cb
# Required-Start:
# Should-Start:
# Required-Stop:
# Default-Start: 2 3 5
# Default-Stop:
# Description: Load O2CB cluster services at system boot.
### END INIT INFO

root@serv:~# chkconfig –del o2cb
root@serv:~# /etc/init.d/o2cb offline ocfs2
root@serv:~# /etc/init.d/o2cb unload
root@serv:~# /etc/init.d/o2cb configure

Hit enter for the questions asked and it will keep the default value

root@serv:~# /etc/init.d/o2cb load
root@serv:~# /etc/init.d/o2cb online ocfs2
root@serv:~# /etc/init.d/ocfs2 start
root@serv:~# chkconfig –add o2cb
root@serv:~# chkconfig –add ocfs2

You have configured the cluster filesystem, try some write checks from two servers on the clustered partition, keep an eye on the logs also.

LAMP installation from source

Overview

Installing Apache ( 2.2.17 ) , Mysql ( 5.1.54 ) and php ( 5.3.4 ) on a Centos server.

Requirements

Centos Server

Objective

Building from source an optimised/light Apache-Mysql-PHP on top of Centos server

Configuration

Step 1

Install Mysql

root@serv:~# groupadd mysql

root@serv:~# useradd -r -g mysql mysql

root@serv:~# cd /usr/local

root@serv:~# wget http://dev.mysql.com/get/Downloads/MySQL-5.1/mysql-5.1.54-linux-i686-glibc23.tar.gz/from/http://mysql.easynet.be/

root@serv:~# gunzip < /usr/local/mysql-5.1.54-linux-i686-glibc23.tar.gz | tar xvf –

root@serv:~# ln -s /usr/local/mysql-5.1.54-linux-i686-glibc23 mysql

root@serv:~# cd mysql

root@serv:~# chown -R mysql .

root@serv:~# chgrp -R mysql .

root@serv:~# scripts/mysql_install_db –user=mysql

root@serv:~# chown -R root .

root@serv:~# chown -R mysql data

root@serv:~# cp /usr/local/mysql/support-files/my-small.cnf /etc/my.cnf

root@serv:~# bin/mysqld_safe –user=mysql &

root@serv:~# cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysql

root@serv:~# ln -s /usr/local/mysql/bin/* /usr/bin/

Step 2

Install Apache , also install the dependent packages and compilers. You have to install the below packages for the most needed compile options that I have used.

root@serv:~# yum install gcc zlib-devel openssl-devel make

root@serv:~# cd /usr/local/src/

root@serv:~# wget http://www.alliedquotes.com/mirrors/apache//httpd/httpd-2.2.17.tar.bz2

root@serv:~# tar -jxvf httpd-2.2.17.tar.bz2

root@serv:~# cd /usr/local/src/httpd-2.2.17

root@serv:~# ./configure –prefix=/usr/local/apache –host=i686-redhat-linux-gnu –build=i686-redhat-linux-gnu –target=i386-redhat-linux  –enable-deflate –enable-proxy –enable-proxy-http—enable-proxy-connect –enable-so –enable-cgi –enable-info –enable-rewrite –enable-speling –enable-usertrack –enable-deflate –enable-mime-magic –enable-ssl

root@serv:~# make

root@serv:~# make install

Step 3

Install php, as we did before you need to install the dependencies before the php installation

root@serv:~# cd /usr/local/src/

root@serv:~# wget http://in2.php.net/get/php-5.3.4.tar.bz2/from/us.php.net/mirror

root@serv:~# tar -jxvf php-5.3.4.tar.bz2

root@serv:~# cd /usr/local/src/php-5.3.4/

root@serv:~# yum install libxml2-devel pcre-devel bzip2-devel curl-devel libjpeg-devel libpng-devel libXpm-devel libc-client-devel libmcrypt-devel libmcrypt-devel expat-devel

root@serv:~# ./configure –with-apxs2=/usr/local/apache/bin/apxs –enable-bcmath –enable-calendar –enable-ftp –enable-libxml –enable-magic-quotes –enable-pdo=shared –enable-soap –enable-sockets –enable-zip –prefix=/usr –with-bz2 –with-curl=/opt/curlssl/ –with-gd –with-imap=/opt/php_with_imap_client/ –with-imap-ssl=/usr –with-jpeg-dir=/usr –with-kerberos –with-libexpat-dir=/usr –with-libxml-dir –with-libxml-dir –with-mcrypt=/opt/libmcrypt/ –with-mhash=/opt/mhash/ –with-mysql=/usr/local/mysql/ –with-mysql-sock –with-openssl=/usr –with-openssl-dir=/usr –with-pcre-regex –with-pdo-mysql=shared –with-pdo-sqlite=shared –with-png-dir=/usr –with-sqlite=shared –with-xmlrpc –with-xpm-dir=/usr –with-zlib –with-zlib-dir=/usr

root@serv:~# make

root@serv:~# make install
Step 4

Configure php to phrase .php extension as php

root@serv:~# vi /usr/local/apache/conf/httpd.conf

find the line “LoadModule php5_module modules/libphp5.so” add the below line after it.
AddType application/x-httpd-php .php

root@serv:~# /usr/local/apache/bin/apachectl restart

Step 5

That is it, you can now test your installation

echo “<?php phpinfo(); ?> ” > /usr/local/apache/htdocs/phpinfo.php

Access and check your phpinfo page with,
http://your_server_ip/phpinfo.php

Trac installation with mod_python

Overview

Installing trac on a server with Apache and mod_python

Requirements

Tested with the below ,

Apache 2.2
Mysql 5.0

Objective

Installing trac and apache module mod_python for a project system on a domain subdirectory

Configuration

Step 1

Make sure that you have the required version of python , flew, setuptools and mysql-python installed.
This installation was done on a DirectAdmin server and it had python version as Python 2.4.3, so had to install a secondary python of version 2.5 on a different location

To install python 2.5

root@serv:~# cd /usr/local/src
root@serv:~# mkdir -p /usr/local/TRAC/PYTHON/
root@serv:~# wget http://www.python.org/ftp/python/2.5/Python-2.5.tgz
root@serv:~# tar -zxvf Python-2.5.tgz
root@serv:~# cd Python-2.5
root@serv:~# ./configure –enable-shared –prefix=/usr/local/TRAC/PYTHON/
root@serv:~# make
root@serv:~# make install

To install flex 2.5

root@serv:~# cd /usr/local/src
root@serv:~# wget http://sourceforge.net/projects/flex/files/flex/flex-2.5.35/flex-2.5.35.tar.gz/download?use_mirror=biznetnetworks
root@serv:~# tar -zxvf flex-2.5.35.tar.gz
root@serv:~# cd flex-2.5.35
root@serv:~# ./configure
root@serv:~# make
root@serv:~# make install

To install setup tools

root@serv:~# cd /usr/local/src
root@serv:~# wget http://peak.telecommunity.com/dist/ez_setup.py
root@serv:~# /usr/local/TRAC/PYTHON/bin/python ez_setup.py

To install mysql-python

root@serv:~# cd /usr/local/src
root@serv:~# wget http://sourceforge.net/projects/mysql-python/files/mysql-python/1.2.3/MySQL-python-1.2.3.tar.gz/download?use_mirror=biznetnetworks
root@serv:~# tar -zxvf MySQL-python-1.2.3.tar.gz
root@serv:~# cd MySQL-python-1.2.3
root@serv:~# /usr/local/TRAC/PYTHON/bin/python ./setup.py install

Step 2

Linking the libraries
As you have installed the python to a custom location you have to link the libraries so as properly compile the mod_python

root@serv:~# echo “/usr/local/TRAC/PYTHON/lib/” > /etc/ld.so.conf.d/python2.5.conf
root@serv:~# ldconfig -v

Step 3

Installing trac

root@serv:~# cd /usr/local/src
root@serv:~# wget http://ftp.edgewall.com/pub/trac/Trac-0.12.1.tar.gz
root@serv:~# tar -zxvf Trac-0.12.1.tar.gz
root@serv:~# cd Trac-0.12.1/
root@serv:~# /usr/local/TRAC/PYTHON/bin/python setup.py install

Step 4

Installing mod_python and loading the module
Please note to give the apxs and python binary path correctly according to the installed location.

root@serv:~# wget http://www.ecoficial.com/apachemirror//httpd/modpython/mod_python-3.3.1.tgz
root@serv:~# tar -zxvf mod_python-3.3.1.tgz
root@serv:~# cd mod_python-3.3.1/
root@serv:~# ./configure –with-apxs=/usr/sbin/apxs –with-python=/usr/local/TRAC/PYTHON/bin/python
root@serv:~# make
root@serv:~# make install

Please make sure that the module is loaded on the proper file which is included in apache conf or you can load the module directly in the main conf file ( httpd.conf )

root@serv:~# echo “LoadModule python_module /usr/lib/apache/mod_python.so” > /etc/httpd/conf/extra/httpd-python.conf

Step 5

Creating a project
Create a mysql db/db_user and grant all privileges to the database with a password

root@serv:~# /usr/local/TRAC/PYTHON/bin/trac-admin /var/project initenv desired_projectname mysql://db_user:db_pass@localhost:3306/db_name

Step 6

Setting up a Login
Limit the access with a login

root@serv:~# htpasswd -c /var/project/ .htpasswd admin

Step 7

Setup the VirtualHost
Open your Apache VirtualHost file and add the below lines into it

<Location /project>

RewriteEngine Off  ### to override any redirect rules on .htaccess of parent directory
SetHandler mod_python
PythonInterpreter main_interpreter
PythonHandler trac.web.modpython_frontend
PythonOption TracEnv /var/project
PythonOption TracUriRoot /project
AuthType Basic
AuthName “Trac”
AuthUserFile /var/project/.htpasswd
Require valid-user

</Location>

You will be able to access the project trac now using

http://your_domain.com/project

Multiple Jboss instance with different ports

Overview

Deploying multiple instance of Jboss on a single Jboss server.

Requirements

Jboss Installation used  :: 4.2.2.GA

Objective

Run two Jboss instance on same server, on ports 80 and 8080

Configuration

Step1

On the Jboss installation server directory , make a copy of default directory

root@serv:~# cd /usr/local/jboss/server
root@serv:~# cp -rpf default node01

Step 2

Jboss has 3 set of preconfigured ports for running 3 different instance together. The default installation will be using the  ports-default set, we can use ports-01 for our node01.

To use ports-01 uncomment below lines in file /usr/local/jboss/server/node01/conf/jboss-service.xml

root@serv:~# vim /usr/local/jboss/server/node01/conf/jboss-service.xml

<mbean code=”org.jboss.services.binding.ServiceBindingManager”
name=”jboss.system:service=ServiceBindingManager”>
<attribute name=”ServerName”>ports-01</attribute>
<attribute name=”StoreURL”>${jboss.home.url}/docs/examples/binding-manager/sample-bindings.xml</attribute>
<attribute name=”StoreFactoryClassName”>
org.jboss.services.binding.XMLServicesStoreFactory
</attribute>
</mbean>

Also change serverBindPort from 4446 to 14446 in the same file

root@serv:~# sed -i  “s/4446/14446/g” — /usr/local/jboss/server/node01/conf/jboss-service.xml

Step 3

Change the port from 3873 to 13873  in deploy jboss-service.xml

root@serv:~# sed -i “s/3873/13873/” — /usr/local/jboss/server/node01/deploy/ejb3.deployer/META-INF/jboss-service.xml

Step4

Change the default listening port form the default value ( I had 80 as default ) to a custom value

changing 80 to 8080

root@serv:~# sed -i “s/80/8080/g” — /usr/local/jboss/server/node01/deploy/jboss-web.deployer/server.xml

also change Connector port  from 8019 to 8119

root@serv:~# sed -i “s/8019/8119g” — /usr/local/jboss/server/node01/deploy/jboss-web.deployer/server.xml

Step5

Now, you can run the default instance with

root@serv:~# /usr/local/jboss/bin/run.sh

and the new instance on port 8080 with

root@serv:~# /usr/local/jboss/bin/run.sh -c node01

Audit trail configuration on Alfresco 3.3

1)Overview
Audit trail configuration for alfresco 3.3 with old audit mechanism

2) Requirements
Server deployed with alfresco ( Installation method :: Jumpbox)

3) Objective

  • Enable Audit trail
  • Enable Logging

4) Configuration done

Step 1
On main property file turn audit on. Add the below two lines on alfresco-global.properties

root@serv:~# vi /opt/alfresco/tomcat/shared/classes/alfresco-global.properties

audit.enabled=true
audit.useNewConfig=false
# to use disable new config

Step 2
Turn all false values in file auditConfig.xml to true
/opt/alfresco/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/auditConfig.xml

root@serv:~# sed -i “s/false/true/g” — /opt/alfresco/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/auditConfig.xml

Step 3
You can turn logging level to debug by adding the following directives in the file log4j.properties

root@serv:~# vi /opt/alfresco/tomcat/webapps/alfresco/WEB-INF/classes/log4j.properties

# Audit debugging
log4j.logger.org.alfresco.repo.audit=DEBUG
log4j.logger.org.alfresco.repo.audit.model=DEBUG

Step 4
Stop/Start alfresco
root@home:~# /etc/init.d/alfresco stop
root@home:~# /etc/init.d/alfresco start

DirectAdmin migration

Overview

A how to for doing DirectAdmin to DirectAdmin server migration. This can assist you on  complete account migration from Oldserver to Newserver , with rsync, sysbackup and manual restoration.

Requirements

  • Basic idea of DireactAdmin files and directories
  • You must have a new server with DirectAdmin Licensed and installed
  • You must make sure that the version of Apache, php and mysql installed on both servers matches

Migration

DirectAdmin does have a utility called System Backup to backup all the needed configuration files and directories in the  server, but unfortunately it doesn’t come with a restoration tool. So we will have to do it in the manual way. Home directories will be synced and mysql databases will be backedup and restored  separately.

Step 1

Run System Backup on the old server.

System Backup

Admin Tools >> System Backup

 

We will be backuping home directories and mysql db’s manually so Uncheck and unselect the following options on System Backup

Add user home directories to directory list below

Backup httpd data

Backup MySQL Databases

Check and Select

Backup DNS data

Backup Directories and Files listed below

All directories/files listed in bottom section of the System Backup

now click on the Run System Backup Now icon . The backup will be stored mostly in /home/backup ( it will depend upon how you have set it in DA )

Step 2

rsync the system backup to the Newserver.

root@old:~# rsync -avurz -e ssh –delete /home/backup root@Newserver_IP:/home/backup

Step 3

On the Newserver restore the system backups one by one manually.

For example, for restoring your /etc/virtual directory,

root@new:~# cd /etc
root@new:~# tar xvzfp /home/backup/<backup_date>/custom/etc/virtual.tar.gz

Please check here for the complete paths and files used on a DirectAdmin system.

( Do take extra care while restoring /etc/passwd /etc/shadow /etc/group etc.. )

Step 4

Synchronise the home directory

root@old:~# rsync -avurz -e ssh –delete /home root@Newserver_IP:/home

Step 5

Backup and restore the mysql DB’s

On Oldserver

root@old:~# cat /usr/local/directadmin/conf/mysql.conf

Get the da_admin password from the above file

root@old:~# mysqldump -u da_admin -p  –all-databases > /root/all_databases.sql

root@old:~# scp /root/all_databases.sql root@Newserver_IP:/root

On Newserver

root@new:~# cat /usr/local/directadmin/conf/mysql.conf

root@new:~# mysql -u da_admin -p < /root/all_databases.sql

Step 6

Use the ipswap script to change the Oldserver IP’s

root@new:~# cd /usr/local/direactadmin/scripts/

root@new:~# ./ipswap.sh Oldserver_IP  Newserver_IP

Step 7

Update the nameservers to the Newserver IP’s.

Step 8

To resolve all the queries correctly to the new server . You will have to setup the multi server dns clustering on the new server

Multi Server Setup

on, Add Remote Server

Input the Oldserver IP , login :  admin and password

IP:

Port:

 

 

SSL:

 

 

Username:

Password:

 

 

Click Add

next on, List of External Servers

Zone Transfer:
Domain Check:

select the server

Click connections “Test Connection(s)”  to check the connection.

If the test runs OK, Turn Multi Server On on the top

and run the below to sync the zone files

root@new:~# echo “action=rewrite&value=named” >> /usr/local/directadmin/data/task.queue

Now you’ll be able to access the domains from the new server , do tail the logs to see if everything is fine 🙂

Openworkdesk with Alfresco

Overview

Add openworkdesk as a management system to Alfresco

Requirements

Alfresco installed ( Installation method :: Jumpbox)

Placeholders used

(Delivery) :: /usr/src/OWD_3.0.0.0Final_Community_Edition_bin
(Tomcat) :: /opt/alfresco/tomcat
(OpenWorkdesk) :: /opt/alfresco/tomcat/webapps/openworkdesk/

Installation instructions

Step 1
Community edition ( OWD_3.0.0.0Final_Community_Edition_bin.zip ) downloaded from http://sourceforge.net/projects/owd/files/ to /usr/src/

Step 2
unzip package
root@home:~# cd /usr/src
root@home:~# unzip OWD_3.0.0.0Final_Community_Edition_bin.zip

Step 3
change to unzipped (Delivery) folder
root@home:~# cd /usr/src/OWD_3.0.0.0Final_Community_Edition_bin

Step 4
copy webservice-api.jar from (Delivery)/ow/WEB-INF/lib to (Tomcat)/endorsed
root@home:~# cp /usr/src/OWD_3.0.0.0Final_Community_Edition_bin/ow/WEB-INF/lib/webservice-api.jar /opt/alfresco/tomcat/endorsed/

Step 5
create a Deployment dir (OpenWorkdesk) at (Tomcat)/webapps and copy the ow dir contents
root@home:~# mkdir /opt/alfresco/tomcat/webapps/openworkdesk/
root@home:~#cp -rpf /usr/src/OWD_3.0.0.0Final_Community_Edition_bin/ow/* /opt/alfresco/tomcat/webapps/openworkdesk/

Step 6
Configuring the CMIS adapter ( as we are using local alfresco installation, comment the following lines in, /opt/alfresco/tomcat/webapps/openworkdesk/WEB-INF/conf/cmis/owbootstrap.xml )

root@home:~# vi /opt/alfresco/tomcat/webapps/openworkdesk/WEB-INF/conf/cmis/owbootstrap.xml

comment the following lines,

<!—
<!– Alfresco online CMIS WSDL location –>
<WSDLRepository>http://cmis.alfresco.com/cmis/RepositoryService?wsdl</WSDLRepository>
<WSDLNavigation>http://cmis.alfresco.com/cmis/NavigationService?wsdl</WSDLNavigation>
<WSDLObject>http://cmis.alfresco.com/cmis/ObjectService?wsdl</WSDLObject>
<WSDLMultifiling>http://cmis.alfresco.com/cmis/MultiFilingService?wsdl</WSDLMultifiling>
<WSDLDiscovery>http://cmis.alfresco.com/cmis/DiscoveryService?wsdl</WSDLDiscovery>
<WSDLVersioning>http://cmis.alfresco.com/cmis/VersioningService?wsdl</WSDLVersioning>
<WSDLRelationship>http://cmis.alfresco.com/cmis/RelationshipService?wsdl</WSDLRelationship>
<WSDLPolicy>http://cmis.alfresco.com/cmis/PolicyService?wsdl</WSDLPolicy>
<!– <WSDLACL>…currently not supported…</WSDLACL> –>

and Uncomment these line

<!– Alfresco local CMIS WSDL location –>
<WSDLRepository>http://localhost:8080/alfresco/cmis/RepositoryService?wsdl</WSDLRepository>
<WSDLNavigation>http://localhost:8080/alfresco/cmis/NavigationService?wsdl</WSDLNavigation>
<WSDLObject>http://localhost:8080/alfresco/cmis/ObjectService?wsdl</WSDLObject>
<WSDLMultifiling>http://localhost:8080/alfresco/cmis/MultiFilingService?wsdl</WSDLMultifiling>
<WSDLDiscovery>http://loclahost:8080/alfresco/cmis/DiscoveryService?wsdl</WSDLDiscovery>
<WSDLVersioning>http://localhost:8080/alfresco/cmis/VersioningService?wsdl</WSDLVersioning>
<WSDLRelationship>http://localhost:8080/alfresco/cmis/RelationshipService?wsdl</WSDLRelationship>
<WSDLPolicy>http://localhost:8080/alfresco/cmis/PolicyService?wsdl</WSDLPolicy>
<!– <WSDLACL>…currently not supported…</WSDLACL> –>

Step 7
Point to http://your_alfresco_server_ip:8080/openworkdesk/
you can use alfresco login credentials to login