Archive for December, 2007

Mac os x web server - Running DebianGNU/LinuxDebian GNU/Linux is a creation of the

Monday, December 31st, 2007

Running DebianGNU/LinuxDebian GNU/Linux is a creation of the Debian Project. Founded in 1993 by Ian Murdock, the Debian Project isan association of individuals who have made a common causeto create a free, coherent, and complete operating system. The Debian GNU/Linux network install CD is contained onthe CD that comes with this book. You can install Debianfrom that CD as described in this chapter. You can do a mini- mal Debian install with just that CD or a complete Debianinstall with a connection to the Internet (recommended). Thisinstallation is suited for setting up a Web server (LAMP server) and a mail server (see Chapters 23 and 24, respectively). The principles of the Debian Project are defined in the DebianSocial Contract. This contract is a commitment to the freesoftware community that basically states: .All software within the Debian system will remain free, asdefined in the Debian Free Software Guidelines (DFSG). .The Debian Project will contribute to the free softwarecommunity by licensing any software developed for theDebian system in accordance with the DFSG, developingthe best system it can, and by sharing improvementsand fixes with the original developers of any programsincorporated into Debian GNU/Linux. .Problems will not be hidden from users, and any bugreports filed against Debian components will be madepromptly available to the public through the Debian BugTracking System (BTS). .The Debian Project will focus on the needs of its usersand on the principles of free software. .Provisions will be made for the support of programs thatdo not meet the standards in the DFSG because someusers may depend on these programs to make effectiveuse of the system. The bug tracking and support systemswill always include mechanisms for handling these pro- grams when they are provided with the Debian system. On theCD-ROM99CHAPTER …In This ChapterInside DebianInstalling DebianManaging yourDebian system …

Business web hosting - 294Part IIIChoosing and Installing a Linux DistributionThe Fedora

Sunday, December 30th, 2007

294Part IIIChoosing and Installing a Linux DistributionThe Fedora Setup Agent runs automatically only if you have configured Fedora toboot to a graphical login prompt. To start it from a text login, log in as root andswitch to init state 5 temporarily (type init 5). Log in to the graphical prompt. Froma Terminal window, as root user, type# rm /etc/sysconfig/firstboot# /usr/sbin/firstbootThe Welcome screen displays. From it, step through screens to configure date andtime, your monitor, user accounts, and additional software. SummaryAfter throwing its devoted following into turmoil by dropping the well-known RedHat Linux name, Red Hat Inc. has settled its development efforts into the free FedoraProject and commercial Red Hat Enterprise Linux. Fedora Core and Red Hat Enterprise Linux distributions distinguish themselves fromother Linux distributions with their simplified installer (called Anaconda), graphicalconfiguration tools, and RPM Package Management tools. Fedora Core is freely avail- able, whereas Red Hat Enterprise Linux is available on a paid subscription basis. Fedora Core is included on the DVD that comes with this book. You can install thecomplete Fedora Core distribution by following the detailed instructions includedin this chapter. … Note15_

293Chapter 8Running Fedora Core and Red Hat Enterprise (Web hosting solutions)

Saturday, December 29th, 2007

293Chapter 8Running Fedora Core and Red Hat Enterprise LinuxIf you are enabling Security Enhanced Linux (SELinux) on your computer, the secu- rity structure of your computer changes. The root user may no longer have completecontrol of the computer, but instead there may be policies set that prevent anyone user from having complete control. 20.Select Packages.Groups of packages are selected by default depending onthetype of installation you chose earlier. In general, either more workstation- oriented or server-oriented packages are selected. Pick the ones you want. You can override your package selections by choosing Mimimal or Everythinginstall groups. Disk space requirements for those install types are described earlierin this chapter. Because each group represents several packages, you can click the Detailsbutton next to each group to select more specifically the packages within thatgroup. Because Workstation and Personal Desktop installations don t add anyserver packages, this is a good opportunity to add server packages for theservices you expect to use. Click Next to continue. 21.Decide to Install. You can still back out now, and the disk will not have changed. Click Next to proceed. (To quit without changes, eject the CD and restart thecomputer.) Now the file systems are created and the packages are installed. This typically takes from 20 to 60 minutes to complete, although it can takemuch longer on older computers. If you are using the DVD, you do not need to change media. If you are installingfrom the four-CD set, you are prompted to insert additional installation CDs asthey are needed. 22.Configure your monitor.You may be asked to configure your monitor. If itwas probed properly, you should be able to just continue. 23.Finish installing.When you see the Congratulations screen, you are done. Note the links to Fedora Core information, eject the CD, and click Exit. 24.Your computer restarts.If you installed GRUB, you will see a graphical bootscreen that displays the bootable partitions. Press the up or down arrow keyto choose the partition you want to boot, and press Enter. If Linux is the defaultpartition, you can simply wait a few moments and it will boot automatically. The first time your system boots after installation, the Fedora Setup Agent runs todo some initial configuration of your system. The next section explains how FedoraSetup Agent works. Running Fedora Setup AgentThe first time you boot Fedora Core after it is installed, the Fedora Setup Agentruns to configure some initial settings for your computer. TipNote15_

292Part IIIChoosing and Installing a Linux Distribution16.Choose a (Web site domain)

Saturday, December 29th, 2007

292Part IIIChoosing and Installing a Linux Distribution16.Choose a firewall configuration.The use of a firewall has significant impacton the security of your computer. If you are connected to the Internet or toanother public network, a firewall can limit the ways an intruder may breakinto your Linux system. Here are your choices: No firewall Select this security level if you are not connected to a public network and do not want to deny requests for services from anycomputer on your local network. Of course, you can still restrict accessto services by starting up only the services you want to offer and byusing configuration files to restrict access to individual services. Enable firewall Select this security level if you are connecting yourLinux system to the Internet for Web browsing and file downloading(FTP). By default, only services needed to enable Web browsing andbasic network setup, DNS replies, and DHCP (to serve addresses) areallowed at this level. If you enable the firewall and you know you want to enable access to particu- lar services, you can click the appropriate check boxes and allow incomingrequests for the following services: SSH (secure shell to allow remote login), Telnet (an insecure method of remote login), WWW (act as a Web server), Mail (act as a mail server), and/or FTP (act as an FTP server). You can alsoadd a comma-separated list of port numbers to the Other Ports box to openaccess to those ports, which effectively allows requests to services associ- ated with those port numbers. (The /etc/servicesfile lists which servicesare associated with which port numbers.) If you have a LAN that consists of trusted computers, you can click the box rep- resenting your interface to that LAN (probably eth0). Clicking the box allowsaccess to any services you care to share with the computers on your LAN. Click Next to continue. Adding firewall rules here results in rules being added to the /etc/sysconfig/ iptablesfile. The rules are run from the /etc/init.d/iptablesstartup scriptwhen you boot your system. 17.Choose language support.The default is your installation language. You caninstall support for additional languages by clicking the check boxes next tothe languages you want. Click the Select All button to install all supported languages to your system. When you are done, click Next to continue. 18.Choose a time zone.Select one from the list. To see a more specific view ofyour location, click World and choose your continent. From the UTC Offsettab, you can choose a time zone according to the number of hours away fromGreenwich Mean Time (GMT), known as the UTC offset. 19.Set root password. The root password provides complete control of yourFedora Linux system. Without it, and before you add other users, you willhave no access to your own system. Enter the password, and then type itagain in the Confirm box. (Remember the root user s password and keep itconfidential! Don t lose it!) Click Next to continue. Tip15_

291Chapter 8Running Fedora Core and Red Hat Enterprise (Medical web site)

Friday, December 28th, 2007

291Chapter 8Running Fedora Core and Red Hat Enterprise Linux15.Configure networking.This applies only to a local area network. If you will useonly dial-up networking, skip this section by clicking Next. If your computer isnot yet connected to a LAN, you also should skip this section. Network address information is assigned to your computer in two basic ways: statically (you type it) or dynamically (a DHCP server provides that informationfrom the network at boot time). One Network Device appears for each networkcard you have installed on your computer. The first Ethernet interface is eth0, the second is eth1, and so on. Repeat the setup for each card by selectingeach card and clicking Edit. Chapter 5 discusses IP addresses, netmasks, and other information you need toset up your LAN. With the Edit Interface eth0 dialog box displayed, add the following: Configure using DHCP If your IP address is assigned automatically froma DHCP server, a check mark should appear here. With DHCP checked, you don t have to set other values on this page. Remove the check markto set your own IP address. IP Address If you set your own IP address, this is the four-part, dot- separated number that represents your computer to the network. HowIP addresses are formed and how you choose them is more than can besaid in a few sentences (see Chapter 5 for a more complete description). An example of a private IP address is 192.168.0.1. Netmask The netmask is used to determine what part of an IP addressrepresents the network and what part represents a particular host com- puter. An example of a netmask for a Class C network is 255.255.255.0. Activate on boot Indicate whether you want the network to start atboot time (you probably do if you have a LAN). Click OK, and then add the following information on the main screen: Set the hostname The name identifying your computer within yourdomain. For example, if your computer were named baskets in the handsonhistory.comdomain, your full hostname may be baskets. handsonhistory.com. You can either set the domain name yourself(manually) or have it assigned automatically, if that information is beingassigned by a DHCP server (automatically via DHCP). Gateway The IP number of the computer that acts as a gateway to networks outside your LAN. It represents a host computer or router thatroutes packets between your LAN and the Internet. Primary DNS The IP address of the host that translates computernames you request into IP addresses. It is referred to as a Domain NameSystem (DNS) server. You may also have Secondary and Tertiary nameservers in case the first one can t be reached. (Most ISPs will give youtwo DNS server addresses.) Click Next to continue. Cross- Reference15_

290Part IIIChoosing and Installing a (Http web server) Linux DistributionThe swap

Thursday, December 27th, 2007

290Part IIIChoosing and Installing a Linux DistributionThe swap partition is often set to twice the size of the amount of RAM on yourcomputer (for example, for 128MB RAM you could use 256MB of swap). Linuxuses swap space when active processes have filled up your system s RAM. Atthat point, an inactive process is moved to swap space. You get a performancehit when the inactive process is moved to swap and another hit when thatprocess restarts (moves back to RAM). For example, you might notice a delayon a busy system when you reopen a window that has been minimized for along time. When RAM and swap fill up, no other processes can start until somethingcloses. Bottom line: Add RAM to get better performance; add swap space ifprocesses are failing to start. Red Hat suggests a minimum of 32MB and maxi- mum of 2GB of swap space. Click the Next button (and select OK to accept any changes) to continue. 13.Configure boot loader.All bootable partitions and default boot loaderoptions are displayed. By default, the install process uses the GRUB bootloader, installs the boot loader in the master boot record of the computer, andchooses Fedora as your default operating system to boot. If you keep the GRUB boot loader, you have the option of adding a GRUB password. The password protects your system from having potentially dangerous options sentto the kernel by someone without that password. This does not have to be the samepassword you use to log in later. (The GRUB boot loader is described in Chapter 7.) The names shown for each bootable partition will appear on the boot loaderscreen when the system starts. Change a partition name by clicking it andselecting Edit. To change the location of the boot loader, click ConfigureAdvanced Boot Loader Options, and continue to the next step. If you do notwant to install a boot loader (because you don t want to change the currentboot loader), click Change Boot Loader and select Do Not Install a Boot Loader. (If the defaults are okay, skip the next step.) 14.Configure advanced boot loader.To choose where to store the boot loader, select one of the following: Master Boot Record (MBR) This is the preferred place for GRUB. Itcauses GRUB to control the boot process for all operating systemsinstalled on the hard disk. First Sector of Boot Partition If another boot loader is being used onyour computer, you can have GRUB installed on your Linux partition(first sector). This lets you have the other boot loader refer to yourGRUB boot loader to boot Fedora Linux. You can choose to add kernel parameters (which may be needed if your computer can t detect certain hardware). Some of the kernel parameters youcan use are described in Chapter 11 in descriptions of boot options. You canselect to use linear mode (which was once required to boot from a partitionon the disk that is above cylinder 1024 but is now rarely needed). Continue tothe next step. Note15_

289Chapter 8Running Fedora Core and Red Hat Enterprise (Shared web hosting)

Thursday, December 27th, 2007

289Chapter 8Running Fedora Core and Red Hat Enterprise Linux Custom System You are given the choice of configuring your own partitions and selecting your own software packages. Everything andMinimum installs are available under the Custom System selection. If you are just trying out Linux, an Everything custom install gives you all the desk- top, server, and development tools that come with Fedora Linux. If you have thedisk space, an Everything install saves you the trouble of installing packages youneed later. If you plan to use the computer as an Internet server, be selective aboutwhich packages you install. Some software packages can represent security risks ifthey are installed and not configured properly. The steps will now continue through a Custom System installation. (With otherinstallation selections, you can simply skip over steps you are not prompted for.) Although different install classes choose different partitioning methods by default, in all cases you can see and change the partitioning that was chosen for you. 10.Choose your partitioning strategy. You have two choices: Automatically partition All Linux partitions on all hard disks areerased and used for the installation. The installation process automati- cally handles the partitioning. (It does give you a chance to review yourpartitioning, however.) Manually partition with Disk Druid The Disk Druid utility is run to letyou partition your hard disk. If you select Disk Druid for partitioning, refer to the section on partitioning yourhard disk in Chapter 7 for details on using those partitioning tools. Click Next to continue. 11.For automatic partitioning, select your partition option.Choose from the following: Remove all Linux partitions on this system Windows and other non- Linux partitions remain intact with this selection. Remove all partitions on this system This erases the entire hard disk. Keep all partitions and use existing free space This works only if youhave enough free space on your hard disk that is not currently assignedto any partition. If you have multiple hard disks, you can select which of those disks should beused for your Fedora Core installation. Turn the Review check box on to seehow Linux is choosing to partition your hard disk. Click Next to continue. 12.Review the Partitions screen.You can change any of the partitions you chooseproviding you have at least one root (/) partition that can hold the entire instal- lation and one swap partition. A small /bootpartition (about 100MB) is alsorecommended. NoteNote15_

288Part IIIChoosing and Installing a (Adelphia web hosting) Linux Distribution4.Media check.

Wednesday, December 26th, 2007

288Part IIIChoosing and Installing a Linux Distribution4.Media check. If you re asked to check your installation media, press Enter. Ifthe DVD is damaged, this step saves you the trouble of getting deep into theinstall and then failing. Once the DVD is checked, select Skip to continue. 5.Continue. When the welcome screen appears, click Release Notes to see infor- mation about this version of Fedora Linux. Click Next when you re ready tocontinue. 6.Choose an installation language. Move the arrow keys to the language youwant and then select Next. (Later, you will be able to add additional languages.) 7.Choose a keyboard. Some layouts enable dead keys (on by default). Dead keysenable you to use characters with special markings (such as circumflexes andumlauts). 8.Choose install type. Select either Install Fedora Core for a new install orUpgrade an Existing Installation to upgrade an existing version of Fedora. 9.Select type for new install.Choose one of the following types (also referredto as classes): Personal Desktop Installs software appropriate for a home or officepersonal computer or laptop computer. This includes the GNOME desktop(no KDE) and various desktop-related tools (word processors, Internettools, and so on). Server tools, software development tools, and manysystem administration tools are not installed. Workstation Similar to a Personal Desktop installation but adds toolsfor system administration and software development. (Server software isnot installed.) Any Linux partitions or free space on your hard disk(s) will be assigned to the newinstallation with the Personal Desktop or Workstation types of installation. AnyWindows partitions (VFAT or FAT32 file system types) will not be touched by thisinstall. After installation, you will be able to boot Linux or Windows. If there is nofree space outside your Windows partition, you must run Partition Magic, theparted utility, the FIPS program (described later) or other disk-resizing softwarebefore proceeding, or you will lose your Windows installation. Server Server installs the software packages that you would typicallyneed for a Linux server (in particular, Web server, file server, and printserver). It does not include many other server types (DHCP, mail, DNS, FTP, SQL, or news servers). The default server install does not include aGUI (so you d better know how to use the shell). This install type alsoerases all hard disks and assigns them to Linux by default. This is a big one. In case you didn t catch the previous paragraph, the Server typeinstall erases the entire hard disk by default! If you have an existing Windows parti- tion that you want to keep, change the Automatic Partitioning option that appearsnext either to only remove the Linux Partitions or to only use existing free space. CautionCaution15_

287Chapter 8Running Fedora Core and Red (Adult web hosting) Hat Enterprise

Tuesday, December 25th, 2007

287Chapter 8Running Fedora Core and Red Hat Enterprise LinuxIf, when installing Windows or Fedora, you find that the other operating system isno longer available on your boot screen, don t panic and don t immediately rein- stall. You can usually recover from the problem by booting with the Fedora Linuxemergency boot disk and then using either the grub-installor lilocommandto reinsert the proper MBR. If you are uncomfortable working in emergency mode, seek out an expert to help you. Red Hat provides a description of how to configure a dual-boot system at www. redhat.com/docs/manuals/linux/RHL-9-Manual/install-guide/ ch-x86-dualboot.html. Beginning the InstallationOnce you have selected the right type of installation for your needs, you can beginthe installation procedure. Throughout most of the procedure, you can click Backto make changes to earlier screens. However, once you are warned that packagesare about to be written to hard disk, there s no turning back. Most items that youconfigure can be changed after Fedora is installed. It is quite possible that your entire hard disk is devoted to a Windows 95, 98, 2000, ME, NT, or XP operating system, and you may want to keep much of that informa- tion after Fedora Core is installed. Personal Desktop, Workstation, and Custominstall classes retain existing partitions (by default), but they don t let you takespace from existing DOS partitions without destroying them. Some good commer- cial products are available that you can use to resize your hard disk. In particular, Irecommend Partition Magic (www.partitionmagic.com/partitionmagic). Ready to install? Here s what to do: 1.Insert the DVD into the DVD drive.(If you are not able to boot from the DVD, obtain an installation CD set as described earlier in this chapter and continuewith this procedure by inserting the first CD into the drive.) 2.Start your computer.If you see the Fedora installation screen, continue to thenext step. If you don t see the installation screen, your DVD or CD-ROM drive may not bebootable. You may be able to make the drive bootable, though. Here s how: Restartthe computer. Immediately, you should see a message telling you how to go intosetup, such as by pressing the F1, F2, or Del key. Enter setup and look for an optionsuch as Boot Options or Boot From. If the value is A: First, Then C:, changeit to CD-ROM First, Then C:or something similar. Save the changes and try toinstall again. 3.Boot the install procedure. At the boot prompt, press Enter to start theinstall in graphical mode. If your computer won t let you install in graphicalmode (16-bit color, 800 600 resolution, framebuffer), refer to the ChoosingDifferent Install Modes sidebar. TipCaution15_

286Part IIIChoosing and Installing a Linux DistributionInstalling on (Web design tools)

Monday, December 24th, 2007

286Part IIIChoosing and Installing a Linux DistributionInstalling on Multiple ComputersIf you re installing Fedora on many computers with similar configurations, you cansave yourself some time by using the kickstart installation, which enables you tocreate a set of answers to the questions Fedora Core asks you during installation. Installation GuidesNo specific installation guide is provided with the Fedora Project. However, the RedHat Linux Installation Guide is available from any Red Hat FTP site (such as ftp. redhat.com). The location on the ftp.redhat.comserver of the Red Hat Linux 9Installation Guide ispub/redhat/linux/9/en/doc/RH-DOCS/rhl-ig-x86-en-9/index.htmlAnother document you may find useful before installing is the Fedora LinuxReference Guide (also listed in the RH-DOCSdirectory, as rhl-rg-en-9.0). You llneed to check for yourself to find out whether the Fedora Project eventuallyupdates the reference guides for Fedora Core. Choosing to Install or UpgradeAre you doing a new install or an upgrade? If you are upgrading an existing Red HatLinux or Fedora system to the latest version, the installation process will try toleave your data files and configuration files intact as much as possible. This type ofinstallation takes longer than a new install. A new install simply erases all data onthe Linux partitions (or whole hard disk) that you choose. If you are upgrading an existing Fedora Linux system to this release, you shouldconsider first removing any unwanted packages from your old Fedora Linux system. The fewer to be checked during an upgrade, the faster the upgrade installation(andthe less space used). You can upgrade to Fedora Core 3 from previous Fedora or Red Hat Linux systems(such as Red Hat Linux 8 or 9). You cannot upgrade to Fedora Core 2 from a Red HatEnterprise Linux system. To upgrade, you must have at least a Linux 2.0 kernel installed. With an upgrade, allof your configuration files are saved as filename.rpmsave(for example, the hostsfile is saved as hosts.rpmsave). The locations of those files, as well as other upgradeinformation, is written to /tmp/upgrade.log. The upgrade installs the new kernel, any changed software packages, and any packages that the installed packagesdepend on being there. Your data files and configuration information should remainintact. By clicking the Customize box, you can choose which packages to upgrade. If you are installing a dual-boot system that includes a Windows operating system, install the Windows system first and the Fedora Core system afterward. SomeWindows systems blow away the Master Boot Record (MBR), making the FedoraCore partition inaccessible. CautionNote15_