Setting up a Web Server

From Missouri Academy Wiki
Jump to: navigation, search

This guide will tell you how to get your own Apache webserver up and running with Slackware Linux. Slackware is quick and easy to install, comes with all the neccessary packages, but is easy to streamline. Before starting, it would be a good idea to be comfortable with the Linux console, as well as experience with using FTP.

What You Need[edit]

  • A computer. I would say anything above a 386 is good for a simple website, but it should have at least 64 MB of RAM for Apache.
  • A broadband, always on connection to the internet, as well as a router. The more content, the faster uplink you will need.
  • Slackware ISO's. Get them from the Slackware website and burn them to a CD with a program like Nero.

Installation[edit]

Boot up with the installation CD. Most of the installation is easy, except for perhaps partitioning and package selection. If you don't know what your doing, two partitions are sufficient - a swap and a root partition. A good rule is to make the swap twice the RAM, and the root take up the rest of the space. If you plan to use your box purely as a server, don't bother with X, X-apps, KDE, and Gnome. Do the full install if you are not very experienced, later you can remove unnecessary packages with pkgtool or removepkg (A listing of packages is in /var/log/packages/).

When you get to the startup services section, select what you want to run on your server: definitely httpd (Apache) and SSH, maybe FTP, mail server, MySQL (for phpBB, for example) or Samba (for filesharing with Windows machines), depending on your needs.

Once everything is installed, boot it up. Hopefully, everything works. If not, LinuxQuestions.org is a nice place to go. In case you need any more help with the installation and configuration, Shilo's Slackware Site is a good resource.

Configuration[edit]

Optimization[edit]

To streamline your server, consider the following options (in order of potential helpfulness):

  • Upgrade the kernel to 2.6. You can use the precompiled 2.6 kernel packages that Slackware provides. Or better yet, you can compile the kernel from source, customizing it for your own system.
  • hdparm - If you saw any messages about DMA not being enabled during bootup, playing with this is a good idea. Try this hdparm guide.
  • Remove unneccessary packages with pkgtool or removepkg.
  • Edit startup scripts. The scripts in /etc/rc.d/ probably run things that aren't neccessary for your needs.