Introduction


More organizations install Linux into their server rooms every day. The reasons for this vary, but those who make the switch to Linux often claim that its reliability, cost, choice, scalability, and the freedom it offers from vendor lock-in, are some of the reasons why they decided to switch. But, whatever your reasons for choosing Linux, as system administrator, you need to know what to do with these new servers.

This book gives you the knowledge you need to build, configure, and maintain servers running the LAMP (Linux, Apache, MySQL, and PHP) open source Web application platform.

In these pages, we'll show you how to build a Linux server, and help you decide which flavour of Linux best suits your situation. You'll learn how to set up Apache to serve Websites, use MySQL to store data, and employ PHP to build Web applications. You'll also discover how to secure your new LAMP server, and how best to access and control it both on site, and remotely.

Everything you'll need to build and maintain your Linux servers, and to deploy Web applications to them, is contained in these chapters. Enjoy!

Who Should Read This Book?

If you know what it's like to be a systems administrator, but don't know about Linux, this book is for you.

If you're currently thinking about introducing Linux to your firm on a trial basisperhaps to run some Websites, or because your development team keep banging on at you to let them use Apachethis book will give you the grounding you need to successfully build Linux servers and keep them running.

You and your organization can enjoy the stability and ease-of-use of a free operating system and tools that are compliant with open standards. This book will show you how.

What's In This Book?


Chapter 1: Building The Linux Environment

We kick off by discussing what Linux is, and seeing how easy it is to set up a Linux server. I'll walk you through a review of the hardware you'll need before we choose which flavour of Linux we'll install. In making this decision, we'll explore the alternatives, and I'll provide a few tips on how to ensure you make the right decision. By the chapter's close, you'll have installed Linux successfully on your server.


Chapter 2: Day-to-day Usage

This chapter explains hot to run and manage your Linux server on a daily basis. In particular, we'll discuss the key differences between Linux and Windows systems. You'll finish up with a solid grounding in the essentials, including filesystems and layout.


Chapter 3: The Command Line

The command line is one of the most powerful aspects of Linux. While it's easy to use Linux's graphical toolstools that allow us to achieve most of our goalsthe command line gives us an extra level of control over our systems. In this chapter, we'll identify those extra capabilities, and discuss the command line's advantages over the GUI.


Chapter 4: System Administration

Linux system administrators must be comfortable with creating new users, and scheduling tasks to run unattended, as well as concepts like services and runlevels. In this chapter, we discuss the lot as we take a tour of the Linux system administrator's toolkit.


Chapter 5: Building The Server

It's time to turn our Linux server into a LAMP server as we install Apache, MySQL, and PHP. We'll explore some of the basics of Apache itself, including how it works, and how it fits into the Linux environment. Then, you'll see how to configure Apache on setup, how to set up secure (SSL/https) access for your Websites, and how to add MySQL and PHP to the mix.


Chapter 6: Server Administration

This chapter focuses on a selection of handy tools that will help you to configure your LAMP server and add new packages to it. In particular, we discuss Webmin, which facilitates the Web-based configuration of services, and yum, which helps with package installation.


Chapter 7: Remote Administration

Remote administration makes the job of the Linux system administrator much easier. In this chapter, we'll get a feel for working with SSHthe secure shellwhich allows command line access to a server across the network, and VNC, which enables you to access your LAMP server's GUI remotely. We'll discuss which tools are best used in particular situations, and look at some of the extra functionality that SSH offers above and beyond its primary job as a command-line shell.


Chapter 8: Occasional Administration

"Occasional Administration" encompasses those system elements that you'll likely need to set up once, then tweak only occasionally. After an introduction to backup tools, we set up Web traffic reporting, which will help us understand the nature of the visits the server receives. We also take a close look at the log files that the system creates, and discuss how these can be used to track and manage server usage, identify errors, and more.


Chapter 9: Server Security

Security is a critical aspect of running any server, but it's particularly important for those that offer services over the Internet. In this chapter, we set up a firewall on our LAMP server, and install intrusion detection services as a means to identify remote cracking attempts. We'll also meet Tripwire, a security system that protects against malicious users compromising the server if they somehow manage to gain access.


Appendix A: Command Line Reference

As we step through the process of setting up your server, you'll be introduced to a number of powerful command line tools. This appendix lists the more useful tools, and some of the options that can be used to customize their behavior.


Appendix B: Troubleshooting

Our tour concludes with some troubleshooting and an FAQ section that provides answers to common questions about Linux, Apache, and the other tools you may have installed.

Linux and Distributions

If you're being very technical, Linux is just the operating system kernel: the bit at the very lowest level of your software that talks directly to the hardware. All the other programsthe graphical interface, the Apache Web server, MySQL, the menus at the top of the screenthey're all separate, open-source programs, coded by different teams of developers, and released at different times. It's possible to build your own Linux system out of these disparate parts, but it's a long and complicated job. Instead, various groups and companies have taken on the role of providing a Linux distribution (sometimes shortened to distro): they collect all the bits of software you need, make sure they all fit together correctly, and give them all to you in one go. There are many, many Linux distributions. Some have specialized purposes: the distributor has made sure that the distribution contains software suited to musicians, for example, or medical personnel, or security analysts, or that the distribution is designed to run directly from CD, or from a USB pen drive, or without a graphical interface. Most, though, are general: they're designed to cover all bases.

General-purpose Distributions

Some of the most popular general distributions are Debian, Canonical's Ubuntu Linux, Novell's SuSE Linux Desktop, Knoppix, Linspire, and Red Hat's Enterprise Linux and Fedora Core distributions. Some distributions contain proprietary software, and require a licence fee; others do not. Each has its merits, and each its proponents.

Debian has a very strong free-software ethos, and an excellent packaging system (apt) which has been emulated by most other distributions. Ubuntu Linux is derived from Debian, but places a much stronger focus on being a good desktop distribution. Novell's SuSE Linux has a commercial edge to it, mixing open-source and proprietary tools; Novell is a relatively new player in the Linux sphere, but SuSE Linux has been around for some time. Red Hat Enterprise Linux also has a commercial edge, and comes in flavors tailored to desktops and servers. Development of Red Hat Enterprise Linux is in part driven by the more community spirited Fedora Core. Linspire is heavily focused on home users; like SuSE, it mixes open-source tools with proprietary software, and is oriented towards being a desktop operating system. Knoppix is slightly unusual in that it is not designed to be installed and run; instead, it comes on, and runs entirely from, a so-called "Live CD." You can simply put the CD in and boot up to obtain all the benefits of a working Linux computer without losing or overwriting your existing system or files. It's perfect for testing out hardware, or getting familiar with the Linux environment without taking the ultimate plunge and installing the system from scratch.

Fedora Core

In this book, we'll be focusing on Fedora Core 4, from Red Hat. The Fedora distribution is very current, so you'll have all the latest tools at your disposal, and boasts a very wide portfolio of compatible software. Red Hat employs many notable open-source developers to work on distributions, and Fedora receives the benefits of this work, while still remaining open-source and community-maintained. Using Fedora, you can enjoy those benefits: you'll have the most robust, modern tools at your fingertips, while using the most popular Linux distribution available.

The Book's Website

Located at http://www.sitepoint.com/books/linux1/, the Website that supports this book will give you access to the following facilities.

The Code Archive

One of the more powerful aspects of Linux is the scriptable command line. This book includes some scripts to help you get started with shell scripting, which can be downloaded from the book's web site.

Updates and Errata

The Errata page on the book's Website has the latest information about known typographical and code errors, and updates necessitated by changes to technologies.

The SitePoint Forums

While I've made every attempt to anticipate any questions you may have, and answer them in this book, there is no way that any book could cover everything there is to know about establishing, running, and maintaining a Linux server. If you have a question about anything in this book, the best place to go for a quick answer is http://www.sitepoint.com/forums/SitePoint's vibrant and knowledgeable community.

The SitePoint Newsletters

In addition to books like this one, SitePoint offers free email newsletters.

The SitePoint Tech Times covers the latest news, product releases, trends, tips, and techniques for all technical aspects of Web development. The long-running SitePoint Tribune is a biweekly digest of the business and money making aspects of the Web. Whether you're a freelance developer looking for tips to score that dream contract, or a marketing major striving to keep abreast of changes to the major search engines, this is the newsletter for you. The SitePoint Design View is a monthly compilation of the best in Web design. From new CSS layout methods to subtle PhotoShop techniques, SitePoint's chief designer shares his years of experience in its pages.

Browse the archives or sign up to any of SitePoint's free newsletters at http://www.sitepoint.com/newsletter/.

Your Feedback

If you can't find your answer through the forums, or you wish to contact me for any other reason, the best place to write is books@sitepoint.com. We have a well-manned email support system set up to track your inquiries, and if our support staff is unable to answer your question, they send it straight to me. Suggestions for improvement as well as notices of any mistakes you may find are especially welcome.

Acknowledgements

This book would not have been what it is without the SitePoint team, particularly Stephen, Craig, and Simon. A big round of applause also goes out to Ade, for coping in his typically composed and bald style with the bombardment of questions. Much thanks, bald man.

Inspiration is theirs; mistakes are mine alone.




Run Your Own Web Server Using Linux & Apache
Run Your Own Web Server Using Linux & Apache
ISBN: 0975240226
EAN: 2147483647
Year: 2006
Pages: 92

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net