The Ten Minute Guide to Setting Up a Linux Web Server



Similar documents
How To Set Up A Virtual Host In Apa On A Linux Box On A Windows Xp Or Ipa On An Ubuntu Box On An Ipa (Windows) Or Ipo (Windows Xp) On A Ubora Box On Your Ubora

NATIONAL POPULATION REGISTER (NPR)

OS Installation Guide Red Hat Linux 9.0

Secured CentOS 4.x i386

Amahi Instruction Manual

HOMEROOM SERVER INSTALLATION & NETWORK CONFIGURATION GUIDE

JAMF Software Server Installation Guide for Linux. Version 8.6

Deploying IBM Lotus Domino on Red Hat Enterprise Linux 5. Version 1.0

Installing Multiple Linux Distributions on a Single Machine

Novell Open Workgroup Suite

Cloud.com CloudStack Community Edition 2.1 Beta Installation Guide

What is included in the ATRC server support

VMware vcenter Log Insight Getting Started Guide

EMC Data Domain Management Center

READYNAS INSTANT STORAGE. Quick Installation Guide

Lepide Active Directory Self Service. Installation Guide. Lepide Active Directory Self Service Tool. Lepide Software Private Limited Page 1

VMTurbo Operations Manager 4.5 Installing and Updating Operations Manager

VMware Identity Manager Connector Installation and Configuration

Rebasoft Auditor Quick Start Guide

F-Secure Internet Gatekeeper Virtual Appliance

ReadyNAS Setup Manual

Acronis Backup & Recovery 11.5 Quick Start Guide

Red Hat Linux 7.2 Installation Guide

LOCKSS on LINUX. CentOS6 Installation Manual 08/22/2013

Virtual Appliance for VMware Server. Getting Started Guide. Revision Warning and Disclaimer

NovaBACKUP xsp Version 15.0 Upgrade Guide

Citrix XenServer Workload Balancing Quick Start. Published February Edition

MadCap Software. Upgrading Guide. Pulse

6.0. Getting Started Guide

ReadyNAS Duo Setup Manual

F-Secure Messaging Security Gateway. Deployment Guide

Clearswift SECURE Exchange Gateway Installation & Setup Guide. Version 1.0

IGEL Universal Management. Installation Guide

CA arcserve Unified Data Protection Agent for Linux

OnCommand Performance Manager 1.1

PHD Virtual Backup for Hyper-V

Load Balancing. Outlook Web Access. Web Mail Using Equalizer

It should be noted that the installer will delete any existing partitions on your disk in order to install the software required to use BLËSK.

Configuring Global Protect SSL VPN with a user-defined port

User Guide. Cloud Gateway Software Device

Interworks. Interworks Cloud Platform Installation Guide

Semantic based Web Application Firewall (SWAF - V 1.6)

Cable Internet Connection & Sharing using Red Hat 7.2 (Version 1.0, )

Trend Micro Incorporated reserves the right to make changes to this document and to the products described herein without notice.

Host your websites. The process to host a single website is different from having multiple sites.

Virtual Managment Appliance Setup Guide

Required Virtual Interface Maps to... mgmt0. bridge network interface = mgmt0 wan0. bridge network interface = wan0 mgmt1

Verax Service Desk Installation Guide for UNIX and Windows

1 You will need the following items to get started:

Creating an ESS instance on the Amazon Cloud

Rally Installation Guide


Configuring PPP And SIP

Configuring a customer owned router to function as a switch with Ultra TV

ITIS 2110 Lab 11: Domain Name Server. Tyler Everhart 11/12/2010

JAMF Software Server Installation Guide for Windows. Version 8.6

EZblue BusinessServer The All - In - One Server For Your Home And Business

LOCKSS on LINUX. Installation Manual and the OpenBSD Transition 02/17/2011

Tips for getting started! with! Virtual Data Center!

Virtual Web Appliance Setup Guide

Getting Started in Red Hat Linux An Overview of Red Hat Linux p. 3 Introducing Red Hat Linux p. 4 What Is Linux? p. 5 Linux's Roots in UNIX p.

Virtual Appliance Setup Guide

How to set up a free iscsi or NAS storage system for VMware ESX using Openfiler

Oracle Virtual Machine Qualification Note Oracle FLEXCUBE Universal Banking Release [April] [2014]

Quick Start Guide for Parallels Virtuozzo

NETAVIS Observer 4.3 and 3.4 Server Installation and Administration

II. Installing Debian Linux:

NETWORK SETUP GLOSSARY

Quick Start Guide for VMware and Windows 7

An Oracle White Paper July Oracle VM 3: Building a Demo Environment using Oracle VM VirtualBox

Asia Web Services Ltd. (vpshosting.com.hk)

Setup and configuration for Intelicode. SQL Server Express

Installation and Deployment

Linux Operating System Security

Trend Micro Encryption Gateway 5

EZblue BusinessServer The All - In - One Server For Your Home And Business

Installing Operating Systems

THINKTEL COMMUNICATIONS DIGIUM G100/G200 PRI OVER IP SIP TRUNKING

TFTP Firmware upgrade

Local Caching Servers (LCS): User Manual

DameWare Server. Administrator Guide

OnCommand Performance Manager 2.0

DEPLOYMENT GUIDE CONFIGURING THE BIG-IP LTM SYSTEM WITH FIREPASS CONTROLLERS FOR LOAD BALANCING AND SSL OFFLOAD

insync Installation Guide

Extreme Control Center, NAC, and Purview Virtual Appliance Installation Guide

Chapter 2 Preparing Your Network

Network Configuration Settings

emerge 50P emerge 5000P

Quick Start Guide For Ipswitch Failover v9.0

Before deploying SiteAudit it is recommended to review the information below. This will ensure efficient installation and operation of SiteAudit.

SETTING UP REMOTE ACCESS FOR Q-SEE DVR SYSTEMS MODEL NUMBER: QC40198

Trend Micro Incorporated reserves the right to make changes to this document and to the products described herein without notice.

Chapter 6 Configuring the SSL VPN Tunnel Client and Port Forwarding

Release Date May 10, Adeptia Inc. 443 North Clark Ave, Suite 350 Chicago, IL 60654, USA

Heroix Longitude Quick Start Guide V7.1

Accessing VirtualBox Guests from Host using SSH, WinSCP and Tunnelling

Testing and Restoring the Nasuni Filer in a Disaster Recovery Scenario

Setting Up a Unisphere Management Station for the VNX Series P/N Revision A01 January 5, 2010

Remote Desktop How-To. How to log into your computer remotely using Windows XP, etc.

It is recommended that you use a clean installation of Lion client before upgrading to Lion Server.

Transcription:

Hentzenwerke Whitepaper Series The Ten Minute Guide to Setting Up a Linux Web Server By Whil Hentzen Here's a quick tutorial to the essential steps involved in setting up a Linux Web Server, using Fedora Core as an example. No explanation for any of the steps is provided; just the basic 'to do' list to install, configure and secure your Web server. For background and explanation, see the various whitepapers and Linux Transfer books found on www.linuxtransfer.com.

The Ten Minute Guide to Setting up a Linux Web Server Page 2 1. Preface 1.1 Copyright Copyright 2004 Whil Hentzen. Some rights reserved. This work is licensed under the Creative Commons Attribution- NonCommercial-NoDerivs License, which basically means that you can copy, distribute, and display only unaltered copies of this work, but in return, you must give the original author credit, you may not distribute the work for commercial gain, nor create derivative works based on it without first licensing those rights from the author. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/2.0/. 1.2 Revisions 1.2.1 History Version Date Synopsis Author 1.0.0 2004/7/7 Original WH 1.2.2 New version The newest version of this document will be found at www.hentzenwerke.com. 1.2.3 Feedback and corrections If you have questions, comments, or corrections about this document, please feel free to email me at 'books@hentzenwerke.com'. I also welcome suggestions for passages you find unclear. 1.3 References and acknowledgments This guide is an abbreviated cookbook from the Linux Transfer for Windows Web Server Admins by Hentzenwerke authors Dee-Ann LeBlanc, Steve Suehring and AJ Prowant. 1.4 Disclaimer No warranty! This material is provided as is, with no warranty of fitness for any particular purpose. Use the concepts, examples and other content at your own risk. There may be errors and inaccuracies that in some configurations may be damaging to your system. The author(s) disavows all liability for the contents of this document. Before making any changes to your system, ensure that you have backups and other resources to restore the system to its state before making those changes. All copyrights are held by their respective owners, unless specifically noted otherwise. Use of a term in this document should not be regarded as affecting the validity of any trademark or service mark. Naming of particular products or brands should not be seen as endorsements. 1.5 Prerequisites This document was written using Fedora Core 2.0 and assumes a beginner's familiarity with use of Linux via the GUI and the Command Window. This document also assumes you're not using DHCP, as it explains how to set a static IP address. 2. Materials needed before you begin You'll need the four Fedora Core 2 CDs, a machine, an Internet connection and the IP addresses of the gateway and for the machine itself. 3. Install Fedora Core 2 The installation process follows the same steps as for Fedora Core 1 (and earlier versions of Red Hat) so it's not necessary to explicitly repeat each step again. If you haven't done a FC install, see my 1/29 whitepaper on www.linuxtransfer.com. However, since this is a Web server, the choices you make in several steps are different, and those differences are explained here. 3.1 Installation type Select the server installation. Fine tuning of the packages will come later.

The Ten Minute Guide to Setting up a Linux Web Server Page 3 3.2 Configure partitions A Web server has different partition requirements than a desktop or a file server. For a machine with 26 GB of hard disk space, spread out over two drives, here's one possible configuration. Boot is always 100 MB, unless you're so pressed for disk space that you need to reduce it further. /var/www is where Web server files go, so you'll want a lot of room there. Swap is usually twice the amount of RAM. hda (12 GB) - boot 100 MB - /var/www 11,000 MB - swap 500 (assuming 256 MB of RAM) Reserve a fair amount of space for /tmp and /var, which hold files like logs and working files. Putting each of these in its own partition means that, for example, a log file that runs out of control won't crash the rest of the system. Reserve a fair amount of space for /home. And increase that if you're going to have other people maintaining their own home directories on your Web server. The rest goes to the root partition. hdb (14 GB) - / 5000 - /tmp 2000 - /home 3000 - /var 2000 3.3 Ethernet configuration If you're not using DHCP, you're going to need to configure your network card manually. In the Network Configuration step, select the Edit button to the right of the Network Devices list box. You'll uncheck the Configure using HDCP check box, and then enter the IP Address and Netmask for your Web server computer. Once back in the Network Configuration step, you'll select the Set the hostname option button to manually, and enter the hostname for your Web server computer. Finally, you'll enter the IP address for your Web server's gateway (often this is an IP associated with the router that the server is connecting to the Internet through), and the IP addresses for the DNS servers your Web server will be using. You can verify and modify these settings through the System Settings Network dialog as shown in Figure 1. You'll need to enter the root password in order to gain access to the dialog.

The Ten Minute Guide to Setting up a Linux Web Server Page 4 Figure 1. The Network Configuration dialog allows you to access and modify your network settings. Select the Edit button in the Network Configuration dialog to view or change the IP addresses for the computer, as shown in Figure 2.

The Ten Minute Guide to Setting up a Linux Web Server Page 5 Figure 2. The General tab of the Ethernet Device dialog allows you to view and change the IP addresses associated with the computer. Select the DNS tab of the Network Configuration dialog, as shown in Figure 3, to modify your hostname as well as your DNS settings.

The Ten Minute Guide to Setting up a Linux Web Server Page 6 Figure 3. The DNS tab of the Network Configuration dialog allows you modify the hostname and DNS settings. 3.4 Firewall and Services Use the Firewall Configuration dialog to set up the basic firewall for your server. First, select the Enable firewall choice at the top of the dialog. Second, select the 'WWW (HTTP)', 'SSH' and 'Mail (SMTP)' services. Finally, if you're going to use HTTPS, enter the text string 443:tcp into the "Other ports" text box in order to allow HTTPS through on port 443. See Figure 4.

The Ten Minute Guide to Setting up a Linux Web Server Page 7 Figure 4. The appropriate settings for setting up a firewall on your Web server. Also note that you'll need the "openssh-server" package for ssh. 3.5 Package Group Selection Having selected the 'server' installation type earlier causes the following package groups to be automatically selected. (The number of packages selected out of the total number of available packages is shown in parens behind each section.) text based ineternet (3/7) server config tools (9/12) web server tools (20/25) winfs (2/2) admin tools (11/12) printing support (1/10) Now go into the Web server tools section and add the following packages: mod_auth_mysql mod_auth_pgsql php-mysql php-pgsql Now, since this is your first Web server, you'll want some extra help. Select the following sections to be installed in addition to the server defaults just discussed, and add or remove individual packages in each section as noted. X Window System (33/38): No changes Gnome (34/40): Add gqview Kde (14/15): Add kadmin Graphical internet (4/14): Add quanta SQL database server (4/6): Add MySQL-server System tools (7/22): No changes

The Ten Minute Guide to Setting up a Linux Web Server Page 8 3.6 Log file Once you're done with the initial installation, the installation log file is found in /root/install.log. 4. Get rid of unneeded services Open Open System Settings Server Settings Services, and make sure that just the following services are running (for both level 3 and 5.) acpid anacron atd autofs cpuspeed crond gpm httpd iptables irqbalance kudzu mdmonitor mdmpd messagebus microcode_ctl network portmpa random rawdevices readahead readahead_early rhnsd rpcgssd rpcidmapd rpcsvcgssd sgi_fam smartd sshd syslog xinetd You may choose to turn off xinetd as well. 5. Test the Web server's default page It's time to test your Web server to see if it's actually a Web server or just a computer with grand aspirations. If you have to do your testing on the Web server machine itself, open up a browser and enter http://localhost/ into the address bar. If you've got access to a different computer - ideally on a separate line - and you've got a separate domain set up on the Internet, and pointed to the gateway IP in step 3.3, enter http://www.yourdomainname.com into the address bar. In both cases, you should see the Apache page, as shown in Figure 5.

The Ten Minute Guide to Setting up a Linux Web Server Page 9 Figure 5. The default Apache page on Fedora Core. 6. Test the Web server with your own page. Create your own index.html file and put it in /var/www/html and run the test (localhost or yourdomain.com) again - you should see your own page instead of the Apache test page. 7. Secure the box by shutting off unneeded services Run the commands netstat -an more and lsof -P -i to see what ports are open and what services are accessing them. The only ports that should be open are 22, 80, and, if you're interested in HTTPS, 443. 8. Reconfigure ssh Change the setting of PermitRootLogin in the /etc/ssh/sshd_config file to no.

The Ten Minute Guide to Setting up a Linux Web Server 10 Page 9. All done with the basics You've now got the basics of a secured Web server. 10. Where to go for more information This free whitepaper is published and distributed by Hentzenwerke Publishing, Inc. We have the largest lists of Moving to Linux, OpenOffice.org, and Visual FoxPro books on the planet. We also have oodles of free whitepapers on our website and more are being added regularly. Our Preferred Customer mailing list gets bi-monthly announcements of new whitepapers (and gets discounts on our books, first crack at special deals, and other stuff as we think of it.) Click on Your Account at www.hentzenwerke.com to get on our Preferred Customer list. If you found this whitepaper helpful, check out these Hentzenwerke Publishing books as well: Linux Transfer for Windows Web Server Admins: A roadmap for building a Linux Web server Steve Suehring, Dee-Ann LeBlanc Linux Transfer for Windows Network Admins: A roadmap for building a Linux file and print server Michael Jang Linux Transfer for Windows Power Users: Getting started with Linux for the desktop Whil Hentzen