linux server setup: file, ftp, web, and tv by misterhaan, jan 2008 (updated jan 31st)
this guide is the steps i went through when i upgraded my “server” hecubus to fedora 12. hecubus serves as a file server (samba and nfs), ftp server (pure-ftp), web server (apache, mysql, and php), and personal video recorder (mythtv). setup for fedora 12 as well as these other packages are detailed. mythtv setup includes setting up hauppage hvr 2250 and pvr 150 cards with schedulesdirect guide information.
gnu/linux (fedora)
this guide uses hecubus as an example. in general, the hardware in hecubus is whatever is left over after i upgrade my main machine. it’s not a server-class machine, but it keeps up okay in the server roles i use it for because there are really only 5 client machines that ever connect to it (the demand on it is relatively light). some may be able to get acceptable results with less powerful hardware, while others may need more powerful hardware. specific requirements are listed at the beginning of each section.
a dvd drive and several gigabytes of hard drive space are required for installing fedora 12. there are cd images available as well, but this guide uses a dvd image.
fedora install disc images are available at fedoraproject.org. i use the x86_64 dvd — i recommend using bittorrent to get the image faster, provided you’re comfortable using a bittorrent client. once downloaded, burn the disc image to a dvd.
the fedora install dvd is bootable, so unless your machine is incredibly old, you should be able to simply put the fedora dvd in the dvd drive and boot up the machine to start the fedora installer.
once the fedora menu comes up, choose install or upgrade an existing system. after a while it asks if you want to test your installation media. i generally do this the first time installing from a disc to ensure i had a good download. note that it takes a long time though. after this step, anaconda (the graphical install program) starts up.
choose your language and keyboard, then choose install fedora if given the choice between installing and upgrading. next i enter hecubus for the hostname since that’s my server’s name.
next is time zone selection, where i find it easiest to click on the map to choose my time zone. i also leave the system clock uses utc box checked (note that some other operating systems, like windows, don’t let you do this so it may be a bad idea if your dual-booting your server for some reason). next it asks you to specify a password for the root user. since root can do anything this should be a strong password, but you will need it later so make sure you can remember it somehow.
the next screen lists any hard disks found on the system and allows you to set partitioning options. choose “create custom layout.” at the beginning of the first disk, create a 100-meg (at least) partition: mount point /boot, type ext4, and “force to be a primary partition.” after that, create a swap partition: type swap, size 2× memory (hecubus has 1 gig, so doubling it gives me 2 gig, which is 2048 meg). next, at least 10 gig (i made mine 20 to be safe) for mount point /, type ext4, and primary again. split the rest of your space between non-primary partitions /home and /files, where /home is ext4 and /files is xfs. home is for users’ files, so that could be very small (or absorbed into /) if you don’t plan on storing files there (i use it as temp space and a staging area). put the rest into /files (note you can name /files anything that’s not normally used by linux). the other drives’ (if you have any) partitions should be given a mount point so that you don’t have to manually add them to /etc/fstab later.
the next screen allows the boot loader (grub) options to be changed, but i just keep the defaults. after that is software package selection — i deselect office and productivity since it's a server, and leave the other options unchecked as well. i also select fedora 12 - x86_64 and fedora 12 - x86_64 - updates for repositories to get the latest packages. choose customize now near the bottom, then move on to the next screen. for desktop environments, deselect gnome and if you’re going to install mythtv select kde. for applications, deselect everything but editors. under development, select development libraries and development tools. select windows file server from under servers. the other defaults are fine, so click next, wait a while, then click next again and fedora will start installing. this will likely take a long enough time that you’ll want to go do something else — you can probably count on about a half hour.
eventually it will ask you to reboot, and you’ll then get the post-install setup. on the create user page, i create tempuser with the same as the password — i’ll delete this later after creating users with the ids i want. on the date and time screen, check synchronize date and time over the network. this means you won’t have to worry about your system time being off (nice for recording tv).
log in with tempuser. i do this over ssh from a different machine, but you can log into a gui session on the server if you prefer — just start a terminal after you do. the first thing to do is disable selinux (it blocks mythtv) by editing /etc/selinux/config and changing SELINUX=enforcing to SELINUX=disabled.
i have my users share a default group so that they are better able to use each others’ files. to create users and groups, you need to become root. both su and su - will ask you for the root password and then let you become root, but su - also gives you root’s context (this means you don’t have to specify the path for administrator commands). you should not log in as root directly. in the rest of this guide, lines starting with $ can be run by a normal user, but lines starting with # must be run as root.
create a group with the id you want (i’m using 700 here) and the name you want (i’m using people):
# groupadd -g 700 peoplecreate the user(s) using that group as the default, and set a password or the user(s):
# useradd -g people -u 703 misterhaan# passwd misterhaan
log all the way out, then log in as one of the new users so you can remove the temp user:
# userdel tempuseralso turn off services that aren’t needed. my server doesn’t use printing or ipv6:
# chkconfig cups off# chkconfig ip6tables off
- page 1: gnu/linux (fedora)
- page 2: file servers (samba and nfs)
- page 3: ftp server (pure-ftpd)
- page 4: web server (apache, mysql, php)
- page 5: personal video recorder (mythtv)
- all 5 pages








