Archive for November, 2007

330 Part III . Using the Command Line (Vps web hosting)

Friday, November 30th, 2007

330 Part III . Using the Command Line in SUSE Linux On the other hand, if something is wrong with the package, you are told what file in the package is different from the original installed file from the RPM. bible:~ # rpm V i4l-isdnlog S.5….T c /etc/isdn/isdn.conf bible:~ # For each file in an RPM that differs from the norm, you receive a letter that dictates what the difference was and why. Table 12-1 details what the differences can be and their respective status letters (or number). Table 12-1 RPM Verification Output Status Description M The file mode is different. 5 The MD5 sum differs. D If this is a device file, the major or minor number is different. L If this is a file link, then its status is different from what is expected. U The owner of the file differs. G The group owner differs. T The modification time differs (the file contents have changed since being installed). S Different file size. So in the case of the /etc/isdn/isdn.conf example given previously, the current file differs in size (S), its MD5 sum is different (5), and the modification time is different (T). This might lead you to assume that the configuration file has changed since As with the RPM list command (rpm-qa), you can verify all the packages installed on the system with rpm -Va. Using RPM is not as difficult as most new users think. As we hope you can see, RPM provides a very useful tool for your arsenal, and any competent administrator or user should know how to use it. For more information, see the rpm man page, which lists the full range of what RPM can do. installation. Note
Check Tomcat Web Hosting services for best quality webspace to host your web application.

Chapter 12 . Working with Packages 329 Listing (Frontpage web hosting)

Friday, November 30th, 2007

Chapter 12 . Working with Packages 329 Listing 12-6: Removing a Dependent Package bible:/media/dvd/suse/i586 # rpm -e blackbox error: Failed dependencies: blackbox is needed by (installed) bbtools-2005.1.24-3 In this example, you have been told that the package bb-tools depends on the Blackbox package we are trying to remove. To resolve this, you have two options, one good and one bad: . The bad option, which can prove marginally useful during both installation and removal of packages, is to tell RPM to ignore package dependencies. This should never really be used when removing a package, because as in the case of bbtools, other packages will stop working. However, during package installation, you may know for certain that a dependency that RPM is aware of is in fact resolved by a source-compiled library you have installed, or are testing. To tell RPM to not check for dependencies, use the -nodeps parameter as well as the usual rpm -Uvh. . The good option (you do want to be a good administrator, don t you?) is to remove the dependent package as well as the package you originally wanted to remove, as shown in the following: bible:/media/dvd/suse/i586 # rpm -e blackbox bbtools Caution You may have noticed a very important characteristic of package removal, one common with most things in Unix that is, when you are root, you are not warned that you are removing files. This holds true when removing packages. You were not asked to confirm the removal of bbtools and blackbox; rpm assumed you knew what you were doing. Verifying an RPM If you want to verify whether an RPM is correctly installed, you can use the rpm-V command. Using the verify command will check the files, their permissions, and also if the package s dependencies are installed so that it can function correctly. bible:~ # rpm V logcheck bible:~ # If rpm-V returns nothing, then the RPM itself has been successfully verified and all is well.
If you are in need for cheap and reliable webhost to host your website, we recommend http web server services.

Web hosting company - 328 Part III . Using the Command Line

Friday, November 30th, 2007

328 Part III . Using the Command Line in SUSE Linux When all packages we need have been installed, we then remove any non-essential packages used for the running of the server. This lowers the security risk, mainly for local security exploits that could take place. To see what packages you have on the system, you need to query the RPM database (-q) and list all (-a) RPM packages (see Listing 12-5). Listing 12-5: Listing Installed RPM Packages bible:/media/dvd/suse/i586 # rpm -qa aaa_skel-2005.2.1 providers-2004.10.25 suse-release-10 dos2unix-3.1-303 netcat-1.10-869 mktemp-1.5-732 gle-3.0.6-648 gpart-0.1h-478 eject-2.0.13-190 usbutils-0.70-8 popt-1.7-207 ziptool-1.4.0-111 Again, we have cut the list down as we have a lot of packages installed, but you get the point. Tip The program sort is useful in this situation to sort the output of the rpm-qa command into an alphanumeric list. Using the pipe (|) command, you can redirect the output of the rpm-qa command through the sort command (rpm -qa |sort). Once listed, you can go through the RPM list and remove any packages not needed. Removing Installed Packages After an RPM has been installed, you may need to remove it from the system for one reason or another. As it does when installing packages, RPM will check the dependencies of the package you want to remove. This check of dependencies is as important as checking package dependency during installation, because you could end up deleting files that another RPM package depends on. To remove packages, you need to erase (-e) the package from the system. As with installation of packages, RPM checks to see if any other RPM packages on the system depend on the package you want to remove. If a package does depend on it, the removal will fail. See Listing 12-6 for an example.
You want to have a cheap webhost for your apache application, then check apache web hosting services.

Web hosting india - Chapter 12 . Working with Packages 327 Listing

Thursday, November 29th, 2007

Chapter 12 . Working with Packages 327 Listing 12-4: Querying a Package Directly for Its File List bible:/media/dvd/suse/i586 # rpm -qlp blackbox-0.65.0-313.i586.rpm /usr/X11R6/bin/blackbox /usr/X11R6/bin/bsetbg /usr/X11R6/bin/bsetroot /usr/share/blackbox /usr/share/blackbox/menu /usr/share/blackbox/nls /usr/share/blackbox/nls/C /usr/share/blackbox/nls/C/blackbox.cat As you can see, the package list is the same, which is what you would assume. Finding What RPM Package Owns a File When a package has been installed, you may need to find out if a file on the system belongs to a package for maintenance purposes. To do this, you need to query (-q) the database again and also find where the file came from (-f), as we do in the following code lines: bible:/media/dvd/suse/i586 # rpm -qf /usr/X11R6/bin/blackbox blackbox-0.65.0-313 As you can see by the second line in the preceding example, the RPM database is fully aware that the file /usr/X11R6/bin/blackbox belongs to the Blackbox package. Tip If you do not know the full location of a binary file, you can use the which command and backticks to pass the full path of the binary to rpm -qvf. If you wanted to find the location of Blackbox, you could use which blackbox. Passing this to rpm -qvf is achieved by using the command rpm -qvf `which blackbox`. A backtick is not a single quote; it looks like a single quote slanted to the left on your keyboard. Querying the database for file ownership is really useful when you want to upgrade a certain application, but you are unsure if it is controlled by the RPM system. Listing the RPM Packages Installed on a System When we have installed SUSE servers for customers, one of the first things we do is install a minimal system and then use YaST to install only the packages we need to run the specific server the customer wants for example, Apache.
Go visit our java server pages services for a reliable, lowcost webhost to satisfy all your needs.

Web hosting control panel - 326 Part III . Using the Command Line

Thursday, November 29th, 2007

326 Part III . Using the Command Line in SUSE Linux Querying RPM Packages To find out information about an RPM package, you must query the RPM database or the RPM package directly. You do this with the -q command-line option. If you are querying an installed RPM, you just need to use the -q parameter with the query type you want to use. If you need to query an RPM package file directly, you have to add the -p (package) directive. Querying RPMs is a very important part of administrating an RPM-based system because you may need to see what version of the software is installed, determine whether a file you have come across on your system is owned by an RPM package, or list the files that belong to an RPM. Listing Files in an RPM It is quite useful to see what files are in an RPM package, both before and after the package has been installed. To do this, you need to query (-q) the package for its files (-l), as in Listing 12-3. Listing 12-3: Querying a Package for Its File List bible:/media/dvd/suse/i586 # rpm -ql blackbox /usr/X11R6/bin/blackbox /usr/X11R6/bin/bsetbg /usr/X11R6/bin/bsetroot /usr/share/blackbox /usr/share/blackbox/menu /usr/share/blackbox/nls /usr/share/blackbox/nls/C /usr/share/blackbox/nls/C/blackbox.cat /usr/share/blackbox/nls/POSIX Blackbox contains a lot of files, and we have cut the list short to conserve space. Even though the RPM file itself is called blackbox-0.65.0-313.i586.rpm, you need to query only the package name itself. The rest of the filename refers to the version (0.65.0-313) and the architecture it was compiled for (i586). If you want to see what files belong to an RPM before it is installed, you need to query the package directly, and not the RPM database. To do this you use the -p (package) option (see Listing 12-4).
From our experience, we can recommend PHP5 Web Hosting services, if you need affordable webhost to host and run your web application.

Chapter 12 . Working with Packages 325 Tip

Wednesday, November 28th, 2007

Chapter 12 . Working with Packages 325 Tip Doing an upgrade on a package that does not have a lower version install will do a straight install, so we usually just use the upgrade parameter. To illustrate the dependency problem we talked about in the previous section, Listing 12-1 shows an install of the bb-tools package. The bb-tools package is a group of applications that act as helpers to the Blackbox window manager. If you want to use Blackbox, we recommend that you also install the bb-tools package. Listing 12-1: Installing the bb-tools RPM Package bible:/media/dvd/suse/i586 # rpm -Uvh bbtools-2005.1.24-3.i586.rpm error: Failed dependencies: blackbox is needed by bbtools-2005.1.24-3 We used the -U (upgrade), -v (verbose output), and -h (show hashes) parameters. The -v and -h parameters are usually very helpful in giving you active feedback of the installation of a package. The bb-tools package depends on quite a few other software packages; thankfully, most have already been installed during the installation of SUSE. However, you can see that we do not have the Blackbox window manager installed, as RPM s dependency tree can tell this from the RPM itself. To be successful, you need to install both Blackbox and bb-tools. The RPM system is able to install multiple RPM files and will take into account whether the packages to be installed depend on one another. This proves very useful in these situations. Listing 12-2 shows an installation of both bb-tools and the Blackbox RPM. Listing 12-2: Installing Both bb-tools and Blackbox bible:/media/dvd/suse/i586 # rpm -Uvh bbtools-2005.1.24-3.i586.rpm blackbox 0.65.0-313.i586.rpm Preparing… ########################################### [100%] 1:blackbox ########################################### [ 50%] 2:bbtools ########################################### [100%] Take note that even though we specified bb-tools before Blackbox, RPM was able to see that Blackbox had to be installed first during the preparation phase of package installation.
We recommend high quality webhost to host and run your jsp application: christian web host services.

324 Part (Web design careers) III . Using the Command Line

Wednesday, November 28th, 2007

324 Part III . Using the Command Line in SUSE Linux Note Binary RPMs An RPM contains the binary, configuration, and documentation for an application. It also contains information about what it depends on and what it provides to the system (so that other packages can depend on the RPM you are dealing with if needed). Whereas with source code you have to resolve and figure out any dependencies that are needed, the RPM contains all of this information for you in the package itself. When you install SUSE, a large number of RPM files are installed with the software you have selected. These RPMs may rely on other RPMs for functionality and so on. The process of controlling dependencies is handled by YaST automatically. For example, if you want to install Mozilla, YaST knows from the RPM file that Mozilla depends on the X libraries, among others. YaST creates a dependency tree for RPMs that need to be installed and resolves any dependency needs as well as any conflicts. This feature of YaST is something that proves extremely useful because it means that the user does not need to resolve package dependencies manually when installing software. RPM manages packages directly, installing, querying, and building RPMs. YaST, on the other hand, takes the features of RPM and builds an installer system around it. YaST will resolve dependencies, give you information about the packages, and enable you to search all SUSE packages on the media to find what you need to install. Dependencies are an important part of the RPM process. The fact that the RPM system manages dependencies takes away the cumbersome and sometimes difficult process of manually resolving dependencies of the source code. Installing an RPM To install an RPM, you can use the YaST package selection tool we talked about in Chapter 1 or install manually. Installing an RPM manually involves using the command-line features of rpmas opposed to using the YaST package manager. We will talk about installing, querying, and removing RPM packages manually so that you are proficient in managing and checking installed software. The rpmcommand is used to control all package operations on the system. To install a package, you need to use the -i(install) parameter. Doing a straight install is fine in most situations, but if the package is installed already (albeit a lower version), you will either need to remove the package and then install the higher version or use the -U(upgrade) parameter.
We highly recommend you visit web and email hosting services if you need stable and cheap web hosting platform for your web applications.

Working with Packages Originally, there was no such (Web hosting provider)

Tuesday, November 27th, 2007

Working with Packages Originally, there was no such thing as a package in Linux. It was a dark time for people who have a penchant for an organized, manageable, and above all clean system. A package is a file containing all the files of an application, library, or anything else with data in it that can be installed, removed, queried, and managed as one entity. The RPM (Red Hat Package Manager) format has undoubtedly become the de facto package standard on Linux (and is available on other operating systems, too). In the dark days, when you needed to install new applications, you downloaded the source code, untarred it, configured the build environment, and compiled it. When it came to installing the application, you had no way of telling what file belonged to what application. This led to orphaned files existing on a system when you wanted to remove the application or upgrade it. Enter RPM to solve this issue. RPM uses a central database that contains information about all software installed on the system. You can query this database to find out what packages are installed, their versions, and also what files they own. If you want to upgrade the package, you can download the RPM and simply tell RPM that you want to upgrade the software to a later revision. This helps to control and curb orphaned files and provides a quick and easy way to see what software is installed on the system. This chapter covers package maintenance and manipulation using RPM. RPM is a very powerful system, not only to install and manage packages, but also to automate the build process of software to produce a binary RPM. 12 CHAPTER …. In This Chapter What is RPM? Installing an RPM Querying an RPM RPM and dependencies Removing an RPM Creating an RPM ….
We highly recommend you visit web and email hosting services if you need stable and cheap web hosting platform for your web applications.

Web site development - 322 Part III . Using the Command Line

Tuesday, November 27th, 2007

322 Part III . Using the Command Line in SUSE Linux Specifying Modes As discussed earlier, emacs provides different key bindings and functions based on the type of file that you are using; these are known as modes. The default mode used by emacs when you start emacs without specifying the file that you want to edit is known as Fundamental mode. You may want to customize emacs to always use a different mode by default, regardless of the name of the file. For example, to make text mode the default mode each time you start emacs, you could add the following line to your ~/.gnu-emacs-custom file: (setq default-major-mode text-mode) As you can see from this example, the name of the default mode in emacs is defined through an emacs variable, default-major-mode, which in this case requires the name of an emacs function rather than a numeric value as shown in the examples in the previous section. Each emacs mode also enables you to specify other actions whenever you use that mode. For example, to turn on auto-fill (wrapping words to the next line when you reach a certain column on your screen), you could add the following line to your ~/.gnu-emacs-custom file: (add-hook text-mode-hook turn-on-auto-fill) Changing File Associations As discussed earlier, emacs automatically enters specific modes when you open files with a specific extension, just like many GUIs do when you click a specific type of file. You may occasionally want to have emacs automatically enter a specific mode when you open files that the specified mode is not traditionally associated with. For example, emacs automatically enters text mode when you edit files with the .txt or .text extensions. But what if you typically name text files with the .inf extension and want emacs to automatically enter text mode when entering files of that type? The file extensions associated with different emacs modes are stored in a list of extension/mode-name pairs. Therefore, to add the .inf extension to the list of extensions associated with text mode, you would simply append that extension to the list of extensions associated with text mode, as in the following example: (setq auto-mode-alist (cons ( .inf . text-mode) auto-mode-alist)) This example uses the Lisp cons function to append the pair .inf and text-modeto the list of automatic file associations, and then uses the setq function discussed in the previous sections to set the auto-mode-alist variable to the new, expanded list.
Note: If you are looking for cheap and reliable webhost to host and run your mysql application check mysql web server services.

Chapter 11 . Text Editors 321 Changing Key (Apache web server tutorial)

Monday, November 26th, 2007

Chapter 11 . Text Editors 321 Changing Key Bindings Whenever you execute an emacs command, you are actually executing a Lisp function. As explained earlier, emacs is configured to execute specific commands in response to combinations of the Control or Escape keys and the standard keys on your keyboard. These are known as key bindings because they associate (bind) a specific function with a specific key sequence. However, if you re already familiar with another editor that also used commands consisting of combinations of the Control or Escape keys and the standard keys on your keyboard, your fingers are probably used to typing certain keys to execute certain commands. The most common customization made to emacs is therefore to change the keys to which commonly used commands are associated. Though emacs enables you to change key bindings globally or within a specific mode, it is more common to customize a specific key binding so that it works regardless of the mode in which you are using emacs. The emacs configuration command to globally set a key binding is global-set-binding. For example, to globally set the key sequence Ctrl+z to a function that scrolls the current buffer up one line rather than attempting to suspend emacs, you would put the following command in your ~/.gnu-emacs-custom file: (global-set-key C-Z scroll-one-line-up) In Lisp fashion, you must preface the name of the function that you are referring to with a single-quotation mark (not the back-quote). If you re interested, the scroll- one-line-up function is provided as an example in the section Defining Your Own Functions a bit later in this chapter. When specifying key bindings, the Control key is represented by C-and the Escape key is represented by M-. Setting Variables emacs uses a number of internal variables to control its behavior. These variables can be modified using the setq command. For example, to cause emacs to scroll more smoothly in one-line increments, you could add the following line to your ~/.gnu-emacs-custom file: (setq scroll-step 1) As another example, the default settings in emacs cause it to automatically save your files each time you have typed or modified 300 characters. To decrease this value to every 100 changes, you could add the following line to your ~/.gnuemacs-custom file: (setq auto-save-interval 100) Note
You need excellent and relaible webhost company to host your web applications? Then pay a visit to Inexpensive Web Hosting services.