Archive for October, 2007

322 Part III . (Web site construction) Choosing and Installing a

Saturday, October 13th, 2007

322 Part III . Choosing and Installing a Linux Distribution This sets the owner and group of /usr/bin/wall to root and root and disables all permissions on the file. You can find more information about file permissions in the Understanding File Permissions section of Chapter 2. Unlike dpkg-divert, dpkg-statoverride does not keep track of the original file permissions. As a result, removing an override does not restore the old permissions. After removing the override, you need to either set the permissions manually or reinstall the package that contained the file: # dpkg-statoverride –remove /usr/bin/wall # apt-get –reinstall install bsdutils Reading Package Lists… Done Building Dependency Tree… Done 0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded. Need to get 0B/62.5kB of archives. After unpacking 0B of additional disk space will be used. Do you want to continue? [Y/n]Y (Reading database … 16542 files and directories currently installed.) Preparing to replace bsdutils 1:2.12-10 (using …/bsdutils_1%3a2.12- 10_i386.deb) … Unpacking replacement bsdutils … Setting up bsdutils (2.12-10) … Managing Package Configuration with debconf All packages that include support for configuration management through debconf are configured as they are being installed. If you want to change a configuration option later, you can do so using the dpkg-reconfigure utility. For instance, you can change the configuration options for ssh using the following command: # dpkg-reconfigure ssh Every configuration parameter is assigned a priority by the package maintainer. This allows debconf to select the default values for settings below a specific priority. By default, you will be prompted to answer questions of only medium, high, or critical priority; low-priority questions are answered automatically. You can change this by reconfiguring the debconf package: # dpkg-reconfigure debconf Advanced users maintaining multiple systems may want to create a database of configuration settings that can be distributed to every computer (or to sets of computers) to reduce the number of repeated steps. This process is documented in the debconf and debconf.conf man pages. Note Note
If you are looking for affordable and reliable webhost to host and run your business application visit our ftp web hosting services.

Chapter 9 . Running Debian (Remote web server) GNU/Linux 321 The

Friday, October 12th, 2007

Chapter 9 . Running Debian GNU/Linux 321 The system administrator can designate which program is referenced in the alternatives database through the use of the update-alternatives command: # update-alternatives –config editor These are alternatives that provide editor . Selection Alternative ———————————————– 1 /bin/ed *+ 2 /bin/nano 3 /usr/bin/nvi Press enter to keep the default[*], or type selection number: 2 You can also use the –all command with update-alternatives to configure every entry in the alternatives database, one at a time. You can find more details by typing the following: man update-alternatives By default, all alternatives are in automatic mode, meaning that the system automatically selects a suitable program from the available candidates. Installing a new candidate program generally results in the automatic updating of the appropriate alternatives. Manually configuring an alternative disables automatic mode, preventing the system from changing these settings without prior knowledge of the system administrator. The Debian package management tools also provide a mechanism for renaming specific files in a package and for overriding the ownership and permission settings on files. Unlike when these changes are made manually, using mv, chmod, or chown, changes made through the Debian tools remain in place across package upgrades and re-installations. For example, if you want to replace /usr/bin/users without modifying the coreutils package, you can divert it to /usr/bin/users.distrib: # dpkg-divert –local –rename –add /usr/bin/users Adding `local diversion of /usr/bin/users to /usr/bin/users.distrib Removing the diversion returns the original filename: # dpkg-divert –remove /usr/bin/users Removing `local diversion of /usr/bin/users to /usr/bin/users.distrib Stat overrides are useful when you want to disable access to a program, or when you want to make it set-UID. For instance, to disable access to the wall program, type the following: # dpkg-statoverride –update –add root root 0000 /usr/bin/wall Note
If you are searching for cheap webhost for your web application, please visit MySQL5 Web Hosting services.

320 Part III . Choosing and Installing a (Yahoo web space)

Thursday, October 11th, 2007

320 Part III . Choosing and Installing a Linux Distribution The following –contents option lets you see the full contents of the package you choose as if you were listing the contents with an ls -l command. You can see the name and path to each file, its permission settings and file/group ownership: $ dpkg –contents lsof_4.71-1_i386.deb drwxr-xr-x root/root 0 2004-04-03 07:34:41 ./ drwxr-xr-x root/root 0 2004-04-03 07:34:36 ./usr/ drwxr-xr-x root/root 0 2004-04-03 07:34:39 ./usr/bin/ … Installing Package Sets (Tasks) with Tasksel Some package sets are too large to be managed practically through meta packages, so tasks have been created as an alternative. Tasks are installed and removed using the tasksel utility. When run without any arguments, tasksel presents a menu from which you can select tasks to install or remove. Do not install any tasks if you plan to use this system in conjunction with the server examples in Chapters 24 and 25. Additional options are available from the command line: . To see a list of known tasks, run tasksel –list-tasks. . To list the packages that are installed by a task, run tasksel –task-packages . When a task is removed, all programs associated with that task, whether installed manually or as part of that task, are removed! An example of a popular task to install is the desktop task. The desktop task installs three complete desktop environments based on the X Window System: GNOME, KDE, and XFCE environments. Note that this task will take a long time to download and install and requires several gigabytes of disk space to complete. To start the desktop task, run the following: # tasksel install desktop Alternatives, Diversions, and Stat Overrides In cases where there is more than one installed program that provides a specific function, package maintainers have the option of utilizing Debian s alternatives system. The alternatives system manages which program is executed when you run a specific command. For instance, the ed, nano, and nvi packages each provide a text editor. An alternative maintained in the system guarantees that a text editor is accessible through the generic editor command, regardless of which combination of these packages is installed. Caution Caution
We recommend cheap and reliable webhost to host and run your web applications: Coldfusion Web Hosting services.

Chapter 9 . Running Debian GNU/Linux 319 The (Anonymous web server)

Wednesday, October 10th, 2007

Chapter 9 . Running Debian GNU/Linux 319 The quotes are used to prevent the shell from replacing the wildcard with a list of matching files in the current directory. For more information about wildcards, see Chapter 2 or type man 7 glob to see a list of wildcards. To view detailed information about a specific package, use the -s or –status command: $ dpkg –status lsof Package: lsof Status: install ok installed Priority: standard Section: utils … The origin package for a file can be determined using the -S or –search command: $ dpkg –search /bin/ls coreutils: /bin/ls The list of files in an installed package can be viewed using the -L or –listfiles command: $ dpkg –listfiles lsof /. /usr /usr/sbin /usr/bin /usr/bin/lsof … Examining a Package File Package files can be examined before installing them using either the –info (-I) or the –contents (-c) command. These options can be used on packages in a local directory, as opposed to using them to examine packages on a remote server. The following –info option shows the lsof package name, version information, and sizes of different parts of the package. Beyond that (although shortened here for space considerations) you would be able to see a list of packages lsof depends on and descriptive information about the package. $ dpkg –info lsof_4.71-1_i386.deb new debian package, version 2.0. size 319058 bytes: control archive= 1534 bytes. 557 bytes, 16 lines control 2246 bytes, 32 lines md5sums Package: lsof Version: 4.71-1 … Note
If you are in need for chaep and reliable webhost to host your website, our recommendation is http web server services.

318 Part III . Choosing and Installing a (Apache web server tutorial)

Tuesday, October 9th, 2007

318 Part III . Choosing and Installing a Linux Distribution Package Management Using dpkg As mentioned earlier, the dpkg utility is the core package management tool in Debian. Most other package management tools within the system, including APT, use dpkg to perform the midlevel work, and dpkg in turn uses dpkg-deb and dpkg-query to handle a number of the low-level functions. In most cases, you will want to use APT or Aptitude for package management, and use dpkg in only a few situations. Far too many commands associated with dpkg exist to list in this chapter, but the most common ones are explained in the following sections. In most cases, there are both short and long commands to perform the same function. Use whichever is easier for you to remember. Installing and Removing Packages Packages can be installed with dpkg using the -i or –install flags and the path to the .deb file containing the package. The path must be accessible as a file system path (HTTP, FTP, and other methods are not supported), and more than one package can be specified: # dpkg –install /home/wayne/lsof_4.71-1_i386.deb Package removal through dpkg is also straightforward and is done with the -r or –remove commands. When configuration files are to be removed, the -P or –purge command can be used instead. Both commands can also be used to specify multiple packages to remove: # dpkg –remove lsof or… # dpkg –purge lsof Querying the Package Database You will often need to obtain more information about packages that are already installed on your system. Because these operations do not modify the package database, they can be done as a non-root user. To list all packages known to dpkg, use the -l or –list commands: $ dpkg –list You can restrict the list by specifying a glob pattern: $ dpkg –list *lsof*
If you are looking for affordable and reliable webhost to host and run your business application visit our ftp web hosting services.

Chapter 9 . (Best web hosting) Running Debian GNU/Linux 317 On

Monday, October 8th, 2007

Chapter 9 . Running Debian GNU/Linux 317 On this command, APT retrieves and installs the ssh package. If additional packages are required, a list of those packages is displayed by APT. If you choose to continue, APT will download and install those packages along with the package you requested. When installing packages that support automatic configuration through debconf, you re prompted to answer the appropriate configuration questions. While the Debian package developers have gone to great lengths to ensure that the default options for these questions will work in most situations, it s best to read the questions thoroughly to be sure that the defaults work for you. Removing Packages APT can also be used to remove packages from your system. Unlike dpkg, which removes only the package you tell it to remove, apt-get also removes any packages that depend on the package you are removing. This is best used in conjunction with the -s option to simulate what would happen if the removal were actually performed: # apt-get -s remove python2.3 Reading Package Lists… Done Building Dependency Tree… Done The following packages will be REMOVED: bittornado python python2.3 python2.3-dev 0 upgraded, 0 newly installed, 4 to remove and 0 not upgraded. Remv pytris (0.96 Debian:testing) Remv python (2.3.4-1 Debian:testing) Remv python2.3-dev (2.3.4-5 Debian:testing) Remv python2.3 (2.3.4-5 Debian:testing) In this example, several other packages depend on the python2.3 package and also need to be removed. To proceed with removing python2.3 and all packages that depend on it, run the command again without the -s flag. Upgrading Your System As new versions of packages become available, you can instruct APT to download and install them, automatically replacing the older versions. This is as simple as updating your package list, followed by a simple command: # apt-get upgrade When upgrading to a newer distribution, use dist-upgrade instead of upgrade. This changes the rules that APT uses when deciding which actions to take, making it expect major changes in dependencies and handle them appropriately. Note Note
Check Tomcat Web Hosting services for best quality webspace to host your web application.

Adelphia web hosting - 316 Part III . Choosing and Installing a

Sunday, October 7th, 2007

316 Part III . Choosing and Installing a Linux Distribution You generally want to run this command before installing new packages so that you do not download an older version. Run it before checking for upgrades as well. Finding and Installing Packages When looking for new packages to install, you may not always know what package you want. The package database maintained by APT includes package descriptions and other fields that can be searched using the apt-cache utility: # apt-cache search tetris bsdgames a collection of classic textual unix games pytris two-player networked console tetris clone stax collection of puzzle games similar to Tetris Attack. Specifying multiple keywords in a search prevents apt-cache from listing packages that do not contain all of the keywords you specify. This enables you to do very specific searches such as word processor. You can also use this utility to find out more information about a specific package in the repositories: # apt-cache show pytris Package: pytris Priority: optional Section: games Installed-Size: 101 Maintainer: Radovan Garabik Architecture: i386 Version: 0.96 Depends: python (>=2.1), libc6 (>= 2.2.4-4) Filename: pool/main/p/pytris/pytris_0.96_i386.deb Size: 16304 MD5sum: 70eb8ad6f5a8a901a95eb37f7336fc57 Description: two-player networked console tetris clone two-player networked console based tetris clone, written in python, similar to xtet42. To view information about a specific package that is already installed on your system, use dpkg, as discussed later in this chapter. Once you know the name of the package you want to install, use the install method to download it and any packages on which it depends. For example, the ssh package is very useful for remotely accessing systems and is probably one of the first programs that you will want to install: # apt-get install ssh Note Tip
If you are looking for cheap and quality webhost to host and run your website check Jboss Web Hosting services.

Web design course - Chapter 9 . Running Debian GNU/Linux 315 Managing

Sunday, October 7th, 2007

Chapter 9 . Running Debian GNU/Linux 315 Managing the List of Package Repositories The configuration file /etc/apt/sources.list contains a list of Debian package repositories that APT will use. Like most configuration files on a Linux system, this file is a plain-text file that can be viewed using any text editor or pager. To view its contents, run the following: # pager /etc/apt/sources.list deb cdrom:[Debian GNU/Linux _Sarge_ NetInst]/ stable main deb http://ftp.us.debian.org/debian/ stable main deb-src http://ftp.us.debian.org/debian/ stable main deb http://security.debian.org/ stable/updates main Depending on which pager is configured as your default, you may need to press the q key in order to return to a prompt. Your output will differ from this example s, of course, but the kind of information remains the same. The first part of each line indicates whether the repository is to be used for binary packages (indicated by the deb prefix) or source packages (deb-src). The rest of the line defines the method (in this case, cdrom or http), the location, the distribution (stable), and the sections (main). If you want to use software from the contrib and non-free sections, you can use a text editor to add them after main. Run man sources.list on any Debian system for more information. If you aren t going to have your Debian CD available all the time, you may want to remove the cdrom: entry from the file. Use a text editor (as root user) to edit the file: # editor /etc/apt/sources.list Make any changes you need to the file, exit the editor, and then update the package database as described in the following section. Astute readers may notice that the pager and editor commands used in this section are not common UNIX commands. Both are pointers to programs and are managed using Debian s alternatives system, which is discussed later in this chapter. Updating the APT Package Database Because the lists of packages available in the Debian package repositories may change from time to time, you need to instruct APT to download these lists and update its database occasionally. To perform this process, run the following command: # apt-get update Note Note Note
In case you need quality webspace to host and run your web applications, try our personal web hosting services.

314 Part (Virtual web hosting) III . Choosing and Installing a

Saturday, October 6th, 2007

314 Part III . Choosing and Installing a Linux Distribution You can disconnect using the poff command and can view logs (for diagnosing problems or determining status) using the plog command. The user that was created during the base system configuration will automatically have access to run these commands. Any other users who need to run them will need to be added to the dialout group through the use of the gpasswd utility: # gpasswd -a dialout PPPoE Connections Some DSL and cable modem providers require that you use PPPoE (PPP over Ethernet) to connect to their systems. PPPoE connections are managed using the pppoeconf program. As long as your computer is connected to the broadband connection, it should be able to detect most of the settings automatically. Package Management Using APT For most users, APT will be the primary tool for installing, removing, and upgrading packages. This section shows how to use the apt-get and apt-cache utilities. Identifying and Configuring Your Modem If your modem is not automatically on COM1, 2, 3, or 4, you may need to perform some additional configuration steps before it can be used for PPP connections. Plug-and-play and PCI modems are often found on higher ports such as ttyS4 ( COM5 ). This information can often be found in the output from the dmesg utility. If you reached this point from stage 2 of the install, you can get to a prompt by pressing Alt+F2 and logging in as root. # dmesg | grep tty ttyS00 at 0×03f8 (irq = 4) is a 16550A ttyS04 at port 0xa800 (irq = 5) is a 16550A In this case, ttyS00 is the on-board serial port (most PC motherboards have at least one of these) and ttyS04 is probably the modem. If you have several serial ports showing up, you can create devices for all of them (as shown following) and try them until you find your modem. The system includes only ttyS0 through ttyS3 by default, so this device will need to be created using the MAKEDEV command. When running MAKEDEV, you will need to leave out any leading zeros in the device number. In this example, ttyS04 becomes ttyS4: # (cd /dev && sh MAKEDEV ttyS4) If you reached this point while performing stage 2 of the install, you can get back to the install menu by pressing Alt+F1. See Chapter 5 for more information on using modems to get on the Internet.
From our experience, we are can tell you that you can find a reliable and cheap webhost service at Java Web Hosting services.

Chapter 9 . Running Debian GNU/Linux 313 The (Domain and web hosting)

Friday, October 5th, 2007

Chapter 9 . Running Debian GNU/Linux 313 The pppconfig utility will ask a number of questions during the connection creation process. Start by selecting Create a connection, and then enter the following information as prompted: 1. Provider name Enter any name you like to identify this connection. For the dial-up entry to your primary ISP, you can simply leave the name provider as the Provider name. 2. DNS server configuration method Here you can configure the connection to static DNS servers if needed. This is probably not necessary unless your service provider included the DNS server information in the information that it provided about the connection. If you aren t certain, select Dynamic DNS and change it later if needed. 3. Authentication method This is the method that your computer will use to identify itself to the dial-up server. PAP is the most commonly used protocol, and some systems also support CHAP. The Chat option should be used if the dial-up servers use text prompts to ask for the username and password. If in doubt, select PAP. 4. User name and password Enter the username and password that will be recognized by the dial-up server. 5. Speed This is the speed that your computer and your modem will communicate with one another. In most cases, this should be set to 115200. 6. Dialing method If your telephone system requires pulse dialing, you can configure that here. 7. Phone number Enter the number that you need to dial in order to reach the dial-up server, including any area codes and other codes that may be needed. For instance, if you have to dial 9 in order to reach an outside line, use 9,. The comma tells your modem to pause before continuing the dialing process. You may also enter the appropriate numbers for disabling features such as call waiting through your telephone service. 8. Modem configuration method Here, you can have pppconfig attempt to automatically find the port that your modem is on. If a modem is not found, you will then be given the chance to enter the path to the modem device. More information about what to enter here can be found in the Identifying and Configuring Your Modem sidebar later in this chapter. Save your settings by selecting Finished from the menu, and then exit the pppconfig utility. Dial a connection by using the pon command, by replacing peer with the name you assigned to your connection, or by leaving it out if your connection is named provider: # pon peer
Check Tomcat Web Hosting services for best quality webspace to host your web application.