Jump to content

Howto: create your own linux home server using Debian

Yes' date=' I even went so far as to explicitly download the latest sensor-detect script, to no avail I forgot to mention it in the tutorial, apparently.[/quote'] That may be because you are running a relatively recent mobo on an older debian kernel (2.6.x im guessing?) and the sensors modules haven't been updated to include probing for ivy bridge. You might want to try to run something like a fedora live cd/usb to see if that works.

I also forgot to mention that you don’t need sudo in front of the su command. su will prompt you to for the root password anyway.

I don't know how to set up the key pairs as of yet (never really thought about doing it)' date=' I welcome you to post the howto here and I'll make an entry in the original post.[/quote']Sure, Here's a basic how to with some explanation of key pairs:

A keypair consists of a private and public key. In the case of SSH, the public key will sit on your server and can be freely transferred between computers and be given to others without any security risk. Generally speaking a public key encrypts information and a private key decrypts it. Basically this works by the server issuing a "challenge" and encrypting it using the public key, which can only be answered correctly by a computer if it has the correct private key. From there a secure and encrypted connection is established.

on a Windows client:

To generate a key pair download PuTTYgen from here and run it. At the bottom of the window check ssh2 RSA, put the bits at 2048 and generate the key. Enter a passphrase that will be used to secure your private key, which will need to be entered every time you use it like a password. Click save private key and save it somewhere safe. Now you will need to save the public key on the server. To do this, Download wincsp, run it, click new and enter your servers IP, username and password like you would in PuTTY. Save the profile and connect. Once in, go into the .ssh folder on your server. Create a file called authorized_keys if it is not there already. Copy the text from PuTTYgen in the window below where it says "public key for pasting into OpenSSH authorized_keys file:†into the authorized_keys file, save it and exit. Now you can test your key with PuTTY, by loading your PuTTY profile and go to the SSH>Auth section where you can browse to your private key. Save your profile and connect.

On a Linux client:

To generate a key pair, use the ssh-keygen command, which should come with the OpenSSH package (I’m not a debian guy so not entirely sure on this). Run the command as:

ssh-keygen -t rsa -b 2048

and it will prompt you with a few questions. The only thing that will need to be entered is the passphrase, the defaults are fine for the rest so just push enter past each one. Now you copy the public key to the server with:

 ssh-copy-id -i ~/.ssh/id_rsa.pub -p @

SSH will use your private key as the default key when you connect, so you can ssh in as usual and it will prompt you for the passphrase.

Fair enough, I forgot about that.
Link to comment
Share on other sites

Link to post
Share on other sites

  • 2 months later...

They probably are. This tutorial was made in the vBulletin era ;)

 

I'm still planning on rewriting it. But at the moment, I'm having exams.

oke :p

 

Best of luck with the exams!

Respect the Code of Conduct!

>> Feel free to join the unofficial LTT teamspeak 3 server TS3.schnitzel.team <<

>>LTT 10TB+ Topic<< | >>FlexRAID Tutorial<<>>LTT Speed wave<< | >>LTT Communies and Servers<<

Link to comment
Share on other sites

Link to post
Share on other sites

I don't have the time or need to read through this right now, but I'll be setting up a new server in a few months and I'm considering using linux. So I favorited :)

 

Cheers for taking the time to write this btw. After a quick once over it looks very in depth and well written :)

Workstation: 3930k @ 4.3GHz under an H100 - 4x8GB ram - infiniband HCA  - xonar essence stx - gtx 680 - sabretooth x79 - corsair C70 Server: i7 3770k (don't ask) - lsi-9260-4i used as an HBA - 6x3TB WD red (raidz2) - crucia m4's (60gb (ZIL, L2ARC), 120gb (OS)) - 4X8GB ram - infiniband HCA - define mini  Goodies: Røde podcaster w/ boom & shock mount - 3x1080p ips panels (NEC monitors for life) - k90 - g9x - sp2500's - HD598's - kvm switch

ZFS tutorial

Link to comment
Share on other sites

Link to post
Share on other sites

I don't have the time or need to read through this right now, but I'll be setting up a new server in a few months and I'm considering using linux. So I favorited :)

 

Cheers for taking the time to write this btw. After a quick once over it looks very in depth and well written :)

I'll try to rewrite the thing by then. I'm glad someone actually is planning on using it.

I also wrote this for myself. It's always a good idea to document your work, for later reference ;)

Link to comment
Share on other sites

Link to post
Share on other sites

I hope I get the opportunity to use this guide in the near future :)

export PS1='\[\033[1;30m\]┌╼ \[\033[1;32m\]\u@\h\[\033[1;30m\] ╾╼ \[\033[0;34m\]\w\[\033[0;36m\]\n\[\033[1;30m\]└╼ \[\033[1;37m\]'


"All your threads are belong to /dev/null"


| 80's Terminal Keyboard Conversion | $5 Graphics Card Silence Mod Tutorial | 485KH/s R9 270X | The Smallest Ethernet Cable | Ass Pennies | My Screenfetch |

Link to comment
Share on other sites

Link to post
Share on other sites

I don't have the time or need to read through this right now, but I'll be setting up a new server in a few months and I'm considering using linux. So I favorited :)

Cheers for taking the time to write this btw. After a quick once over it looks very in depth and well written :)

same here so thanks for all the work your putting in mg2r

oh dear was that YOUR computer i just downloaded a few dozen viruses on when you weren't paying attention?

Link to comment
Share on other sites

Link to post
Share on other sites

It would be cool if you could show how to run a minecraft server from this

The best way to predict the future is to invent it

Link to comment
Share on other sites

Link to post
Share on other sites

 

Great guide... but abit missing on parts as mentioned by azeotrope. Also, could you cover on mounting permissions, creating user accounts and setting up a streaming server?

This is a great guide, could the mods please sticky this?

Oh, I totally forgot users and groups in the "Linux basics" section. Damnit. Also, what do you mean with streaming server? Which protocol are you after? I just mount the samba shares on my Windows desktop and stream all my movies and music of of it as if it were a local hard drive. I'll be editing this guide soon, when I find the time ;) Thanks for your feedback!

I don't know if this is what Huntsman was asking for, but I would be interested in setting up some kind of streaming system that can interact with say blu-ray players, smart phones, or tablets that may struggle to connect to a standard windows share. Any knowledge on setting something like this up on linux? Tutorial appreciated :D

Link to comment
Share on other sites

Link to post
Share on other sites

It would be cool if you could show how to run a minecraft server from this

Check this link: http://www.minecraftwiki.net/wiki/Tutorials/Setting_up_a_server#Linux_instructions

That tutorial does assume some linux knowledge. if you can't get it figured out, I have experience running minecraft servers off linux for a couple years now, so shoot me a PM or something. On headless machines its a little more difficult but still do-able using screen or sending things into the background and managing everything from ingame. I personally add a & to the end of my script to launch the server, which sends it to the background and make sure I am in the ops file, then I can run any commands I would run in the console while i'm actually logged in to the game. Good luck!

Link to comment
Share on other sites

Link to post
Share on other sites

I don't know if this is what Huntsman was asking for, but I would be interested in setting up some kind of streaming system that can interact with say blu-ray players, smart phones, or tablets that may struggle to connect to a standard windows share. Any knowledge on setting something like this up on linux? Tutorial appreciated :D

I would love to, but I do not have any devices to test it with. I will keep in mind, though...

Link to comment
Share on other sites

Link to post
Share on other sites

Hey, nice thread you have here. I thought I'd help out by de-HTML-ifying your screwed up post.

I might not have gotten everything completely right as you'd want it, but it should save you

some work.

I'll edit this post down once you've copied the text and your post is restored. You should

be able to copy it by quoting this post I think.

------------------------------CONTENT------------------------------

redacted - too slow :lol:

BUILD LOGS: HELIOS - Latest Update: 2015-SEP-06 ::: ZEUS - BOTW 2013-JUN-28 ::: APOLLO - Complete: 2014-MAY-10
OTHER STUFF: Cable Lacing Tutorial ::: What Is ZFS? ::: mincss Primer ::: LSI RAID Card Flashing Tutorial
FORUM INFO: Community Standards ::: The Moderating Team ::: 10TB+ Storage Showoff Topic

Link to comment
Share on other sites

Link to post
Share on other sites

What is the point of this guide when there is going to be better, more detailed and up to date info on the Debian wiki?

Link to comment
Share on other sites

Link to post
Share on other sites

What is the point of this guide when there is going to be better, more detailed and up to date info on the Debian wiki?

Because I think this is more beginner-friendly than the Debian wiki. This is a to-the-point explanation of how to do basic stuff to get your system running and configured in a couple of hours work.

If you go on the Debian wiki searching for the way to turn your box into a web server, you get this. Someone that is new to Debian has no idea what to do with that. Also, I think that a lot of "introductions to linux" are overly long or complicated. Apart from that, I like to document everything I do on my server for my own personal reference anyway, so why not write it in a fashion everyone can understand? :)

Link to comment
Share on other sites

Link to post
Share on other sites

  • 2 weeks later...

Installing webmin

Webmin is an awesome online management tool which makes managing your server easier. I actually use it more for uploading stuff to my server than anything else, but it is very nice to have. If you every land on a computer where you can't access SSH, you can simply manage your server via a browser (which has proven its use to me a couple of times).

 

To install it, you can simply follow the instructions on the webmin website. In short, you need to do:

wget http://prdownloads.sourceforge.net/webadmin/webmin_1.630_all.debsudo apt-get install -f perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl apt-show-versions pythonsudo dpkg --install webmin_1.630_all.debrm webmin_1.630_all.deb

After that, you may reach webmin by browsing to https://192.168.1.150:10000

 

Back to index

Link to comment
Share on other sites

Link to post
Share on other sites

Really nice thread man, After reading through it briefly I can say I'v learnt a fair bit :)

My Meme Proudly Featured on the Live-Stream: http://prodigydoo.com/ImageStorage/memes/linus-meme-6.jpg
Some Threads You Should Get involved in: Linus and Slick Memes     Youtubers on the LTT Forum      The List of Tech YouTubers (Contribute!)      Disable AdBlock for Linus (Guide)

Link to comment
Share on other sites

Link to post
Share on other sites

A very good and comprehensive guide so far. I look forward to reading the rest, especially the section on owncloud.

I have a few suggestions which you might consider though:

The installation part feels a bit short, mostly because it doesn't cover partitoning and filesystem creation. I know there are lots of guides out there that already cover this, so maybe you could link to one? the choice of whether or not to set seperate parititions for /var /home et al. and which filesystem to choose can be pretty intimidating for someone new to linux.

Mounting a drive is not just to declare a mount point, it is done so that the kernel can read and recognise the filesystem and run checks etc. Windows mounts drives too, the difference being that windows mounts everything automatically.

I don't think the analogy of C:\ to / is very accurate, since EVERYTHING exists under root, but not so under C:\. I understand that the FHS might be hard to get to grips with for new users, but it's a bit of a stretch.

The section on mounting devices seems a bit confusing as per how block devices are referenced. The idea that a file represents a device is strange to new users, so might need a bit more explainig? block devices are not always /dev/sdX, they can have strange names especially if you are using a raid card in JBOD. a good way to actually find your drives is with lsblk -f. generally speaking, /dev/sda will be the drive plugged into sata0, /dev/sdb in sata1 etc on an ATX mobo, but not always.

It may be a good idea to mention how to secure an SSH server properly, especially if it will be opened to the net. disallowing root logins, not running on 22 and using key pairs are a must IMO.

Are you aware that you need to run sensors-detect first in order to load the correct kernel modules in order to use the sensors command? It's unlikely to work otherwise.

The wikipedia page may be useful, but Linux raid wiki is a far better and more in depth resource for setting up mdraid. It also covers aspects like chunk size and how to properly determine stripe size on the filesystem, as well as a few more performance pointers. Personally I also think the monitor tool is worth running since you can set it up to inform you (by email or twitter for example) when a drive drops out of the array.

On a server which exclusively runs linux, I don't see the point of using fdisk MBR instead of the GPT tools like gdisk, cgdisk etc. GPT is far more flexible and there are no stupid limitations on whether or not you can use GPT on BIOS like on windows.

Hopefully I'm not being over critical :)

Sounds like another arch user :P

Link to comment
Share on other sites

Link to post
Share on other sites

  • 4 months later...

Holy mother of potatoes

Main Rig: -FX8150 -32gb Kingston HyperX BLUE -120gb Kingston HyperX SSD -1TB WD Black -ASUS R9 270 DCUII OC -Corsair 300r -Full specs on Profile


Other Devices: -One Plus One 64gb Sandstone Black -Canon T5 -Moto G -Pebble Smartwatch -Nintendo 2DS -G27 Racing Wheel


#PlugYourStuff - 720penis - 1080penis - #KilledMyWife - #LinusButtPlug - #HashtagsAreALifestyle - CAR BOUGHT: 2010 Corolla

Link to comment
Share on other sites

Link to post
Share on other sites

  • 1 month later...

Installing SABnzbd+ (usenet client)

SABnzbd+ is an open source usenet client written in Python. It features a sexy web UI, good performance and powerful features. Setting it up is easy, so let's go!

 

Editing your sources

The first thing to do is letting apt-get know where it can find the necessary packages to install SABnzbd+. The place(s) apt-get goes looking for packages is (are) defined in your sources.list file. On both Debian and Ubuntu, you will find this file in /etc/apt. It is only writeable by the superuser.

 

To install SABnzbd+, you will need to make sure that both the contrib and the non-free packages are available. You can do this by editing sources.list.

sudo vim /etc/apt/sources.list

Your file should look something like this:

## deb cdrom:[Debian GNU/Linux 7 _Wheezy_ - Official Snapshot amd64 LIVE/INSTALL Binary 20131013-20:58]/ wheezy maindeb cdrom:[Debian GNU/Linux 7 _Wheezy_ - Official Snapshot amd64 LIVE/INSTALL Binary 20131013-20:58]/ wheezy maindeb http://ftp.belnet.be/debian/ wheezy main deb-src http://ftp.belnet.be/debian/ wheezy maindeb http://security.debian.org/ wheezy/updates maindeb-src http://security.debian.org/ wheezy/updates main# wheezy-updates, previously known as 'volatile'deb http://ftp.belnet.be/debian/ wheezy-updates maindeb-src http://ftp.belnet.be/debian/ wheezy-updates main

All the deb entries are software repositories. Notice the two lines in bold only have 'main' at the end. You will need to add 'contrib non-free' to the end of both of these lines and save the file. If you're unsure of which lines to pick, you can always just add

deb http://http.debian.net/debian wheezy contrib non-freedeb-src http://http.debian.net/debian wheezy contrib non-free

to the end of the document.

 

Note that you need to adjust 'wheezy' to the codename of your version. You can consult https://wiki.debian.org/DebianReleases#Production_Releases for a translation between version number and name. The repositories that already were in your sources.list should have the right name by default.

 

After you've edited your sources.list, you still need to reload the package cache. You can do this by running

sudo apt-get update

Installing the package

This is the simplest step in the SABnzbd+ installation:

sudo apt-get install sabnzbdplus

Configuring the service

You'll need to clarify as which user SABnzbd+ needs to run. You also need to set to what address and port it needs to listen to. You can configure this by editing /etc/default/sabnzbdplus:

sudo vim /etc/default/sabnzbdplus

You should edit that file to look something like this:

# This file is sourced by /etc/init.d/sabnzbdplus## When SABnzbd+ is started using the init script, the# --daemon option is always used, and the program is# started under the account of $USER, as set below.## Each setting is marked either "required" or "optional";# leaving any required setting unconfigured will cause# the service to not start.# [required] user or uid of account to run the program as:USER=simon# [optional] full path to the configuration file of your choice;#            otherwise, the default location (in $USER's home#            directory) is used:CONFIG=# [optional] hostname/ip and port number to listen on:HOST=0.0.0.0PORT=8080# [optional] extra command line options, if any:EXTRAOPTS=

The user option sets the user that this program will run as. 0.0.0.0 means that you want it to listen to any address that is assigned to the machine. You can choose your port, but port numbers below 1024 require the program to run under root privileges.

 

After editing the file, you need to start the service:

sudo service sabnzbdplus start

Configuring the web UI

Now, you should be able to go to http://192.168.1.150:8080 and be greeted by the setup wizard. Just fill in the connection details given to you by your usenet provider and you should be good to go.

Once you entered everything, SABnzbd+ will restart.

 

After the restart is complete, you may go to 'config' and set up everything to your liking. Pay special attention to 'folders', as you can set where you want SABnzbd+ to download your articles.

 

 

Back to index

Link to comment
Share on other sites

Link to post
Share on other sites

whats up with the whole domain thingy on samba and stuff could you make guide

If you tell a big enough lie and tell it frequently enough it will be believed.

-Adolf Hitler 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×