How to get the Orange-Pi One to work as Server AKA cheapest file server in the world, for a reason. [WIP]

in #tech7 years ago

Well cheapest, there are a few single-board computers out there that are a bit cheaper.
But let's start from scratch here after my last post reffering after my last post. I mentioned a big amount of issues.
The support for this board isn't what you wish it would be. And yes the internet is full of compliants. It has no own actual community what so ever, the dead trap of any open source project. Yet I decide to give this a go. This board suffers extremely from powerdrops and has no tollarance what so ever. How ever this will work fine on a Raspberry Pi.

So the amount of steps you have to take to get it here? Well this is gonna be an odd one.

You gonna need

a Orange Pi One $10 on Ali Express (I ordered somewhere else)
a Micro SD Card (for the Linux Image) I have a 32GB Sandisk But about $ 14 will do
a PowerSuply for your Orange Pi, tricky I bought a cable for € 1.60
a UTP Cable/Network depending on the length just € 2
a Monitor HDMI supporting and need support your board kinda, the screen resolution didn't fit.
a USB keyboard, yup you can't go straight ssh too it. Sadly...

Well, this applies to the image I used of course.
I got it from armbian.com so far this the only image that actually worked for me. And going to the second install cause I messed up.

So first up leave your UTP Cable Out this is important somehow.
Boot with put in a keyboard, SD-card (duh) and a monitor hooked up.

Then login as root pswd is 1234, change it.
Add a user

Now you can put in the ethernet cable.
Give in the command, apt-get update.

Now let's start a LAMP.

apt-get install apache2
Over browser check if it works.

You probably know your IP by this stage if not.

Use this: ifconfig eth0 | grep inet | awk '{ print $2 }'

apt-get install mysql-server

Finish it off by the following command: mysql_secure_installation

Next up PHP: apt-get install php5 php-pear php5-mysql

Restart apache2 like this: service apache2 restart

Now our LAMP is set up which may be usefull and doesn't take that much space check everything going on with the top command


To read full LAMP Document: https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-debian

Looks about this, but my LAMP isn't running right now. Only Linux is.

Okay next up choosing how to set a file share system.
My favourite is SFTP:// how ever I use this at the office with Linux, Samba has been a standard for a well. So let's setup a Samba server instead. I am not sure how this is gonna run. But let's try samba it has been around for a while now.

Install Samba Server

apt-get install samba

Install Samba Client

apt-get install samba-client

Configure the Samba daemon
Edit the Samba configuration file.

nano /etc/samba/smb.conf

In the global section, check the name of the workgroup. It might be useful to know it when you'll try to connect from a Windows machine:

[global]
...
workgroup = STURBAIN
Locate the home share definition:

[homes]
In that section you may enable read-write access to the home directories:

read only = no
To share files in some other path on the system, add another share definition such as:

[ourfiles]
comment = Some useful files
read only = no
locking = no
path = /path_to_our_files
guest ok = no
Add Samba users
Samba uses it's own password system so users need to be added by root. Note that the users have to exist in /etc/passwd

smbpasswd -a me

smbpasswd -a you

You will be prompted for a password for each of those users.

To list existing Samba users:

pdbedit -w -L
Restart the Samba daemon

/etc/init.d/samba restart

or, if you are using systemd

/usr/sbin/service smbd restart

For more see: https://wiki.debian.org/SambaServerSimple
Did I get everything running? Yes but I ran in too much issues te recommend it to anyone. I have been working on this till past 1 AM. And some dpkg issues are just too real.

apt-get update exactly crashes my Orange Pi.
So I will have to fix that first to have it functioning.
I will drop it for now and just see how my server will act over night, I will post this how ever. Main-reason if someone is wresteling with an orange pi like I do this might be usefull. It functions now for at least the minimum.

Coin Marketplace

STEEM 0.29
TRX 0.12
JST 0.033
BTC 63855.79
ETH 3113.00
USDT 1.00
SBD 4.04