Documentation improvements

This commit is contained in:
Bob Mottram 2015-01-24 20:14:57 +00:00
parent e3d9b91979
commit 1392ab7b56
3 changed files with 213 additions and 144 deletions

View File

@ -157,3 +157,13 @@ On your internet router, typically under firewall settings, open the following p
| Email | 587 | | Email | 587 |
| Email | 465 | | Email | 465 |
| Email | 993 | | 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

View File

@ -7,7 +7,7 @@
#+BEGIN_CENTER #+BEGIN_CENTER
[[./images/logo.png]] [[./images/logo.png]]
#+END_CENTER #+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 * Preparation for the Beaglebone Black
@ -166,3 +166,13 @@ On your internet router, typically under firewall settings, open the following p
| Email | 587 | | Email | 587 |
| Email | 465 | | Email | 465 |
| Email | 993 | | 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

View File

@ -4,7 +4,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head> <head>
<title></title> <title></title>
<!-- 2015-01-16 Fri 23:51 --> <!-- 2015-01-24 Sat 20:14 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="generator" content="Org-mode" /> <meta name="generator" content="Org-mode" />
<meta name="author" content="Bob Mottram" /> <meta name="author" content="Bob Mottram" />
@ -167,39 +167,36 @@ for the JavaScript code in this tag.
<col class="left" /> <col class="left" />
<col class="left" />
<col class="left" />
<col class="left" />
<col class="left" /> <col class="left" />
</colgroup> </colgroup>
<tbody> <tbody>
<tr> <tr>
<td class="left"><a href="index.html">Home</a></td> <td class="left"><a href="index.html">Home</a></td>
<td class="left"><i>Download the code</i></td> <td class="left"><a href="#unnumbered-1">Preparation for the Beaglebone Black</a></td>
<td class="left"><a href="#unnumbered-2">On a Beaglebone Black</a></td> <td class="left"><a href="#unnumbered-2">Checklist</a></td>
<td class="left"><a href="#unnumbered-3">On a laptop/PC/netbook</a></td> <td class="left"><a href="#unnumbered-3">GPG Keys</a></td>
<td class="left"><a href="#unnumbered-4">Internet Router</a></td> <td class="left"><a href="#unnumbered-4">Interactive Setup</a></td>
<td class="left"><a href="#unnumbered-5">Non-Interactive Setup</a></td>
<td class="left"><a href="#unnumbered-6">Post-Setup</a></td>
<td class="left"><a href="#unnumbered-7">On Client Machines</a></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<div id="outline-container-unnumbered-1" class="outline-2"> <div id="outline-container-unnumbered-1" class="outline-2">
<h2 id="unnumbered-1">Download and install the code</h2> <h2 id="unnumbered-1">Preparation for the Beaglebone Black</h2>
<div class="outline-text-2" id="text-unnumbered-1"> <div class="outline-text-2" id="text-unnumbered-1">
<p> <p>
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.
</p> </p>
<div class="org-src-container">
<pre class="src src-bash">sudo apt-get install git
git clone https://github.com/bashrc/freedombone
<span class="org-builtin">cd</span> freedombone
make install
</pre>
</div>
</div>
</div>
<div id="outline-container-unnumbered-2" class="outline-2">
<h2 id="unnumbered-2">On a Beaglebone Black</h2>
<div class="outline-text-2" id="text-unnumbered-2">
<p> <p>
To get started you will need: To get started you will need:
</p> </p>
@ -217,7 +214,7 @@ To get started you will need:
</li> </li>
<li>USB thumb drive (for backups or storing media) <li>USB thumb drive (for backups or storing media)
</li> </li>
<li>One or more subdomains created on <a href="https://freedns.afraid.org/">https://freedns.afraid.org/</a> <li>One or more domains available via a dynamic DNS provider, such as <a href="https://freedns.afraid.org/">https://freedns.afraid.org/</a>
</li> </li>
<li>A purchased domain name and SSL certificate (only needed for Red Matrix) <li>A purchased domain name and SSL certificate (only needed for Red Matrix)
</li> </li>
@ -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 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).
</p> </p>
<p>
You can either install from a debian package or manually as follows:
</p>
<div class="org-src-container">
<pre class="src src-bash">sudo apt-get install git dialog
git clone https://github.com/bashrc/freedombone
<span class="org-builtin">cd</span> freedombone
sudo make install
</pre>
</div>
<p> <p>
Plug the microSD card into your laptop/desktop and then run the <b>freedombone-prep</b> command. For example: Plug the microSD card into your laptop/desktop and then run the <b>freedombone-prep</b> command. For example:
</p> </p>
<div class="org-src-container"> <div class="org-src-container">
<pre class="src src-bash">freedombone-prep -d /dev/sdX --ip &lt;static LAN IP&gt; --iprouter &lt;router LAN IP&gt; <pre class="src src-bash">freedombone-prep -d /dev/sdX --ip freedombone_IP_address --iprouter router_IP_address
</pre> </pre>
</div> </div>
<p> <p>
where <b>/dev/sdX</b> is the device name for the microSD card. Often it's <b>/dev/sdb</b> or <b>/dev/sdc</b>, 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.
</p> </p>
<p> <p>
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 <b>freedombone.cfg</b> which contains those variables. Variables which you might want to put into a <b>freedombone.cfg</b> file are: When the initial setup is done follow the instructions on screen to run the main freedombone command.
</p>
</div>
</div>
<div id="outline-container-unnumbered-2" class="outline-2">
<h2 id="unnumbered-2">Checklist</h2>
<div class="outline-text-2" id="text-unnumbered-2">
<p>
Before running the freedombone command you will need a few things.
</p>
<ul class="org-ul">
<li>Have some domains, or subdomains, registered with a dynamic DNS service
</li>
<li>System with a new installation of Debian Jessie
</li>
<li>Ethernet connection to an internet router
</li>
<li>It is possible to forward ports from the internet router to the system
</li>
<li>If you want to set up a social network or microblog then you will need SSL certificates corresponding to those domains
</li>
<li>Have ssh access to the system
</li>
</ul>
</div>
</div>
<div id="outline-container-unnumbered-3" class="outline-2">
<h2 id="unnumbered-3">GPG Keys</h2>
<div class="outline-text-2" id="text-unnumbered-3">
<p>
If you have existing GPG keys then copy the .gnupg directory onto the system.
</p> </p>
<div class="org-src-container"> <div class="org-src-container">
<pre class="src src-bash"><span class="org-variable-name">MY_EMAIL_ADDRESS</span>=&lt;your email address&gt; <pre class="src src-bash">scp -r ~/.gnupg username@freedombone_IP_address:/home/username
<span class="org-variable-name">MY_NAME</span>=&lt;your name/nick/pseudonym&gt; </pre>
<span class="org-variable-name">MY_BLOG_TITLE</span>=&lt;title of your blog&gt; </div>
<span class="org-variable-name">MY_BLOG_SUBTITLE</span>=&lt;subtitle of your blog&gt; </div>
<span class="org-variable-name">SSH_PORT</span>=2222 </div>
<span class="org-variable-name">FULLBLOG_DOMAIN_NAME</span>=&lt;freedns subdomain for your blog&gt;
<span class="org-variable-name">FULLBLOG_FREEDNS_SUBDOMAIN_CODE</span>=&lt;freedns subdomain code for your blog&gt; <div id="outline-container-unnumbered-4" class="outline-2">
<span class="org-variable-name">MICROBLOG_DOMAIN_NAME</span>=&lt;domain name for your microblog&gt; <h2 id="unnumbered-4">Interactive Setup</h2>
<span class="org-variable-name">MICROBLOG_FREEDNS_SUBDOMAIN_CODE</span>=1234 <div class="outline-text-2" id="text-unnumbered-4">
<span class="org-variable-name">REDMATRIX_DOMAIN_NAME</span>=&lt;domain name for your Red Matrix site&gt; <p>
<span class="org-variable-name">OWNCLOUD_DOMAIN_NAME</span>=&lt;freedns subdomain for your Owncloud site&gt; The interactive server configuration setup is recommended for most users. On the system where freedombone is to be installed create a configuration file.
<span class="org-variable-name">OWNCLOUD_FREEDNS_SUBDOMAIN_CODE</span>=&lt;freedns subdomain code for your Owncloud site&gt; </p>
<span class="org-variable-name">WIKI_TITLE</span>=&lt;title of your wiki&gt;
<span class="org-variable-name">WIKI_DOMAIN_NAME</span>=&lt;freedns subdomain for your wiki&gt; <div class="org-src-container">
<span class="org-variable-name">WIKI_FREEDNS_SUBDOMAIN_CODE</span>=&lt;freedns subdomain code for your wiki&gt;
<span class="org-variable-name">MY_GPG_PUBLIC_KEY</span>=&lt;exported public key filename&gt; <pre class="src src-bash">ssh username@freedombone_IP_address
<span class="org-variable-name">MY_GPG_PRIVATE_KE</span>=&lt;exported private key filename&gt; su
<span class="org-variable-name">PUBLIC_MAILING_LIST</span>=&lt;name of your mailing list&gt; apt-get install git dialog
<span class="org-variable-name">LOCAL_NETWORK_STATIC_IP_ADDRESS</span>=192.168.1.60 git clone https://github.com/bashrc/freedombone
<span class="org-variable-name">ROUTER_IP_ADDRESS</span>=192.168.1.254 <span class="org-builtin">cd</span> freedombone
make install
</pre>
</div>
<p>
Now the easiest way to install the system is via the interactive setup.
</p>
<div class="org-src-container">
<pre class="src src-bash">freedombone menuconfig
</pre>
</div>
<p>
You can select which variant you wish to install and then enter the details as requested. A video of the install sequence can be <a href="./installer.ogv">seen here</a>.
</p>
</div>
</div>
<div id="outline-container-unnumbered-5" class="outline-2">
<h2 id="unnumbered-5">Non-Interactive Setup</h2>
<div class="outline-text-2" id="text-unnumbered-5">
<p>
If you don't want to install interactively then it's possible to manually create a configuration file as follows:
</p>
<p>
On the system where freedombone is to be installed create a configuration file.
</p>
<div class="org-src-container">
<pre class="src src-bash">ssh username@freedombone_IP_address
su
apt-get install git
git clone https://github.com/bashrc/freedombone
<span class="org-builtin">cd</span> freedombone
make install
nano /home/username/freedombone/freedombone.cfg
</pre>
</div>
<p>
Add the following, and set the values as needed.
</p>
<div class="org-src-container">
<pre class="src src-bash"><span class="org-variable-name">MY_EMAIL_ADDRESS</span>=
<span class="org-variable-name">MY_NAME</span>=
<span class="org-variable-name">MY_BLOG_TITLE</span>=
<span class="org-variable-name">MY_BLOG_SUBTITLE</span>=
<span class="org-variable-name">FULLBLOG_DOMAIN_NAME</span>=
<span class="org-variable-name">MICROBLOG_DOMAIN_NAME</span>=
<span class="org-variable-name">REDMATRIX_DOMAIN_NAME</span>=
<span class="org-variable-name">OWNCLOUD_DOMAIN_NAME</span>=
<span class="org-variable-name">WIKI_DOMAIN_NAME</span>=
<span class="org-variable-name">WIKI_TITLE</span>=
<span class="org-variable-name">ENABLE_CJDNS</span>=no <span class="org-variable-name">ENABLE_CJDNS</span>=no
<span class="org-variable-name">LOCAL_NETWORK_STATIC_IP_ADDRESS</span>=
<span class="org-variable-name">ROUTER_IP_ADDRESS</span>=
</pre> </pre>
</div> </div>
<p> <p>
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.
</p> </p>
<p> <p>
The <a href="https://freedns.afraid.org/">FreeDNS</a> 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.
</p> </p>
<p> <p>
The syntax of the <b>freedombone</b> command is: Now you can begin the installation. If you are doing this on a Beaglebone Black:
</p> </p>
<div class="org-src-container"> <div class="org-src-container">
<pre class="src src-bash">freedombone --bbb -d [domain name] -u [username] -c [FreeDNS subdomain code] --ddnsuser [FreeDNS username] --ddnspass [FreeDNS password] -s [optional variant type] <pre class="src src-bash">freedombone --bbb -d [default domain name] -u [username] --ddns [dynamic DNS provider domain] --ddnsuser [dynamic DNS username] --ddnspass [dynamic DNS password]
</pre> </pre>
</div> </div>
<p>
Or on any other system don't include the <b>&#x2013;bbb</b> option.
</p>
<div class="org-src-container">
<pre class="src src-bash">freedombone -d [default domain name] -u [username] --ddns [dynamic DNS provider domain] --ddnsuser [dynamic DNS username] --ddnspass [dynamic DNS password]
</pre>
</div>
<p>
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.
</p>
<p> <p>
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 <b>freedombone.cfg</b> file then it should be in the same directory from which the <b>freedombone</b> command is run. 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 <b>freedombone.cfg</b> file then it should be in the same directory from which the <b>freedombone</b> command is run.
</p> </p>
</div>
</div>
<div id="outline-container-unnumbered-6" class="outline-2">
<h2 id="unnumbered-6">Post-Setup</h2>
<div class="outline-text-2" id="text-unnumbered-6">
<p> <p>
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.
</p> </p>
<p> <p>
@ -310,103 +433,11 @@ When done you can ssh into the Freedombone with:
</div> </div>
<p> <p>
Any manual post-installation setup instructions or passwords can be found in <b>/home/username/README</b>. You should remove any passwords from that file and store them within a password manager such as KeepassX. 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.
</p>
</div>
</div>
<div id="outline-container-unnumbered-3" class="outline-2">
<h2 id="unnumbered-3">On a laptop/PC/netbook</h2>
<div class="outline-text-2" id="text-unnumbered-3">
<p>
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 <b>freedombone.cfg</b> or do not include the <b>&#x2013;bbb</b> option within the <b>freedombone</b> command. Obviously, you don't need to run the <b>freedombone-prep</b> command on non-Beaglebone systems.
</p> </p>
<ul class="org-ul">
<li>Download the <a href="https://www.debian.org/devel/debian-installer">Debian Jessie "netinst" installer</a>
</li>
<li>Use <a href="https://apps.ubuntu.com/cat/applications/usb-creator-gtk/">Startup Disk Creator</a> or <a href="https://en.wikipedia.org/wiki/UNetbootin">Unetbootin</a> to copy the netinst image to a USB thumb drive
</li>
<li>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.
</li>
<li>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.
</li>
<li>Within the installer unselect the <b>print server</b> and select the <b>ssh server</b>
</li>
<li>After installation use ssh to access the machine and become the root user
</li>
</ul>
<div class="org-src-container">
<pre class="src src-bash">ssh username@192.168.1.60
su
</pre>
</div>
<ul class="org-ul">
<li>If you have GPG keys you may wish to transfer them to the <b>/home/usernname</b> 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.
</li>
<li>Run the following commands:
</li>
</ul>
<div class="org-src-container">
<pre class="src src-bash"><span class="org-builtin">cd</span> /home/&lt;username&gt;
apt-get install git
git clone https://github.com/bashrc/freedombone
<span class="org-builtin">cd</span> freedombone
make install
nano freedombone.cfg
</pre>
</div>
<ul class="org-ul">
<li>Now create a configuration file, such as the following, filling in the details for your <a href="https://freedns.afraid.org/">FreeDNS subdomains</a>.
</li>
</ul>
<div class="org-src-container">
<pre class="src src-bash"><span class="org-variable-name">INSTALLING_ON_BBB</span>=no
<span class="org-variable-name">MY_EMAIL_ADDRESS</span>=&lt;your email address&gt;
<span class="org-variable-name">MY_NAME</span>=&lt;your name/nick/pseudonym&gt;
<span class="org-variable-name">MY_BLOG_TITLE</span>=&lt;title of your blog&gt;
<span class="org-variable-name">MY_BLOG_SUBTITLE</span>=&lt;subtitle of your blog&gt;
<span class="org-variable-name">SSH_PORT</span>=2222
<span class="org-variable-name">FULLBLOG_DOMAIN_NAME</span>=&lt;freedns subdomain for your blog&gt;
<span class="org-variable-name">FULLBLOG_FREEDNS_SUBDOMAIN_CODE</span>=&lt;freedns subdomain code for your blog&gt;
<span class="org-variable-name">MICROBLOG_DOMAIN_NAME</span>=&lt;domain name for your microblog&gt;
<span class="org-variable-name">MICROBLOG_FREEDNS_SUBDOMAIN_CODE</span>=1234
<span class="org-variable-name">REDMATRIX_DOMAIN_NAME</span>=&lt;domain name for your Red Matrix site&gt;
<span class="org-variable-name">OWNCLOUD_DOMAIN_NAME</span>=&lt;freedns subdomain for your Owncloud site&gt;
<span class="org-variable-name">OWNCLOUD_FREEDNS_SUBDOMAIN_CODE</span>=&lt;freedns subdomain code for your Owncloud site&gt;
<span class="org-variable-name">WIKI_TITLE</span>=&lt;title of your wiki&gt;
<span class="org-variable-name">WIKI_DOMAIN_NAME</span>=&lt;freedns subdomain for your wiki&gt;
<span class="org-variable-name">WIKI_FREEDNS_SUBDOMAIN_CODE</span>=&lt;freedns subdomain code for your wiki&gt;
<span class="org-variable-name">MY_GPG_PUBLIC_KEY</span>=&lt;exported public key filename&gt;
<span class="org-variable-name">MY_GPG_PRIVATE_KE</span>=&lt;exported private key filename&gt;
<span class="org-variable-name">PUBLIC_MAILING_LIST</span>=&lt;name of your mailing list&gt;
<span class="org-variable-name">LOCAL_NETWORK_STATIC_IP_ADDRESS</span>=192.168.1.60
<span class="org-variable-name">ROUTER_IP_ADDRESS</span>=192.168.1.254
<span class="org-variable-name">ENABLE_CJDNS</span>=no
</pre>
</div>
<ul class="org-ul">
<li>Save and exit, then run:
</li>
</ul>
<div class="org-src-container">
<pre class="src src-bash">freedombone -d [your wiki domain name] -u [your username] -c [your wiki FreeDNS domain code] --ddnsuser [FreeDNS username] --ddnspass [FreeDNS password]
</pre>
</div>
</div>
</div>
<div id="outline-container-unnumbered-4" class="outline-2">
<h2 id="unnumbered-4">Internet Router</h2>
<div class="outline-text-2" id="text-unnumbered-4">
<p> <p>
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.
</p> </p>
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides"> <table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
@ -502,6 +533,24 @@ On your internet router, typically under firewall settings, open the following p
</table> </table>
</div> </div>
</div> </div>
<div id="outline-container-unnumbered-7" class="outline-2">
<h2 id="unnumbered-7">On Client Machines</h2>
<div class="outline-text-2" id="text-unnumbered-7">
<p>
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.
</p>
<div class="org-src-container">
<pre class="src src-bash">sudo apt-get install git dialog
git clone https://github.com/bashrc/freedombone
<span class="org-builtin">cd</span> freedombone
sudo make install
freedombone-client
</pre>
</div>
</div>
</div>
</div> </div>
<div id="postamble" class="status"> <div id="postamble" class="status">