<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>

<channel>
	<title>The Lone Sysadmin &#187; How To</title>
	<atom:link href="http://lonesysadmin.net/category/how-to/feed" rel="self" type="application/rss+xml" />
	<link>http://lonesysadmin.net</link>
	<description>im in ur data centrz patchin ur serverz</description>
	<pubDate>Thu, 04 Sep 2008 16:00:29 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
	<language>en</language>
			<item>
		<title>How To Configure Linux Serial Consoles</title>
		<link>http://lonesysadmin.net/2008/01/31/how-to-configure-linux-serial-consoles/</link>
		<comments>http://lonesysadmin.net/2008/01/31/how-to-configure-linux-serial-consoles/#comments</comments>
		<pubDate>Fri, 01 Feb 2008 02:17:34 +0000</pubDate>
		<dc:creator>Bob Plankers</dc:creator>
		
		<category><![CDATA[Featured]]></category>

		<category><![CDATA[How To]]></category>

		<category><![CDATA[System Administration]]></category>

		<guid isPermaLink="false">http://lonesysadmin.net/2008/01/31/how-to-configure-linux-serial-consoles/</guid>
		<description><![CDATA[Need a serial console on your Linux box, just in case something happens to the network? Yeah, me too. It&#8217;s fairly simple to get it running (at least on Red Hat Enterprise Linux 4), if you have the right steps.
This is not an in-depth tutorial on serial consoles, it&#8217;s just designed to get you moving [...]]]></description>
			<content:encoded><![CDATA[<p>Need a serial console on your Linux box, just in case something happens to the network? Yeah, me too. It&#8217;s fairly simple to get it running (at least on Red Hat Enterprise Linux 4), if you have the right steps.</p>
<p>This is not an in-depth tutorial on serial consoles, it&#8217;s just designed to get you moving faster. I assume you know how to install packages, edit files, etc., or are at least resourceful enough to figure it out. I also assume you&#8217;re s-m-r-t enough to try this on a machine you can get to easily, if you mess it up the first time.</p>
<p>On newer machines there are often BIOS serial redirection options, too, which might be useful. Conveniently, check your BIOS! :-)</p>
<p>1. Figure out what speed your terminal server wants to go, as well as the number of data, parity, and stop bits. 9600 is a common default, and the other parameters are often 8, N, and 1. Faster speeds generally mean it&#8217;s less annoying to work on them, but it has to be set the same on both sides, and you can go too fast for the cables you have.</p>
<p>You can verify the settings with &#8220;/usr/bin/screen /dev/ttyS0&#8243; (as suggested by <a href="http://rejectreality.net/">Greg</a> in the comments), or /usr/bin/minicom (installed as the &#8220;minicom&#8221; package from Red Hat). If you ever used Telix for DOS you&#8217;ll be right at home with minicom. Hit Ctrl-A, then O to get to the configuration menu. Once it is set up properly you should be able to type in Minicom and have it appear on the terminal server, and vice versa. Don&#8217;t go on until you can do that.</p>
<p>/dev/ttyS0 is COM1, /dev/ttyS1 is COM2, etc.</p>
<p>From here on out replace 9600, 8N1, and ttyS0 in my examples with the right parameters for your setup.</p>
<p>2. Add the following to /etc/inittab, remembering to substitute the right serial port, and the terminal type you want:</p>
<p><code># Serial Console Access<br />
S0:2345:respawn:/sbin/agetty ttyS0 9600 vt100</code></p>
<p>Have &#8216;init&#8217; reread inittab by issuing the command &#8220;sudo /sbin/telinit q&#8221; and you should be able to see something via the terminal server. You might need to hit enter a couple of times to get its attention.</p>
<p>3. If you want to see stuff at boot, edit /etc/grub.conf. Add the following, substituting the proper serial port in &#8220;unit&#8221;:</p>
<p><code>serial --unit=0 --speed=9600 --word=8 --parity=no --stop=1<br />
terminal --timeout=10 serial console</code></p>
<p>(two lines, &#8220;serial&#8221; and &#8220;terminal,&#8221; if it wraps)</p>
<p>4. Comment out any line in /etc/grub.conf that starts with &#8220;splashimage.&#8221; The splash image doesn&#8217;t work so well with character-only interfaces.</p>
<p>5. Add &#8220;console=ttyS0,9600n8&#8243; to the proper kernel entry in /etc/grub.conf. So your original entry:</p>
<p><code>title Red Hat Enterprise Linux AS (2.6.9-67.EL)<br />
&nbsp;&nbsp;root (hd0,0)<br />
&nbsp;&nbsp;kernel /vmlinuz-2.6.9-67.EL ro root=/dev/sda1 rhgb quiet<br />
&nbsp;&nbsp;initrd /initrd-2.6.9-67.EL.img<br />
</code><br />
becomes something like:</p>
<p><code>title Red Hat Enterprise Linux AS (2.6.9-67.EL)<br />
&nbsp;&nbsp;root (hd0,0)<br />
&nbsp;&nbsp;kernel /vmlinuz-2.6.9-67.EL ro root=/dev/sda1 rhgb quiet console=ttyS0,9600n8<br />
&nbsp;&nbsp;initrd /initrd-2.6.9-67.EL.img</code></p>
<p>(that&#8217;s four lines if it&#8217;s wrapping)</p>
<p>6. Reboot and check it out. Party like it&#8217;s 1989.</p>
<p>If it isn&#8217;t working you&#8217;ll have to comment out the inittab line and &#8220;telinit q&#8221; again to free up the serial port, before you try Minicom or screen.</p>
<p>If I have messed something up here let me know in the comments. Thanks!</p>
<p class="akst_link"><a href="http://lonesysadmin.net/?p=1094&amp;akst_action=share-this"  title="Email, post to del.icio.us, etc." id="akst_link_1094" class="akst_share_link" rel="noindex nofollow">ShareThis</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://lonesysadmin.net/2008/01/31/how-to-configure-linux-serial-consoles/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How to Install a tftp Server on Red Hat Enterprise Linux</title>
		<link>http://lonesysadmin.net/2007/10/29/how-to-install-a-tftp-server-on-red-hat-enterprise-linux/</link>
		<comments>http://lonesysadmin.net/2007/10/29/how-to-install-a-tftp-server-on-red-hat-enterprise-linux/#comments</comments>
		<pubDate>Mon, 29 Oct 2007 16:18:30 +0000</pubDate>
		<dc:creator>Bob Plankers</dc:creator>
		
		<category><![CDATA[Featured]]></category>

		<category><![CDATA[How To]]></category>

		<guid isPermaLink="false">http://lonesysadmin.net/2007/10/29/how-to-install-a-tftp-server-on-red-hat-enterprise-linux/</guid>
		<description><![CDATA[I install a tftp server about once every three years. As such I never remember what needs to happen, and this time a Google search didn&#8217;t have a nice answer for me. So, as my latest contribution to the world of HOWTOs, I present the non-idiot&#8217;s concise guide to installing and configuring a tftp server.
As [...]]]></description>
			<content:encoded><![CDATA[<p>I install a tftp server about once every three years. As such I never remember what needs to happen, and this time a Google search didn&#8217;t have a nice answer for me. So, as my latest contribution to the world of HOWTOs, I present the non-idiot&#8217;s concise guide to installing and configuring a tftp server.</p>
<p>As always if you have suggestions or corrections just add them as comments, and I&#8217;ll update the text here.</p>
<p>This will give you the default /tftpboot directory. I assume that if you need a filesystem there you can handle adding one there on your own. :-) If you want to change the filesystem you can do that in /etc/xinetd.d/tftp, in the server_args field. Don&#8217;t forget to reload xinetd after you change it.</p>
<p>1. Install the tftp server software and enable it:</p>
<p><code>/usr/bin/up2date tftp-server<br />
/sbin/chkconfig tftp on</code></p>
<p>3. Because it runs via xinetd reload that to pick up the configuration file change:</p>
<p><code>/sbin/service xinetd reload</code></p>
<p>4. Edit /etc/sysconfig/iptables-config and edit the IPTABLES_MODULES line to read:</p>
<p><code>IPTABLES_MODULES="ip_conntrack_tftp"</code></p>
<p>If you already have something in that line just add the new module with a space as a delimiter, like:</p>
<p><code>IPTABLES_MODULES="ip_conntrack_ftp ip_conntrack_tftp"</code></p>
<p>5. Add firewall rules to /etc/sysconfig/iptables. You probably only need UDP, though I always add the TCP rules, too (they&#8217;re both listed in /etc/services for port 69):</p>
<p><code>-A RH-Firewall-1-INPUT -s 10.1.0.0/16 -m tcp -p tcp --dport 69 -j ACCEPT<br />
-A RH-Firewall-1-INPUT -s 10.1.0.0/16 -m udp -p udp --dport 69 -j ACCEPT</code></p>
<p>(two lines here if it&#8217;s wrapping)</p>
<p>6. Restart iptables to pick up the changes from steps 4 and 5:</p>
<p><code>/sbin/service iptables restart</code></p>
<p>7. Add the proper lines to /etc/hosts.allow:</p>
<p><code>in.tftpd: 10.1.</code></p>
<p>8. Put something in /tftpboot to retrieve with a client, for testing.</p>
<p>9. Use a client from an allowed IP range to test:</p>
<p><code>$ tftp my.tftp.server.com<br />
tftp> get filename.bin<br />
</code></p>
<p>9. If you get an error check /var/log/secure and /var/log/messages on the server, and start eliminating potential problems one at a time (disable iptables, put ALL in hosts.allow, etc.) until you find the problem.</p>
<p>Have fun!</p>
<p class="akst_link"><a href="http://lonesysadmin.net/?p=939&amp;akst_action=share-this"  title="Email, post to del.icio.us, etc." id="akst_link_939" class="akst_share_link" rel="noindex nofollow">ShareThis</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://lonesysadmin.net/2007/10/29/how-to-install-a-tftp-server-on-red-hat-enterprise-linux/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How To Use A Linksys Router to Bridge</title>
		<link>http://lonesysadmin.net/2007/09/04/how-to-use-a-linksys-router-to-bridge/</link>
		<comments>http://lonesysadmin.net/2007/09/04/how-to-use-a-linksys-router-to-bridge/#comments</comments>
		<pubDate>Tue, 04 Sep 2007 17:21:12 +0000</pubDate>
		<dc:creator>Bob Plankers</dc:creator>
		
		<category><![CDATA[Featured]]></category>

		<category><![CDATA[How To]]></category>

		<guid isPermaLink="false">http://lonesysadmin.net/2007/09/04/how-to-use-a-linksys-router-to-bridge/</guid>
		<description><![CDATA[Do you want to use your Linksys wireless access point &#038; router to bridge another wired network to wireless?
There isn&#8217;t a mode for it in the Linksys setup. There are firmware hacks, but those are another thing completely.
My simple suggestion: instead of using the WAN port for the router&#8217;s uplink, just plug the uplink into [...]]]></description>
			<content:encoded><![CDATA[<p>Do you want to use your Linksys wireless access point &#038; router to bridge another wired network to wireless?</p>
<p>There isn&#8217;t a mode for it in the Linksys setup. There are firmware hacks, but those are another thing completely.</p>
<p>My simple suggestion: instead of using the WAN port for the router&#8217;s uplink, <strong>just plug the uplink into one of the switch ports on the Linksys</strong>. Ta-dum! Instant bridging.</p>
<p class="akst_link"><a href="http://lonesysadmin.net/?p=854&amp;akst_action=share-this"  title="Email, post to del.icio.us, etc." id="akst_link_854" class="akst_share_link" rel="noindex nofollow">ShareThis</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://lonesysadmin.net/2007/09/04/how-to-use-a-linksys-router-to-bridge/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How To Install ClamAV On Red Hat Enterprise Linux</title>
		<link>http://lonesysadmin.net/2007/07/31/how-to-install-clamav-on-red-hat-enterprise-linux/</link>
		<comments>http://lonesysadmin.net/2007/07/31/how-to-install-clamav-on-red-hat-enterprise-linux/#comments</comments>
		<pubDate>Tue, 31 Jul 2007 16:48:08 +0000</pubDate>
		<dc:creator>Bob Plankers</dc:creator>
		
		<category><![CDATA[How To]]></category>

		<guid isPermaLink="false">http://lonesysadmin.net/2007/07/31/how-to-install-clamav-on-red-hat-enterprise-linux/</guid>
		<description><![CDATA[Want to install ClamAV on your Red Hat Enterprise Linux, CentOS, or Fedora Core box? Their documentation is pretty darn easy to follow, but this fills in some of the missing pieces for RHEL.  
clamd is the scanning daemon, clamav-milter is the milter, and freshclam is the process that updates the virus definitions.
All the [...]]]></description>
			<content:encoded><![CDATA[<p>Want to install ClamAV on your Red Hat Enterprise Linux, CentOS, or Fedora Core box? Their documentation is pretty darn easy to follow, but this fills in some of the missing pieces for RHEL.  </p>
<p>clamd is the scanning daemon, clamav-milter is the milter, and freshclam is the process that updates the virus definitions.</p>
<p>All the commands, in Courier font, should be on one line if they happen to wrap.</p>
<ol>
<li>Install gmp, gmp-devel, sendmail, sendmail-cf, sendmail-devel, zlib, zlib-devel, bzip2, bzip2-devel.</li>
<li>Get the sendmail source from sendmail.org. Extract it, go into the libmilter subdirectory. Run &quot;make&quot; and &quot;make install&quot;. That will install libmilter into /usr, where sendmail can find it. No need to build the whole sendmail.</li>
<li><code>groupadd clamav</code></li>
<li><code>useradd -g clamav -s /bin/false -c &quot;Clam AntiVirus&quot; clamav</code></li>
<li>Get the ClamAV source, extract it, build it, install it (three lines, two are make):
<p><code>./configure --prefix=/usr/local/clamav --disable-zlib-vcheck --enable-milter<br />
make<br />
make install</code></li>
<li>Configure /usr/local/clamav/etc/clamd.conf. I changed the following:
<p><code># Example<br />
    LogTime: yes<br />
    LogSyslog yes<br />
    LogFacility LOG_MAIL<br />
    PidFile /var/run/clamav/clamd.pid<br />
    TemporaryDirectory /tmp<br />
    LocalSocket /var/run/clamav/clamd.socket<br />
    FixStaleSocket yes<br />
    User clamav</code></p>
<p>    I chose to have it log via syslog to the mail facility. Why? Because I&#8217;m lazy and that log gets rotated already. One less thing to have to change &amp; worry about. If you are high-traffic you might want to have logrotate rotate /var/log/maillog daily.</p>
</li>
<li>Configure /usr/local/clamav/etc/freshclam.conf. I changed the following:
<p><code># Example<br />
    LogSyslog yes<br />
    LogFacility LOG_MAIL<br />
    PidFile /var/run/clamav/freshclam.pid<br />
    DatabaseMirror db.us.clamav.net<br />
    NotifyClamd /usr/local/clamav/etc/clamd.conf<br />
    </code></p>
</li>
<li><code>mkdir /var/run/clamav</code></li>
<li><code>chown clamav.clamav /var/run/clamav</code>/</li>
<li><code>chmod 700 /var/run/clamav</code></li>
<li>Start the base services to make sure they work. You may want to &quot;tail -f /var/log/maillog&quot; while you&#8217;re doing this:
<p><code>/usr/local/clamav/sbin/clamd<br />
    /usr/local/clamav/bin/freshclam -d</code></p>
</li>
<li>Configure the milter. Add the following to /etc/mail/sendmail.mc right before the <font face="Courier New">MAILER(smtp)dnl</font> line. It&#8217;s two lines, the second beginning with &#8220;define&#8221;:
<p>    <font face="Courier New">INPUT_MAIL_FILTER(`clamav&#8217;, `S=local:/var/run/clamav/clmilter.sock, F=, T=S:4m;R:4m;C:30s;E:10m&#8217;)dnl<br />
    define(`confINPUT_MAIL_FILTERS&#8217;, `clamav&#8217;)<br />
    </font></li>
<li>Make the new sendmail.cf by issuing a &quot;<font face="Courier New">make -C /etc/mail</font>&quot; command.</li>
<li>Start the milter process to test it:
<p>    <font face="Courier New">/usr/local/clamav/sbin/clamav-milter -lo /var/run/clamav/clmilter.sock</p>
<p>    </font></li>
<li>Restart sendmail to make it pick up the configuration changes (<font face="Courier New">service sendmail restart</font>).</li>
<li>Send a test email. If everything works make sure you set the services to start at boot, either with the init script that is in the ClamAV contrib directory or just by adding lines to /etc/rc.local.</li>
</ol>
<p class="akst_link"><a href="http://lonesysadmin.net/?p=795&amp;akst_action=share-this"  title="Email, post to del.icio.us, etc." id="akst_link_795" class="akst_share_link" rel="noindex nofollow">ShareThis</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://lonesysadmin.net/2007/07/31/how-to-install-clamav-on-red-hat-enterprise-linux/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How to Configure IPMI on a Dell PowerEdge running Red Hat Enterprise Linux</title>
		<link>http://lonesysadmin.net/2007/06/21/how-to-configure-ipmi-on-a-dell-poweredge-running-red-hat-enterprise-linux/</link>
		<comments>http://lonesysadmin.net/2007/06/21/how-to-configure-ipmi-on-a-dell-poweredge-running-red-hat-enterprise-linux/#comments</comments>
		<pubDate>Fri, 22 Jun 2007 01:58:01 +0000</pubDate>
		<dc:creator>Bob Plankers</dc:creator>
		
		<category><![CDATA[Featured]]></category>

		<category><![CDATA[How To]]></category>

		<category><![CDATA[System Administration]]></category>

		<guid isPermaLink="false">http://lonesysadmin.net/2007/06/21/how-to-configure-ipmi-on-a-dell-poweredge-running-red-hat-enterprise-linux/</guid>
		<description><![CDATA[This is intended to help fairly knowledgeable people get IPMI working on their hosts so they can issue remote commands to their hardware. I focus on Red Hat Enterprise Linux on a Dell, but it is likely to work on other hosts, distributions, and OSes, too. This works for me on Dell PowerEdge 1850, PowerEdge [...]]]></description>
			<content:encoded><![CDATA[<p>This is intended to help fairly knowledgeable people get IPMI working on their hosts so they can issue remote commands to their hardware. I focus on Red Hat Enterprise Linux on a Dell, but it is likely to work on other hosts, distributions, and OSes, too. This works for me on Dell PowerEdge 1850, PowerEdge 2850, Dell PowerEdge 1950, and Dell PowerEdge 2950 hardware.</p>
<p>Dell PowerEdge 1650, 2650, and 1750 servers have an older implementation of IPMI which will let you issue commands locally, but not to these models over the network.</p>
<p><strong>Before you begin</strong>:</p>
<p>The Baseboard Management Controller (BMC) is the thing that implements IPMI. It piggybacks on the first built-in NIC so you have to have that attached to the network on the hosts you wish to manage. It uses its own IP address (so you need an extra one).</p>
<p>If you are new to this get a server that is nearby to act as your test machine. Most of the IPMI commands that shut the host down also kill the BMC. If that happens you&#8217;ll need to go power the machine on manually. Until you figure out exactly what is okay and what isn&#8217;t you&#8217;ll be pushing the power button a lot.</p>
<p>You will need a Linux host to send the IPMI commands from. Undoubtedly there are ways to send these commands from other operating systems, but as I am a Linux guy I&#8217;ll use that as my example. Feel free to post comments addressing other OSes.</p>
<p><strong>Getting the OS prepared</strong>:</p>
<p>1) Install IPMItool and the startup scripts. On Red Hat Enterprise Linux install the OpenIPMI, OpenIPMI-tools, OpenIPMI-libs, and OpenIPMI-devel packages. That will get you everything you need. There are similar packages available for other distributions (SuSE, Ubuntu, CentOS, etc.). You&#8217;ll need IPMItool on any machine you want to configure, and any machine you want to send commands from.</p>
<p>2) Enable the IPMI service:</p>
<p><code>/sbin/chkconfig ipmi on</code></p>
<p>3) Start the IPMI service, which will load the kernel modules for you:</p>
<p><code>/sbin/service ipmi start</code></p>
<p><strong>Configure the BMC for Remote Usage</strong>:</p>
<p>1) There are two ways to configure the BMC. You can configure it through the boot-time menu (Ctrl-E), where you can set the management password and IP address information. Or, you can configure it with ipmitool from the OS. Replace my sample IP address, gateway, and netmask with your own:</p>
<p><code>/usr/bin/ipmitool -I open lan set 1 ipaddr 192.168.40.88<br />
/usr/bin/ipmitool -I open lan set 1 defgw ipaddr 192.168.40.1<br />
/usr/bin/ipmitool -I open lan set 1 netmask 255.255.255.0<br />
/usr/bin/ipmitool -I open lan set 1 access on<br />
</code></p>
<p>2) Secure the BMC, so unauthorized people can&#8217;t power cycle your machines. To do this you want to change the default SNMP community, the &#8220;null&#8221; user password, and the root user password. First, set the SNMP community, either to a random string or something you know:</p>
<p><code>/usr/bin/ipmitool -I open lan set 1 snmp YOURSNMPCOMMUNITY</code></p>
<p>Then set the null user password to something random. Replace CRAPRANDOMSTRING with something random and secure:</p>
<p><code>/usr/bin/ipmitool -I open lan set 1 password CRAPRANDOMSTRING</code></p>
<p>Last, set the root user password to something you know:</p>
<p><code>/usr/bin/ipmitool -I open user set password 2 REMEMBERTHIS</code></p>
<p>Double-check your settings with:</p>
<p><code>/usr/bin/ipmitool -I open lan print 1</code></p>
<p>Trying it:</p>
<p>1) You can set an environment variable, IPMI_PASSWORD, with the password you used above. That will save some typing:</p>
<p><code>export IPMI_PASSWORD="REMEMBERTHIS"</code></p>
<p>If you use this substitute the &#8220;-a&#8221; in the following commands with a &#8220;-E&#8221;.</p>
<p>2) From another machine issue the following command, obviously replacing the IP with the target BMC&#8217;s IP:</p>
<p><code>/usr/bin/ipmitool -I lan -U root -H 192.168.40.88 -a chassis power status</code></p>
<p>You should get something like:</p>
<p><code>Chassis Power is on</code></p>
<p>If you get anything else, or nothing, double-check to make sure the BMC is set right, you entered the right password, and the IP it has is reachable from the machine you’re on. You can double-check your work via the Ctrl-E boot menu, too.</p>
<p>Beyond that, get familiar with:</p>
<p><code>/usr/bin/ipmitool -I lan -U root -H 192.168.40.88 -a chassis power off</code></p>
<p><code>/usr/bin/ipmitool -I lan -U root -H 192.168.40.88 -a chassis power cycle<br />
</code><br />
<code>/usr/bin/ipmitool -I lan -U root -H 192.168.40.88 -a sel list<br />
</code><br />
For me, a &#8220;chassis power off&#8221; command kills the box. &#8220;SEL&#8221; is the system event log.</p>
<p>You can issue all of these commands locally, too:</p>
<p><code>/usr/bin/ipmitool sel list</code></p>
<p>Hopefully this helps a little. If you find any errors in this please leave me a comment or send me an email. Thanks!</p>
<p class="akst_link"><a href="http://lonesysadmin.net/?p=724&amp;akst_action=share-this"  title="Email, post to del.icio.us, etc." id="akst_link_724" class="akst_share_link" rel="noindex nofollow">ShareThis</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://lonesysadmin.net/2007/06/21/how-to-configure-ipmi-on-a-dell-poweredge-running-red-hat-enterprise-linux/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
