Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 89 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
89
Dung lượng
3,69 MB
Nội dung
Security tools — Check whether the data on your system has been compromised with tools such as chkrootkit (to check for software installed by hackers to let them access your system), as well as clamav and clamd (to scan for existing and incoming viruses). Use nmap (scan network computers for open ports) and nc (the Netcat utility for check- ing connections to remote hosts) for checking network security. Backup tools — As you might expect, this distribution contains standard Linux tools for archiving data (tar, cpio, dump, rar, and so on) and compressing data (such as bzip2, gzip, and compress). Likewise, it contains standard tools for copying your data over the network (scp, sftp, ftp, and so on). Because SystemRescueCd doesn’t include a graphical interface, it can get a lot of commands into about 100MB of disk space. Some of the tools, however, such as the midnight commander ( mc command) file manager, provide a GUI-like interface from a regular Linux shell via the ncurses libraries. The SystemRescueCd image is included on the CD that comes with this book. Refer to Appendix A for information on running the SystemRescueCd. KNOPPIX Security Tools Distribution The Knoppix-STD goes lightweight on the window manager to go heavyweight on the diagnostic tools. The distribution contains hundreds of tools that can be used for repairing and assessing computer and network security (see http://s-t-d.org/). Instead of a full GNOME desktop, Knoppix-STD uses the Fluxbox window manager. It will run on lesser machines, but you’ll get a usable GUI on almost any Pentium-class machine with at least 64MB of RAM. With at least 640MB of RAM, you can run the entire distribution from RAM (type knoppix toram to boot it to run entirely from RAM). With Knoppix-STD running in RAM, the system operates faster and your CD or DVD drive is available for other purposes. Go to the project’s Tools page ( http://s-t-d.org/tools.html) to find out about more fea- tures in the project. Or go to the download page ( http://s-t-d.org/download.html) to download and try it yourself. The Inside Security Rescue Toolkit INSERT (Inside Security Rescue Toolkit) is another KNOPPIX derivative that includes features from Damn Small Linux as well. INSERT bills itself as a disaster recovery and network analysis system. It contains a more compact set of tools to fit on a bootable business card (about 50MB). Check it out at www.freshmeat.net/projects/INSERT/. Chapter 6 shows how to use INSERT to check for rootkits. INSERT is included on the CD that comes with this book. Refer to Appendix A for infor- mation on using INSERT. ON the CD-ROM ON the CD-ROM ON the CD-ROM ON the CD-ROM 498 Choosing and Installing a Linux Distribution Part III 30190c19.qxd:Layout 1 12/18/07 12:45 AM Page 498 The Fluxbox window manager offers some docked system monitors for monitoring CPU, network traffic, memory and swap use, and battery (if you are on a laptop). Another applet displays the Matrix screensaver (double-click it to launch a Terminal window). The mount applet lets you step through the CD, floppy, and hard disk partitions on your computer. Click the key button on that applet (so it turns green), and you can double-click it to mount and open that device or partition. Right-click the desktop to see a menu that lets you select from a handful of graphical tools for troubleshooting your computer and network, most of which will run from the shell. Figure 19-2 shows the INSERT desktop. FIGURE 19-2 Use INSERT to troubleshoot computers and networks. You can find what’s in INSERT from the List of Applications page on the Inside Security site ( www.inside-security.de/applicationlist.html). 499 Running Bootable Linux Distributions 19 30190c19.qxd:Layout 1 12/18/07 12:45 AM Page 499 Demonstration Bootables Individuals and organizations that want to promote their businesses or software projects can create custom live CDs to incorporate their own content or display their wares. And software developers can rest assured that the project they want to show off will work because it can be adapted to an entire operating system. An organization that wants to demonstrate what it’s about can boot up to play any content (images, presentations, movies, music, and so on) on any existing open source player. Here are some examples of bootable CDs that are used for demonstration purposes: Linux distributions — Several Linux distributions offer official live CDs that let you start using or playing with that distribution before committing to a full install. Two such live CDs are delivered with the Ubuntu ( www.ubuntu.com/download) and Gentoo Linux ( www.gentoo.org/main/en/where.xml) projects. Both of these live CDs also offer an icon on the desktop that lets you install the distribution from the live CD (a basic desktop install) directly to hard disk when you are ready. Software projects — There are open source projects that produce a live CD to let people try out their projects. The GNOME Live Media project ( http://live.gnome.org/ GnomeLiveMedia ) offers a live CD that can be used to try the features of GNOME. Any content you choose — Live CDs are becoming a popular medium to hold and play specific content. GeeXBoX Generator and eMoviX 2 are spin-offs of GeeXboX and MoviX 2 projects for creating live CDs to play any video you include (see the following section). I’ve created custom versions of Damn Small Linux that boot directly to a slide show of images from my family vacation. Because Linux can act as both a client and server, it is a great medium to demo custom Web applications. The book Practical PHP and MySQL by Jono Bacon (Prentice Hall, 2006) includes a live CD that contains all the Web applications described in the book. Because a complete LAMP server package is also on the live CD, that live CD is all you need to run the sample projects, display them in a Web browser, and modify them in an HTML editor. Because open source software can be manipulated as you choose and redistributed, live CDs are becoming an increasingly popular method of demonstrating software projects and content. Multimedia Bootables Some bootable Linuxes are tailored specifically to let you play movies, music, and images. Most let you play whatever content you have on your hard disk or can point to from the Internet. Many run in a small enough amount of memory to let you remove the bootable DVD or CD containing Linux and insert your own content (such as a music CD or movie DVD) to play. 500 Choosing and Installing a Linux Distribution Part III 30190c19.qxd:Layout 1 12/18/07 12:45 AM Page 500 MoviX With MoviX (http://sourceforge.net/projects/movix/), you run a multimedia player that disregards the operating systems (Windows, Linux, or otherwise) installed on your system. Because MoviX is small enough to run in your system memory, after it has booted you can remove it and insert the CD or DVD containing the content you want to run. With MoviX, you can play: Videos — You can play video from many different formats, including DivX/XVID, MPEG 1 and 2, and MPEG 4. So that MoviX can be freely distributed, it does not include the capability to play most DVD movies. The U.S. Digital Millennium Copyright Act (DCMA) prohibits the creation or distribu- tion of software that is made to circumvent encryption that protects copyrighted mate- rial. The libdvdcss library, needed to decrypt DVD movies (even if only for playback), has been the subject of much discussion. Although this library is available on the Internet, most Linux systems in the U.S. have chosen not to distribute this library because using it may be illegal under the DCMA. You should research this issue yourself if you plan to add libdvdcss to MoviX or any other Linux distribution that includes MPlayer or xine media players. Music — You can play audio files in AVI, MP3, Ogg Vorbis, and other formats. Images — You can run a slide show using the Linux Frame Buffer Image (fbi) viewer that displays images in JPEG, PNG, and a variety of other image formats. The MoviX player itself doesn’t include any video, music, or images for you to play. Instead, it lets you choose the location of your content. Here are the possibilities, depending on what is available on your computer: DVDs — If you have a DVD drive on your computer, you can play supported content from there. (As previously stated, that doesn’t include most commercial movies, by default.) VCDs and SVCD — These are video formats that can be put on standard CDs. Audio CDs — You can play standard music CDs (including AVI, MP3, and other formats). Hard disk files — Any supported content on the local hard disk can also be played from MoviX. As with KNOPPIX, MoviX detects hard disk partitions and then mounts them as you request files from those partitions. The mounts are done read-only, by default, so you can play your content without any risk of deleting or otherwise damaging it. Network — MoviX boots onto the network if a DHCP server is detected. Although the friendly user interface doesn’t appear to support it yet, software in MoviX should enable you to get content from your LAN or the Internet to play back using an NFS (UNIX file sharing) or FTP (standard Internet file sharing facility) file server. MoviX boots right up to MPlayer, so you can eject the MoviX disk; insert a CD, DVD, or VCD into your drive; and play any supported content. Right-click the desktop to see your choices for select- ing content. CAUTION CAUTION 501 Running Bootable Linux Distributions 19 30190c19.qxd:Layout 1 12/18/07 12:45 AM Page 501 If you are comfortable moving around in Linux, you can go to different virtual terminals while you are using MoviX. Press Ctrl+Alt+F2 to view a sound mixer or Ctrl+Alt+F3 to go to a Linux shell. Then press Ctrl+Alt+F4 to get back to the main screen (with MPlayer). Select Switch to MoviX from the menu, and you can choose to run your audio player, slide show, or TV viewer (the latter if you have a television card installed). If you think MoviX is cool, you’ll really like the idea of the eMoviX project. With eMoviX, you put a mini-MoviX distribution on a CD or DVD with your video so that your video content comes with its own bootable player! (See http://movix.sourceforge.net/Docs/eMoviX for details.) Both eMovix and MoviX are described in my book Linux Toys II, in a project devoted mainly to creating your own bootable movies. GeeXboX GeeXboX (www.geexbox.org) is another bootable multimedia player distribution. From the screen that appears after GeeXboX boots, you can use your cursor to select the location of the content you want. Like MoviX, you can play a variety of audio and video content. It also boots up on your network, so you can get audio and video content from it. Because GeeXboX is so small (just a few megabytes), you can fit it easily on a mini-CD, bootable business card, or even a pen drive (provided your computer can be booted from those media). There is no graphical interface; you just use the keyboard to select content and simple controls from menus. Use arrow keys to move among the few GeeXboX selections (Open, Controls, Options, Help, and Quit). Press Enter to make a selection. You can open a file from hard disk, a music playlist, directory of images, or removable media (DVD, VCD/XCD, or audio CD) containing video content. Press M to show or hide menus and use P to pause. KnoppMyth I’ve included KnoppMyth (http://freshmeat.net/projects/knoppmyth) because it repre- sents a new and interesting class of bootable Linux distributions. MythTV is a fairly complex set of software used to configure an entertainment center that can include a personal video recorder (complete with downloaded local TV listings and tools for managing recording and playback), music player, weather center, and tools for getting news and other information. KnoppMyth is a CD distribution based on KNOPPIX that is intended to help simplify getting a MythTV installation up and running. Boot up KnoppMyth, answer a few questions, and MythTV is installed on your hard disk. KnoppMyth also includes another nice feature: a MythTV front end. With MythTV configured on a computer on your LAN, you can use the KnoppMyth disk to boot up a MythTV front end. That way, you can use your MythTV entertainment center from any TV on your local area network. NOTE NOTE 502 Choosing and Installing a Linux Distribution Part III 30190c19.qxd:Layout 1 12/18/07 12:45 AM Page 502 Dyne:bolic The Dyne:bolic GNU/Linux live bootable CD (www.dynebolic.org) provides a full range of mul- timedia production tools on a single bootable operating system. The distribution is intended for artisans who want to create and work with a variety of digital media: audio, video, digital images, HTML, and so on. Tools included with Dyne:bolic include MuSE, TerminatorX, GDam, SoundTracker, and PD (for mixing and streaming audio). Video editors include Kino, Cinelerra, and LiVES. For 3D modeling, there is Blender. For image manipulation, Dyne:bolic includes GIMP. Bluefish is included for creat- ing Web pages. Tiny Desktops A small CD, shaped in the form of a business card, can fit in your wallet. A USB pen drive can hang from your keychain. There are whole bootable Linux distributions that enable you to boot up a desktop with which you can connect to the Internet, browse the Web, play music, send and receive e-mail, do instant messaging, write documents, and work with spreadsheets. And they can do all that in about 50MB of space on a removable medium. CD business cards are really just regular CDs that have been cut into the shape of a business card. Depending on the one you choose, it can hold from 40MB to 52MB of data. A mini-CD can hold about 180MB of data. You can purchase these CDs in bulk from many loca- tions that sell regular CDs, and you can play them in any CD drive. (However, it’s best to use these CDs in trays that have a mini-CD inset because they have been known to fly loose and break CD drives.) Many bootable Linuxes these days are either based on KNOPPIX or the Bootable Business Card project ( http://www.lnx-bbc.com/). I know of several Linux user groups that have tailored their own bootable business card projects from the lnx-bbc.org BBC project to hand out to repre- sent their groups. Many bootable Linux distributions for media with capacity that is larger than that of a business-card-size CD tend to be based on KNOPPIX. Two examples of tiny desktop Linux distributions are Damn Small Linux and Puppy Linux. Damn Small Linux If you want your desktop Linux distribution to fit in your wallet, Damn Small Linux is one of your best choices. Damn Small is one of the first distributions based on KNOPPIX to fit on a bootable business card (about 48MB currently). Damn Small Linux is included on the CD that comes with this book. You can use it as described in Appendix A. With KNOPPIX inside, you have many of the features you get with KNOPPIX: excellent hardware detection and bootup to a desktop with network connectivity (provided you have an Ethernet con- nection with DHCP). Many features specific to Damn Small, however, are there to let you get a work- able desktop system in a small medium (mini-CD) and low RAM. Figure 19-3 shows an example of the DSL desktop. ON the CD-ROM ON the CD-ROM NOTE NOTE 503 Running Bootable Linux Distributions 19 30190c19.qxd:Layout 1 12/18/07 12:45 AM Page 503 FIGURE 19-3 Damn Small Linux fits a lot of features in under 50MB. Damn Small’s default desktop is pretty simple. The window manager is the powerful, yet efficient, FluxBox window manager (based on BlackBox). Right-click the desktop to see a menu of features you can select. Here are a few things you want to do when you first boot up Damn Small: Enhance your desktop — Right-click to see the Damn Small menu, and then select Desktop ➪ Full Enhanced Desktop. This adds some icons to your desktop to launch applications, some applets in the lower-right corner to display system information, and a workspace editor. Select Desktop again if you want to change the styles (colors and window borders), or Configuration to change desktop behavior. Get a network connection — If you don’t automatically get on the Internet at boot time, select System ➪ Net Setup from the Damn Small menu. Then you can choose to configure your Ethernet card, DSL connection, dial-up modem, or wireless card. 504 Choosing and Installing a Linux Distribution Part III 30190c19.qxd:Layout 1 12/18/07 12:45 AM Page 504 Browse the Web — Damn Small comes with the Firefox and Dillo Web browsers. Select Apps ➪ Net ➪ Browsers, and then choose either Firefox or Dillo to start browsing. The Dillo browser is small and fast, and can run on any X window manager because it doesn’t require GNOME libraries. Configure and read e-mail — The Sylpheed e-mail client is also very compact and runs fast. Select Apps ➪ Net ➪ Sylpheed to open it. Configure it and you can be up and read- ing your e-mail within a few minutes. Try out other applications — Right-click and look through the menu for applications that interest you. To see descriptions of those applications, visit http://damnsmalllinux .org/applications.html . Get other applications — Select the MyDSL icon on the desktop to see a selection of application categories you can choose from. If you are connected to the Internet, you can see lists of applications in each category for downloading and installing. You can get other DSL files that will let you download other applications from your desktop as well. Visit www.damnsmalllinux.org and select the link to packages to see the myDSL repository. Damn Small Linux has recently added some excellent customization features. For example, pack- ages you download, desktop settings, and configuration information can be saved across reboots. By creating a list of files and packages you want to save, those files and packages can be saved to a backup file that is stored on your hard disk or any removable medium. The next time you reboot, you can tell Damn Small Linux where to find that backup file and all settings and applications will be inserted into your current Damn Small Linux session. More information about using Damn Small Linux is available at the project FAQ page, www.damnsmalllinux.org/faq.html. Puppy Linux The other heavyweight contender for lightweight Linux bootables is Puppy Linux (www.puppylinux .com/ ). The Puppy Linux ISO image is about 71MB. So, for example, you can install and boot Puppy Linux on a 128MB flash drive and still have another 50+ megabytes of space left for data. Puppy Linux is built for speed, small size, and ease of use. To emphasize the ease-of-use aspects, Puppy Linux tends to lean more toward open and easy than closed and secure. Here are some examples: Backs up data — Puppy Linux lets you save files and configuration settings to memory the first time you use it. When you are done with your session, you are asked if you want to save that information permanently to a USB flash drive, zip drive, floppy drive, or hard disk partition. If you choose to save your information, it will be backed to a single archive file (named pup_save.3fs in ext3 format) on the permanent storage location you selected. You can choose the size of that archive as well. The next time you boot Puppy Linux on that computer, it will find your archive and restore its contents to your Puppy Linux session. NOTE NOTE 505 Running Bootable Linux Distributions 19 30190c19.qxd:Layout 1 12/18/07 12:45 AM Page 505 Loads to RAM — When you load Puppy Linux it will, by default, run in RAM. So you should get excellent performance, provided your machine has at least 128MB of RAM available. With Puppy Linux in RAM, that also frees up your CD/DVD drive. So you can pop in a CD or DVD and play it without disturbing the running Puppy Linux system. Sets no firewall rules — Because Puppy Linux uses a Linux 2.6 kernel, the iptables fire- wall is built in. However, no firewall rules are set by default. So, if you are thinking of expanding Puppy Linux to offer some services (Web server, mail server, and so on), keep in mind that it is intended for a desktop system and not built to securely offer services. Every major category of desktop applications is represented in Puppy Linux. For word processing, you have abiword. You can play music with GPlayer and video with Gxine. Much of the SeaMonkey Internet Application Suite (derived from code that was previously part of the Mozilla Application Suite) is included for Web browsing, mail, news, and HTML editing. For other Internet client appli- cations, you have GAIM (instant messaging), Gftp (FTP client), and several remote login and remote execution tools (secure shell and telnet). Other personal productivity tools that come with Puppy Linux include calendar (Ical Calendar), spreadsheet (Gnumeric), contacts (Gabby and SeaMonkey Addressbook), finance manager (Xfinans), and personal information (DidiWiki) applications. Most of these applications are lightweight but serviceable utilities. Puppy Linux is still a relative newcomer to bootable Linuxes, but it seems to have a good following and fairly active forums and development efforts. Tools for configuring your network and detecting devices seem to work better in KNOPPIX derivatives, such as Damn Small Linux, at the moment. But look for these areas to improve as Puppy Linux develops. Special-Purpose Bootables As people begin learning about and playing with customizing bootable Linux distributions, I believe more special-purpose distributions will begin to emerge. The eMoviX 2 distribution (part of the MoviX project) is an example of a distribution geared specifically toward a particular function (in this case, playing video content that you package yourself with the distribution). Here are examples: Gaming distributions — The GamesKNOPPIX distribution ( http://games-knoppix .unix-ag.uni-kl.de ) is currently being developed and will be a collection focusing on games. Refer to Chapter 23 for descriptions of many open source games available today. Windows applications distribution — The SLAX project ( www.slax.org), which is based on Slackware, offers some good examples of special-purpose bootable Linuxes. By CROSS-REF CROSS-REF 506 Choosing and Installing a Linux Distribution Part III 30190c19.qxd:Layout 1 12/18/07 12:45 AM Page 506 including WINE, DOSBox, and QEMU software, along with an easy-to-use KDE inter- face, SLAX KillBill offers a special Linux system designed particularly to get Windows applications running in a bootable Linux. Figure 19-4 shows an example of the SLAX KillBill desktop with the Windows WINAMP application running under WINE. FIGURE 19-4 Try on Windows applications in the bootable SLAX KillBill distro. While the SLAX KillBill CD image is not included on the media that comes with this book, the SLAX Popcorn Edition is included. SLAX Popcorn edition is a pocket operating system that fits on a 128MB USB flash drive. It includes a basic desktop interface along with some useful Internet applications and desktop productivity tools. Refer to Appendix A for information on using SLAX Popcorn Edition. Using the features just mentioned, many Windows applications can run natively, without any modification. This distribution offers a great way to try different kinds of Windows compatibility and emulation software to see if you can move your application to Linux. Firewall distributions — A firewall is a very good application for a bootable Linux dis- tribution. Using almost any PC and a CD (or even a floppy disk) Linux distribution, you can protect your LAN from intruders and provide a route for multiple computers to the Internet. Popular firewall distributions include Devil-Linux ( www.devil-linux.org) and Sentry Firewall CD ( www.sentryfirewall.com). Firewall/router distributions are described in Chapter 18. ON the CD-ROM ON the CD-ROM 507 Running Bootable Linux Distributions 19 30190c19.qxd:Layout 1 12/18/07 12:45 AM Page 507 [...]... you can add to Puppy Linux By adding and deleting these packages, you can create a customized version of Puppy Linux For information on adding packages and saving your configuration to a custom Puppy Linux distribution, refer to the Puppy Unleashed feature: www.puppyos.com/puppy-unleashed.htm Gentoo — Tools for building a potentially more finely tuned live CD are available with the Gentoo distribution... an existing bootable Linux and customize it yourself Customizing a Bootable Linux A Linux live CD is like a Linux system running from a hard disk, with a few significant differences It has to be tailored to run from a read-only medium, it usually doesn’t (by default) save information across reboots, and it needs to be able to detect and configure hardware each time it starts Many live CD distributions. .. 12/18/ 07 12:49 AM Page 5 27 Playing Music and Video Using the Playlist Editor The Playlist Editor lets you put together a list of audio files that you want to play You can add and delete files from this list, save them to a file, and use them again later Click the PL button in the XMMS window to open the Playlist Editor The Playlist Editor enables you to: Add files to the playlist — Click the Add button... files in other formats, you can convert them to one of the supported formats by using the sox command (described previously in this chapter) One way to create an audio CD is to use cdda2wav to extract (copy) the music tracks to a directory and then use cdrecord to write them from the directory to the CD Here’s an example: If you prefer a graphical tool for copying and burning CDs and DVDs, refer to Appendix... or many other types of systems Many bootable Linuxes are based on KNOPPIX (described in Chapter 11) , so they feature very fine hardware detection and strong network connectivity If you want to try out a mini-bootable Linux distribution, try Damn Small Linux or Puppy Linux For a Linux distribution that fits on a floppy disk, try Coyote Linux (described in Chapter 18) Nearly all bootable Linux distributions. .. different ways One approach is to save all your changes to a single archive file to any available writable medium (hard disk, pen drive, and so on), and then restore that archive the next time you boot the CD Another approach is to create a “persistent desktop,” which assigns your home directory and possibly other directories to a writable, mounted file system on your hard disk or other medium The latter... you to customize the CD and to save your customizations across reboots If you are setting out to create your own customized live CD, or simply save your own custom settings to go with an existing live CD, you can go about it in a few ways: Customizing data — Live CD distributions, including KNOPPIX and Damn Small Linux, let you save your settings, data files, and even installed applications in a couple... Playlist Editor window appears 6 Double-click the music file, and it starts to play 7 With a file selected and playing, here are a few actions you can take: Control play — Buttons for controlling play are what you would expect to see on a standalone CD player From left to right, the buttons let you go to a previous track, play, pause, stop, go to the next track, and eject the CD The eject button opens... Part III 12/18/ 07 12:45 AM Page 508 Choosing and Installing a Linux Distribution There are also bootable Linux distributions that are suited for education and for the visually impaired There are bootable Linux distributions that are suited to be run as a server or to centralize management of clusters The cool thing is that if there isn’t the exact kind of bootable Linux available for you to use, you can... a computer is playing audio and video With improved multimedia players and tools for storing and managing content, Linux has become a great platform for storing, playing, and managing your music and video files In this chapter, you learn to use the sound, video, digital imaging, and other multimedia tools available for Linux You explore the process of configuring audio and selecting video devices You . examples of tiny desktop Linux distributions are Damn Small Linux and Puppy Linux. Damn Small Linux If you want your desktop Linux distribution to fit in your wallet, Damn Small Linux is one of your best. Small Linux is available at the project FAQ page, www.damnsmalllinux.org/faq.html. Puppy Linux The other heavyweight contender for lightweight Linux bootables is Puppy Linux (www.puppylinux .com/ ) The Puppy Linux ISO image is about 71 MB. So, for example, you can install and boot Puppy Linux on a 128MB flash drive and still have another 50+ megabytes of space left for data. Puppy Linux