Archive for July, 2007

82 Part I . SUSE (Web hosting company) Linux Basics What

Tuesday, July 31st, 2007

82 Part I . SUSE Linux Basics What Does fdisk Really Do? The fdisk command displays and modifies the partition table, often referred to as the partition map, for one or all disk drives. The partition table is stored on disk and is just a list of the cylinders, sectors, and blocks associated with each existing partition on the disk. When you start fdisk in interactive mode, it reads your disk s partition table into memory and enables you to make changes to that in-memory copy. Changes to the partition table are not actually written back to the disk until you explicitly use the w (write) command to do so. Do not issue the w command unless you are absolutely sure that you want to update a disk s partition map. So let s go ahead and load fdisk with /dev/hda as the disk we will be working with (see Listing 3-2). (We re using a different disk in the following examples from the one we used in Listing 3-1, so don t worry about the discrepancy between this listing and the previous fdisk-l example.) Listing 3-2: Using fdisk to Edit /dev/hda bible:~ # fdisk /dev/hda The number of cylinders for this disk is set to 31207. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) Command (m for help): p Disk /dev/hda: 16.1 GB, 16105807872 bytes 16 heads, 63 sectors/track, 31207 cylinders Units = cylinders of 1008 * 512 = 516096 bytes Device Boot Start End Blocks Id System /dev/hda1 1 1041 524632+ 82 Linux swap /dev/hda2 * 1042 7283 3145968 83 Linux /dev/hda3 7284 11445 2097648 83 Linux Command (m for help): As you can see in the preceding listing, fdisk presents you with a warning about the size of the disk. The warning relates to older systems and disks and is not especially relevant these days. Older operating systems used to talk to the disks in a
We recommend cheap and reliable webhost to host and run your web applications: Coldfusion Web Hosting services.

Web hosting service - Chapter 3 . Partitions, Filesystems, and Files 81

Tuesday, July 31st, 2007

Chapter 3 . Partitions, Filesystems, and Files 81 Listing 3-1: Output of the fdisk -l Command # fdisk -l Disk /dev/hda: 82.3 GB, 82348277760 bytes 255 heads, 63 sectors/track, 10011 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/hda1 * 1 13 104391 83 Linux /dev/hda2 14 268 2048287+ 83 Linux /dev/hda3 269 395 1020127+ 82 Linux swap /dev/hda4 396 10011 77240520 f Win95 Ext d (LBA) /dev/hda5 396 2945 20482843+ 83 Linux /dev/hda6 2946 4857 15358108+ 83 Linux /dev/hda7 4858 6132 10241406 83 Linux /dev/hda8 6133 10011 31158036 83 Linux Note The output of fdisk-l shows you the size of the disk, how many cylinders it has, and the disk s block and cylinder size. As the development of fdisk has progressed, the usability of the tool has increased, showing users human-readable information regarding the disk subsystem. We will use human-readable sizes when creating partitions, as this is the easiest and safest way to create new partitions. As you can see from the output of fdisk -l, the partitions within a disk are numbered incrementally. As a partition is added to a disk, the partition number is increased. As you can see from the fdisk -l output, we have eight partitions, 1 8. Partition 4 is not an actual partition but is the definition for the extended partition that actually houses logical partitions 5, 6, 7, and 8. You can determine this by looking at the partition name or by comparing the starting and ending block numbers for these partitions. Disks themselves are referenced using different drive letters within each type of I/O interface (IDE, SCSI, and so on). The first IDE disk on the system is named hda. The first SCSI disk on the system is named sda. As more disks are added to the system, subsequent letters are used within each of your system s storage interfaces. For example, hdb would be the second IDE disk on the system s first IDE interface, hdc would be the first drive on the systems second IDE interface, sdb would be the second disk on the system s SCSI interface, and so on. To set up partitions using fdisk, you need to specify the disk itself on the command line. After fdisk has loaded, you will be dropped to its command line to continue working on the disk. At any time while in the fdisk command prompt, entering m followed by Return will display a help screen that lists all available fdisk commands.
Looking for affordable and reliable webhost to host and run your business application? Then look no more and go to servlet web hosting services.

Web site templates - 80 Part I . SUSE Linux Basics Character

Monday, July 30th, 2007

80 Part I . SUSE Linux Basics Character and Block Devices Two types of devices can represent physical and virtual devices in Linux: . Character devices are those whose communication is based on a serial communica- tion character by character. Common character devices are your serial ports (/dev/ttyS0, /dev/ttyS1, and so on) and the /dev/random device, which is a virtual device that if read will just feed out a string of random bytes. The latter is useful for creating an empty file that contains actual data. . Block devices are those whose communication is based on multiple bytes that are read and written as a unit known as a block. All disk devices are block devices. You will come across more block and character devices throughout the book. Creating Partitions This section uses the fdisk command to view, edit, and create partitions on a sample SUSE system. If you do not have available, unallocated disk space to experiment with on your existing system, this section provides examples of the most common reasons you would use fdisk to carry out partitioning work so that you can see how and when you might use fdisk in the future. Caution Partitioning and creating filesystems is a destructive procedure, and if not done correctly, it will destroy data. It is quite likely that you have used up all of the space on your disk(s) when you installed SUSE, which may mean that you will not have any space left on the disk to experiment with the processes in this chapter. If you are new to Linux, it is possible that playing with the system over time and prodding and poking system elements such as partitions and filesystems could accidentally destroy your SUSE system (it happens to all of us who like to learn by playing). If a reinstallation is needed, you could create your SUSE system with space left over to test out these practices. If you are worried about your data and SUSE installation, we cannot stress enough that playing around with partition tables and filesystems can lead to data corruption, or at worst, the destruction of all data on a disk. If you have a spare computer, you may want to consider using it as a test system rather than experimenting on a system that you are using for real work and which stores your personal data. Your disk controllers and existing disk drives were detected and configured when you installed SUSE Linux on your system. When using fdisk or any other partitioning software, the most important thing to find out is that you are working with the correct disk on your system. SUSE provides a few ways to do this, but the easiest is to use a feature of fdisk that prints out all of the disks detected by the system along with their partition maps. As shown in Listing 3-1, the fdisk-l command tries to query all disks attached to the system and their respective partition maps. The sample system used in this chapter has only one disk.
In case you need quality webspace to host and run your web applications, try our personal web hosting services.

Chapter 3 . Partitions, Filesystems, and Files 79 (Crystaltech web hosting)

Monday, July 30th, 2007

Chapter 3 . Partitions, Filesystems, and Files 79 . Extended partition An extended partition is a portion of a disk in which logical partitions can be created (see the next bullet item). It is a special type of partition because it cannot directly hold any data itself but contains other partitions that can themselves hold data. . Logical partitions This is a special type of partition that is not a single physical portion of your disk, as a primary partition is, but instead resides inside an extended partition. After creating an extended partition, creating subsequent partitions will offer you the choice of creating either a primary partition (remember, only four per disk) or a logical partition that resides in an extended partition. If you have never encountered partitions before, they can be very daunting. With this in mind, Figure 3-1 shows a logical view of sample partitions on a hard disk. This is not necessarily how partitions are physically laid out on disks but provides a good conceptual view of how they work together. /home /home/justin/Music / (root) /spare swap /home/justin/Movies Extended partition boundary Primary partition Logical partition Figure 3-1: Conceptual view of partitions After a partition has been created, it is represented in Linux by a device name. Devices are represented by files in /dev, and the devices we are interested in at the moment are the block devices that represent disk systems. We will concentrate on the common IDE (/dev/hdx) and SCSI (/dev/sdx) disks.
Please visit our professional web hosting services to find out about cheap and reliable webhost service that will surely answer all your demands.

Top ten web hosting - 78 Part I . SUSE Linux Basics Partitions

Sunday, July 29th, 2007

78 Part I . SUSE Linux Basics Partitions We touched upon partitions during the installation of SUSE in Chapter 1, and the configuration and creation of these is relatively easy with the new graphical installers to help users along. Before graphical interfaces such as YaST were readily available, more low-level tools such as fdisk were available to simplify working with and partitioning disks. This book is designed to teach you the ways of SUSE. However, because you already know how to create partitions graphically with YaST as discussed in Chapter 1, we will use the fdisk command from now on to get additional insights into the low-level aspects of working with disks and partitions. Tip You can still access SUSE s graphical partitioning utility after system installation by running the Control Center, selecting the YaST2 Modules entry, selecting System, and clicking the Expert Partitioner. This enables you to create new partitions in unallocated space. To resize existing partitions, you can use the /usr/sbin/ parted (partition editor) utility. Most operating systems enable users to split a disk into sections that are known as partitions. Disks are partitioned for several different reasons. In many operating systems, such as older DOS/Windows systems, the operating system software lagged behind the manufacturing capabilities of disk drive manufacturers, so partitions were necessary to divide large disks into sections that the system could address correctly. In general, partitions provide both manageability and logical separation of data for any computer system. Dividing a disk into partitions makes it easier to back up data because backups are generally done on a per-partition basis. Partitioning also limits the potential problems related to partial disk failures. Even if a portion of your drive becomes unwritable, data on other portions (partitions) of the disk is still accessible. Finally, separating a disk into partitions makes it easier to administer and reallocate disk space. Data can be moved between partitions as needed, and partitions can be managed and added into the overall filesystem more flexibly thanks to the way in which Unix and Linux systems make partitions available by mounting them on directories. For example, if a system supports a large number of projects and one project uses substantially more disk space than others and often fills up an existing partition, its data can be moved to its own partition, which can then be mounted on its home directory. Types of Partitions There are three types of partition definitions, and each provides different functionality for different situations: . Primary partitions These are the standard physical partitions you would use if you did not need to segment your disk too much. Linux supports a total of four primary partitions on a disk, which is usually a limitation for people with large disks who would like to have some segmentation in the way they organize their data or critical files.
We would like to recommend you tested and proved virtual web hosting services, which you will surely find to be of great quality.

Web hosting unlimited bandwidth - Partitions, Filesystems, and Files Partitions are physical or

Sunday, July 29th, 2007

Partitions, Filesystems, and Files Partitions are physical or logical portions of a disk; a filesystem is the logical arrangement of data on a physical or logical partition so that your computer system can access and store data there. Partitions and filesystems are nothing new to the computer world, but you will find that these parts of the operating system are much more visible and important as you use Linux. One of the great things about Unix in general is that it is hands on. This may be daunting at first, but it enables you to have as much or as little control over how your system works as you want, optimize your system to meet your needs, and fix any problems that may crop up. Windows users have pretty much had it easy with regards to installing their operating systems, which is a testament to Microsoft s ability to provide a high-level installer that still performs low-level tasks without low-level user involvement. Of course, this can be a burden, too, as any high-level interface provides less access to the low-level commands that may be necessary when optimizing your system for your specific requirements. The next few sections cover partitions, how to use them, why you use them, and where you use them. Later in this chapter, you will use this basic knowledge about partitions to create a filesystem in which you can actually create and store files and directories. 3 CHAPTER …. In This Chapter Creating partitions Selecting and creating filesystems Mounting filesystems Unmounting filesystems ….
You need excellent and relaible webhost company to host your web applications? Then pay a visit to Inexpensive Web Hosting services.

76 Part I . SUSE Linux Basics One

Saturday, July 28th, 2007

76 Part I . SUSE Linux Basics One of the nice features of pax is that it can deal with archives in both the traditional Unix formats tar and cpio. It is also a very convenient tool for copying a directory tree unchanged from one place to another, like this: pax rwv work /tmp/ Another useful tool for synchronizing directory trees, whether locally or remotely, is rsync. For example: rsync r localdir faraway:/home/bible/incoming/ will create a copy of the directory localdir on the remote machine faraway under the directory /home/bible/incoming/. One of the advantages of rsync is that it is economic with bandwidth because it sends only changes to files across the network. If you make changes in one file in localdir and run the preceding command, only the changed file (actually only parts even of that) will be transmitted across the network. rsync has other features including a server mode where it runs as a daemon and allows other machines to synchronize against a directory tree. Creating an ISO Image to Burn to CD An ISO file is a file that essentially contains the image of an ISO 9660 compliant CD. If you create archive files in this format, you can then burn those files to a CD for offsite archival purposes. To create an ISO image of the directory work that you can subsequently burn to CD, do this: mkisofs -J -r -o work.iso work/ To mount the image and check that it is correct, use the following: mount work.iso /mnt o loop You can then umount the image (umount/mnt) and then burn the image to CD using cdrecord from the command line or KDE s k3b tool. Ultimately, this chapter has attempted to introduce the most common commands and concepts that you will need when working with a SUSE Linux system. Much of the material that has been covered here will become clearer as it is used again in other chapters of the book. It is often said that the only way to learn a language is to use it. In the same way, if the commands and ideas in this chapter were new to you, the best advice is to use them, experiment with them, and gain knowledge by experience, with the examples in this chapter as a guide.
Please visit Domain Name Hosting services for high quality webhost to host and run your jsp applications.

Chapter 2 . Linux Fundamentals 75 Backing Up, (Web server application)

Saturday, July 28th, 2007

Chapter 2 . Linux Fundamentals 75 Backing Up, Restoring, and Archiving Files After you ve done any real work on your SUSE system, you want to make sure that you ve backed it up somewhere in case of hardware failure or accidental deletion of your data. Linux provides a variety of ways to create archive files that contain files and directories. You can then copy these archive files to another machine over your network or write them to removable media such as a CD-ROM to protect yourself against calamities. This section introduces some of the most popular commands used to create archive files on a Linux system, either as a standard Linux archive file or as an ISO file that you can subsequently burn to a CD for archival purposes. Creating and Reading Simple Archives We mentioned gzipped tar archives earlier if you want to back up the current state of a directory with all file permissions, date stamps, and symbolic links preserved, creating such an archive may be the best way to do it. To create a gzipped tar archive of the directory work, execute a command such as the following: tar zcvf work.tgz work/ The options zcvf mean compressed, create, verbose, file, respectively. If you copy the archive somewhere else and you want to unpack it: tar zxvf work.tgz where zxvf means compressed, extract, verbose, file. If your aim was simply to back up the directory on a remote machine, you can create the file on your local machine and copy it elsewhere as explained in the previous section. You could also use ssh and tar together to copy the directory tree across, like this: tar cvf - work/|ssh faraway cd /home/bible/incoming; tar xvf - What this does is to create a tar archive of the directory work on standard output, which is pushed through the pipe (|) to ssh, which changes directory and unpacks the archive that it is receiving on standard input. SUSE includes a very nice tool called pax that can both create archives and very easily move a directory tree from one place to another, preserving all file attributes. To create a pax archive of the directory work, you can do this: pax -wf work.pax work/ To unpack this again, do the following: pax -rvf work.pax
If you are looking for cheap and quality webhost to host and run your website check Jboss Web Hosting services.

74 Part I . SUSE Linux Basics If

Saturday, July 28th, 2007

74 Part I . SUSE Linux Basics If you are logged in to the machine bible as user fred and you want to log in to the machine faraway as user guest, this is what you would do: fred@bible:~> ssh guest@faraway You will be prompted for the password, and you will be logged in. If you use ssh with the option -X you will be able to run graphical programs on faraway and see the display on bible. If you need to connect to your Linux machine from Windows, you can still use ssh provided you have installed an ssh client for Windows: the best known of these is putty. You will find a version of putty in the dosutils directory on the SUSE DVD that is included with this book. The latest version of putty is always available online from www.chiark.greenend.org.uk/~sgtatham/putty/. Similarly, the traditional way to move files from one system to another was FTP. Again, SUSE systems do not have FTP enabled by default because of security concerns; you should use either scp or sftp: . scp is most convenient when you are copying files from the local machine to the remote one: scp myfile root@faraway:/tmp/ . sftp enables you to list files and navigate directories on the remote machine just like FTP. You can then use the get and put commands within sftp to transfer the files. The Konqueror browser has a very nice feature called fish, which allows you to browse files on a remote machine using ssh, effectively combining the functionality of the ssh tools into a graphical remote access client. In the Konqueror location bar, type fish://faraway. Konqueror will then try to log you in under your current user- name to the machine faraway and display your home directory there. You can then drag files across to another Konqueror window or to the desktop. If you need to use a different username on the remote machine, you can type, for example, fish://root@faraway into the location bar. If you are regularly logging into one or more machines by ssh, you may want to consider creating an ssh key and copying it to the remote machine to allow a secure passwordless login: ssh-keygen t rsa When prompted for a password, you can simply press Return. This will create files id_rsa and id_rsa.pub in the directory .ssh under your home directory. If you copy (or append) the file id_rsa.pub (the public key) to the file .ssh/ authorized_keys2 under your home directory on the remote machine, you will be able to log in simply by typing sshfaraway.
Searching for affordable and reliable webhost to host and run your web applications? Go to our java web server services and you will be pleased.

Chapter 2 . Linux Fundamentals 73 problems, because (Christian web host)

Friday, July 27th, 2007

Chapter 2 . Linux Fundamentals 73 problems, because these two versions are binary compatible. But in many other cases although you may not be able to install the binary RPM, you may be able to take a source package and rebuild it according to your needs. In the simplest case, you would do this (as root): rpmbuild –clean –rebuild packagename.src.rpm You will then find that in the directory /usr/src/packages/RPMS, in the subdirectory corresponding to your architecture (i586 if you are on x86), there is a brand- new binary RPM package that you can install. Again, you need to have the development tools installed for this to work. Cross-Working with packages is covered in detail in Chapter 12. Reference Compiling Source Packages You will very often find materials distributed as gzipped tar archives. These are files that will usually have names such as filename.tgz or filename.tar.gz. To extract all the files from this archive, copy it to an empty directory somewhere and use the tar command to unpack it, something like the following example: mkdir unpack cp filename.tgz unpack/ cd unpack tar zxvf filename.tgz Usually, you will then find that a new directory has been created with all the contents of the package inside if you are lucky, there will be a document there giving you details about how to build the package. Very often (but not always) the way to proceed will be to do the following commands: ./configure make make install You will need to have the development tools installed for this to work. Connecting over the Network Traditionally the way to connect to a remote machine and work on it was Telnet. Telnet is inherently insecure because it sends passwords in plain text across the network; SUSE systems do not have a Telnet server enabled by default. If you want to log in remotely, you should use ssh (secure shell).
Note: If you are looking for cheap and reliable webhost to host and run your mysql application check mysql web server services.