doc/install_on_olinuxino.md

112 lines
5.3 KiB
Markdown
Raw Normal View History

2017-01-25 01:27:39 +01:00
# Install on an OlinuXino board
<div class="alert alert-info" markdown="1">
2017-01-25 01:27:39 +01:00
The simplest way to install YunoHost on an OLinuXino board is to use the image provided by the [*Internet Cube project*](http://labriqueinter.net). It's an image specifically designed for the OLinuXino boards.
</div>
<div class="alert alert-warning" markdown="1">
If you aim to setup a full Internet Cube (OLinuXino boad + YunoHost + VPN from neutral ISP + Wifi access point), you should contact your [local associative ISP](https://internetcu.be/#obtenir-une-brique), the Internet Cube really advice **against** installing it yourself. If you still really want to do it by yourself, you can try [the install procedure on the Internet Cube project website](https://install.labriqueinter.net).
2017-01-25 01:27:39 +01:00
It is recommended to read about the [advantages of using a neutral VPN in the context of self-hosting](/vpn_advantage) and to contact your local associative ISP (if you have one).
</div>
2017-01-25 01:27:39 +01:00
## Prerequisites
2017-01-25 01:27:39 +01:00
* One of these OLinuXino boards
* [A20-OLinuXino-LIME](https://www.olimex.com/Products/OLinuXino/A20/A20-OLinuXino-LIME/open-source-hardware)
* [A20-OLinuXino-LIME2](https://www.olimex.com/Products/OLinuXino/A20/A20-OLinuXino-LIME2/open-source-hardware)
2017-01-25 01:27:39 +01:00
* A Micro-SD card ([Transcend 300x](https://www.amazon.com/Transcend-MicroSDHC-Class10-Adapter-TS32GUSDU1/dp/B00APCMMDG/) show good performance and stability).
* A power supply ([european one](https://www.olimex.com/Products/Power/SY0605E/)) for the board. (Supply through a USB cable is not stable.)
* An ethernet/RJ-45 cable to connect the board to your internet box / router.
2017-01-25 01:27:39 +01:00
To prepare the SD card, a computer with GNU/Linux or BSD is preferable. You should be able to follow the same instructions on MacOS/OSX. On Windows, you will need to use the tool decribed [here](/copy_image).
---
2017-01-25 01:27:39 +01:00
## Download the image
2017-01-25 01:27:39 +01:00
Download the image ([LIME1](http://repo.labriqueinter.net/labriqueinternet_A20LIME_latest_jessie.img.tar.xz) or [LIME2](http://repo.labriqueinter.net/labriqueinternet_A20LIME2_latest_jessie.img.tar.xz)), check its integrity (*MD5 checksum*), and uncompress it :
```bash
2017-01-25 01:27:39 +01:00
cd /tmp/
# Download image
wget https://repo.labriqueinter.net/labriqueinternet_A20LIME_latest_jessie.img.tar.xz
# Integrity check (optionnal, but recommended)
wget -q -O - https://repo.labriqueinter.net/MD5SUMS | grep "labriqueinternet_A20LIME_latest_jessie.img.tar.xz$" > MD5SUMS
md5sum -c MD5SUMS
# Uncompress image
tar -xf labriqueinternet_*.img.tar.xz
mv labriqueinternet_*.img labriqueinternet.img
```
2017-01-25 01:27:39 +01:00
## Copy image to SD card
2017-01-25 01:27:39 +01:00
1. Identify the name of the card :
- Make sure the SD card is *not* plugged in the computer
- Run the command `ls -1 /sys/block/`
- Insert the SD card in the computer (maybe
- Run the command `ls -1 /sys/block/` again
- The name of your card (SDNAME) is the one present in the what's returned in the second command but not in the first. It's usually something like `sdb` or `mmcblk0`.
2. Copy the image to your card (replace SDNAME by the name of your card, found in the previous step). Command will take a while.
```bash
2017-01-25 01:27:39 +01:00
sudo dd if=/tmp/labriqueinternet.img of=/dev/SDNAME bs=1M status=progress
sync
```
2017-01-25 01:27:39 +01:00
## Plug and boot
2017-01-25 01:27:39 +01:00
Insert the card in the OLinuXino board, connect it to your router with the Ethernet cable, and plug the power supply. Your board will boot (give it a few seconds) and the LEDs around the Ethernet port should start blinking.
<div class="alert alert-warning" markdown="1">
2017-01-25 01:27:39 +01:00
The first boot can take a little more than one minute because the partition is being resized and the board rebooted automatically.
</div>
2017-01-25 01:27:39 +01:00
## Find the local IP of your server
Get the local IP of your OLinuXino board :
2017-01-25 01:27:39 +01:00
* either using `sudo arp-scan --local | grep -P '\t02'` ;
* either using the router interface by listing the DHCP clients ;
* either by pluging an HDMI screen on the OLinuXino, logging in and typing `ifconfig`.
<div class="alert alert-info" markdown="1">
2017-01-25 01:27:39 +01:00
In the following commands, we refer to the board's IP with **192.168.x.y**. You should replace it with the local IP you found.
</div>
2017-01-25 01:27:39 +01:00
## Connect through SSH and change root password
2017-01-25 01:27:39 +01:00
Connect to your server with
```bash
2017-01-25 01:27:39 +01:00
ssh root@192.168.x.y
```
2017-01-25 01:27:39 +01:00
The default password is **olinux**.
2017-01-25 01:27:39 +01:00
After connecting, you will be asked to changed the root password. First, enter **olinux** *again* (current password), then type the new password two times.
2017-01-25 01:27:39 +01:00
## Update your server
2017-01-25 01:27:39 +01:00
Update your server with the following commands. It can take around 15 minutes.
```bash
2017-01-25 01:27:39 +01:00
apt-get update && apt-get dist-upgrade
```
2017-01-25 01:27:39 +01:00
## Proceed to post-installation
2017-01-25 01:27:39 +01:00
Proceed to [post-installation](/postinstall) by connecting with your browser to https://192.168.x.y (you browser will warn you about the certificate being self-signed, but you can add/accept the certificate exception).
<div class="alert alert-info" markdown="1">
2017-01-25 01:27:39 +01:00
**Note :** it is also possibled to do the post-installation step through command line in SSH, with `yunohost tools postinstall`.
</div>
## (Optional) Install DoctorCube
2017-01-25 01:27:39 +01:00
If you want to benefit automatically from fixes and configuration specific to the Internet Cube, you can install the DoctorCube app.
2017-01-25 01:27:39 +01:00
1. Add the Internet Cube repository :
```bash
yunohost app fetchlist -n labriqueinternet -u https://labriqueinter.net/apps/labriqueinternet.json
```
2017-01-25 01:27:39 +01:00
2. In the web administration interface, click on "Applications", then install the DoctorCube app. The installation can be pretty long, but you can leave the page anyway.