On the existing machine

  • Stop services
sudo /etc/init.d/dualshield stop
sudo /etc/init.d/dualsql stop
  • Create a working directory
mkdir dualshield-files
  • Enter the working directory
cd dualshield-files
  • Compress the whole installation folder
sudo tar -C /opt -czf dualshield.tar.gz dualshield
  • Copy service scripts
cp /etc/init.d/dualshield .
cp /etc/init.d/dualsql .
  • Copy all files to the new machine
scp -r /path/to/dualshield-files someuser@remote.server:/somepath/

On the new machine

  • Enter the working directory
cd dualshield-files
  • Extract dualshield folder
sudo tar -xzvf dualshield.tar.gz -C /opt/
  • Copy service script
sudo cp dualshield /etc/init.d/
sudo cp dualsql /etc/init.d/
  • Create dualshield user
sudo useradd -g dualshield -s /sbin/nologin dualshield
  • Change dualshield directory owner
sudo chown -R dualshield:dualshield /opt/dualshield
sudo echo "127.0.0.1    dualshield.fqdn.com" >> /etc/hosts
sudo echo "127.0.0.1    $(hostname)" >> /etc/hosts
  • Register services
# if you are on RHEL, CentOS, Fedora, Rocky etc
sudo /sbin/chkconfig --add dualshield
sudo /sbin/chkconfig --add dualsql

# if you are on ubuntu, debian etc
sudo update-rc.d dualshield defaults 89
sudo update-rc.d dualsql defaults 88
  • Start Services
sudo /etc/init.d/dualsql start
sudo /etc/init.d/dualshield start
  • No labels