Tuesday 13 October 2015

Banana Pi Installation and first steps

Banana Pi be used as server, I have decided for the distribution Bananian. An absolute lightweight distribution based on Debian Wheezy, which is designed for low resource usage, security and speed. No graphical user interface, no frills, just the pure operating system. Perfect for a server.

So download the Image here: Download Bananian and install it to a SD-Card. How that is done is described on that page, too: Install Bananian
Then plug the SD-Card to the Banana Pi, connect network cable and power.
Warning! The Banana Pi has 2 Micro-USB connectors. The connector for power is located between the SATA power connector and SATA connector. When power is connected to the other Micro USB port, the computer will not start.
Booting of the computer takes depending on the used SD card about 6 seconds. Booting is finished, when you can see the heartbeat-like flashing of the green LED.
Now it’s time to log in. When the computer is started for the first time, the router will assign it to an IP Address via DHCP. If the computer is not connected to an monitor, you need to find out its IP-Address. So log in to your router with a browser and take a look at the routers DHCP-table, which IP-Address is assigned to the computer „bananapi“.
So log on the Banana Pi with that IP-Address.
For that open a shell (Windows users need to install the program Putty) and log on to the banana with the command
 ssh -l root IP-ADDRESS 
. The default password for the user root is „pi“.
To finish the installation and customize the layout of the computer, enter the command
 bananian-config 
. A script is executed, where you can customize the following settings
  1. the keyboard layout (that did not work for me)
  2. the root password
  3. the time zone
  4. the character set
  5. the hostname
  6. the video acceleration – by default this is disabled. If you want to run the Banana Pi as a plain server without monitor connected, you can leave this disabled. Thus, the operating system needs only around 25 MB of memory.
  7. the USB OTG status
  8. the size of the root file system – this should be expanded to the size of the SD card
The installation is now complete. But before the computer is restarted, we give him a static IP – so you don’t have to search him after restarting again.
This is set in the file /etc/network/interfaces and is already prepared.
You just have comment out the line „iface eth0 inet dhcp“ and uncomment „iface eth0 inet static“ and the following lines. Then the file should look something like this:
root@bananaserv ~ # nano /etc/network/interfaces

# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

auto eth0

# dhcp configuration
# iface eth0 inet dhcp

# static ip configuration
iface eth0 inet static
        address 192.168.70.100
        netmask 255.255.255.0
        gateway 192.168.70.1
The IP addresses in „address“ and „gateway“ must of course be adapted to your own settings.
Save the file and you’re done. After the reboot you can login to the new address with the new password.

No comments:

Post a Comment