Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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?
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.
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.
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
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.
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
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"?
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
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
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.
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.
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 ----------
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.