Archive for August, 2007

Learning BasicAdministrationLinux, like other UNIX systems, was intended (Geocities web hosting)

Friday, August 31st, 2007

Learning BasicAdministrationLinux, like other UNIX systems, was intended for usebymore than one person at a time. Multiuser featuresenable many people to have accounts on a single Linux sys- tem, with their data kept secure from others. Multitaskingenables many people to run programs on the computer atthesame time. Sophisticated networking protocols and applications make it possible for a Linux system to extenditscapabilities to network users and computers around theworld. The person assigned to manage all of this stuff is calledthe system administrator. Even if you are the only person using a Linux system, systemadministration is still set up to be separate from other com- puter use. To do most administrative tasks, you need to belogged in as the root user (also called the superuser) or tem- porarily get root permission. Users other than root cannotchange, or in some cases even see, some of the configurationinformation for a Linux system. In particular, security featuressuch as stored passwords are protected from general view. This chapter describes the general principles of Linux systemadministration. In particular, this chapter examines some ofthe basic tools you need to administer your Linux system. Italso helps teach you how to work with file systems and moni- tor the setup and performance of your Linux system. Graphical Administration ToolsMany Linux systems come with simplified graphical tools foradministering Linux. If you are a casual user, these tools oftenlet you do everything you need to administer your systemwithout editing configuration files or running shell commands. Let s examine some of the Web-based administration toolsthat are available to use with most Linux systems. 44CHAPTER …In This ChapterDoing graphicaladministrationUsing the root loginUnderstandingadministrativecommands, configfiles, and log filesCreating useraccountsConfiguringhardwareManaging file systemsand disk spaceMonitoring systemperformance …

Running the Show…In This PartChapter 4Learning BasicAdministrationChapter (Web site designers) 5Getting

Thursday, August 30th, 2007

Running the Show…In This PartChapter 4Learning BasicAdministrationChapter 5Getting on theInternetChapter 6Securing Linux …

121Chapter 3Getting into the DesktopSummaryComplete desktop (Shared web hosting) environments that

Thursday, August 30th, 2007

121Chapter 3Getting into the DesktopSummaryComplete desktop environments that run in Linux can rival desktop systems fromany operating system. KDE and GNOME are the most popular desktop environ- ments available today for Linux. For people who want a sleeker, more lightweightdesktop environment, a variety of simple window managers (Blackbox, FVWM, twm, FluxBox, and many others) are available to use in Linux as well. The KDE desktop is well known for its large set of integrated applications (officeproductivity tools, games, multimedia, and other applications). GNOME has the rep- utation of being a more basic, business-oriented desktop. Most Linux distributionssuch as Slackware and Gentoo offer GNOME and KDE desktops that aren t changedmuch from how they are delivered from those desktop projects. Other Linux sys- tems (such as Red Hat) put their own look-and-feel over GNOME and KDE desktops. While the latest Windows systems won t run on many older 486 and Pentiummachines, you can use an efficient Linux system like Slackware, add a lightweightwindow manager, and get reasonably good performance with your desktop systemon those machines. …

Web server logs - 120Part ILinux First Steps .Twm (Tabbed Window Manager) Although

Wednesday, August 29th, 2007

120Part ILinux First Steps .Twm (Tabbed Window Manager) Although no longer actively maintained, some people still use twm when they want a truly bare-bones desktop. Untilyou click the left mouse button in twm, there s nothing on the screen. Use themenu that pops up to open and close windows. There are many other window managers available for Linux as well. To check outsome more, visit the Xwinman Web site (www.plig.org/xwinman). Once the system default is set for your window manager, users can set their ownwindow manager to override that decision. The follow section describes how todothat. Choosing Your Personal Window ManagerSimply adding an execline with the name of the window manager you want to useto your own .xinitrcfile in your home directory causes startxto start that win- dow manager for you. Here is an example of the contents of a .xinitrcto start theWindow Maker window manager: exec /usr/bin/wmakerMake sure that the file is executable (chmod 755 $HOME/.xinitrc). The WindowMaker window manager should start the next time you start your desktop. Otherwindow managers you can choose include Blackbox (/usr/X11R6/bin/blackbox), FluxBox (/usr/X11R6/bin/fluxbox), FVWM (/usr/X11R6/bin/fluxbox), FVWM- 95 (/usr/X11R6/bin/fvwm95), and twm (/usr/X11R6/bin/twm). Getting More InformationIf you tried configuring X and you still have a server that crashes or has a garbleddisplay, your video card may either be unsupported or may require special configu- ration. Here are a couple of locations you can check for further information: .X.Org(www.x.org) The latest information about the X servers that comewith Fedora Core is available from the X.Org Web site. X.Org is the freewareversion of X recently used by many major Linux distributions to replace theXFree86 X server. .X documentation README files that are specific to different types of videocards are delivered with the X.Org X server. Visit the X docdirectory(/usr/X11R6/lib/X11/doc) for a README file specific to the type of videocard (or more specifically, the video chipset) you are using. A lot of goodinformation can also be found on the xorg.confman page (type manxorg.conf).

119Chapter 3Getting into the DesktopFigure 3-15:In Slackware, you (Web server setup)

Tuesday, August 28th, 2007

119Chapter 3Getting into the DesktopFigure 3-15:In Slackware, you can change window managers using the xwmconfigcommand. Select the window manager you want to try from that screen and select OK. Thatwindow manager will start the next time you run startx(provided you don t over- ride it by creating your own .xinitrcfile). Here are your choices: .Xfce (www.xfce.org) The xfce window manager is designed to belightweight and fast. .Blackbox (www.blackboxwm.sourceforge.net) Another lightweight win- dow manager that strives to require few library dependencies so it can run inmany environments. Offers many features for setting colors and styles .FluxBox (http://fluxbox.sourceforge.net) Based on Blackbox(0.61.1),FluxBox adds nice features such as window tabs (where you can jointogether multiple windows so they appear as multiple tabs on a single win- dow). It also includes an icon bar and adds some useful mouse features (suchas using your mouse wheel to change workspaces). .Window Maker (www.windowmaker.org) Window Maker is a clone of theNEXTSTEP graphical interface, a popular UNIX workstation of the 1980s and1990s. It is a particularly attractive window manager, with support for themes, various window decorations, and features for changing backgrounds, anima- tions, and adding applets (called docapps). .FVWM (www.fvwm.org) This window manager supports full international- ization, window manager hints, and improved font features. Interesting fea- tures include window shading in all directions (even diagonal) and side titles(including text displayed vertically). .FVWM-95(http://fvwm95.sourceforge.net) A version of FVWM thatwas created to look and feel like Windows 95.08_

118Part ILinux First Steps .Screen resolution The last major (Crystaltech web hosting)

Tuesday, August 28th, 2007

118Part ILinux First Steps .Screen resolution The last major piece of information you may want to addis the screen resolution and color depth. There will be a screen resolutionassociated with each video card installed on your computer. The Screen sec- tion defines default color depths (such as 8, 16, or 24) and modes (such as1024×768, 800×600, or 640×480). Set the DefaultDepth to the number of bitsrepresenting color depth for your system, and then add a Modesline to set thescreen resolution. To read more about how to set options in your xorg.conffile, type man xorg.conf. If your X server is XFree86, type man XF86Config. Choosing a Window ManagerFully integrated desktop environments have become somewhat unfriendly to chang- ing out window managers. However, you can completely bypass KDE or GNOME, ifyou like, and start your desktop simply with X and a window manager of your choice. Although I m using Slackware as the reference distribution for describing how tochange window managers, the concept is the same on other Linux systems. In gen- eral, if no desktop environment is running in Linux, you can start it by typing: $ startxThis command starts up your desktop environment or window manager, dependingon how your system is configured. Although a variety of configuration files are readand commands are run, essentially which desktop you get depends on the contentsof two files: ./etc/X11/xinit/xinitrc If a user doesn t specifically request a particu- lar desktop environment or window manager, the default desktop settings willcome from the contents of this file. The xinitrcfile is the system-wide X con- figuration file. Different Linux systems use different xinitrcfiles. .$HOME/.xinitrc The .xinitrcfile is used to let individual users set uptheir own desktop startup information. Any user can add a .xinitrc file tohis or her own home directory. The result is that the contents of that file willoverride any system-wide settings. If you do create your own .xinitrcfile, itshould have as its last line exec windowmanager, where windowmanageristhe name of your window manager; for example: exec /usr/X1R6/bin/blackboxSlackware has at least seven different window managers from which you canchoose, making it a good place to try out a few. It also includes a tool calledxwmconfig, which lets you change the window manager system-wide (in the/etc/X11/xinit/xinitrcfile). To use that tool, as the root user simply typexwmconfigfrom any shell on a Slackware system. Figure 3-15 shows an example ofthat screen.

117Chapter 3Getting into the DesktopYour mouse might be (Web server setup)

Monday, August 27th, 2007

117Chapter 3Getting into the DesktopYour mouse might be connected in a different way (such as a bus or serialmouse) or may have different buttons to enable. Tools for configuring yourmouse are distribution-specific. Try mouseconfig, mouseadmin, or system- config-mouseto reconfigure your mouse from the command line. .Monitor The monitor section defines attributes of your monitor. There aregeneric settings you can use if you don t exactly know the model of your moni- tor. Changing the Horizontal Sync and Vertical Refresh rates without checkingyour monitor s technical specifications is not recommended; you could damagethe monitor. Here s an example of an entry that will work on many LCD panels: Section Monitor Identifier Monitor0 VendorName Monitor Vendor ModelName LCD Panel 1024×768 HorizSync 31.5 - 48.5VertRefresh 40.0 - 70.0EndSectionHere s an entry for a generic CRT monitor that will work on many CRTs: Section Monitor Identifier Monitor0 VendorName Monitor Vendor ModelName Generic Monitor, 1280×1024 @ 74 Hz HorizSync 31.5 - 79.0VertRefresh 50.0 - 90.0EndSectionIf there is a tool available to select your monitor model directly, that would bethe best way to go. For example, in Red Hat systems, you would run system- config-xfree86to change monitor settings. .Videodevice The Device section is where you identify the driver to usewith your video driver and any options to use with it. It s important to get thissection right. The Xorgcommand described earlier usually does a good jobdetecting the driver. If you want to change to a different one, this is where todo so. Here s an example of the Device section after I added a video driverfrom NVIDIA to my system (the driver name is nv): Section Device Identifier Card0 Driver nv VendorName nVidia Corporation BoardName Unknown Board BusID PCI:1:0:0 EndSection08_

Web hosting faq - 116Part ILinux First StepsGetting New X DriversWorking video

Monday, August 27th, 2007

116Part ILinux First StepsGetting New X DriversWorking video drivers are available with most video cards you can purchase today. However, to get some advanced features from your video cards (such as 3D acceler- ation) you may need to get proprietary drivers directly from the video manufactur- ers. In particular, you may want to get drivers from NVIDIA and ATI. To get new drivers for video cards or chipsets from NVIDIA, go to the NVIDIA site(www.nvidia.com) and select the Download Drivers button. Follow the link toLinux and FreeBSD drivers. Links from the page that appears will take you to a Webpage from which you can download the new driver and get instructions forinstalling it. For ATI video cards and chipsets, go to www.ati.comand select Drivers & Software. Follow the links to Linux drivers and related installation instructions. Tuning Up Your X Configuration FileThe xorg.conffile might look a bit complicated when you first start working withit. However, chances are that there are only a few key elements you will need tochange in it. As root user, open the /etc/X11/xorg.conffile in any text editor. Here are some things you can look for: .Mouse Look for an InputDevice section with a Mouse0 or Mouse1 identifier. That section for a simple two-button, PS2 mouse might look as follows: Section InputDevice Identifier Mouse0 Driver mouse Option Protocol PS/2 Option Device /dev/psaux EndSectionIf you are unable to use some feature of the mouse, such as a middle wheel, you might be able to get it working with an entry that looks more like thefollowing: Section InputDevice Identifier Mouse0 Driver mouse Option Protocol IMPS/2 Option Device /dev/psaux Option ZAxisMapping 4 5 EndSectionDon t change the mouse identifier, but you can change the protocol and addthe ZAxisMapping line to enable your wheel mouse. Try restarting X and try- ing your mouse wheel on something like a Web page to see if you can scroll upand down with it.

Photo web hosting - 115Chapter 3Getting into the DesktopIt s possible that you

Sunday, August 26th, 2007

115Chapter 3Getting into the DesktopIt s possible that you already did some configuration when you installed Linux. Ifyou are able to start a desktop successfully and your mouse, keyboard, and screenall seem to be behaving, you may not have to do anything more to configure X. However, if you can t start the desktop or you want to adjust some basic features(such as screen resolution or number of colors supported), let s look at some ideason how to go about doing those things. Creating a Working X Configuration FileIf your desktop crashes immediately or only shows garbled text, try to create a newX configuration file. With the X.org X server, that file is /etc/X11/xorg.conf. In XFree86, the configuration file, which has basically the same format, is/etc/X11/XF86Config. To have X try to create a sane xorg.conffile for you to use, do the following from aTerminal window as root user: 1.If Linux booted to a command prompt, go to the next step. However, if it triedto start X automatically, you might have an illegible screen. In that case, pressthese keys together: Ctrl+Alt+Backspace. It should kill your X server and getyou back to a command prompt. If X tries to restart (and is still messed up), press Ctrl+Alt+F2. When you see the command prompt, log in as root and typeinit 3. This will temporarily bring you down to a nongraphical state. 2.To have X probe your video hardware and create a new configuration file, type: # Xorg -configure3.The file x.org.conf.newshould appear in your home directory. To test if thisnew configuration file works, type the following to start the X server: # X -xf86config /root/xorg.conf.newA gray background with an X in the middle should appear. Move the mouse tomove the X pointer. If that succeeds, you have a working xorg.conffile to use. 4.Press Ctrl+Alt+Backspace to exit the X server. 5.Copy the new configuration file to where it is picked up the next time X starts. # cp /root/xorg.conf.new /etc/X11/xorg.confChances are that you have a very basic X configuration that you may want to tunefurther. Note08_

114Part ILinux First StepsConfiguring Your Own DesktopToday s modern (Yahoo web space)

Saturday, August 25th, 2007

114Part ILinux First StepsConfiguring Your Own DesktopToday s modern desktop computer systems are made to spoon-feed you your oper- ating system. In the name of ease of use, some desktop environments spend a lot ofresources on fancy panels, complex control centers, and busy applets. In short, they can become bloated. Many technically inclined people want a more streamlined desktop or at leastwant to choose their own bells and whistles. They don t want to have to wait forwindows to redraw or menus to come up. Linux enables those people to forget thecomplete desktop environments and configure: .X The X Window System provides the framework of choice for Linux andmost UNIX systems. When you configure X yourself, you can choose the videodriver, monitor settings, mouse configuration, and other basic featuresneeded to get your display working properly. .Window manager Dozens of window managers are available to use with Xon a Linux system. Window managers add borders and buttons to otherwisebare X windows. They add colors and graphics to backgrounds, menus, andwindows. Window managers also define how you can use keyboard andmouse combinations to operate your desktop. You only need to configure X directly if your desktop isn t working (the desktopmay appear scrambled or just plain crash). You may choose to configure X if youwant to tune it to give you higher resolutions or more colors than you get bydefault. Still to come in this chapter: examining tools for tuning X and, in particular, workingwith the xorg.conffile. You ll also explore a few popular window managers thatyou might want to try out. Slackware Linux is used to illustrate how to choose andconfigure a window manager because Slackware users tend to like simple, directways of working with the desktop (when they need a desktop at all). Configuring XBefore 2004, most Linux distributions used the X server from the XFree86 project(www.xfree86.org). Because of licensing issues, many of the major Linux vendors(including Red Hat, SUSE, and Slackware) changed to the X server from X.org(www.X.org). The descriptions of how to get X going on your machine assume youare using the X.org X server. To determine which X server is installed on your system, from a Terminal windowtype man Xorgand man XFree86. If you only have one X server installed on yourcomputer (which you probably do) only the one installed will show a man page. While you are there, press the space bar to page through the features of your Xserver. Note08_