<body><script type="text/javascript"> function setAttributeOnload(object, attribute, val) { if(window.addEventListener) { window.addEventListener('load', function(){ object[attribute] = val; }, false); } else { window.attachEvent('onload', function(){ object[attribute] = val; }); } } </script> <div id="navbar-iframe-container"></div> <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script> <script type="text/javascript"> gapi.load("gapi.iframes:gapi.iframes.style.bubble", function() { if (gapi.iframes && gapi.iframes.getContext) { gapi.iframes.getContext().openChild({ url: 'https://www.blogger.com/navbar.g?targetBlogID\x3d11356004\x26blogName\x3dxception\x26publishMode\x3dPUBLISH_MODE_BLOGSPOT\x26navbarType\x3dBLUE\x26layoutType\x3dCLASSIC\x26searchRoot\x3dhttp://openrent.blogspot.com/search\x26blogLocale\x3den_US\x26v\x3d2\x26homepageUrl\x3dhttp://openrent.blogspot.com/\x26vt\x3d-2179510228592399674', where: document.getElementById("navbar-iframe-container"), id: "navbar-iframe" }); } }); </script>

Ultra-minimal kickstart

Want to build a Linux server for an unsafe DMZ environment? Use the undocumented "--nobase" option when performing a Red Hat kickstart. This will install the smallest footprint of packages needed to run a bastion server--83 packages. Note that kudzu is a requirement of this setup. Use the following option in the "%packages" section of your kickstart file:

%packages --nobase
kudzu

However, the nobase option omits some useful tools for server management. Below you will find a list of packages I feel are needed for a functioning Linux server. This will yield a server with 180 packages. You can certainly prune this list to your needs.

%packages --nobase

# Necessary utility packages
crontabs
dos2unix
eject
file
ftp
gnupg
iptables
kudzu
grub
logrotate
mailx
man
man-pages
net-snmp
nmap
ntp
openldap
openldap-clients
openssh
openssh-clients
openssh-server
openssl
passwd
pciutils
procmail
psacct
psmisc
python
rhgb
rootfiles
rpm
rpm-build
rsync
schedutils
screen
setarch
slocate
sudo
symlinks
tcpdump
time
traceroute
unzip
up2date
vim-enhanced
vim-common
vixie-cron
wget
which
yum
zlib

# Kernel, debugging, and software-build related packages
cpp
gcc
gcc-c++
gdb
kernel-utils
lsof
ltrace
make
patch
patchutils
ncurses-devel
strace

CentOS 2.6.9-22.0.1.EL kernel problem

If you install this kernel, and get a kernel panic that stops you at the "e2fsck: cannot continue, aborting" section of the boot process, you must edit a config file. More specifically, edit /etc/rc.d/rc.sysinit, and scroll down to line number 375. Comment out the entire section below, and you will be able to boot into the new kernel:
if [ "${RHGB_STARTED}" != "0" -a -w /etc/rhgb/temp/rhgb-console ]; then
fsck -T -a $rootdev $fsckoptions > /etc/rhgb/temp/rhgb-console
else
initlog -c "fsck -T -a $rootdev $fsckoptions"
fi

Create a CentOS DVD from CDROM iso images

I'm learning VMWare ESX server, and one of the best ways to install a virtual machine is by using an ISO image for the base OS installation. Today, CentOS 4.2 does not work in a VM session; a SCSI driver issue causes an unrecoverable crash at boot time.

To get around this, I wanted to use CentOS 4.1, the previous release. However, CentOS mirrors routinely remove old releases, including the DVD image, after a new release is shipped. I did manage, however, to download the four CDROM's that makeup the image in the CentoOS vault.

After downloading, I realized that unless I wanted to keep manually telling the VM to swap CD's at install time, I needed to build them into a DVD ISO image that could run unattended. Here's how I did it:

1) Mount each CD ISO image.
# mount -o loop CentOS-4.1-i386-bin1of4.iso /mnt
2) Copy the isolinux directory and the .discinfo from disc1 to the current directory.
#cp .discinfo /rootcp -Rp isolinux/ /root
3) Edit the .discinfo file so that the fourth line changes from "1" to "1,2,3,4"
4) Create a directory to hold the DVD image.
#mkdir /CENTDVD
5) Copy the files from the first CD to the DVD image directory.
# cp -a * /CENTDVD
6) Unmount the CD.
# cd /rootumount /mnt
7) Mount the second CD.
# mount -o loop CentOS-4.1-i386-bin2of4.iso /mnt
8) Copy only the RPMS directory to the proper place in the /CENTDVD directory.
#cp -a /mnt/CentOS/RPMS/* /CENTDVD/CentOS/RPMS/
9) Repeat steps 6-9 for the second, third, and fourth CDROM's.
10) Copy the edited .discinfo file to the /CENTDVD directory.
# cp .discinfo /CENTDVD/
11) Change to the root directory (where you copied the isolinux folder earlier)
# cd /root
12) Create the iso image.
# mkisofs -o /root/CentOS41_DVD.iso -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -R -J -v -T /CENTDVD/
13) Burn to a DVD
# cdrecord -v dev=ATA:1,0,0 driveropts=burnfree -eject -data /root/DVD.iso

Connect OpenOffice Calc to A MySQL Database

The following will connect OpenOffice.org Calc 2.0 to a MySQL database. This article is meant as a companion to the article by Mark Wielgus called "Connect Excel to Mysql Database". To begin, follow Mark's directions on downloading and configuring the ODBC driver to access your MySQL database table. We begin at Mark's step 3:

Step Three
Launch Calc. On the main menu click New->Database

This will open the Database Wizard dialog box. Select the "Connect to an existing database" option, and choose MySQL in the drop-down box. Click "Next."

You are now at step 2 of the wizard. Choose the "Connect using ODBC (Open Database Connectivity) option and click "Next."

Now you will choose the ODBC datasource you created earlier. Click the "Browse" button to find it, then click "Next."

You should now be at step 4. Enter the username that has access to the database, and tick the "Password required" checkbox. You should now click the "Test connection" button to test the connectivity to the database. After clicking the button, you will be prompted for the password associated with the database username, like this:






If the connection test was successful, you will see this dialog box:






If you cannot make a succesful connection, verify the grants for the database you are connecting to. Click "Next" and move on to step 4. At this step, uncheck "Open the database for editing" and leave the "Yes, register the database for me radio button checked.

Click the "Finish" button, and you will be prompted to save the database connection as an .odb file: OpenDocument Database. Use any name for the file, and save it. The dialog box should disappear.

Now reopen Calc, and choose View->Data Sources from the menu. This will allow you to view, manipulate, and import data from the database within the Calc application. It should look something like this: