On the existing machine
- Stop services
| Code Block | ||
|---|---|---|
| ||
sudo systemctl stop dualshield sudo systemctl stop dualsql |
...
- Create a working directory
| Code Block | ||
|---|---|---|
| ||
mkdir dualshield-files |
...
- Enter the working directory
| Code Block | ||
|---|---|---|
| ||
cd dualshield-files |
...
- Compress the whole installation folder
| Code Block | ||
|---|---|---|
| ||
sudo tar -C /opt -czf dualshield.tar.gz dualshield |
...
- Copy service scripts
| Code Block | ||
|---|---|---|
| ||
cp /usr/lib/systemd/system/dualshield.service . cp /usr/lib/systemd/system/dualsql.service . |
...
- Copy all files to the new machine
| Code Block | ||
|---|---|---|
| ||
scp -r /path/to/dualshield-files someuser@remote.server:/somepath/ |
...
On the new machine- Enter the working directory
| Code Block | ||
|---|---|---|
| ||
cd dualshield-files |
...
- Extract dualshield folder
| Code Block | ||
|---|---|---|
| ||
sudo tar -xzvf dualshield.tar.gz -C /opt/ |
...
- Copy service script
| Code Block | ||
|---|---|---|
| ||
sudo cp dualshield.service /usr/lib/systemd/system/ sudo cp dualsql.service /usr/lib/systemd/system/ |
...
- Create
dualshielduser
| Code Block | ||
|---|---|---|
| ||
sudo useradd -g dualshield -s /sbin/nologin dualshield |
...
- Change dualshield directory owner
| Code Block | ||
|---|---|---|
| ||
sudo chown -R dualshield:dualshield /opt/dualshield |
...
- Add host file entries
(replacedualshield.fqdn.comwith your actual dualshield fqdn)
| Code Block | ||
|---|---|---|
| ||
sudo echo "127.0.0.1 dualshield.fqdn.com" >> /etc/hosts sudo echo "127.0.0.1 $(hostname)" >> /etc/hosts |
...
- Register services
| Code Block | ||
|---|---|---|
| ||
sudo systemctl enable dualshield.service sudo systemctl enable dualsql.service |
- Start services
| Code Block | ||
|---|---|---|
| ||
sudo systemctl start duqlsql sudo systemctl start dualshield |
...