LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-15-2012, 09:51 AM   #1
Aunnix
Member
 
Registered: Aug 2012
Posts: 126

Rep: Reputation: Disabled
Starting a server build


Hi Everyone,

I will be starting to install Linux on my previous computer tomorrow evening, and was looking for any ideas, help, advice, etc. that anyone has to offer.

Firstly, the specs of the server machine:
MSI k9n SLI ready motherboard
8GB 800mhz OCZ RAM
Dell 300W (maybe 350W) power supply
AMD Athlon 64 X2 6000+ 3.1 Dual Core processor
2 X 750GB Western Digital Caviar Black SATA hard drives (plan to run in a raid setup to mirror)
Radeon ATI HD 4650 Video Card (mobo has no on board video)


So far, my intentions for this server are:
1 - website hosting (my few personal websites, and maybe a few "pro bono" sites for friends/family members

2 - website development / testing (php and mysql, etc.)

3 - file sharing on my home network (not looking to share online with strangers)

4 - music and video streaming (not necessarily streaming from various online sources... I want to be able to stream my own music and video files that I've downloaded to devices on my own home network

5 - of course, security... I need all of this to be secured so no one can have access to my data outside of my home network. I don't want my server to download random files, or allow anyone outside of the home network to access the server and download random (potentially threatening) files to my server (I don't know if this one is possible anyway).

6 - once I have the OS installed and running smoothly, I plan to begin accessing the server remotely from main, everyday use, computer.



I will be heading to Micro Center in a couple hours to pick up a few SATA cables and prepare to do the install and raid setup. The functions above are the basic / main functions I can think of and / or care about right now. I'm sure once I start diving into the world of servers I'll find more for it to do?

Please, any advice on the system, how to run it, issues I may run into, Linux distributions, or anything that comes to your mind, share it. I figured I'd throw up this post to see if it will help me with keeping the installation(s) as smooth and simple as possible. It could also help me find some other interesting server functions to run / install..

* I've had a pretty basic introduction to Linux, but haven't played around with it much at all.. So, I'm not too positive of what all I'm capable of doing with it and how to go about it.


Thanks much!!
 
Old 08-15-2012, 11:36 AM   #2
sjreilly
Member
 
Registered: Oct 2007
Location: Edinburgh, Scotland
Distribution: Debian, CentOS, RHEL, Mint, Ubuntu
Posts: 79

Rep: Reputation: 15
Aunnix,

I would heartily recommend Debian Stable. Does all the things you are after, plus a lot more.

Steve

Last edited by sjreilly; 08-15-2012 at 11:38 AM.
 
Old 08-15-2012, 11:58 AM   #3
Aunnix
Member
 
Registered: Aug 2012
Posts: 126

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by sjreilly View Post
Aunnix,

I would heartily recommend Debian Stable. Does all the things you are after, plus a lot more.

Steve


Thanks. I've also been told to check out Ubuntu (12.04 or something?) as it is supposed to be very easy to install and setup, and I've been told about Cent OS or something. Any comments on these builds?
 
Old 08-15-2012, 01:32 PM   #4
ks8
Member
 
Registered: May 2003
Posts: 38

Rep: Reputation: 15
ks8

I have debian squeeze (stable) running on my older single core desktop with one GB of ram. I use it for my photo web server. Debian is easy to install. Just download the netinstall. When it comes to partitions, I recommend using one single partition, or 2 (/root with 15-20 GB and /home for the balance of the space in your HDD). You also need to have a small swap (e.g., 1 GB).

Ubuntu is based on debian, so most commands are alike.
 
Old 08-15-2012, 01:50 PM   #5
GregJetter
LQ Newbie
 
Registered: Jun 2006
Location: Lazy Mountain Alaska, USA
Distribution: Red Hat /FC
Posts: 9

Rep: Reputation: 0
Put a little time into developing your firewall , if your going to be exposing the server to the world your going to get whacked as soon as it connects to the world. figure out what ports you need and how to control access . learn what a "host.deny" file is and how to use it. Learn how to use the log files to ferret out problems. running a server is a lot of fun , I've had a linux server for my home running for the last 15 years. Have a back up plan and do your data backups. For each service you run there is going to be some type of configuration file , learn to read them and how to tighten them up , as they all come with default settings that need to be tailored to your own situation.

and don't forget a backup power supply UPS , and consider using detachable drives instead of mirroring , physically rotating the drives with spares pre configured and ready. RAID is great but a pain in the ass to restore from.

have fun

Greg
 
Old 08-15-2012, 02:16 PM   #6
ks8
Member
 
Registered: May 2003
Posts: 38

Rep: Reputation: 15
Yes, secure server is important once it is open to the internet. I followed this tutorial to install the apache server:
http://aboutdebian.com/internet.htm

There are other useful how-to in there.
 
Old 08-15-2012, 03:01 PM   #7
Aunnix
Member
 
Registered: Aug 2012
Posts: 126

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ks8 View Post
I have debian squeeze (stable) running on my older single core desktop with one GB of ram. I use it for my photo web server. Debian is easy to install. Just download the netinstall. When it comes to partitions, I recommend using one single partition, or 2 (/root with 15-20 GB and /home for the balance of the space in your HDD). You also need to have a small swap (e.g., 1 GB).

Ubuntu is based on debian, so most commands are alike.

Care to elaborate on the partitioning? I assume the /root would be what houses the OS/Linux distro? does the /home partition just the rest of the HDD space where I'll be storing my files? I'm confused about the "balancing of space" comment, lol.
 
Old 08-15-2012, 03:22 PM   #8
ks8
Member
 
Registered: May 2003
Posts: 38

Rep: Reputation: 15
Yes, /root is for the system files. 20GB is plenty. You can back up the image with GParted-Clonzilla easily and fast (clonzilla is a package inside GParted). /home is where the user data are. You can back it up with grsync which can do incremental backup(come as debian package).

I also use ext3 (partition type) for /root, and ext4 for /home. You can read about them in aboutdebian.com
 
Old 08-15-2012, 03:24 PM   #9
Aunnix
Member
 
Registered: Aug 2012
Posts: 126

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by GregJetter View Post
Put a little time into developing your firewall , if your going to be exposing the server to the world your going to get whacked as soon as it connects to the world. figure out what ports you need and how to control access . learn what a "host.deny" file is and how to use it. Learn how to use the log files to ferret out problems. running a server is a lot of fun , I've had a linux server for my home running for the last 15 years. Have a back up plan and do your data backups. For each service you run there is going to be some type of configuration file , learn to read them and how to tighten them up , as they all come with default settings that need to be tailored to your own situation.

and don't forget a backup power supply UPS , and consider using detachable drives instead of mirroring , physically rotating the drives with spares pre configured and ready. RAID is great but a pain in the ass to restore from.

have fun

Greg

I assume I should develop the firewall before setting up the configurations / functions? So far, I'm under the impression that once I install the OS I'm basically ready to go online. Also, can you refer me to any good resources on reading up / figuring out the ports issue(s)? I assume for a backup power supply, there is some type of external PSU? I can't run a second in the ATX tower I'm using, lol, and I don't want to spend any more money on this, hahaha.

I will probably start out mirroring (so I can get everything running for as little cost as possible) and once I start moving data around significantly I'll have to look into the detachable drives. Is this the same thing as "hot swappable"?
 
Old 08-15-2012, 03:31 PM   #10
Aunnix
Member
 
Registered: Aug 2012
Posts: 126

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ks8 View Post
Yes, /root is for the system files. 20GB is plenty. You can back up the image with GParted-Clonzilla easily and fast (clonzilla is a package inside GParted). /home is where the user data are. You can back it up with grsync which can do incremental backup(come as debian package).

I also use ext3 (partition type) for /root, and ext4 for /home. You can read about them in aboutdebian.com
Cool. I plan to use as little partitions as possible. I figured it will make it easier for storing files and mirroring. Incremental backup?


Quote:
Originally Posted by ks8 View Post
You also need to have a small swap (e.g., 1 GB).
What do you mean small swap? I need a third hard drive?

---------- Post added 08-15-12 at 04:32 PM ----------

Quote:
Originally Posted by ks8 View Post
Yes, secure server is important once it is open to the internet. I followed this tutorial to install the apache server:
http://aboutdebian.com/internet.htm

There are other useful how-to in there.
Thanks! I do plan to use apache so this should come in handy.
 
Old 08-15-2012, 04:21 PM   #11
ks8
Member
 
Registered: May 2003
Posts: 38

Rep: Reputation: 15
Incremental backup = backing up only the new files, and files that has been changed since the last backup. This speeds up the backup process.

Swap - is a third partition that is required. It is like a page file in MS. Since you have so much memory, you will probably never use swap, so make it small, 1 GB is plenty.
 
Old 08-15-2012, 06:54 PM   #12
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,348

Rep: Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749
Definitely check out the Security forum.
I'd also recommend looking at Centos as the OS (free rebuild of RHEL).
Lots of manuals here www.linuxtopia.org; you probably want the SysAdmin list http://www.linuxtopia.org/online_boo...ion_index.html

You might find this tutorial useful as a good starter http://rute.2038bug.com/index.html.gz
 
Old 08-15-2012, 07:49 PM   #13
Aunnix
Member
 
Registered: Aug 2012
Posts: 126

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ks8 View Post
Incremental backup = backing up only the new files, and files that has been changed since the last backup. This speeds up the backup process.

Swap - is a third partition that is required. It is like a page file in MS. Since you have so much memory, you will probably never use swap, so make it small, 1 GB is plenty.
Ok, so I'll actually have 3 partitions? Above (in earlier post) you said you recommend only one or two partitions...

---------- Post added 08-15-12 at 08:50 PM ----------

Quote:
Originally Posted by chrism01 View Post
Definitely check out the Security forum.
I'd also recommend looking at Centos as the OS (free rebuild of RHEL).
Lots of manuals here www.linuxtopia.org; you probably want the SysAdmin list http://www.linuxtopia.org/online_boo...ion_index.html

You might find this tutorial useful as a good starter http://rute.2038bug.com/index.html.gz

Thanks!
 
Old 08-15-2012, 08:35 PM   #14
padeen
Member
 
Registered: Sep 2009
Location: Perth, W.A.
Distribution: Slackware, Debian, Gentoo, FreeBSD, OpenBSD
Posts: 208

Rep: Reputation: 41
If it was me, I wouldn't bother about separate partitions under /, especially since you will be serving large multi-media files, so the size of, say, /var or /srv could be quite big.

I also would use a smaller swap partition than 1GB, that seems big to me. You will likely never use it, and 512MB would be plenty.

I run Debian Squeeze on two servers, FreeBSD on another, and RHEL on another. I've tried CentOS, and found Debian easier to administer for a server that is for my own use. FreeBSD is great as a server (and OpenBSD even more so) , but if you're a linux newbie you may find the BSDs a bit intimidating.
 
Old 08-16-2012, 04:20 AM   #15
sjreilly
Member
 
Registered: Oct 2007
Location: Edinburgh, Scotland
Distribution: Debian, CentOS, RHEL, Mint, Ubuntu
Posts: 79

Rep: Reputation: 15
I run a number of servers (Debian, Ubuntu and CentOS), but I chose to run Debian at home because of the huge number of packages available, the fact that it a rolling-update install (ie no need to reinstall when the next version comes out) and it just keeps going with little (no) maintenance.

My preference would be to go for a 5 partitions;

10G /
5G /tmp
5G /var
RAM+2G swap
/home "the rest"

Given that you have 750G drives the amount taken up by the OS is small. You might even want to consider using an SSD drive for the OS then use the two 750G drives for /home mirror.

I would have a good long "play" with setting things up. Try different setups and just enjoy the experience.
I don't have a firewall running on my server as I have a NAT firewall on my DSL router, so only WWW and SSH ports are directed to that machine (and SSH is on a none-default port, away from prying eyes)

Saying that, I do use fail2ban to drop connections from people trying too hard to access my server.

Don't put all your data on the machine until you've had a GOOD LONG PLAY!

and BACKUP your data!!!!! (rdiff-backup is great for incremental backups, and clonezilla (mentioned previously) is great for taking a snapshot image of the OS).

padeen - I have never used a /srv partition. Today was the first day I've ever looked in that dir and there is nothing in it.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Easy way to Build FTP server in Ubuntu Server 12.04 LXer Syndicated Linux News 0 05-29-2012 08:10 AM
jenkins continuous build server not starting application userbrian Programming 2 03-31-2012 02:12 PM
Starting to build a cluster martins48 Linux - Software 4 10-21-2011 05:33 PM
Building my first home server - atom based router/file server build need advice mothergoose729 Linux - Networking 5 03-23-2010 03:19 AM
starting xprogram without starting X server. bruse Linux - Newbie 9 04-26-2005 07:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:16 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration