Installation of the Wiki

This will be a short documentation on how to setup a new location as a wiki node.

The Italy location will be used as main location where all other nodes will connect to and sync content with.

  1. mkdir ~/.ssh
  2. chmod 700 ~/.ssh
  3. paste the following inside .ssh/authorized_keys

ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDzu/xEiVJkY84fQNvrNyfv4QtV/9vhUoXB1pCjgNWTP0YhieuftX41zEN/aNqQPcle99Ln6RyOmGxGbqamIkJQuN6AyfctbZJ+quWyz0Mv9zzVYmrH4q5P1E+9GhLYsnt60VWtqnju6XV32QmCRy92t1oXsKez5NbWyyFa6hgAMG1qx6n/XlS3L7ldkOOPYx3D8mxYcF0mj1LhrHCwd1nQGgirwmKiDoXmhSiEHtx8HDjCtnwDi6wek3oZ96yE5sMuS4wjRMnxTVi90XvmiT24STt+sdq7k7UarD+NeA+TJ9fQGkvCjznk6sVTaqtQU5k1t64BNHGgikHB84vo42lJ lowendspirit

The reason to use Tuxlite as installation “help” is to use a user based webroot and not not www-data because we doesn't have to change permissions on the files synced. By not using www-data we can use Key-based SSH Logins to sync the data.

As root, run the following in the root home directory:

The last line installs aptitude that is required by Tuxlite and rsync and cron that will be used to keep the sites in sync.

The next few lines are notes what to do and not copy/paste instructions

Inside the Tuxlite directory

  1. nano options.conf and change the following values
    1. HOSTNAME= srv1
    3. CONFIGURE_APT=yes
    4. DB_GUI=2
  2. comment out *install_mysql* in (not the function, the calls TO the function)
  3. ./ apt
  4. ./ install
  5. adduser leswikiusr (password is saved elsewhere)
  6. ./ add leswikiusr
  7. nano /etc/nginx/sites-enabled/
  8. enable ipv6 [::]:80;
  9. disable SSL
  10. add as server_name
  11. save /etc/nginx/sites-enabled/
  12. nano /etc/nginx/sites-enabled/default
  13. enable ipv6 [::]:80;
  14. save
  15. /etc/init.d/nginx restart

  1. nano /etc/hosts
  2. add IPv6 for IT location
  3. save and close file

Since all sync connections will be initiated from the nodes to the main (IT) location we need to copy the ssh key to use.

Generate keys without password

make sure these commands are run as leswikiusr

  1. mkdir ~/.ssh
  2. chmod 700 ~/.ssh
  3. ssh-keygen -t rsa (use empty passphrase)
  4. cat ~/.ssh/id\ | ssh [email protected] “cat » ~/.ssh/authorized_keys”

First we need to get the updated files from the master so that we can serve the website from this node. This is accomplished with rsync:

rsync -avz --ipv6 [email protected]:/home/leswikiusr/domains/ /home/leswikiusr/domains/ 
rsync -avz --ipv6 [email protected]:/home/leswikiusr/dokuwiki/ /home/leswikiusr/dokuwiki/  

On every node:

  1. crontab -e
*/5 * * * * rsync -avz --ipv6 [email protected]:/home/leswikiusr/dokuwiki/data/ /home/leswikiusr/dokuwiki/data/ &> /dev/null

login to Cloudflare and

  1. add the VPS ipv6 IP to
  2. add the VPS ipv6 to *country***
  3. Use Cloudflare on both entries