Kickstart: 32-bit RPMS on 64-bit installs

Unix, Work 2 Comments »

We ran into another issue this week with Kickstart. We bought a bunch of new 64 bit machines ( AMD 64 bit, to be exact ) and have been developing a Kickstart solution for them. However, we have a bunch of applications that require some 32 bit libraries in order to run. Most Kickstart suggestions were to simply install certain compat groups, however, like the bad sheep of the family, that’s not what we wanted to do. We do a very minimal install on our machines and didn’t want to install a bunch of libraries that we didn’t need. After much searching, we found this simple way of doing it. In the %packages section, simply add .i386 to the end of the package name.

For example:

libgcc.i386

That’s all it takes in order to install a 32-bit version of a library. Hope this helps.

Sendmail on RHEL 4.0 - Without DNS

Unix, Work 11 Comments »

For any of you who have ever tried to use or configure sendmail, you know it’s not a fun task. At best, you wince, try to browse some google groups as you make your way through the billions of posts regarding some tribal knowledge that has to do with this release of sendmail on that specific OS. Then throw DNS into the mix, sendmail’s partner in crime and we’ve got a real ho-down. Especially when DNS goes missing. When DNS doesn’t arrive for the party, sendmail gets mad.

Real mad.

Anyways, in alot of our networks, we have hosts that don’t have DNS. Why? Because we’re too lazy to set the shit up. Seriously tho, it’s mostly because work has me stuck on building machines ( ie: monkey work ) rather than trying to solve the real issues in our infrastructure. Since I just spent the last hour trying to figure out how to get a RedHat Enterprise 4 ( U4 ) machine to send mail without DNS to a smart relay host, I thought I’d share the results and how to do it.

First, make sure you have the sendmail-cf package installed. Either install it locally via media or use yum/up2date to get it.

rpm -ivh sendmail-cf-8.13.1-3.RHEL4.5.i386.rpm

Next, add your smart relay host to your /etc/hosts file

192.168.0.6 mailhost mailhost.domain.com

Go into /etc/mail/ and vi the sendmail.mc file. Add the following lines:

FEATURE(`accept_unresolvable_domains')dnl
FEATURE(`accept_unqualified_senders')dnl
FEATURE(nocanonify)
define(`confSERVICE_SWITCH_FILE', `/etc/mail/service.switch')dnl
define(`SMART_HOST',`mailhost')

Note: The first character after the “FEATURE(” is a tick mark ( ` ) from the tilde key, this is not a typo. The ending quotation is a single quote mark ( ‘ ).  I’ve enclosed the code in pre tags, although it looks ugly, to ease copying and pasting into the configuration. Please look at the sendmail.mc file for more clarification.

Of course, replace the mailhost with the host you entered in your /etc/hosts file. Now create a file in /etc/mail called service.switch and add the following:

hosts files

For our last file modification, edit the submit.mc file in /etc/mail and add the following line:

define(`confDIRECT_SUBMISSION_MODIFIERS', `C')dnl

Now that we’re done making our file modifications, simply type ‘make’ while in the /etc/mail directory. You shouldn’t see any output, but if you do a directory listing, you should see some .bak files now. You can compare these with the current .cf files to see what changes were made.

Restart sendmail and the sm-client:

service sendmail restart

And voila! You should now successfully be able to send mail to your smart relay host with no DNS. To test, trying something like this:

mail -s test name@domain.com < /dev/null 2>&1 >> /dev/null

Cross your fingers, sacrifice a few goats and chickens, do a little dance, make a little love and check your inbox for the test email.