Install HostGIS

From HostGISLinux

Jump to: navigation, search

This page describes the basic installation of HostGIS on a new computer. It is based on an actual install to a low-end server, and is meant to show the installation process in detail.

Contents

[edit] Obtain the HostGIS distribution

The current HostGIS distribution can be downloaded from this website (www.hostgis.com) - see the Wiki page Download. Download the "Basic Server CD" and burn the downloaded ISO file to a CD. To start the installation, place the HostGIS CD in the computer's hard disk drive and start the computer. If the CD (or DVD) drive you use is recognized as a boot device, and is set in priority ahead of other devices like the hard disk drive, the computer will boot using the HostGIS CD.

If your computer does not boot from the CD, turn it off and restart it. As the computer powers up, request access to its basic setup system (e.g., by pressing the F2 key, which works on many Intel motherboards). This little system will generally give you the opportunity to select which device is checked first for the computer's boot image. Make sure your CD drive is the first device checked.

[edit] Perform the installation

The installation process appears as a series of pages or screens containing instructions and questions. In this section the pages are presented just as they appear in the example installation. Each page has been numbered in sequence, with as much of the text and menu choices documented as feasible.

Note: The test computer for this installation is a custom-built server. The motherboard is Intel, as is the dual-core Pentium CPU. The board has 4 gigabytes of RAM. There is a single 80-gigabyte IDE hard drive and a single IDE DVD/CD drive.

Place the HostGIS installation CD-ROM in the DVD/CD drive and power up the server. After some moments, the following text appears on the console screen:

boot:

Hit Enter to proceed.

[edit] Page 1

Welcome to the HostGIS Linux Installer

No changes will be made to your computer until the end,
and you will have a chance to bail out first.

At any time during this setup,
you can select Cancel to cancel installation.

Continue with the installation?
< Yes > < No >

Select <Yes>.

[edit] Page 2

First off, you'll need to partition your hard disk to make 
space for Linux. You will need to create at least the 
following partitions:

* One partition of type Linux, which will be formatted and 
  used for the filesystem. This partition needs to be at
  bare minimum 1 GB.

* The other partition of type 82, Linux Swap. This will be
  used as virtual memory. This partition can be fairly small,
  100-200 MB should be more than sufficient.

* You can also create additional Linux filesystem partitions,
  and mount them later for your bulk storage. In fact, you
  will probably want to create a third very large partition
  for this purpose, but that's up to you.

IMPORTANT: If you delete a partition, the data on that partition
will be lost! If you don't have any free space on the drive,
you'll need to free up some space by either deleting partitions

< OK >

Select <OK>.

The following message appears:

Disk /dev/hda doesn't contain a valid partition table.

Wait for some moments to pass.

[edit] Page 3

On which disk will you be
installing?

(X) /dev/hda   -

< OK > <Cancel>

Select <OK>.

No partition table or unknown signature on partition table
Do you wish to start with a zero table [y/N] ?

Type "y".

[edit] Page 4

                                 cfdisk 2.12

                             Disk Drive: /dev/hda
                       Size: 80026361856 bytes, 80.0 GB
             Heads: 255 Sectors per Track: 63 Cylinders: 9729

   Name        Flags      Part Type  FS Type          [Label]        Size (MB)
------------------------------------------------------------------------------
                           Pri/Log   Free Space                       80023.75







 


   [  Help  ]  [  New  ]  [  Print  ]  [  Quit  ]  [  Units  ]
   [ Write  ]

This is the user interface of the cfdisk disk formatting program. Before proceeding, some decisions about the hard disk format need to be made.

[edit] Determining number, type, and size of Linux partitions

For the Boot Drive:

To be able to boot HostGIS from the drive you are about to partition, you will need:

  • A primary partition
  • One or more swap partitions
  • Zero or more primary/logical partitions

For any other drive:

  • One or more primary/logical partitions
  • Zero or more swap partitions

The number of primary partitions on a hard drive is limited to four. While Linux can be installed on either a primary or a logical partition, we will use a primary partition in this example.

The Linux root partition

This is the location of the base Linux operating system files, and also of the main software applications included with the distribution. As noted on an earlier page in the installation process, the HostGIS installation needs at least one gigabyte allocated for the Linux partition.

The swap partition

The swap partition is used to store programs if the main (RAM) memory is full. The suggested size of the swap partition depends on the configuration of the computer, particularly on the amount of RAM installed. If you have a hard disk of a reasonable size, it is usually recommended that you create a swap size between the size your computer's RAM and double that size. For example, if you have 4 gigabytes of RAM, make the swap partition between 4 and 8 gigabytes in size.

Additional partitions

Everything in the Linux file system can be placed in the same (single) partition. However, there are circumstances when you may want to create additional partitions to house particular parts of the filesystem. The rules of thumb are many, and advice from different sources is not always consistent. Check elsewhere on the Web for more details. Here's a brief overview:

/var
This filesystem contains Linux output directories, such as the spool directories for mail and printing and the error log directory. If the server develops a chronic error, log messages can fill the partition. Server computers should have /var in a different partition than / (the "root").
/tmp
Some programs write temporary data files here. Usually, they are quite small. But some computationally intensive jobs, like science or engineering applications, may use hundreds of megabytes for brief periods of time. In this case, keep /tmp in a different partition than /.
/usr
This is where most executable binaries go. In addition, the kernel source tree goes here, and considerable system documentation.
/home
This is where the home directories of individual users go. If there are no quotas on the number or file usage of users, this content should be in its own partition.

[edit] Selected values for this example

For this server, the following partitions and size values will be used:

Linux root partition
3,000 megabytes (3 gigabytes)
Swap partition
4,000 megabytes (4 gigabytes)
/var
10,000 megabytes (10 gigabytes)
/tmp
2,000 megabytes (2 gigabytes)
/usr
40,000 megabytes (40 gigabytes)
/home
20,000 megabytes (20 gigabytes)

[edit] Creating partitions with cfdisk

Linux root partition

Create a Linux partition in cfdisk by selecting the row containing the text "Free Space"

  • Execute the "New" command.
  • You will have the choice of creating a primary or a logical partition. Select [Primary].
  • Enter the size (3,000 megabytes).
  • You will be given a choice of where to add the partition. Select [Beginning].
  • Select [Bootable] to make the partition bootable.
  • The type of the new partition is automatically set to "Linux Native", so it is not necessary to set the partition type.

The following lines will display in cfdisk:

   Name        Flags      Part Type  FS Type          [Label]        Size (MB)
------------------------------------------------------------------------------
   hda1        Boot        Primary   Linux                             3002.23
                           Pri/Log   Free Space                       77021.53

Swap partition

Use the arrow keys to highlight the line containing "Free Space".

  • Execute the "New" command.
  • Select [Logical] as the partition type.
  • Enter the size (4,000 megabytes).
  • Select [Beginning] for the location to add the partition.
  • Select [Type] to choose the partition type.
  • Select "82" (Linux swap) and press Enter.

The following lines will display in cfdisk:

   Name        Flags      Part Type  FS Type          [Label]        Size (MB)
------------------------------------------------------------------------------
   hda1        Boot        Primary   Linux                             3002.23
   hda5                    Logical   Linux swap                        3997.49
                           Pri/Log   Free Space                       73024.04

/var partition

Use the arrow keys to highlight the line containing "Free Space".

  • Execute the "New" command.
  • Select [Logical] as the partition type.
  • Enter the size (10,000 megabytes).
  • Select [Beginning] for the location to add the partition.
  • The [Type] defaults to Linux - leave it that way.

The following lines will display in cfdisk:

   Name        Flags      Part Type  FS Type          [Label]        Size (MB)
------------------------------------------------------------------------------
   hda1        Boot        Primary   Linux                             3002.23
   hda5                    Logical   Linux swap                        3997.49
   hda6                    Logical   Linux                            10001.95
                           Pri/Log   Free Space                       63022.10


/tmp

Use the arrow keys to highlight the line containing "Free Space".

  • Execute the "New" command.
  • Select [Logical] as the partition type.
  • Enter the size (2,000 megabytes).
  • Select [Beginning] for the location to add the partition.
  • The [Type] defaults to Linux - leave it that way.

The following lines will display in cfdisk:

   Name        Flags      Part Type  FS Type          [Label]        Size (MB)
------------------------------------------------------------------------------
   hda1        Boot        Primary   Linux                             3002.23
   hda5                    Logical   Linux swap                        3997.49
   hda6                    Logical   Linux                            10001.95
   hda7                    Logical   Linux                             1998.75
                           Pri/Log   Free Space                       61023.36

/usr

Use the arrow keys to highlight the line containing "Free Space".

  • Execute the "New" command.
  • Select [Logical] as the partition type.
  • Enter the size (40,000 megabytes).
  • Select [Beginning] for the location to add the partition.
  • The [Type] defaults to Linux - leave it that way.

The following lines will display in cfdisk:

   Name        Flags      Part Type  FS Type          [Label]        Size (MB)
------------------------------------------------------------------------------
   hda1        Boot        Primary   Linux                             3002.23
   hda5                    Logical   Linux swap                        3997.49
   hda6                    Logical   Linux                            10001.95
   hda7                    Logical   Linux                             1998.75
   hda8                    Logical   Linux                            39999.54
                           Pri/Log   Free Space                       21023.82

/home

Use the arrow keys to highlight the line containing "Free Space".

  • Execute the "New" command.
  • Select [Logical] as the partition type.
  • Enter the size (20,000 megabytes).
  • Select [Beginning] for the location to add the partition.
  • The [Type] defaults to Linux - leave it that way.

The following lines will display in cfdisk:

   Name        Flags      Part Type  FS Type          [Label]        Size (MB)
------------------------------------------------------------------------------
   hda1        Boot        Primary   Linux                             3002.23
   hda5                    Logical   Linux swap                        3997.49
   hda6                    Logical   Linux                            10001.95
   hda7                    Logical   Linux                             1998.75
   hda8                    Logical   Linux                            39999.54
   hda9                    Logical   Linux                            20003.89
                           Pri/Log   Free Space                        1019.94

Once the partitioning is complete, save the changes by executing the "Write" command. This operation has to be confirmed by entering yes. Bear in mind that this step will destroy all data on partitions you have chosen to delete or change. Be certain that you want to proceed before executing "Write".

After selecting [Write] the following status messages will appear, one after the other:

Writing partition table to disk
Wrote partition table to disk

Now close cfdisk by selecting the Quit command.

It is wise to reboot the computer before starting the installation, to make sure that the partitioning changes are active. Press <Ctrl> + <Alt> + <Delete> to shut Linux down and restart the computer. Leave the HostGIS installation disk in the CD-ROM drive.

The installation process will start again.

[edit] Page 1 again

Welcome to the HostGIS Linux Installer

No changes will be made to your computer until the end,
and you will have a chance to bail out first.

At any time during this setup,
you can select Cancel to cancel installation.

Continue with the installation?
< Yes > < No >

Select <Yes>.

[edit] Page 2 again

First off, you'll need to partition your hard disk to make 
space for Linux. You will need to create at least the 
following partitions:

* One partition of type Linux, which will be formatted and 
  used for the filesystem. This partition needs to be at
  bare minimum 1 GB.

* The other partition of type 82, Linux Swap. This will be
  used as virtual memory. This partition can be fairly small,
  100-200 MB should be more than sufficient.

* You can also create additional Linux filesystem partitions,
  and mount them later for your bulk storage. In fact, you
  will probably want to create a third very large partition
  for this purpose, but that's up to you.

IMPORTANT: If you delete a partition, the data on that partition
will be lost! If you don't have any free space on the drive,
you'll need to free up some space by either deleting partitions

< OK >

Select <OK>.

[edit] Page 3 again

On which disk will you be
installing?

(X) /dev/hda   -

< OK > <Cancel>

Select <OK>.

The cfdisk application will run again and display the full set of partitions just set up. Select [Quit].

[edit] Page 5

Select the installation
partition:

   (x) /dev/hda1 -
   ( ) /dev/hda6 -
   ( ) /dev/hda7 -
   ( ) /dev/hda8 -
   ( ) /dev/hda9 -

<OK> <Cancel>

Select <OK> with the "x" beside "/dev/hda1". This requests that the Linux install take place in hda1, the primary partition just created.

[edit] Page 6

Select the swap space
partition:

   (x) /dev/hda5 -

<OK> <Cancel>

Select <OK> to make hda5 the swap partition.

[edit] Page 7

In addition to your root filesystem,
you can have other partitions
mounted within your new system.
Check any partitions below which you
would like mounted.

   (x) /dev/hda6 -
   (x) /dev/hda7 -
   (x) /dev/hda8 -
   (x) /dev/hda9 -

<OK> <Cancel>

Tap the spacebar on each line to select each of the remaining partitions, then select <OK>.

[edit] Page 8

Mount point for /dev/hda6
Under what directory do 
you want to mount this
partition?

   ( ) /home     -
   ( ) /opt      -
   ( ) /usr      -
   (x) /var      -
   ( ) /var/www  -
   ( ) /tmp      -

<OK> <Cancel>

Use the arrow keys to highlight "/var" and tap the spacebar to select it, then select <OK>.

[edit] Page 9

Do you want this partition to 
be formatted? If not, then it
needs to already be formatted 
in order to be mounted.

<OK> <Cancel>

Use the arrow keys to highlight <OK> and press Enter.

[edit] Page 8 again

Mount point for /dev/hda7
Under what directory do 
you want to mount this
partition?

   ( ) /home     -
   ( ) /opt      -
   ( ) /usr      -
   ( ) /var      -
   ( ) /var/www  -
   (x) /tmp      -

<OK> <Cancel>

Use the arrow keys to highlight "/tmp" and tap the spacebar to select it, then select <OK>.

[edit] Page 9 again

Do you want this partition to 
be formatted? If not, then it
needs to already be formatted 
in order to be mounted.

<OK> <Cancel>

Use the arrow keys to highlight <OK> and press Enter.

[edit] Page 8 again

Mount point for /dev/hda8
Under what directory do 
you want to mount this
partition?

   ( ) /home     -
   ( ) /opt      -
   (x) /usr      -
   ( ) /var      -
   ( ) /var/www  -
   ( ) /tmp      -

<OK> <Cancel>

Use the arrow keys to highlight "/usr" and tap the spacebar to select it, then select <OK>.

[edit] Page 9 again

Do you want this partition to 
be formatted? If not, then it
needs to already be formatted 
in order to be mounted.

<OK> <Cancel>

Use the arrow keys to highlight <OK> and press Enter.

[edit] Page 8 again

Mount point for /dev/hda9
Under what directory do 
you want to mount this
partition?

   (x) /home     -
   ( ) /opt      -
   ( ) /usr      -
   ( ) /var      -
   ( ) /var/www  -
   ( ) /tmp      -

<OK> <Cancel>

Use the arrow keys to highlight "/home" and tap the spacebar to select it, then select <OK>.

[edit] Page 9 again

Do you want this partition to 
be formatted? If not, then it
needs to already be formatted 
in order to be mounted.

<OK> <Cancel>

Use the arrow keys to highlight <OK> and press Enter.

[edit] Page 10

The LILO bootloader will be installed on your hard disk, and presents
a list of operating systems so you can choose which one to boot. The
bootloader needs to know two things:

* Which disk is your boot device?
* What other operating systems (if any) should be present at boot time

<OK>

Press Enter.

[edit] Page 11

Which disk is your boot 
disk?

(x) /dev/hda1   -

<OK>

Press Enter to select hda1 as the boot disk.

[edit] Page 12

If any of your other partitions contain
a bootable operating system, select
them here. Each time your system boots,
LILO will offer the selected partitions
as alternate boot options.

[ ] /dev/hda6  -
[ ] /dev/hda7  -
[ ] /dev/hda8  -
[ ] /dev/hda9  -

<OK> <Cancel>

Do not highlight any of the remaining partitions, just select <OK> and press Enter.

[edit] Page 13

All right, that's all the information we need to install.
Please review the following. On the next page, you will
be asked for final confirmation before installation begins.

The LILO bootloader will be installed on /dev/hda.

These partitions will be ERASED:
/dev/hda1   Root filesystem
/dev/hda5   Swap space

Additional mount points:
/dev/hda6   /var   FORMAT
/dev/hda7   /tmp   FORMAT
/dev/hda8   /usr   FORMAT
/dev/hda9   /home  FORMAT

<OK>

Press Enter.

[edit] Page 14

Proceed with
installation?

<Yes> <No>

Select <Yes> and press Enter.

Preparing partitions
Formatting
filesystem /dev/hda1
filesystem /dev/hda6
filesystem /dev/hda7
filesystem /dev/hda8
filesystem /dev/hda9
Installing packages
(many package names appear)

[edit] Next steps

See the wiki page Post-Installation.


Portions of this page are derived from materials copyright © 2002, 2003, 2004 by Daniël de Kok and released under the the GNU Free Documentation License. Original materials were retrieved from http://www.linuxpackages.net/howto/slackfiles/books/slackware-basics/html/slackware-basics.html (the Slackware Basics guide, 2008.02.11). The applicable license statement is:

Permission is granted to copy, distribute and/or modify this document under the terms of 
the GNU Free Documentation License, Version 1.2 or any later version published by the 
Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no 
Back-Cover Texts.