Ultimate Pi Based Home Server
Ultimate Pi Based Home Server
Table of Contents
Step 1: Plan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Components: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
OS: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Step 2: Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Thank you. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Advertisements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
http://www.instructables.com/id/Ultimate-Pi-Based-Home-Server/
Author:DrWilson
Student, Manchester UK. Usually i'm making things - electronics, computer programming, woodwork, DIY and construction. Follow me for awesome stuff.
In this instructable I hope to teach you key skills involved with setting up and configuring a Linux Server. The knowledge used here can be applied to almost all PC
architectures so if you don't own a Pi (Why not dude?) or it's tied up in another project, any old or unused PC will work. In more detail the main skills taught will be:
Burning an ISO image to an SD for the Pi
Installing an OS
Setting up A web server
Setting up An SQL instance
Deploying a custom cloud network
Managing users for the cloud network
Setting up a SAMBA File sharing network, which will integrate into an established windows based home or office network
Controlling SAMBA users
Establishing a static IP whilst using a non-static IP internet connection
Using Webmin Console to install packages
Using Command line terminal to install packages
Carrying out basic commands such as rebooting (terminal)
Editing system files with Nano terminal based editor
Permanently mounting hard drives within the Linux file system table via webmin
Understanding the principal of the Port forwarding function on a home router
Setting up a web interfaced bit torrent manager
Being an overall IT nerd.
If you're interested then carry on reading. If not, give it a try; you may discover a new hobby.
As the above list demonstrates there's a lot to learn. I definitely feel this is a weekend project. I've followed this process several times and it takes a couple of days at
least. Its good to take long breaks because your eyes may begin to become strained and you may suddenly become unenthusiastic about the whole thing. This
instructable offers functions of many different store purchasable products, such as:
The server we'll setup will cost far less than each of these services in the long run and only a fraction of the cost of the combined services. Setting up your own server is
not only custom and cheap, its very rewarding. I will be a happy guy if somebody benefits from what this instructable contains or become inspired by what I have done. It
took ages to plan and write this instructable. If you learn anything at all or feel this instructable is well written or well documented, please vote for me in the Weekend
Projects Contest or the I could make that contest.
I would also like to point out that this is not a comprehensive tutorial on designing a server case. There are details of my case on step 3, however this guide is intended to
be a comprehensive software tutorial. So if you get stuck or feel a step isn't too clear, just let me know and i'll be happy to help.
A few tips: Because this takes more than one day, don't just fall asleep and forget what you were planing on doing next. Instead have a pile f post-it notes. This way
before you ZzZzzzz... you can jot down anything that needs doing during the next session. I had loads. All over the walls, floors, chairs, desks - you name it! Okay slight
exaggeration, but on a serious note they do help. I did use a full stack. Another tip would be to follow the steps on order. Don't just think "Hmm I like the sound of my own
cloud network lets do that first!" The steps are in such an order that each before is most likely required for the current, if that makes sense. Just stick to the order, it'll
make life easier. A final tip: don't be limited to what is taught here. Do Think of this as a base for inspiration. Adding more services such as those listed on the turnkey
website is easily done using the search APT function within the Webmin Package manager.
http://www.instructables.com/id/Ultimate-Pi-Based-Home-Server/
Image Notes
1. Original hardware setup.
Image Notes
1. The doors screws are spring loaded, so pushing in along with a 25 degree turn
locks them in place.
2. This is serious.
3. This Isn't.
4. Merch Sticker.
5. This is the main danger spot for electrocution (behind)
Step 1: Plan
First things first - Plan. There are many aspects involved with planning, and often when people over plan, they quickly lose interest in the actual task.
Components:
1 x Raspberry Pi (B model)
1 x Raspberry Pi Case of your choice (Mine is a cheap £3 laser cut, clear acrylic, self assembly kit from )
2 x Heat sinks for the processor on the Pi (Mine were free with the case)
1 x Ethernet Cable
1 x SD Card (8GB or above strongly recommended. Also ensure you copy everything off the card as all data will be deleted.)
OS:
We will be using the operating system image from Ghoulmann . We'll download it later. The image is based on Raspian, which is a Debian flavor adapted for the Pi,
that runs turnkey out the box.
http://www.instructables.com/id/Ultimate-Pi-Based-Home-Server/
Plan done. Proceed .
Step 2: Features
There are many available features avaiable to add to a home server, some free, some paid.
I have narrowed down a shortlist of free features that you will be able to add to your home server following the steps inthis instructable .
Webmin Admin Interface (This could be considered the heart of the operation)
Webmin is a state of the art server management web user interface. It allows the installation, management and control of the various services you may wish to add to the
server. The interface is great fore first timers as it minimalizes the required use of the command line interface.
More Info
Shell In A Box (This could be considered the backend)
'Shellinabox' is a web based interface for SSH'ing into the server. It runs on java and CSS so it's compatble with all the best browsers without any additional plugins.
More Info
Samba Windows File Server
Samba is software that can be run on a platform other than Microsoft Windows, for example, Linux. Samba uses the TCP/IP protocol that is installed on the host server.
When correctly configured, it allows the host to interact with a Microsoft Windows client as if it is a Windows file and print server.
More Info
ownCloud
ownCloud gives you universal access to your files through a web interface. It also provides a platform to easily view & sync your contacts, calendars and bookmarks
across all your devices and enables basic editing right on the web. ownCloud is extendable via a simple but powerful API for applications and plugins. Many of which are
avaiable here.
More Info
Transmission BitTorrent WebUI
Transmission is designed for easy, powerful use. It's web user interface allows torrent's to be remotley added, then downloaded to the default torrent location. This
location ca the be shared via samba/ownCloud to allow remote streaming of downloaded content.
More Info
Apache Webserver
The Apache HTTP Server Project is an effort to develop and maintain an open-source HTTP server for modern operating systems such as Linux. The goal of this project
is to provide a secure, efficient and extensible server that provides HTTP services in sync with the current HTTP standards.
More Info
PHP5
PHP is a ser ver-side scripting language designed for web deve lopment but also used as a general-purpose programmin g language . PHP is now installed on more
http://www.instructables.com/id/Ultimate-Pi-Based-Home-Server/
than 244 million w e bsites and 2.1 million we b servers . This is required for owncloud and any other webpages you wish to host.
More Info
MySQL Database
Many of the world's largest and fastest-growing organizations including Facebook, Google and Adobe rely on MySQL to save time and money powering their Web sites.
That why we'll be using it. It's also required for ownCloud.
More Info
no-ip Sync Client
The no-ip sync client will allow us to give the server a 'static address', such as "yourname.no-ip.biz". The sync client will update the current ip your ISP's allocated you
every ten or fifteen minutes. You must first create a free account at no-ip.biz, but more on that later.
More Info
Once you've understood the purpose of each element of the server, continue to the next step.
My ideas developed. In my setup I wanted two mounted hard drives to offer more storage. One was a Segate desktop 3.5" 320GB HDD. The other was a Turo Portable
2.5" 1TB HDD.
This offers loads of storage so I can carry out backups and so on.
When I decided on what hardware I wanted to add on, I came to an instant realization that some sort of case would be necessary. Due to the flashing LED's that indicate
status on all three main hardware parts, I knew I wanted something partly transparent. I also wanted the case to look the part. As I struggle for desk space all too often, I
also decided to make the server a wall mountable unit. This way I would have a self contained, Transparent server case.
When designing your case you can be as basic or as simple as you wish. For me, it was very satisfying to have an end product that expressed some professional quality.
To manage power, I simply mounted a 3-way socket into the case. I then spliced the end and soldered it onto an appropriately rated switch and IEC socket. This again
leaves a pro like finish. The transformers within the enclosure do not exceed the rated current of the wires. For additional finish, I mounted an Ethernet and USB socket to
the top. By using USB hub inside, I am able to host an external socket. This is useful as USB drives can be plugged in when necessary without having to undo the 6
sprung screws that hold the hinged door closed. Pictures are annotated below.
http://www.instructables.com/id/Ultimate-Pi-Based-Home-Server/
Image Notes
1. Original hardware setup.
Image Notes
1. The doors screws are spring loaded, so pushing in along with a 25 degree turn
locks them in place.
2. This is serious.
3. This Isn't.
4. Merch Sticker.
5. This is the main danger spot for electrocution (behind)
Image Notes
1. Pi Power
Image Notes
1. 1TB HDD
2. Power and IDE to USB adapter
3. 4 port USB HUB
4. 320 GB HDD
5. Raspberry Pi
6. GPIO Ribbon cable. This runs to a second case which has a custom relay
board. Using WebIOpi I can control a home automation system.
http://www.instructables.com/id/Ultimate-Pi-Based-Home-Server/
7. Power Bank
8. Power in and switch
9. USB and Ethernet
10. Later replaced by an industrial Ethernet socket.
11. Hinged Door for ease
12. The whole structure was created with spare meccano
http://www.instructables.com/id/Ultimate-Pi-Based-Home-Server/
Step 5: Burn The Image
The first step is often found tricky and complicated. I aim for it to be quick and simple, so we can move onto the fun part sooner.
When the application opens, we need to do two things. Firstly locate the downloaded ISO image file. by Clicking the file icon.
Next ensure the correct drive letter is selected by cross comparing the drive letters in My Computer with the ones available in the dropdown box.
Finally Click Write.
A message informing that the drive can be corrupted will appear. Don't panic, this is standard procedure, just click Yes.
The Image will the begin to write. It will take about eight minutes in total. Once the image has been written to the SD card, a Write Successful Dialog appears.
Close it off and place the SD into your Pi.
http://www.instructables.com/id/Ultimate-Pi-Based-Home-Server/
Step 6: Install The OS
Installing the OS is a nice place to start, besides it being the first chronological step, it is a fairly simple one. The user (you) doesn't really have to do much the setup
scrips take care of that.
No extensive hardware is required for the setup process. All you need is a spare USB Keyboard (or just borrow one - it wont be long), A TV with HDMI or Composite input
and the relevant cable. You'll also need your Pi power supply (Just a regular micro USB phone charger will do).
First plug the HDMI or Composite cable into the back of the TV, then set the TV to the correct input. This is because the Pi detects whether HDMI is plugged in then using
that information chooses whether to output composite or not. Then plug the cable into the Pi.
Plug in the keyboard. Then finally plug in the micro USB power. The Pi will the boot. Setup scripts will run automatically. This will take a few minutes, before being asked
for a root password.
When prompted for a password, choose a secure one. Don't use one that is already used for your email account or similar. Use howsecureismypassword.net to find a
secure password. Aim for something that takes around 10 octillion septuagintillion years to crack. No but seriously, choose something secure.
Setup may ask some other questions. Just input logical answers. After the Q&A is over setup will continue doing its thing for around 5 min.
At the end you'll be told the eth5 connection failed. That because we don't have a internet connection yet. Once setup is complete, unplug the power cable and re-locate
your Pi server into its final resting position.
That's all there is to it, you no longer need the keyboard or monitor/TV. We are officially headless my friend.
http://www.instructables.com/id/Ultimate-Pi-Based-Home-Server/
Step 7: Update Webmin
In this step we will login to Webmin for the first time. When this is done, we will update Webmin to the latest version using the integrated updater.
First, type in the ip of the server (RPi) followed by " :12321 ". This is the default port that Webmin is running on.
Notice how the port remains the same, despite the ip address changing.
A quick explanation. The ip address is the string of numbers that defines any device connected to the internet. The router in your home has a function called DCHP (
Dynamic Host Configuration Protocol ). This auto assigns the
devices on the LAN (Local Area Network) an ip following the default format of 192.168.1.*
This means that your Pi could be any ip address through 192.168.1.2 to 192.168.1.255 (It won't be 192.168.1.1 because that's usually the routers ip address).
Usually there is a chronological order of working, therefore unless you have over 20 devices on the network, you wont be going higher than 192.168.1.20
If you don't know how to determine the ip of a device on the network, I strongly recommend this tool. It's free and extremely handy if your less computer savvy than
others. It works by scanning all the possible ip's on a network, then gathers information about the devices on the other end.
Once you've done that, your going to get that scary security warning we all hate. It looks like this:
This warning usually indicates a website that's has insecure certificates. This means the data sent to the server isn't nesacerily sent to the server, instead a fake server,
trying to capture sensitive data. Usually you'd turn back here, but don't. This message is only displayed as we have not yet installed a SSL certificate on the server.
These are expensive, so instead we'll just disable SSL (HTTPS://). That's later on though. For now just click proceed anyway.
Once your proceeded you'll meet the Webmin Login page for the first time. Isn't she wonderful.
Here enter the username root and the password you entered during the Linux installation. Then click Login
At the bottom of the home page, you'll notice the Upgrade Webmin Now button.
Click the button and Webmin does the rest. Just for reassurance, Here are images of how the process should look:
This final image shows the update is complete. After this is the stage you're at, continue to the next step.
http://www.instructables.com/id/Ultimate-Pi-Based-Home-Server/
Step 8: Shell Login
In this step we will learn how to login to the shell interface via the browser.
Type the ip address of the RPi into the browser, then port :12320 - it will look like 192.168.1.* :12320
Click Proceed anyway, remember we know it's safe because it's your server. This will load the shell interface.
You may be asking what is 'shell' and thinking 'I thought computers sand and water don't mix'. I'll explain. Shell is the Linux version of Command Prompt (which is
probably familiar to you windows users). It basically offers access into the server via command line, which can be very useful for tasks such as adding samba users, or
editing a file using nano (nano is a command line text file editor).
So once the interface has loaded it will look like this. Very basic I may add.
Again, here I'll offer some level of explanation. The 'core login:' is just the server hostname 'core' (we can change this later) followed by login:
This means the server requires us to login before carrying out any tasks.
To login simply type your username (root) press return/enter then enter the password for the root account. Your password wont be displayed for obvious security
reasons, such as the guy stood behind you looking over your shoulder. Take that**.
You will the be greeted by a login message explaining how warranties are not this nor that.
**this is not a reference to the British band
http://www.instructables.com/id/Ultimate-Pi-Based-Home-Server/
Step 9: How to Reboot
Now we know how to access the command line, let's try a few things.
Login to the terminal as normal or if you already have an open session ensure the bottoms most line reads username@hostname ~ # in essence, root@core ~ #
Type reboot
You'll receive a broadcast message informing all users of the system reboot.
That's all there is too it. This is one of the most basic procedures you'll need to carry out. During the server configuration and setup you'll be doing this quite a lot.
Continue to the next step where you will learn how to use nano to edit files.
http://www.instructables.com/id/Ultimate-Pi-Based-Home-Server/
Step 10: Changing the Server Name (Hostname)
Our server is currently named CORE. Boring right? We're going to change it.
First we can type hostname into the shell in the box terminal (after sucsessful login) to print the current hostname. We can see it's 'CORE'.
Press return which will open the text file located in the /etc directory on the SD card named hostname, with the terminal text file editor nano. On boot the setup scripts
read the file contents and use it to set the hostname of the server.
So to change it, simply delete the contents of the text file and type your desired hostname.
Now just reboot the server (covered in step 8) for changes to take effect. When you look in network location from a windows file browser you'll see your server has been
renamed.
Drives with Windows NTFS formatting can be tricky to mount within Linux.
To allow the drive to be mounted, we must install NTFS-3g. This irradiates any issues I know of.
So, open up a tab within your browser. Point it to the address and port of shell in a box, i.e, a new terminal session.
apt-get is the command to grab a package from the repository and install it.
The terminal may then begin to look like a scene from the matrix. This is just the downloading and installation of the package.
Your done when you see the root@core ~ # message again. This is just the servers way of saying "I'm ready for my next command master."
http://www.instructables.com/id/Ultimate-Pi-Based-Home-Server/
Step 12: Mount the Hard Drive Continued
Head back over to Webmin to continue mounting the storage media.
From the top navigation bar click Disks and Network Filesystems from within the System dropdown.
This will load the applet where we can select and mount the drive. To begin mounting click the dropdown box just above the file system table and select the format of the
drive you are mounting. Mounting a drive within Linux will not remove your data, however it's always best to have a backup.
This next page will allow you to name the mount and choose the location. We will create out mount in the location /media/serverhdd . Select Disk and there should
only be one option within the dropdown to choose from. Choose No where you have the option for read only. Keep the default settings for everything else.
Once you have the same settings as above, click create. This will take us back to an updated file system table.
http://www.instructables.com/id/Ultimate-Pi-Based-Home-Server/
Step 13: My SQL
Next we're are going to install MySQL. MySQL is a free tool that allows us to host online databases that are secure, and accessible by PHP scrips. This means that a
login page (such as the ownCloud login page) can use a PHP script to check login details such as user and password, thus allowing it to serve you the correct files and
ultimately allowing you to login.
To install:
Login the Webmin admin console, hover over the unused modules category.
This will serve a page informing us we either don't have the module configured correctly or don't have it installed. We don't have it installed do click the option that says '
click here to have it installed by apt'. Just for your information, apt is a Linux package manager that can be used to install and remove packages (basically software
applications).
The package will then be installed. Lots of code will be running in the webpage. Leave it to run its course. It will inform you at the bottom of the webpage when the
package has been added.
After its installed, go back, and from the servers dropdown in webmin, select the MySQL Database server entry. This will load the interface.
The information will range from usernames and passwords, to file size limits and file paths for each user. It's really quite clever.
Its quick and easy to add a table. First from within the MySQL database manager page in webmin click add a database.
The new database page will then load. Here name the database and leave all other options default. I've called mine owncloud for easy reference. (You'll need to note
down the name for later.) We don't need to ad any tables or data because ownCloud will populate the database during it's installation process.
Click Create at the bottom of the page. You'll then be taken back to the management page, where you'll see the new table.
http://www.instructables.com/id/Ultimate-Pi-Based-Home-Server/
Step 15: Add a user To My SQL (ownCloud prep)
MySQL is a multi-user database management system. This means that there can be more than one user that can gain access to the various databases and the data
within them. This is useful as we can assign different permissions to the different users.
This feature is implemented for a number of reasons. The first most obvious being a security breach. For example if someone somehow hacks access to a service or
program's code which relies on a database within MySQL, they may be able de-crypt the login credentials to the MySQL database server. This means they could access
sensitive data within other databases and cause havoc. But wait hold on, don't panic. Because with multi user functionality, the database server will be safe. We can
know this because we are creating separate accounts that will range from managing the server to reading, modifying and even creating tables. If somebody ever did gain
access, (which is highly unlikely) they would only have certain permissions within the delegated database/s. This way we are not compromising other services that rely on
the SQL server.
Another reason is if a piece of code within a service malfunctioned (also very unlikely) somehow losing control and beginning to erase and delete the databases. This
wouldn't be possible because the program would only have access to its own database. All is not lost, Eh?
So, lets lean how to create a user then. The user account we will create will be later used for ownCloud so use a logical username and password, that will be identifiable
in the future.
Open up the MySQL database server manager if you haven't already. Which you probably have because your twitching with excitement at the concept.
So first, we need to click User Permissions. This will navigate us towards our goal. On the page you'll see a list of user and their corresponding info.
Sorry to ruin your fun Mr.Hacker. Anyway, on the above page click Create New User.
As you will soon see, this has loaded the add user page. Here we'll be able to add our ownCloud database access user. Input the above information into the fields, which
is: Username: owncloud
Select all permissions besides Superuser. Quick tip - Click the top entry, scroll down, hold shift, click the bottom entry. Then deselect the Superuser entry by clicking
whist holding ctrl.
Change the maximum concurrent logins to 15 (we wont be having more than 15 users at a time connected.
This will create the new user and then navigate us back to the user accounts page.
That's it, we've created our new user. During the ownCloud setup, ownCloud will tie the account to the specified database. (Remember the one we created earlier named
cloud?)
Let's continue.
http://www.instructables.com/id/Ultimate-Pi-Based-Home-Server/
Step 16: Install PHP
In this step we'll install PHP and the various add-on's so its compatible with services such as MySQL, which we installed in an earlier step.
This will carry out the installation of PHP and other required dependencies for ownCloud and Transmission.
When you reach the above point just hit Y. This check is common practice and it's essentially just APT asking for permission to use up the specified amount of disk space
to istall the requested programs.
Above we can see the files being fetched from the mirrors.
http://www.instructables.com/id/Ultimate-Pi-Based-Home-Server/
Step 17: Install ownCloud
The installation for ownCloud can be done via the GUI (Graphical User Interface) within webmin.
Head over to webmin and select system software packages from the System dropdown menu.
Here focus on the second section: Install a New Package. Here select the Package from APT radio button. (Which is one of these [ Try Me! ] )
The script has finished, thus, ownCloud has been successfully installed.
http://www.instructables.com/id/Ultimate-Pi-Based-Home-Server/
Step 18: OwnCloud: Pre-setup
Before setting up our ownCloud instance we need to create a folder on the hard drive for our data to rest within.
Quickly open up a shellinabox session and type these three commands separately:
1 cd /media/serverhdd
2 mkdir cloud
This will create the folder and change the permissions so owncloud can write to it.
Click next, you may then be asked if you want to install into a subdirectory, just delete the text in the field and click next. If not just carry on.
Here is the important part. This page is where we will specify a folder for the data to go into, and admin account, and the SQL information.
Type //media/serverhdd (or whatever you mounted your hard drive as) followed by /cloud. So it'll look like this: //media/serverhdd/cloud
Next click the MySQL button and the page will expand, revealing options for the database.
Here type in the MySQL username and password for the owncloud user we made.
Type in the database name of which you wish to use (we also created one earlier)
This will finalize the setting and load up the owncloud service.
Ta Dahh!!
Everything is beginning to come together now. Lets learn how to create a user account. Next Step.
http://www.instructables.com/id/Ultimate-Pi-Based-Home-Server/
Step 20: Creating an ownCloud User
ownCloud has loads of features so it would take a whole lot of time to explain each one and how to use it. That my friends, is another instructable for another day. Have a
look here for a list and usage.
Click the user options button in the top corner then click on Users from the dropdown.
To create a new user, type a username and password into the appropriate boxes above the table view of current users.
Here you will see an admin entry and an +add group entry.
Click +add group, then type a group name for standard user accounts. This only has to be done once.
Then press enter (Keyboard key). This will create and select the new group.
Now we need to set the data limit for the user. Do this using the Storage drop down on the row of the user. The top option sets the default.
Once you have done all this, you've created your new user account. Logout (user button in top right > logout) then log back in as the new user to test things out.
Next, lets s a m b a.
*The term fairly and any other reference to simplicity or difficulty throughout this instructable is subjective, however this instructable is intended for anyone who
understands the basic operation of a PC, so most should be able to follow it.
http://www.instructables.com/id/Ultimate-Pi-Based-Home-Server/
Step 21: Let's all do the Samba
Samba will allow us to share documents with windows PC's on the same network. This will allow the server to be used as a central file server within your home. This is
useful if you have more than one PC within the network.
Installation begins with opening the module from the Un-used modules category within webmin.
You will then be told "Sorry Mr, you don't have that module," or something like that anyway. Just click click here to install it.
The samba package and any other dependencies have been installed. Continue to the next step to set it up.
http://www.instructables.com/id/Ultimate-Pi-Based-Home-Server/
Step 22: Configure Samba Drives
So now we'll setup ad configure the samba instance. Samba operates on the windows file share protocol, so integration into a windows network (or singular PC) is
seamless.
Next select the checker boxes along the left hand side of the default directory mounts.
Click the delete selected drives button located below the table. The page should now look like this:
Here we can now define a name, and file location. We can also set permissions for samba users.
Directory to share: /media/serverhdd/* (here * is a wild card. Mount any folder of your choice. We've already created our cloud data folder so lets mount that.)
Owner: root
Permissions: 755
Group: Root
Available: Yes
Browseable: Yes
Here you can see the mounted drive. Mine is a users folder I created on the hard drive.
Now we need to edit an option. Click on the share you've just made. From there click the Security access and control button from the bottom.
Then Save.
Return to the samba config homepage, and continue until you have mounted all the shares you wish to add.
In the next step we will create a user so we can login to the shares via windows explorer.
http://www.instructables.com/id/Ultimate-Pi-Based-Home-Server/
Step 23: Add a Samba User
I often find the WebGUI for adding samba users to be buggy and unreliable. Because of this, I'm going to teach you to add a user the terminal way.
Before we continue it is important to note: to add a samba user there must be an exsisting Unix account that you can link to. The samba config will rely on the Unix user
account for permissions. Name the samba user the same as the Unix user account.
Nice and Tidy. For changes to take effect, you'll need to restart the samba service. This is easily done via the GUI with the restart button ant the bottom of the page.
All done. Now Head over to your windows PC for the next part, accessing the share.
Full details on the tool pdbedit are available here.
Click Map network Drive. (Locations are as follows: Windows 8: top toolbar under Computer group. Windows 7: On the toolbar below the filepath. Windows Vista: Within
the Tools... dropdown that is located on the toolbar below the filepath. Windows XP: Left click white space.)
First Specify the drive letter. All available ones will be within the dropdown.
Next location, Which will be in the format \\*your server name here\*samba share name here*
Check the Reconnect at sign-in and Connect using different credentials options.
Click Finish.
Once that has been done, the share can be used like a normal storage media from within Windows.
http://www.instructables.com/id/Ultimate-Pi-Based-Home-Server/
Step 25: Install Transmission (Bit Torrent)
Transmission is a torrent/download manager. You simply visit the port the service is running on to open the web UI. From there you can simply copy and paste URL
magnet links, file links, torrent file links and more. The interface is super simple to use.
Here we caan see the files being downloaded and added to the filesystem.
Once the package has installed, we need to stop the daemon (package) from running. This is important to do or the setting file may become corrupt.
Next we need to configure the username and password for the instance. You'll use these credentials to login to the web user interface.
Edit the User and password enteries to whatever you wish. the password entry is named rpc-password and user is rpc-username. Hit shift and X to exit and press Y to
save changes.
Now visit 192.168.2.*:9091. Here you'll hit login dialog. Enter the credentials and login.
After that, a sucsessful login will load the interface. Simply use the add file icon to pase a link for the manager to download. Again full usage guides are available on the
trasmission website.
http://www.instructables.com/id/Ultimate-Pi-Based-Home-Server/
Step 26: The Principal
This step will explain how we will achieve worldwide access for the server.
The first: no-ip, is a free service available to anyone. It comes in two forms, the sync client and the online service account. The accounts are free from the no-ip website.
Create an account here.
The second element is a function built into almost all home routers: port forwarding. This function allows us to redirect incoming requests to other devices on the network,
i.e., the server. This has to be done as any incoming connection from outside your home network will just direct us to the router management page. We need to land on
our servers services page.
To do this the two features work together to provide a simpler way to connect to the server.
http://www.instructables.com/id/Ultimate-Pi-Based-Home-Server/
Step 27: Install no-ip
To install no-ip , open a new shell session.
Now download the tar file to the directory, from no-ip.com with: wget http://www.no-ip.com/client/linux/noip-duc-linux.tar.gz
Change the cd (current directory) to no-ip folder using: cd noip-2.1.9-1 Then make the files with: make
During the install you'll need your no-ip registerd email address and password to hand. Leave the default update period as 30.
Then login to no-ip.com to confirm the client carried out it's first update
Okay so the basic idea is that you type in username.no-ip.biz:* and wind up at the service allocated for *.
So we need to set this up for four instances: ownCloud, Transmission, Webmin and shell in a box.
The incoming ports can be different to the outgoing ports, so you could have userame.no-ip.biz:1 leading to webmin, userame.no-ip.biz:2 leading to ownCloud and so on.
This makes it more convenient to remember.
This means your port forwarding table should be filled out like the illustration below.
http://www.instructables.com/id/Ultimate-Pi-Based-Home-Server/
Step 29: Final: Backup
Now we've almost finished. The final procedure is to unplug the power, remove the SD and create a back-up image of the OS in it's current state. This way if something
goes wrong you have a basic fresh custom set-up to return to.
In the text field type the location of the desktop followed by \backup.iso (something like this C:\Users\Dillon\Desktop\backup.iso). This will tell the software to read the file
and save it to the desktop.
This animated GIF shows a write taking place, but the process is the same.
This will take around 5-10 minutes. After it's done, put the SD back into the Pi and rest at ease. If you ever need to refresh your system (system restore) use the backup
you created to write the ISO to the card, as in step 5. This means all will not be lost. For extra sense of peace, after any major system changes, perform a new backup
and save it with a date. This way you'll have different revisions of backups to choose from.
http://www.instructables.com/id/Ultimate-Pi-Based-Home-Server/
Step 30: Congratulations - Felicitaciones - Glückwünsche - æ•-å–œ
Over 6,000 words and more than 170 illustrative diagrams and images later, we have reached the end.
If you made it this far, well done. I hope you found it an awesome journey. The learning curve may have been steep, but i encourage you to fly from the nest and begin to
lean more about the Linux world.
If you have any issues or questions, drop one below. I hope you enjoyed reading and learning as much as I did writing.
Thank you.
Related Instructables
Host your
Raspberry Pi: website on
Minecraft Server Raspberry Pi - Raspberry pi by Raspberry Pi
Jack of all Personal ARM sajingeo simple blog
by Host your own
trades. by Cloud Server by server. by
chrisgoad3882 blog from a $25
Computothought greenyouse Computothought
Raspberry Pi
computer by
lightnin9
Advertisements
http://www.instructables.com/id/Ultimate-Pi-Based-Home-Server/