I needed to install a base build of Fedora Core in order to install WebGUI. Here is the base build that I used (in VMWare). The WebGIU installation instructions will be in the next article. This installation makes use of the Logical Volume Manager (LVM) tools. These tools make it easier to expand partitions and to take snapshots.
Wednesday, January 24. 2007
Fedora Core 4 Base Build
This build process creates a basic VMWare session with Fedora Core 4. Familiarity with VMWare is assumed. A similar configuration can be used when installing on physical hardware.
To create a VM, start the VMWare wizard with File -> New -> Virtual Machine. Use a 'Custom' Virtual Machine Configuration.
Select Next and then for an 'Appropriate Configuration', choose custom, then click 'Next'.
For a 'Virtual Machine Format', use 'New - Workstation 5'.
When you need to select a Guest Operating System, there is no entry for Fedora, so in the radio button list, select 'Linux'. Then in the drop down box, select 'Other Linux 2.6.x kernel'.
In the next wizard window, provide a Virtual Machine name such as 'fc4base'. Select an appropriate directory.
For 'Processor Configuration', select 'One' processor.
Default memory usage of 256 MB should be fine.
For the 'Network Type', typically you'd use 'Bridged Networking'. During operating system installation and configuration, you can then assign a dedicated IP address or allow the network DHCP to assign it an IP address.
On the 'Specify Disk Capacity' wizard window, the 8GB default disk size should be fine. Leave 'Allocate all disk space now' as blank. Optionally, you can select the 'Split disk into 2 GB files'.
When you need to specify 'Disk File', give it a name such as hda which is similar to the Linux physical drive vernacular.
Click 'Finish' to finish the VM session creation.
Operating System InstallationNow that the VM session has been created, the operating system can now be installed.
For the VM properties, you can point the virtual CD-ROM to a physical drive or to an .iso file on your harddrive. In either case, make the Fedora Core 4 CD 1 available and start the VM session. It should boot from you CD or .iso file.
Install by using the graphical mode by pressing the <ENTER> key. The operating system will load up. You should get a screen confirming a CD was found. Press <TAB> to highlight 'Skip' and then press <ENTER>.
Review the 'Welcome to Fedora Core' page. When running this in VMWare, VMWare 'contains' your keyboard and mouse. To release them, press <CTRL>+<INS>. After installation, VMWare can be used to install vmware-tools to automate the release of the keyboard and mouse.
Click 'Next' to proceed with the installation.
Use English for the installation language.
Use U.S. English for the Keyboard Configuration
This will be a server based installation without the GUI interface.
The installation process begins by partitioning the drive, configuring LVM (Logical Volume Manager), assigning mount points, and beginning the installation process.
To get a feel for the installation process, select 'Manually Partition with Disk Druid' when you reach the 'Disk Partitioning Setup' window. This will initialize your drive, so say Yes and accept that it will 'Erase All Data'.
Except for a brief description to follow, the installation process documented here does not include procedures for building a RAID configuration.
The drive will be created with two basic partitions:
- 100MB bootable partition for the /boot mount point
- remainder of drive assigned to LVM for other mount points
On a physical server, these two partitions would be created across two physical drives using RAID 1.
For the primary partition, click 'New'. Select Mount Point of '/boot', File System Type of 'ext3', Fixed Size of 100 MB, and check the box to 'Force to be primary partition', and click 'OK' to save it.
For the LVM partition, click 'New', leave Mount Point unselected, choose File System Type of 'physical volume (LVM)', and choose 'Fill to maximum size', and click OK to save it.
To allow creation of mount points in the LVM volume, select the LVM button. Put in 'vg01' for the volume group name. Leave the Physical Extent as default.
Click Add to add several mount points:
- no mount point, file system = swap, name = lvSwap, size = 500MB
- mount point = '/', file system = ext3, name = lvBase, size = 2000MB
- mount point = '/var', file system = ext3, name = lvVar, size = 1000MB
Click Ok to finish Logical Volume creation. You should see a configuration similar to the following:
Once the drive is configured, save the settings and move on to the Grub boot loader screen. Accept the defaults. At some point in time, it may be useful to know that the basic operating installation mount point of / is found at /dev/vg01/lvBase.
On the network settings screen, there are a number of necessary settings. For each interface found during boot-up, there is an entry you can edit. There are three ways you can set each interface:
- Allow a DHCP address to be assigned by default (typically for workstations or for servers that will be moved around)
- Manually assign an ip address (typically for servers in a server segment). When manually assigning an ip address, you'll need to provide Gateway and one or more DNS server addresses.
- Do not assign an ip address (recommeded for ports to be used as network scanners like Tcpdump or Ethereal, or for intrusion detection ports used with Snort.) This type of configuration is not allowed from the GUI and will need to be performed later at the command line.
You will need to supply Hostname manually.
After saving the network configuration settings, there are some changes on the firewall screen.
Leave the firewall enabled. Allow the SSH and HTTP services. Deactivate SELinux (for a public server, you may with to turn this on, but for internal use, I typically turn it off or set it to Warn).
Save the settings.
After selecting an appropriate TimeZone and providing a root password, you end up at the Package Group Selection screen. There are some changes to be made:
- Text-based Internet:
- enable lynx
- disable slm
- disable cadaver
- Disable all Server Configuration Tools
- Web Server:
- disable httpd-manual
- enable php-mysql
- enable php-pgsql
- disable squid
- disable tux
- Windows File Server
- disable system-config-samba
- Enable PostgreSQL Database
- disable unixODBC
- Enable MySQL Database
- disable myODBC
- enable php-mysql
- disable unixODBC
- Enable Development Tools
- disable doxygen
- enable expect
- disable gcc-gfortran
- disable rcs
- Disable Administration tools
- System Tools:
- disable bluez-pin
- enable iptraf
- enable lslk
- enable mc
- enable net-snmp-tools
- enable sysstat
- Disable Printing Support
After enabling and disabling the appropriate packages, you can proceed with the install.
After the installation has completed and the session has restarted, you can login.
Use the command ifconfig to find out the machine address if you've used DHCP to assign a dynamic address.
[root@docfc4base network-scripts]# ifconfig eth0 eth0 Link encap:Ethernet HWaddr 00:0C:29:0A:46:F2 inet addr:192.168.59.133 Bcast:192.168.59.255 Mask:255.255.255.0 inet6 addr: fe80::20c:29ff:fe0a:46f2/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:26477 errors:0 dropped:0 overruns:0 frame:0 TX packets:336 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:1675075 (1.5 MiB) TX bytes:34722 (33.9 KiB) Interrupt:10 Base address:0x1400 [root@docfc4base network-scripts]#
If you need to change network settings, the settings can be found in the file /etc/sysconfig/network-scripts/ifcfg-eth0.
You can restart the interface by:
ifdown eth0 ifup eth0
Once the installation is complete, bring the system up-to-date:
yum update rpm --import /usr/share/rhn/RPM-GPG-KEY
Install additional tools:
yum install ncftp ntp
Basic Perl Configuration. For a first time installation, accept all defaults. For choosing a repository, choose close and fast. For example, for where I'm at, I use North America with Duke. If you know of a faster one, then by all means, use it. http://cpan.belfry.net/ seems to be a good one.
perl -MCPAN -eshell install PAR::Dist install Compress::Zlib install IO::Zlib install Test::More install Spiffy install Test::Base install Digest::SHA::PurePerl install Bundle::CPAN reload cpan install Error install Digest::SHA1 install Digest::MD5 install DBI
If you choose a download site that doesn't work very well, use the following command and restart the perl configuration.
rm -rf /usr/lib/perl5/5.8.6/CPAN/Config.pm
Perform general configuration install generic utilities. Some examples include:
- configuring NTP
- change the default editor
- nano /root/.bashrc
- export EDITOR=nano
- source .bashrc
- installing your .ssh key
scp -r .ssh root@192.168.59.133:/root
Finally, if you are using VMWare, make a snapshot of the base build so it can be used as a basis for other servers, and can be rolled back when necessary.
From the command line, you can do so by:
Finding Filesshutdown -h now
Immediately after an installation, if you wish to 'locate' files, perform a:
updatedb
This normally runs at midnight, but you can run it manually. Now to locate a file on the drive, you can use the locate command with some portion of the file name to find the file and the directory in which it resides.
GUI vs ConsoleIf you happened to install in GUI mode, and you want to stop the GUI to reduce processor overhead, use:
init 3
To start the GUI again:
CPU'd Kernelinit 5
To find the current version of kernel:
uname -a
To install a new kernel:
yum install kernel.i686 yum install kernel-devel.i686