The Best Multiplatform Development Environment that Ever Lived on One Box
I decided my consulting company needed to have a professional development environment where I could potentially host works-in-progress for my clients. I wanted high security. I wanted high availability. I wanted to support not only multiple servers (Oracle and Sybase; Tomcat, JRun and Weblogic; different JDK revs), but multiple platforms (NT and UNIX). I wanted to be able to grow disk partitions without having to repartition or re-install. I needed to enable developers from all over the country to have speedy remote access. And, oh yeah, I wanted to spend less than $4,000.00 on all of the hardware and software needed to accomplish this.
This wish list was made possible thanks to Linux, the latest kernel build, a host of freely available and very inexpensive software, and a (relatively) inexpensive server machine.
The bulk of my costs went to the purchase of a refurbished Dell PowerEdge 2300 that I got for a steal, $2700.00. For those of you who don't know, a refurbished Dell carry the exact same warranty as a new Dell.
Cable internet access provides a reasonably inexpensive high-speed connection to the Internet. Since I had only a single "real" IP address from a cable connection, a second network adapter was added to the one that came with the server, so that the server could act as a gateway for my LAN.
The table below outlines the hardware and associated costs:
Hardware Cost Obtained From Refurbished Dell PowerEdge 2300 $2,700.00 www.dell.com (Dual Pentium III 450MHz, 256MB RAM, 54GB Hard Disk, 100Mb Ethernet, external SCSI controller) Second PCI Ethernet Card $ 30.00 Had it laying around 20/40GB DAT Tape Drive $740.00 www.dell.com 256MB Additional RAM $420.00 egghead.com, from mysimon.com (comparison shopping portal) Total $3,890.00
The table below outlines all the software in use, with an overview of its purpose:
Software Purpose Location Red Hat 6.2 Base Operating System redhat.com Kernel v2.4.3 Kernel that includes support kernel.org for LVM and more robust firewalling LVM (Logical Volume Allows physical partitions to linux.msede.com/lvm Management) be grouped arbitrarily into Logical Volumes. Allows Logical Volumes to be grown dynamically. ipchains Firewall kernel module IPCHAINS-HOWTO redir A port redirector to allow sammy.net access from the Internet to the (virtual) NT machine SSH (Secure Shell) Allows highly secure openssh.com authentication and encryption of remote sessions VMware Allows us to run Windows NT vmware.com in a Virtual Machine under Linux VNC (Virtual Network Very thin remote control research.att Computing) software
Of the software listed here, only VMware costs anything, and its price is nominal. We also had software expenses related to the use of Windows NT 4 server, described below.
The first step was to install the base Red Hat 6.2 distribution. I did this by downloading the required boot disks and the DOS utility called rawrite to transfer the disk images to floppies. I then booted off these floppies and installed the entire Red Hat distribution over the Internet. Next, it was time to customize.
Using the Linux kernel v2.4.3 allowed me to take advantage of a key enabling technology: LVM (Logical Volume Management; linux.msede.com/lvm/).
The machine came with six 9GB hard drives. Ordinarily, I would have to have a minimum of six partitions along the boundaries of the physical drives. Not only didn't I want to partition based on this arbitrary boundary, but I also wanted flexibility in our partition plan. If a partition was approaching capacity, I wanted to be able to dynamically grow it. This might mean reducing the size of another, less used partition. LVM allows a high degree of configurability through a host of tools.
I also experienced a performance gain by having logical volumes composed of physical partitions across the six drives. This reduces the overall seek time required when accessing files, since you don't have a read/write head moving around a single disk, but all six at once.
During the process of setting up LVM, virtual devices are created for logical volumes and for virtual groups. Here is the output of the mount command after setting up LVM:
/dev/vgRoot/lvRoot on / type ext2 (rw) none on /proc type proc (rw) /dev/sda5 on /boot type ext2 (rw) /dev/vgHome/lvHome on /home type ext2 (rw) /dev/vgOpt/lvOpt on /opt type ext2 (rw) /dev/vgTmp/lvTmp on /tmp type ext2 (rw) /dev/vgUsr/lvUsr on /usr type ext2 (rw) /dev/vgUsrLocal/lvUsrLocal on /usr/local type ext2 (rw) /dev/vgVar/lvVar on /var type ext2 (rw) none on /dev/pts type devpts (rw,gid=5,mode=620)
Here is the output from the df command showing the space on each partition:
Filesystem 1k-blocks Used Available Use% Mounted on /dev/vgRoot/lvRoot 10885380 106804 10225616 1% / /dev/sda5 248895 15348 220697 7% /boot /dev/vgHome/lvHome 4354120 966752 3166184 23% /home /dev/vgOpt/lvOpt 10885380 3997884 6334536 39% /opt /dev/vgTmp/lvTmp 2189128 98048 1979876 5% /tmp /dev/vgUsr/lvUsr 6507036 1530480 4646012 25% /usr /dev/vgUsrLocal/lvUsrLocal 10865240 4687304 5626000 45% /usr/local /dev/vgVar/lvVar 2173016 40584 2022048 2% /var
Here is the output from one of the LVM utilities, called lvdisplay, that shows what physical partitions make up a logical volume:
--- Logical volume --- LV Name /dev/vgRoot/lvRoot VG Name vgRoot (...snip...) LV Size 10.55 GB Current LE 2700 Allocated LE 2700 Stripes 5 Stripe size (KB) 16 Allocation next free Read ahead sectors 120 Block device 58:0 --- Distribution of logical volume on 5 physical volumes --- PV Name PE on PV reads writes /dev/sda6 540 7407 394 /dev/sdb1 540 13843 6893 /dev/sdc1 540 14395 94168 /dev/sdd1 540 7793 775 /dev/sde1 540 11093 64148
The last few lines of this output show that this logical volume is made up of five physical partitions. Notice that each of these partitions is on different disks. The output also shows the number of stripes on the logical volume, in this case five. This means that writes are spread across all five physical partitions, instead of waiting until one physical partition is filled, and then moving on to the next partition. It is the striping that can improve performance, since rather than a single read/write head having to seek across a disk, you are using five at once.
During the process of setting up LVM, you create PEs (physical extents) that represent the underlying physical partitions. I broke each 9GB drive into four partitions, each containing about 2.2GB. This became my minimum unit for making up logical volumes. The next step is to create virtual groups and then assign a group to a logical volume. For more detail, refer to the LVM home page referenced above.
Practical books for the most technical people on the planet. Newly available books include:
- Agile Product Development by Ted Schmidt
- Improve Business Processes with an Enterprise Job Scheduler by Mike Diehl
- Finding Your Way: Mapping Your Network to Improve Manageability by Bill Childers
- DIY Commerce Site by Reven Lerner
Plus many more.
- diff -u: What's New in Kernel Development
- Server Hardening
- What's New in 3D Printing, Part III: the Software
- Giving Silos Their Due
- 22 Years of Linux Journal on One DVD - Now Available
- Controversy at the Linux Foundation
- Don't Burn Your Android Yet
- Firefox OS
- February 2016 Issue of Linux Journal