Archive for June, 2007

126 Part II . Running (Web hosting asp) the Show Using

Saturday, June 30th, 2007

126 Part II . Running the Show Using Web-Based Administration Web-based administration tools are available with many open source projects to make those projects more accessible to casual users. Often all you need to use those tools is a Web browser (such as Mozilla), the port number of the service, and the root password. Projects such as Samba and CUPS come with their own Web administration tools. Webmin is a general-purpose tool for administering a variety of Linux system services from your Web browser. The advantages of Web-based administration tools are that you can operate them from a familiar interface (your Web browser) and you can access them remotely. If the Linux distribution you are using comes with its own set of graphical administration tools (such as SUSE s YaST or Red Hat s system-config tools), you should generally use those instead of any Web-based interface that comes with a project because a distribution s own tools better integrate with its tools for starting and stopping services. Open Source Projects Offering Web Administration Several major open source projects come with Web-based interfaces for configuring those projects. Regardless of which Linux you are using, you can use your Web browser to configure the following projects: . Samba To set up Samba for doing file and printer sharing with Microsoft Windows systems on your LAN, use the Samba SWAT Web-based administration tools from any Web browser. With SWAT installed and running, you can access your Samba server configuration from your Web browser by typing the following URL in the location box: http://localhost:901 The Samba project also offers other graphical tools for administering Samba. You can check them out at http://samba.org/samba/GUI for descriptions of those tools. Samba is described in Chapters 25 and 26. . CUPS The Common UNIX Printing Service (CUPS) has its own Web administration tool. With CUPS installed and configured, you can typically use CUPS Web administration by typing the following URL in your Web browser s location box: http://localhost:631 You use the CUPS administration tool to manage printers and classes and do a variety of administration tasks. CUPS is described in Chapter 25. Samba and CUPS are included with many Linux distributions. Other projects that offer Web-based administration that may or may not be in your Linux distribution include SquirrelMail (a webmail interface) and Mailman (a mailing list facility). Note

Learning Basic Administration Linux, like other (Sri lanka web server) UNIX systems,

Saturday, June 30th, 2007

Learning Basic Administration Linux, like other UNIX systems, was intended for use by more than one person at a time. Multiuser features enable many people to have accounts on a single Linux system, with their data kept secure from others. Multitasking enables many people to run programs on the computer at the same time. Sophisticated networking protocols and applications make it possible for a Linux system to extend its capabilities to network users and computers around the world. The person assigned to manage all of this stuff is called the system administrator. Even if you are the only person using a Linux system, system administration is still set up to be separate from other computer use. To do most administrative tasks, you need to be logged in as the root user (also called the superuser) or temporarily get root permission. Users other than root cannot change, or in some cases even see, some of the configuration information for a Linux system. In particular, security features such as stored passwords are protected from general view. This chapter describes the general principles of Linux system administration. In particular, this chapter examines some of the basic tools you need to administer your Linux system. It also helps teach you how to work with file systems and monitor the setup and performance of your Linux system. Graphical Administration Tools Many Linux systems come with simplified graphical tools for administering Linux. If you are a casual user, these tools often let you do everything you need to administer your system without editing configuration files or running shell commands. Let s examine some of the Web-based administration tools that are available to use with most Linux systems. C4H A P T E R . . . . In This Chapter Doing graphical administration Using the root login Understanding administrative commands, config files, and log files Creating user accounts Configuring hardware Managing file systems and disk space Monitoring system performance . . . .

Running the Show . . . . In (Web hosting services)

Saturday, June 30th, 2007

Running the Show . . . . In This Part Chapter 4 Learning Basic Administration Chapter 5 Getting on the Internet Chapter 6 Securing Linux . . . . P A R T IIII

Web hosting top - Chapter 3 . Getting into the Desktop 121

Saturday, June 30th, 2007

Chapter 3 . Getting into the Desktop 121 Summary Complete desktop environments that run in Linux can rival desktop systems from any operating system. KDE and GNOME are the most popular desktop environments available today for Linux. For people who want a sleeker, more lightweight desktop 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 (office productivity tools, games, multimedia, and other applications). GNOME has the reputation of being a more basic, business-oriented desktop. Most Linux distributions such as Slackware and Gentoo offer GNOME and KDE desktops that aren t changed much from how they are delivered from those desktop projects. Other Linux systems (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 Pentium machines, you can use an efficient Linux system like Slackware, add a lightweight window manager, and get reasonably good performance with your desktop system on those machines. . . .

Michigan web site - 120 Part I . Linux First Steps .

Friday, June 29th, 2007

120 Part I . Linux First Steps . Twm (Tabbed Window Manager) Although no longer actively maintained, some people still use twm when they want a truly bare-bones desktop. Until you click the left mouse button in twm, there s nothing on the screen. Use the menu that pops up to open and close windows. There are many other window managers available for Linux as well. To check out some more, visit the Xwinman Web site (www.plig.org/xwinman). Once the system default is set for your window manager, users can set their own window manager to override that decision. The follow section describes how to do that. Choosing Your Personal Window Manager Simply adding an exec line with the name of the window manager you want to use to your own .xinitrc file in your home directory causes startx to start that window manager for you. Here is an example of the contents of a .xinitrc to start the Window Maker window manager: exec /usr/bin/wmaker Make sure that the file is executable (chmod 755 $HOME/.xinitrc). The Window Maker window manager should start the next time you start your desktop. Other window 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 Information If you tried configuring X and you still have a server that crashes or has a garbled display, your video card may either be unsupported or may require special configuration. 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 come with Fedora Core is available from the X.Org Web site. X.Org is the freeware version of X recently used by many major Linux distributions to replace the XFree86 X server. . X documentation README files that are specific to different types of video cards are delivered with the X.Org X server. Visit the X doc directory (/usr/X11R6/lib/X11/doc) for a README file specific to the type of video card (or more specifically, the video chipset) you are using. A lot of good information can also be found on the xorg.conf man page (type man xorg.conf).

Chapter 3 . Getting into the Desktop 119 (Virtual web hosting)

Friday, June 29th, 2007

Chapter 3 . Getting into the Desktop 119 Figure 3-15: In Slackware, you can change window managers using the xwmconfig command. Select the window manager you want to try from that screen and select OK. That window manager will start the next time you run startx (provided you don t override it by creating your own .xinitrc file). Here are your choices: . Xfce (www.xfce.org) The xfce window manager is designed to be lightweight and fast. . Blackbox (www.blackboxwm.sourceforge.net) Another lightweight window manager that strives to require few library dependencies so it can run in many 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 join together multiple windows so they appear as multiple tabs on a single window). It also includes an icon bar and adds some useful mouse features (such as using your mouse wheel to change workspaces). . Window Maker (www.windowmaker.org) Window Maker is a clone of the NEXTSTEP graphical interface, a popular UNIX workstation of the 1980s and 1990s. It is a particularly attractive window manager, with support for themes, various window decorations, and features for changing backgrounds, animations, and adding applets (called docapps). . FVWM (www.fvwm.org) This window manager supports full internationalization, window manager hints, and improved font features. Interesting features 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 that was created to look and feel like Windows 95.

Web hosting rating - 118 Part I . Linux First Steps .

Friday, June 29th, 2007

118 Part I . Linux First Steps . Screen resolution The last major piece of information you may want to add is the screen resolution and color depth. There will be a screen resolution associated with each video card installed on your computer. The Screen section defines default color depths (such as 8, 16, or 24) and modes (such as 1024×768, 800×600, or 640×480). Set the DefaultDepth to the number of bits representing color depth for your system, and then add a Modes line to set the screen resolution. To read more about how to set options in your xorg.conf file, type man xorg.conf. If your X server is XFree86, type man XF86Config. Choosing a Window Manager Fully integrated desktop environments have become somewhat unfriendly to changing out window managers. However, you can completely bypass KDE or GNOME, if you 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 to change window managers, the concept is the same on other Linux systems. In general, if no desktop environment is running in Linux, you can start it by typing: $ startx This command starts up your desktop environment or window manager, depending on how your system is configured. Although a variety of configuration files are read and commands are run, essentially which desktop you get depends on the contents of two files: . /etc/X11/xinit/xinitrc If a user doesn t specifically request a particular desktop environment or window manager, the default desktop settings will come from the contents of this file. The xinitrc file is the system-wide X configuration file. Different Linux systems use different xinitrc files. . $HOME/.xinitrc The .xinitrc file is used to let individual users set up their own desktop startup information. Any user can add a .xinitrc file to his or her own home directory. The result is that the contents of that file will override any system-wide settings. If you do create your own .xinitrc file, it should have as its last line exec windowmanager, where windowmanager is the name of your window manager; for example: exec /usr/X1R6/bin/blackbox Slackware has at least seven different window managers from which you can choose, making it a good place to try out a few. It also includes a tool called xwmconfig, which lets you change the window manager system-wide (in the /etc/X11/xinit/xinitrc file). To use that tool, as the root user simply type xwmconfig from any shell on a Slackware system. Figure 3-15 shows an example of that screen.

Chapter 3 . Getting into (Web hosting company) the Desktop 117

Friday, June 29th, 2007

Chapter 3 . Getting into the Desktop 117 Your mouse might be connected in a different way (such as a bus or serial mouse) or may have different buttons to enable. Tools for configuring your mouse are distribution-specific. Try mouseconfig, mouseadmin, or systemconfig- mouse to reconfigure your mouse from the command line. . Monitor The monitor section defines attributes of your monitor. There are generic settings you can use if you don t exactly know the model of your monitor. Changing the Horizontal Sync and Vertical Refresh rates without checking your monitor s technical specifications is not recommended; you could damage the 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.5 VertRefresh 40.0 - 70.0 EndSection Here 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.0 VertRefresh 50.0 - 90.0 EndSection If there is a tool available to select your monitor model directly, that would be the best way to go. For example, in Red Hat systems, you would run systemconfig- xfree86 to change monitor settings. . Video device The Device section is where you identify the driver to use with your video driver and any options to use with it. It s important to get this section right. The Xorg command described earlier usually does a good job detecting the driver. If you want to change to a different one, this is where to do so. Here s an example of the Device section after I added a video driver from 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 EndSection

Web proxy server - 116 Part I . Linux First Steps Getting

Thursday, June 28th, 2007

116 Part I . Linux First Steps Getting New X Drivers Working 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 acceleration) you may need to get proprietary drivers directly from the video manufacturers. 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 to Linux and FreeBSD drivers. Links from the page that appears will take you to a Web page from which you can download the new driver and get instructions for installing it. For ATI video cards and chipsets, go to www.ati.com and select Drivers & Software. Follow the links to Linux drivers and related installation instructions. Tuning Up Your X Configuration File The xorg.conf file might look a bit complicated when you first start working with it. However, chances are that there are only a few key elements you will need to change in it. As root user, open the /etc/X11/xorg.conf file 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 EndSection If 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 the following: Section InputDevice Identifier Mouse0 Driver mouse Option Protocol IMPS/2 Option Device /dev/psaux Option ZAxisMapping 4 5 EndSection Don t change the mouse identifier, but you can change the protocol and add the ZAxisMapping line to enable your wheel mouse. Try restarting X and trying your mouse wheel on something like a Web page to see if you can scroll up and down with it.

Tomcat web server - Chapter 3 . Getting into the Desktop 115

Thursday, June 28th, 2007

Chapter 3 . Getting into the Desktop 115 It s possible that you already did some configuration when you installed Linux. If you are able to start a desktop successfully and your mouse, keyboard, and screen all 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 ideas on how to go about doing those things. Creating a Working X Configuration File If your desktop crashes immediately or only shows garbled text, try to create a new X 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.conf file for you to use, do the following from a Terminal window as root user: 1. If Linux booted to a command prompt, go to the next step. However, if it tried to start X automatically, you might have an illegible screen. In that case, press these keys together: Ctrl+Alt+Backspace. It should kill your X server and get you 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 type init 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 -configure 3. The file x.org.conf.new should appear in your home directory. To test if this new configuration file works, type the following to start the X server: # X -xf86config /root/xorg.conf.new A gray background with an X in the middle should appear. Move the mouse to move the X pointer. If that succeeds, you have a working xorg.conf file 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.conf Chances are that you have a very basic X configuration that you may want to tune further. Note