From 1392ab7b568cc5a4d207e973b3d217f0a3ef7b47 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 24 Jan 2015 20:14:57 +0000 Subject: [PATCH] Documentation improvements --- README.md | 10 ++ doc/installation.org | 12 +- website/installation.html | 335 ++++++++++++++++++++++---------------- 3 files changed, 213 insertions(+), 144 deletions(-) diff --git a/README.md b/README.md index 313d8db0..622fb9de 100644 --- a/README.md +++ b/README.md @@ -157,3 +157,13 @@ On your internet router, typically under firewall settings, open the following p | Email | 587 | | Email | 465 | | Email | 993 | + +On Client Machines +================== +You can configure laptops or desktop machines which connect to the Freedombone server in the following way. This alters encryption settings to improve overall security. + + sudo apt-get install git dialog + git clone https://github.com/bashrc/freedombone + cd freedombone + sudo make install + freedombone-client diff --git a/doc/installation.org b/doc/installation.org index 58c5a4be..deef170c 100644 --- a/doc/installation.org +++ b/doc/installation.org @@ -7,7 +7,7 @@ #+BEGIN_CENTER [[./images/logo.png]] #+END_CENTER -| [[file:index.html][Home]] | [[Preparation for the Beaglebone Black]] | [[Checklist]] | [[GPG Keys]] | [[Interactive Setup]] | [[Non-Interactive Setup]] | [[Post-Setup]] | +| [[file:index.html][Home]] | [[Preparation for the Beaglebone Black]] | [[Checklist]] | [[GPG Keys]] | [[Interactive Setup]] | [[Non-Interactive Setup]] | [[Post-Setup]] | [[On Client Machines]] | * Preparation for the Beaglebone Black @@ -166,3 +166,13 @@ On your internet router, typically under firewall settings, open the following p | Email | 587 | | Email | 465 | | Email | 993 | +* On Client Machines +You can configure laptops or desktop machines which connect to the Freedombone server in the following way. This alters encryption settings to improve overall security. + +#+BEGIN_SRC bash +sudo apt-get install git dialog +git clone https://github.com/bashrc/freedombone +cd freedombone +sudo make install +freedombone-client +#+END_SRC diff --git a/website/installation.html b/website/installation.html index 512febf9..3b88f788 100644 --- a/website/installation.html +++ b/website/installation.html @@ -4,7 +4,7 @@ - + @@ -167,39 +167,36 @@ for the JavaScript code in this tag. + + + + + + Home -Download the code -On a Beaglebone Black -On a laptop/PC/netbook -Internet Router +Preparation for the Beaglebone Black +Checklist +GPG Keys +Interactive Setup +Non-Interactive Setup +Post-Setup +On Client Machines +
-

Download and install the code

+

Preparation for the Beaglebone Black

-Firstly you'll need to download the code as follows: +This section is specific to the Beaglebone Black hardware. If you're not using that hardware then just skip to the next section.

-
- -
sudo apt-get install git
-git clone https://github.com/bashrc/freedombone
-cd freedombone
-make install
-
-
-
-
-
-

On a Beaglebone Black

-

To get started you will need:

@@ -217,7 +214,7 @@ To get started you will need:
  • USB thumb drive (for backups or storing media)
  • -
  • One or more subdomains created on https://freedns.afraid.org/ +
  • One or more domains available via a dynamic DNS provider, such as https://freedns.afraid.org/
  • A purchased domain name and SSL certificate (only needed for Red Matrix)
  • @@ -229,74 +226,200 @@ To get started you will need: You will also need to know, or find out, the IP address of your internet router and have a suitable static IP address for the Beaglebone on your local network. The router should allow you to forward ports to the Beaglebone (often this is under firewall or "advanced" settings).

    +

    +You can either install from a debian package or manually as follows: +

    + +
    + +
    sudo apt-get install git dialog
    +git clone https://github.com/bashrc/freedombone
    +cd freedombone
    +sudo make install
    +
    +
    +

    Plug the microSD card into your laptop/desktop and then run the freedombone-prep command. For example:

    -
    freedombone-prep -d /dev/sdX --ip <static LAN IP> --iprouter <router LAN IP>
    +
    freedombone-prep -d /dev/sdX --ip freedombone_IP_address --iprouter router_IP_address
     

    -where /dev/sdX is the device name for the microSD card. Often it's /dev/sdb or /dev/sdc, depending upon how many drives there are on your system. The script will download the Debian installer and update the microSD card. It can take a while, so be patient. +where /dev/sdX is the device name for the microSD card. Often it's /dev/sdb or /dev/sdc, depending upon how many drives there are on your system. The script will download the Debian installer and update the microSD card. It can take a while, so be patient.

    -When the initial setup is done follow the instructions on screen to run the main Freedombone script. You can create a separate configuration file called freedombone.cfg which contains those variables. Variables which you might want to put into a freedombone.cfg file are: +When the initial setup is done follow the instructions on screen to run the main freedombone command. +

    +
    +
    + +
    +

    Checklist

    +
    +

    +Before running the freedombone command you will need a few things. +

    + +
      +
    • Have some domains, or subdomains, registered with a dynamic DNS service +
    • +
    • System with a new installation of Debian Jessie +
    • +
    • Ethernet connection to an internet router +
    • +
    • It is possible to forward ports from the internet router to the system +
    • +
    • If you want to set up a social network or microblog then you will need SSL certificates corresponding to those domains +
    • +
    • Have ssh access to the system +
    • +
    +
    +
    + +
    +

    GPG Keys

    +
    +

    +If you have existing GPG keys then copy the .gnupg directory onto the system.

    -
    MY_EMAIL_ADDRESS=<your email address>
    -MY_NAME=<your name/nick/pseudonym>
    -MY_BLOG_TITLE=<title of your blog>
    -MY_BLOG_SUBTITLE=<subtitle of your blog>
    -SSH_PORT=2222
    -FULLBLOG_DOMAIN_NAME=<freedns subdomain for your blog>
    -FULLBLOG_FREEDNS_SUBDOMAIN_CODE=<freedns subdomain code for your blog>
    -MICROBLOG_DOMAIN_NAME=<domain name for your microblog>
    -MICROBLOG_FREEDNS_SUBDOMAIN_CODE=1234
    -REDMATRIX_DOMAIN_NAME=<domain name for your Red Matrix site>
    -OWNCLOUD_DOMAIN_NAME=<freedns subdomain for your Owncloud site>
    -OWNCLOUD_FREEDNS_SUBDOMAIN_CODE=<freedns subdomain code for your Owncloud site>
    -WIKI_TITLE=<title of your wiki>
    -WIKI_DOMAIN_NAME=<freedns subdomain for your wiki>
    -WIKI_FREEDNS_SUBDOMAIN_CODE=<freedns subdomain code for your wiki>
    -MY_GPG_PUBLIC_KEY=<exported public key filename>
    -MY_GPG_PRIVATE_KE=<exported private key filename>
    -PUBLIC_MAILING_LIST=<name of your mailing list>
    -LOCAL_NETWORK_STATIC_IP_ADDRESS=192.168.1.60
    -ROUTER_IP_ADDRESS=192.168.1.254
    +
    scp -r ~/.gnupg username@freedombone_IP_address:/home/username
    +
    +
    +
    +
    + +
    +

    Interactive Setup

    +
    +

    +The interactive server configuration setup is recommended for most users. On the system where freedombone is to be installed create a configuration file. +

    + +
    + +
    ssh username@freedombone_IP_address
    +su
    +apt-get install git dialog
    +git clone https://github.com/bashrc/freedombone
    +cd freedombone
    +make install
    +
    +
    + +

    +Now the easiest way to install the system is via the interactive setup. +

    + +
    + +
    freedombone menuconfig
    +
    +
    + +

    +You can select which variant you wish to install and then enter the details as requested. A video of the install sequence can be seen here. +

    +
    +
    + +
    +

    Non-Interactive Setup

    +
    +

    +If you don't want to install interactively then it's possible to manually create a configuration file as follows: +

    + +

    +On the system where freedombone is to be installed create a configuration file. +

    + +
    + +
    ssh username@freedombone_IP_address
    +su
    +apt-get install git
    +git clone https://github.com/bashrc/freedombone
    +cd freedombone
    +make install
    +nano /home/username/freedombone/freedombone.cfg
    +
    +
    + +

    +Add the following, and set the values as needed. +

    + +
    + +
    MY_EMAIL_ADDRESS=
    +MY_NAME=
    +MY_BLOG_TITLE=
    +MY_BLOG_SUBTITLE=
    +FULLBLOG_DOMAIN_NAME=
    +MICROBLOG_DOMAIN_NAME=
    +REDMATRIX_DOMAIN_NAME=
    +OWNCLOUD_DOMAIN_NAME=
    +WIKI_DOMAIN_NAME=
    +WIKI_TITLE=
     ENABLE_CJDNS=no
    +LOCAL_NETWORK_STATIC_IP_ADDRESS=
    +ROUTER_IP_ADDRESS=
     

    -The GPG public/private key variables are for the filenames of exported GPG keys, and if a private key filename is given then it will be automatically shredded after import. +Both of the IP addresses are local IP addresses, typically of the form 192.168.x.x, with one being for the system and the other being for the internet router.

    -The FreeDNS subdomain codes can be found under "Dynamic DNS" and "quick cron example". On the last line it will be the string located between the '?' and the '==' characters. +Save the configuration file and exit from your editor.

    -The syntax of the freedombone command is: +Now you can begin the installation. If you are doing this on a Beaglebone Black:

    -
    freedombone --bbb -d [domain name] -u [username] -c [FreeDNS subdomain code] --ddnsuser [FreeDNS username] --ddnspass [FreeDNS password] -s [optional variant type]
    +
    freedombone --bbb -d [default domain name] -u [username] --ddns [dynamic DNS provider domain] --ddnsuser [dynamic DNS username] --ddnspass [dynamic DNS password]
     
    +

    +Or on any other system don't include the –bbb option. +

    + +
    + +
    freedombone -d [default domain name] -u [username] --ddns [dynamic DNS provider domain] --ddnsuser [dynamic DNS username] --ddnspass [dynamic DNS password]
    +
    +
    + +

    +The above command should be run in the same directory in which your configuration file exists. You can use any of your domains as the default one, but typically the default domain is the same as the one for your wiki. +

    +

    Also see the manpage for additional options which can be used instead of a configuration file. If you don't specify a variant type with the final option then everything will be installed. If you have a freedombone.cfg file then it should be in the same directory from which the freedombone command is run.

    +
    +
    +
    +

    Post-Setup

    +

    -Installation is not quick, and depends upon which variant you choose and your internet bandwidth. Allow about three hours for a full installation on the Beaglebone Black. On the Beaglebone installation is in two parts, since a reboot is needed to enable the hardware random number generator and zram. +Setup of the server and installation of all the relevant packages is not quick, and depends upon which variant you choose and your internet bandwidth. Allow about three hours for a full installation on the Beaglebone Black. On the Beaglebone installation is in two parts, since a reboot is needed to enable the hardware random number generator and zram.

    @@ -310,103 +433,11 @@ When done you can ssh into the Freedombone with:

    -Any manual post-installation setup instructions or passwords can be found in /home/username/README. You should remove any passwords from that file and store them within a password manager such as KeepassX. -

    -
    - - -
    -

    On a laptop/PC/netbook

    -
    -

    -It's also possible to install Freedombone onto other hardware, including other types of single board computer. Any system with a fresh installation of Debian Jessie will do. Just make sure that you change the variable INSTALLING_ON_BBB to "no" within freedombone.cfg or do not include the –bbb option within the freedombone command. Obviously, you don't need to run the freedombone-prep command on non-Beaglebone systems. +Any manual post-installation setup instructions or passwords can be found in /home/username/README. You should remove any passwords from that file and store them within a password manager such as KeepassX.

    -
      -
    • Download the Debian Jessie "netinst" installer -
    • -
    • Use Startup Disk Creator or Unetbootin to copy the netinst image to a USB thumb drive -
    • -
    • Connect the machine to your internet router using an ethernet patch lead. Freedombone is a fully free (as in freedom) system and so wifi drivers may not work. A wired network connection will give better performance anyway. -
    • -
    • On the target machine boot from the USB drive and go through the installation. It's a good idea to use LVM and disk encryption together with a long passphrase which will be hard to crack by brute force methods. Keep a note of the passphrase in your password manager. -
    • -
    • Within the installer unselect the print server and select the ssh server -
    • -
    • After installation use ssh to access the machine and become the root user -
    • -
    -
    - -
    ssh username@192.168.1.60
    -su
    -
    -
    -
      -
    • If you have GPG keys you may wish to transfer them to the /home/usernname directory. If the machine has a second USB socket or an SD card slot then that may be the most secure way to do it. -
    • -
    • Run the following commands: -
    • -
    -
    - -
    cd /home/<username>
    -apt-get install git
    -git clone https://github.com/bashrc/freedombone
    -cd freedombone
    -make install
    -nano freedombone.cfg
    -
    -
    - -
      -
    • Now create a configuration file, such as the following, filling in the details for your FreeDNS subdomains. -
    • -
    -
    - -
    INSTALLING_ON_BBB=no
    -MY_EMAIL_ADDRESS=<your email address>
    -MY_NAME=<your name/nick/pseudonym>
    -MY_BLOG_TITLE=<title of your blog>
    -MY_BLOG_SUBTITLE=<subtitle of your blog>
    -SSH_PORT=2222
    -FULLBLOG_DOMAIN_NAME=<freedns subdomain for your blog>
    -FULLBLOG_FREEDNS_SUBDOMAIN_CODE=<freedns subdomain code for your blog>
    -MICROBLOG_DOMAIN_NAME=<domain name for your microblog>
    -MICROBLOG_FREEDNS_SUBDOMAIN_CODE=1234
    -REDMATRIX_DOMAIN_NAME=<domain name for your Red Matrix site>
    -OWNCLOUD_DOMAIN_NAME=<freedns subdomain for your Owncloud site>
    -OWNCLOUD_FREEDNS_SUBDOMAIN_CODE=<freedns subdomain code for your Owncloud site>
    -WIKI_TITLE=<title of your wiki>
    -WIKI_DOMAIN_NAME=<freedns subdomain for your wiki>
    -WIKI_FREEDNS_SUBDOMAIN_CODE=<freedns subdomain code for your wiki>
    -MY_GPG_PUBLIC_KEY=<exported public key filename>
    -MY_GPG_PRIVATE_KE=<exported private key filename>
    -PUBLIC_MAILING_LIST=<name of your mailing list>
    -LOCAL_NETWORK_STATIC_IP_ADDRESS=192.168.1.60
    -ROUTER_IP_ADDRESS=192.168.1.254
    -ENABLE_CJDNS=no
    -
    -
    - -
      -
    • Save and exit, then run: -
    • -
    -
    - -
    freedombone -d [your wiki domain name] -u [your username] -c [your wiki FreeDNS domain code] --ddnsuser [FreeDNS username] --ddnspass [FreeDNS password]
    -
    -
    -
    -
    - -
    -

    Internet Router

    -

    -On your internet router, typically under firewall settings, open the following ports and forward them to the Freedombone. +On your internet router, typically under firewall settings, open the following ports and forward them to your server.

    @@ -502,6 +533,24 @@ On your internet router, typically under firewall settings, open the following p
    +
    +

    On Client Machines

    +
    +

    +You can configure laptops or desktop machines which connect to the Freedombone server in the following way. This alters encryption settings to improve overall security. +

    + +
    + +
    sudo apt-get install git dialog
    +git clone https://github.com/bashrc/freedombone
    +cd freedombone
    +sudo make install
    +freedombone-client
    +
    +
    +
    +