<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>

<channel>
	<title>Ryan's Tech Notes</title>
	<atom:link href="http://technotes.twosmallcoins.com/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://technotes.twosmallcoins.com</link>
	<description>Useful Tips and How-To's</description>
	<pubDate>Fri, 03 Jun 2011 06:36:15 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Building an RPM using an Existing Spec File</title>
		<link>http://technotes.twosmallcoins.com/?p=388</link>
		<comments>http://technotes.twosmallcoins.com/?p=388#comments</comments>
		<pubDate>Fri, 19 Nov 2010 02:02:44 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[CentOS 5]]></category>

		<category><![CDATA[package management]]></category>

		<category><![CDATA[R]]></category>

		<category><![CDATA[rpm]]></category>

		<guid isPermaLink="false">http://technotes.twosmallcoins.com/?p=388</guid>
		<description><![CDATA[An Example with R Statistical Software




Sometimes the repos have fairly old RPMs.  If you want a newer version of the software, you can either compile it from source.  Or create your own (newer) RPM.  This process is pretty easy if you can utilize someone else&#8217;s existing work.  It just takes some time and persistence.
In this [...]]]></description>
			<content:encoded><![CDATA[<h3>An Example with R Statistical Software</h3>
<p><script type="text/javascript"><!--
google_ad_client = "pub-6665574890847909";
/* Text Banner 468x60, created 6/24/08 */
google_ad_slot = "7934412999";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<p>Sometimes the repos have fairly old RPMs.  If you want a newer version of the software, you can either compile it from source.  Or create your own (newer) RPM.  This process is pretty easy if you can utilize someone else&#8217;s existing work.  It just takes some time and persistence.</p>
<p>In this example, I&#8217;m building an RPM for R-2.11.1.  The currently published RPMs are for R-2.10.0.  I&#8217;m using Centos 5.3.</p>
<p><strong>1) Get the src.rpm file</strong>, available from Berkeley (Go Bears!) <a href="http://cran.cnr.berkeley.edu/bin/linux/redhat/el5/src/">here</a>.  Also download the <a href="http://cran.cnr.berkeley.edu/src/base/R-2/">source code</a>, which is in tar.gz format.</p>
<p><strong>2) Make sure you have the correct RPM build package</strong> on your server.</p>
<p>CentOS5# yum install rpm-build</p>
<p><strong>3) Install the src.rpm file</strong></p>
<p>CentOS5# rpm -i R-2.10.0-2.el5.src.rpm</p>
<p><strong>4) Redhat places the build files in /usr/src/redhat.  Examine the R.spec file</strong> located in /usr/src/redhat/SPECS.  In this case, we only need to edit the Version number. Change</p>
<p>Version: 2.10.0</p>
<p>to</p>
<p>Version: 2.11.1</p>
<p><strong>5)  Copy the R-2.11.1.tar.gz source file</strong> to /usr/src/redhat/SOURCES.</p>
<p><strong>6) Run the build.</strong> And resolve the errors.</p>
<p>CentOS5# rpmbuild -ba /usr/src/redhat/SPECS/R.spec</p>
<p>error: Failed build dependencies:<br />
tetex-latex is needed by R-2.10.0-2.x86_64<br />
texinfo-tex is needed by R-2.10.0-2.x86_64<br />
readline-devel is needed by R-2.10.0-2.x86_64<br />
tcl-devel is needed by R-2.10.0-2.x86_64&#8230;</p>
<p><strong>7)   Sigh.  Perform a yum install</strong> of the needed packages and try again.</p>
<p>CentOS5# yum install tetex-latex texinfo-tex readline-devel &#8230;</p>
<p>CentOS5# rpmbuild -ba /usr/src/redhat/SPECS/R.spec</p>
<p><strong>8)  Got an error</strong> indicating that a number of files located in library/survival/noweb/ were not packaged.  Addressed this by adding this line in R.spec:</p>
<p>%{_libdir}/R/library/survival/noweb</p>
<p>Specifically, I placed it below the core files section:</p>
<p>&#8212;</p>
<p>%files<br />
# Metapackage</p>
<p>%files core<br />
%defattr(-, root, root, -)<br />
&#8230;</p>
<p>%{_libdir}/R/etc<br />
%{_libdir}/R/lib<br />
%{_libdir}/R/library/survival/noweb<br />
&#8230;</p>
<p><strong>9)  Ran the build command again.  This time I got it to run successfully.</strong> The resultant RPMS are located in /usr/src/redhat/RPMS</p>
]]></content:encoded>
			<wfw:commentRss>http://technotes.twosmallcoins.com/?feed=rss2&amp;p=388</wfw:commentRss>
		</item>
		<item>
		<title>Matching Values in a Perl Array</title>
		<link>http://technotes.twosmallcoins.com/?p=383</link>
		<comments>http://technotes.twosmallcoins.com/?p=383#comments</comments>
		<pubDate>Mon, 05 Apr 2010 19:43:32 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
		
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://technotes.twosmallcoins.com/?p=383</guid>
		<description><![CDATA[



Here&#8217;s some code to search for the existence of a value (in this case &#8220;ryan&#8221;) in a Perl array.
#!/usr/bin/perl

@array=("ryan","was","here");
print ryan_in_array(@array); 

sub ryan_in_array { ($_ eq "ryan") &#38;&#38; return 1 for @_; 0 }
The subroutine is modified from http://perldoc.perl.org/List/Util.html.  
Discussion:
In this &#8220;trivial&#8221; code, Graham Barr, uses a few tricks: (1) The &#038;&#038; effectively works as [...]]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript"><!--
google_ad_client = "pub-6665574890847909";
/* Text Banner 468x60, created 6/24/08 */
google_ad_slot = "7934412999";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<p>Here&#8217;s some code to search for the existence of a value (in this case &#8220;ryan&#8221;) in a Perl array.</p>
<pre>#!/usr/bin/perl

@array=("ryan","was","here");
print ryan_in_array(@array); 

sub ryan_in_array { ($_ eq "ryan") &amp;&amp; return 1 for @_; 0 }</pre>
<p>The subroutine is modified from http://perldoc.perl.org/List/Util.html.  </p>
<p>Discussion:</p>
<p>In this &#8220;trivial&#8221; code, Graham Barr, uses a few tricks: (1) The &#038;&#038; effectively works as an &#8220;if true&#8221; statement.  Hence, if $_ is equal to ryan, then we perform the command &#8220;return 1&#8243;.  (2) The &#8220;; 0&#8243;  works as an &#8220;else&#8221; statement.  Our subroutine will return &#8220;0&#8243;, unless, of course, we successfully match &#8220;ryan&#8221;.  Then it&#8217;s superseded by the &#8220;return 1&#8243; call.</p>
]]></content:encoded>
			<wfw:commentRss>http://technotes.twosmallcoins.com/?feed=rss2&amp;p=383</wfw:commentRss>
		</item>
		<item>
		<title>How to Create SNMP Test Trap on Linux</title>
		<link>http://technotes.twosmallcoins.com/?p=369</link>
		<comments>http://technotes.twosmallcoins.com/?p=369#comments</comments>
		<pubDate>Tue, 20 Oct 2009 01:13:58 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[CentOS 5]]></category>

		<category><![CDATA[Net-SNMP]]></category>

		<category><![CDATA[SNMP]]></category>

		<category><![CDATA[SNMP Traps]]></category>

		<category><![CDATA[tcpdump]]></category>

		<category><![CDATA[Wireshark]]></category>

		<guid isPermaLink="false">http://technotes.twosmallcoins.com/?p=369</guid>
		<description><![CDATA[
I wanted to test Nagios&#8216; ability to alarm on an SNMP trap.  So I needed a good way to trigger an SNMP trap without, say&#8230; turning on and off a Cisco switch.
This document basically stitched together an example from the Net-SNMP tutorial and the Net-SNMP FAQs to create a step-by-step guide.  SNMP has a lot [...]]]></description>
			<content:encoded><![CDATA[<p><!--adsense#Banner--></p>
<p>I wanted to test <a href="http://technotes.twosmallcoins.com/?tag=nagios">Nagios</a>&#8216; ability to alarm on an SNMP trap.  So I needed a good way to trigger an SNMP trap without, say&#8230; turning on and off a Cisco switch.</p>
<p>This document basically stitched together an example from the <a href="http://www.net-snmp.org/tutorial/tutorial-5/commands/snmptrap.html">Net-SNMP tutorial</a> and the <a href="http://www.net-snmp.org/wiki/index.php/FAQ:Applications_02">Net-SNMP FAQs</a> to create a step-by-step guide.  SNMP has a lot of technical jargon, but this how-to should work without knowing too many terms.</p>
<h3>Creating the SNMP Trap</h3>
<p>You&#8217;ll need root access to at least one <a href="http://technotes.twosmallcoins.com/?cat=15">Linux</a> server (preferably two servers for proper testing) to complete this exercise.  Enjoy!</p>
<p><strong>1) Install Net-SNMP and its tools</strong>, start the daemon and make sure it works</p>
<p><code>CentOS_5# yum install net-snmp-utils<br />
CentOS_5# /etc/init.d/snmpd start<br />
CentOS_5#snmpwalk -v 2c -c public localhost system<br />
</code><br />
The last line should spew out a number of lines that look like this:</p>
<p><code>NMPv2-MIB::sysORDescr.1 = STRING: The MIB module for SNMPv2 entities<br />
SNMPv2-MIB::sysORDescr.2 = STRING: The MIB module for managing TCP implementations<br />
SNMPv2-MIB::sysORDescr.3 = STRING: The MIB module for managing IP and ICMP implementations</code></p>
<p><strong>2)  Create your MIB definition</strong>.  Drop this file into your MIBs directory, likely in /usr/share/snmp/mibs.</p>
<p><code>CentOS_5# cat /usr/share/snmp/mibs/TRAP-TEST-MIB.txt<br />
</code></p>
<p><code>TRAP-TEST-MIB DEFINITIONS ::= BEGIN<br />
IMPORTS ucdExperimental FROM UCD-SNMP-MIB;</code></p>
<p><code>demotraps OBJECT IDENTIFIER ::= { ucdExperimental 990 }</code></p>
<p><code>demo-trap TRAP-TYPE<br />
STATUS current<br />
ENTERPRISE demotraps<br />
VARIABLES { sysLocation }<br />
DESCRIPTION "This is just a demo"<br />
::= 17</code></p>
<p><code>END</code></p>
<p><strong>3) Load the MIB.</strong><br />
<code>CentOS_5# export MIBS=+TRAP-TEST-MIB</code></p>
<p><strong>4) Run the snmptrap command</strong> to send a trap to your monitoring host.  (Replace monitoring_host with the appropriate hostname).</p>
<p><code>CentOS_5# snmptrap -v 1 -c public monitoring_host TRAP-TEST-MIB::demotraps localhost 6 17 '' SNMPv2-MIB::sysLocation.0 s "Ryan was just here"</code></p>
<h3>How to Verify your SNMP Trap</h3>
<p><strong>1) Run tcpdump</strong> on your monitoring host to see whether you&#8217;re seeing the host.  Note that an aggressively filtering firewall or SELinux may prevent your packet from showing up.</p>
<p><code>monitoring_host# tcpdump host CentOS_5<br />
13:49:03.914746 IP CentOS_5.twosmallcoins.com.56970 &gt; monitoring_host.snmptrap:  Trap(64)  E:2021.13.990 127.0.0.1 enterpriseSpecific s=17 33361154 [|snmp]</code></p>
<p><strong>2)  Save the file and look at it in Wireshark</strong> (formerly known as Ethereal), to see the detailed packet.</p>
<p><code>mointoring_host# tcpdump -w ryan_test.dmp -s 0 host CentOS_5</code></p>
<p>This command will save it to the ryan_test.dmp file, so you can analyze it later.  If you look closely, you can see the part of the packet that says &#8220;Ryan was just here&#8221;.</p>
<p><a href="http://technotes.twosmallcoins.com/images/wireshark_snmp_trap.png"><img class="alignnone" title="Wireshark View of SNMP Trap" src="http://technotes.twosmallcoins.com/images/wireshark_snmp_trap.png" alt="" width="919" height="668" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://technotes.twosmallcoins.com/?feed=rss2&amp;p=369</wfw:commentRss>
		</item>
		<item>
		<title>How to Convert MySQL from MyISAM to InnoDB Using a Script</title>
		<link>http://technotes.twosmallcoins.com/?p=356</link>
		<comments>http://technotes.twosmallcoins.com/?p=356#comments</comments>
		<pubDate>Thu, 10 Sep 2009 13:20:46 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
		
		<category><![CDATA[MySQL]]></category>

		<category><![CDATA[innodb]]></category>

		<category><![CDATA[myISAM]]></category>

		<category><![CDATA[MySQL alter table]]></category>

		<guid isPermaLink="false">http://technotes.twosmallcoins.com/?p=356</guid>
		<description><![CDATA[
Okay.  So I need to convert MySQL database using the default MyISAM engine to the InnoDB engine.  The command is simple:
ALTER TABLE table_name ENGINE = InnoDB;
However, this command needs to be done for EVERY table.  Yes, it&#8217;s a pain in the rear&#8230;  so here&#8217;s a way to do it by scripting.
Scripting a MySQL InnoDB Engine [...]]]></description>
			<content:encoded><![CDATA[<p><!--adsense#Banner--></p>
<p>Okay.  So I need to convert <a href="http://technotes.twosmallcoins.com/?cat=268">MySQL</a> database using the default MyISAM engine to the InnoDB engine.  The command is simple:</p>
<p><code>ALTER TABLE table_name ENGINE = InnoDB;</code></p>
<p>However, this command needs to be done for EVERY table.  Yes, it&#8217;s a pain in the rear&#8230;  so here&#8217;s a way to do it by scripting.</p>
<h3>Scripting a MySQL InnoDB Engine Conversion</h3>
<p><strong>0) Backup your database.</strong> You should probably be doing this already.  Now&#8217;s a good time to make sure that your backups ran.</p>
<p><strong>1) Create the script.</strong> You&#8217;ll need the correct permissions to query the database. Here&#8217;s the command.  Be sure to change &lt;DATABASE_NAME&gt; as it fits.</p>
<p><code>Linux$ mysql -p -e "show tables in &lt;DATABASE_NAME&gt;;" | tail --lines=+2 | xargs -i echo "ALTER TABLE {} ENGINE=INNODB;" &gt; alter_table.sql </code></p>
<p><strong>2) Run the script</strong>.</p>
<p><code>Linux $ mysql --database=&lt;DATABASE_NAME&gt; -p &lt; alter_table.sql</code></p>
<p><strong>3) Verify</strong> it by running this command in mysql:</p>
<p><code>mysql&gt; show table status;</code></p>
<h3>Discussion (If You&#8217;re Interested)</h3>
<p>The script is simply a bunch of ALTER TABLE commands for each of your tables in the database of question.</p>
<p>The mysql -p -e &#8220;show tables in &lt;DATABASE_NAME&gt;&#8221; command gets a list of the tables.  This list has a header that looks like &#8220;Tables_in_DATABASE&#8221;.  The tail command drops that first header line.  Now you have a clean list of tables.  The xargs -i echo command creates the ALTER TABLE command, inserting the table name where the squiggly braces {} are placed.   It&#8217;s now stored in alter_table.sql.</p>
<p>Step two simply runs the script that we stored in alter_table.  Both mysql commands will prompt for a password, based on the -p flag.</p>
]]></content:encoded>
			<wfw:commentRss>http://technotes.twosmallcoins.com/?feed=rss2&amp;p=356</wfw:commentRss>
		</item>
		<item>
		<title>389 Directory Server Install Error:  Exception in thread &#8220;main&#8221; java.lang.Error: Probable fatal error:No fonts found</title>
		<link>http://technotes.twosmallcoins.com/?p=333</link>
		<comments>http://technotes.twosmallcoins.com/?p=333#comments</comments>
		<pubDate>Wed, 09 Sep 2009 17:35:19 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
		
		<category><![CDATA[LDAP]]></category>

		<category><![CDATA[Solaris]]></category>

		<guid isPermaLink="false">http://technotes.twosmallcoins.com/?p=333</guid>
		<description><![CDATA[
I just installed the open source LDAP software, 389 Directory Server, on a CentOS 5.3 server by following these very good instructions.  However, the last line stated
CentOS# 389-console -x nologo
     Exception in thread "main" java.lang.Error: Probable fatal error:No fonts found.
     at sun.font.FontManager.getDefaultPhysicalFont(FontManager.java:1088)
     at [...]]]></description>
			<content:encoded><![CDATA[<p><!--adsense#Banner--></p>
<p>I just installed the open source LDAP software, 389 Directory Server, on a CentOS 5.3 server by following <a href="http://directory.fedoraproject.org/wiki/Download">these very good instructions</a>.  However, the last line stated</p>
<p>CentOS# 389-console -x nologo</p>
<pre>     Exception in thread "main" java.lang.Error: Probable fatal error:No fonts found.
     at sun.font.FontManager.getDefaultPhysicalFont(FontManager.java:1088)
     at sun.font.FontManager.initialiseDeferredFont(FontManager.java:960)
     at sun.font.FontManager.findOtherDeferredFont(FontManager.java:899)
     at sun.font.FontManager.findDeferredFont(FontManager.java:916)
     at sun.font.FontManager.findFont2D(FontManager.java:1904)
     at sun.font.FontManager.getDefaultPhysicalFont(FontManager.java:1071)
     at sun.font.FontManager.initialiseDeferredFont(FontManager.java:960)
     at sun.font.FontManager.findOtherDeferredFont(FontManager.java:899)
     at sun.font.FontManager.findDeferredFont(FontManager.java:916)
     at sun.font.FontManager.findFont2D(FontManager.java:1904)
     ...</pre>
<p>Dozens of un-informative commands continued.  (Dear Java programmer:  do we <em>really</em> need such verbose error messages?  <em>Really</em>?)</p>
<h3>The Solution</h3>
<p>Fortunately the solution for me was relatively easy.  I had installed CentOS in text mode, without X-server.</p>
<p><strong>1) Installed X-server</strong>.  On CentOS, installing X is quite easy:</p>
<p>CentOS# yum groupinstall &#8220;X Window System&#8221;</p>
<p>Followed the prompts.</p>
<p><strong>2) Logged off,  SSH&#8217;ed back in</strong> with X forwarding, and launched GUI.</p>
<p>Cygwin$ ssh -X root@CentOS<br />
Warning: No xauth data; using fake authentication data for X11 forwarding.<br />
CentOS# 389-console -x nologo</p>
<p><strong>3) Celebrated</strong> with a cup o&#8217; java. Hehe.  Okay&#8230; it&#8217;s really not that funny.</p>
]]></content:encoded>
			<wfw:commentRss>http://technotes.twosmallcoins.com/?feed=rss2&amp;p=333</wfw:commentRss>
		</item>
		<item>
		<title>How to Upgrade Sun Grid Engine (SGE) and Migrate to New Server</title>
		<link>http://technotes.twosmallcoins.com/?p=324</link>
		<comments>http://technotes.twosmallcoins.com/?p=324#comments</comments>
		<pubDate>Wed, 26 Aug 2009 17:37:53 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
		
		<category><![CDATA[Sun Grid Engine]]></category>

		<category><![CDATA[SGE 6.2u3]]></category>

		<category><![CDATA[SGE master]]></category>

		<category><![CDATA[SGE upgrade]]></category>

		<guid isPermaLink="false">http://technotes.twosmallcoins.com/?p=324</guid>
		<description><![CDATA[
Sometimes you want to upgrade software and migrate hardware at the same time.  If you want to do that with SGE, then you&#8217;re looking in the right place.
My architecture: old server SGE 6.1u2 on CentOS 5, migrating to SGE 6.2u3 on CentOS 5.3.
Upgrade Procedure
1) Download SGE onto the new server.  If you&#8217;re feeling [...]]]></description>
			<content:encoded><![CDATA[<p><!--adsense#Banner--></p>
<p>Sometimes you want to upgrade software and migrate hardware at the same time.  If you want to do that with SGE, then you&#8217;re looking in the right place.</p>
<p>My architecture: old server SGE 6.1u2 on CentOS 5, migrating to SGE 6.2u3 on CentOS 5.3.</p>
<h3>Upgrade Procedure</h3>
<p><strong>1) <a href="https://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_SMI-Site/en_US/-/USD/ViewProductDetail-Start?ProductRef=GE-6.2U3-OS-G-F@CDS-CDS_SMI">Download SGE</a> </strong>onto the new server.  If you&#8217;re feeling farsighted, fill out the <a href="http://wikis.sun.com/display/gridengine62u3/Planning+Checklist">Planning Checklist</a>.</p>
<p><strong>2) Unzip, <a href="http://technotes.twosmallcoins.com/?s=tar">untar</a>, an set $SGE_ROOT</strong> to your untar&#8217;ed folder.</p>
<p>OldCentOS# export SGE_ROOT=/directory/to/sge/</p>
<p>Note: You may consider putting SGE root in an NFS directory in case you want to create a &#8220;high availability&#8221; fail-over environment.  NFS may very well slow you down.</p>
<p><strong>3) Find save_sge_config.sh</strong> and copy it over to the old host.</p>
<p><strong>4) Create a copy of your configuration</strong> using save_sge_config.sh</p>
<p>OldCentOS# mkdir sge_config_folder<br />
OldCentOS# /path/to/save_sge_config.sh sge_config_folder</p>
<p><strong>5) Copy over your config folder</strong></p>
<p><strong>6) Edit save_config_folder/cell/qmaster</strong> and change the old hostname (OldCentOS) to the new hostname (NewCentOS).  Otherwise you&#8217;ll get an error like this:</p>
<p>Upgrade must be started on a qmaster host!</p>
<p><strong>7) Run upgrade</strong></p>
<p>NewCentOS# $SGE_ROOT/inst_sge -upd</p>
<p><strong>8) Follow prompts.</strong> This is when you should reach for that planning checklist from step 1.</p>
<p><strong>9)  Be patient.</strong> Depending on the size your configuration, certain portions might take a long time.</p>
<p><strong>10) Check</strong> your install</p>
<p>NewCentOS# ps -ef | grep sge<br />
NewCentOS# qstat -f</p>
]]></content:encoded>
			<wfw:commentRss>http://technotes.twosmallcoins.com/?feed=rss2&amp;p=324</wfw:commentRss>
		</item>
		<item>
		<title>How to Prepare AIX 6.1 for Oracle Install</title>
		<link>http://technotes.twosmallcoins.com/?p=312</link>
		<comments>http://technotes.twosmallcoins.com/?p=312#comments</comments>
		<pubDate>Mon, 22 Jun 2009 16:12:35 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
		
		<category><![CDATA[AIX]]></category>

		<category><![CDATA[Oracle]]></category>

		<category><![CDATA[Unix]]></category>

		<category><![CDATA[AIX 6.1]]></category>

		<category><![CDATA[Kernel parameters]]></category>

		<category><![CDATA[ulimit]]></category>

		<guid isPermaLink="false">http://technotes.twosmallcoins.com/?p=312</guid>
		<description><![CDATA[
First off, I&#8217;m not an Oracle DBA.  But here are some of the things I did upon my DBA&#8217;s request, so that he can install Oracle.
1) Add user oracle and group dba. Edited the following files:

/etc/passwd
/etc/group
/etc/security/passwd

2) Edited the default ulimit and associated parameters.  In /etc/security/limits:
default:
fsize = -1
core = 2097151
cpu = -1
data = -1
rss = [...]]]></description>
			<content:encoded><![CDATA[<p><!--adsense#Banner--></p>
<p>First off, I&#8217;m not an Oracle DBA.  But here are some of the things I did upon my DBA&#8217;s request, so that he can install Oracle.</p>
<p><strong>1) Add user oracle and group dba.</strong> Edited the following files:</p>
<ul>
<li>/etc/passwd</li>
<li>/etc/group</li>
<li>/etc/security/passwd</li>
</ul>
<p><strong>2) Edited the default ulimit</strong> and associated parameters.  In /etc/security/limits:</p>
<p>default:<br />
<span style="padding-left: 30px;">fsize = -1<br />
<span style="padding-left: 30px;">core = 2097151<br />
<span style="padding-left: 30px;">cpu = -1<br />
<span style="padding-left: 30px;">data = -1<br />
<span style="padding-left: 30px;">rss = 65536<br />
<span style="padding-left: 30px;">stack = 65536<br />
<span style="padding-left: 30px;">nofiles = 20000</span></span></span></span></span></span></span></p>
<p>root:<br />
<span style="padding-left: 30px;">fsize=-1<br />
<span style="padding-left: 30px;">stack=-1<br />
<span style="padding-left: 30px;">rss=-1</span></span></span></p>
<p>oracle:<br />
<span style="padding-left: 30px;">fsize=-1<br />
<span style="padding-left: 30px;">stack=-1<br />
<span style="padding-left: 30px;">rss=-1</span></span></span></p>
<p>Hmm&#8230; I guess I am really trusting of the DBA.  At least this box is dedicated to Oracle.</p>
<p><strong>3) Edit the kernel parameters.</strong> In /etc/tunables/nextboot, added the following:</p>
<p>vmo:<br />
<span style="padding-left: 30px;">minfree = &#8220;1500&#8243;<br />
<span style="padding-left: 30px;">maxfree = &#8220;2100&#8243;<br />
<span style="padding-left: 30px;">minperm% = &#8220;5&#8243;<br />
<span style="padding-left: 30px;">lru_file_repage = &#8220;0&#8243;</span></span></span></span></p>
<p>ioo:<br />
<span style="padding-left: 30px;">j2_maxRandomWrite = &#8220;128&#8243;<br />
<span style="padding-left: 30px;">j2_nPagesPerWriteBehindCluster = &#8220;128&#8243;<br />
<span style="padding-left: 30px;">j2_nRandomCluster = &#8220;32&#8243;<br />
<strong><br />
4) Installed rsync.</strong></span></span></span></p>
<p><strong>5) Expanded /tmp and /oracle/home as needed.</strong></p>
<p>AIX61# df | grep mnt</p>
<p>My /tmp file system was using /dev/hd3.  Look at it and extend if needed.  Here I extend by 1 physical partition (PP), which is 128 MB.  Then I extend the /tmp file system too. </p>
<p>AIX61# lslv hd3<br />
AIX61# extendlv hd3 1<br />
AIX61# chfs -a size=+128M /tmp</p>
<p><strong>6) Installed the fileset, rstc.basic</strong>, which is required by Oracle 11g.  Mounted AIX6.1 DVD on /mnt and ran this installp command:</p>
<p>AIX61# installp -ag -d /mnt/installp/ppc/ rsct.basic</p>
]]></content:encoded>
			<wfw:commentRss>http://technotes.twosmallcoins.com/?feed=rss2&amp;p=312</wfw:commentRss>
		</item>
		<item>
		<title>How to install SSH on AIX 6.1 and turn off telnet</title>
		<link>http://technotes.twosmallcoins.com/?p=306</link>
		<comments>http://technotes.twosmallcoins.com/?p=306#comments</comments>
		<pubDate>Sun, 14 Jun 2009 18:04:38 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
		
		<category><![CDATA[AIX]]></category>

		<category><![CDATA[Unix]]></category>

		<category><![CDATA[AIX6.1]]></category>

		<category><![CDATA[SSH]]></category>

		<category><![CDATA[Telnet]]></category>

		<guid isPermaLink="false">http://technotes.twosmallcoins.com/?p=306</guid>
		<description><![CDATA[
One of my biggest gripes about AIX is how security un-conscious it is.  SSH now &#8220;comes with&#8221; AIX, but it&#8217;s on a separate cd.  Anyway, enough griping.  Here are the procedures.
Installing OpenSSH on AIX 6.1
1) Obtain the files. It&#8217;s downloadable here: http://sourceforge.net/projects/openssh-aix/.  Or you can find it on the expansion CD.  Or the Linux toolkit [...]]]></description>
			<content:encoded><![CDATA[<p><!--adsense#Banner--></p>
<p>One of my biggest gripes about <a href="http://technotes.twosmallcoins.com/?cat=3">AIX</a> is how security un-conscious it is.  SSH now &#8220;comes with&#8221; AIX, but it&#8217;s on a separate cd.  Anyway, enough griping.  Here are the procedures.</p>
<h3>Installing OpenSSH on AIX 6.1</h3>
<p><strong>1) Obtain the files.</strong> It&#8217;s downloadable here: http://sourceforge.net/projects/openssh-aix/.  Or you can find it on the expansion CD.  Or the Linux toolkit for AIX CD.</p>
<p><strong>2)  Install</strong>.  If you&#8217;re using a CD, follow my directions for installing lsof from <a href="http://technotes.twosmallcoins.com/?p=40">here</a> (of course, replace openssh with lsof).  Otherwise, I have some installp examples <a href="http://technotes.twosmallcoins.com/?p=28">here</a>.</p>
<p><strong>3) Start your SSH.</strong></p>
<p>AIX61# startsrc -g ssh</p>
<p><strong>4) Edit your /etc/hosts.allow file.</strong> Otherwise you&#8217;ll see an error that says this:</p>
<p>ssh_exchange_identification: Connection closed by remote host</p>
<p><strong>5) Test it out.</strong></p>
<p>Linux# ssh AIX61</p>
<h3>How to Disable Telnet on AIX 6.1</h3>
<p><strong>1) Comment out telnet</strong> from /etc/inetd.conf.</p>
<p><strong>2) Reload</strong> the configuration file</p>
<p>AIX61# refresh -s inetd</p>
<p><strong>3) Test.</strong> You should get a nice error message like this:</p>
<p>Linux# telnet AIX6.1<br />
Trying 10.1.1.10&#8230;<br />
telnet: connect to address 10.1.1.10: Connection refused<br />
telnet: Unable to connect to remote host: Connection refused</p>
]]></content:encoded>
			<wfw:commentRss>http://technotes.twosmallcoins.com/?feed=rss2&amp;p=306</wfw:commentRss>
		</item>
		<item>
		<title>Help, my email server (IP Address) has been blacklisted!</title>
		<link>http://technotes.twosmallcoins.com/?p=298</link>
		<comments>http://technotes.twosmallcoins.com/?p=298#comments</comments>
		<pubDate>Tue, 02 Jun 2009 17:33:53 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
		
		<category><![CDATA[Ironport]]></category>

		<category><![CDATA[Postfix]]></category>

		<category><![CDATA[barracuda]]></category>

		<category><![CDATA[email blackilist]]></category>

		<category><![CDATA[email poor reputation]]></category>

		<category><![CDATA[how to remove from email blacklists]]></category>

		<category><![CDATA[spamcop]]></category>

		<guid isPermaLink="false">http://technotes.twosmallcoins.com/?p=298</guid>
		<description><![CDATA[
So, I get a couple of bounced emails that indicate that my email server/IP Address got blacklisted.  Looking at my postfix logs in /var/log/maillog, here are a few examples of rejections.  (Ouch&#8230; even virtual rejections hurt).  By the way, I changed the email and IPs to protect the innocent.
Example Rejected/Blacklisted Email Logs
Jun  3 15:01:03 mail-relay [...]]]></description>
			<content:encoded><![CDATA[<p><!--adsense#Banner--></p>
<p>So, I get a couple of bounced emails that indicate that my email server/IP Address got blacklisted.  Looking at my <a href="http://technotes.twosmallcoins.com/?cat=103">postfix</a> logs in /var/log/maillog, here are a few examples of rejections.  (Ouch&#8230; even virtual rejections hurt).  By the way, I changed the email and IPs to protect the innocent.</p>
<h3>Example Rejected/Blacklisted Email Logs</h3>
<p>Jun  3 15:01:03 mail-relay postfix/smtp: to=&lt;user@foo.com&gt;, relay=mail.foo.com[10.1.0.1], delay=24, status=bounced (host mail.foo.com[10.1.0.1] said: 550 192.168.0.1 blacklisted at bl.spamcop.net (in reply to RCPT TO command))</p>
<p>Jun  3 15:09:21 mail-relay postfix/smtp: to=&lt;user2@bar.com&gt;, relay=none, delay=1072, status=deferred (connect to mail.bar.com[10.0.0.1]: server refused to talk to me: ironport.bar.com  554 &#8220;Your access to this mail system has been rejected due to the sending MTA&#8217;s poor reputation. Please reference the following URL for more information: http://www.senderbase.org/search?searchString=192.168.0.1 If you believe that this failure is in error, please contact the intended recipient via alternate means.&#8221;  )</p>
<h3>Great&#8230; So now what?!?</h3>
<p><strong>1) Find the culprit.</strong> It could be a virus-infected mail server.  Or a misconfigured one.  In my case, it was an infected laptop behind our NAT-ed firewall that was spamming out to random IP addresses on port 25 across the Internet. Ugh.</p>
<p><strong>2) Disable/fix the culprit.</strong></p>
<p><strong>3) Find the unhappy servers</strong>.  Go to http://mxtoolbox.com/blacklists.aspx and enter your IP address.</p>
<p><strong>4) Make atonements.</strong> Some blacklists willl allow you to plead for blacklist removal.  Others require you to to simply wait for your blacklist TTL to expire.</p>
<p>Good luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://technotes.twosmallcoins.com/?feed=rss2&amp;p=298</wfw:commentRss>
		</item>
		<item>
		<title>How to Add a Disk on AIX Logical Volume Manager (LVM)</title>
		<link>http://technotes.twosmallcoins.com/?p=293</link>
		<comments>http://technotes.twosmallcoins.com/?p=293#comments</comments>
		<pubDate>Tue, 12 May 2009 10:33:22 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
		
		<category><![CDATA[AIX]]></category>

		<category><![CDATA[Unix]]></category>

		<category><![CDATA[Logical Volume Manager]]></category>

		<category><![CDATA[lslv]]></category>

		<category><![CDATA[lspv]]></category>

		<category><![CDATA[lsvg]]></category>

		<category><![CDATA[LVM]]></category>

		<category><![CDATA[mkfs]]></category>

		<category><![CDATA[mklv]]></category>

		<category><![CDATA[mkvg]]></category>

		<category><![CDATA[mount]]></category>

		<guid isPermaLink="false">http://technotes.twosmallcoins.com/?p=293</guid>
		<description><![CDATA[
AIX, for all of its strange mainframe-ish ways, has some redeeming qualities.  AIX&#8217;s disk management system would be one of them.  It&#8217;s quite sophisticated given that it&#8217;s bundled in at no additional cost.  But I digress.
For this &#8220;how-to&#8221;, I&#8217;ll walk through a simple scenario of adding a disk.  In my case, [...]]]></description>
			<content:encoded><![CDATA[<p><!--adsense#Banner--></p>
<p>AIX, for all of its strange mainframe-ish ways, has some redeeming qualities.  AIX&#8217;s disk management system would be one of them.  It&#8217;s quite sophisticated given that it&#8217;s bundled in at no additional cost.  But I digress.</p>
<p>For this &#8220;how-to&#8221;, I&#8217;ll walk through a simple scenario of adding a disk.  In my case, it was adding a SAN disk on a DS4800 system.  But this should work for a regular ol&#8217; hard drive too.</p>
<p><strong>1) Add the physical disk</strong>.</p>
<p><strong>2) Rescan your hardware</strong> so that the OS is aware of your new disk.</p>
<p>AIX# cfgmgr</p>
<p><strong>3) Check to see your disk</strong>.  For the purpose of this example, let&#8217;s say the new disk is hdisk2.</p>
<p>AIX# lsdev -Cc disk<br />
AIX# lspv</p>
<p><strong>4) Associate your new disk to a volume group</strong>.  In this case, let&#8217;s create a new group called ryanvg and put hdisk2 in there.</p>
<p>AIX# mkvg -y ryanvg hdisk2</p>
<p><strong>5) Now you can look at the size of hdisk2.</strong> (This command won&#8217;t work if it&#8217;s not associated with a volume group).</p>
<p>AIX# lspv hdisk2</p>
<p><strong>6) Create a log logical volume</strong> for jfs2.  This needs to be part of ryanvg.  Note: in the example below, the type is jfs2log and we&#8217;re giving it 1 physical partition (PP).</p>
<p>AIX# mklv -t jfs2log ryanvg 1</p>
<p><strong>7)  Look for your new logical volume (lv).</strong> Chances are that AIX named it loglv00.</p>
<p>AIX# lsvg<br />
AIX# lsvg -l ryanvg</p>
<p><strong>8) Create your production logical volume.</strong> Let&#8217;s make it, hmm&#8230; how about 30GB?  At the risk of sounding narcissistic, I&#8217;ll name it ryanlv.</p>
<p>AIX# lsvg ryanvg<br />
AIX# mklv -t jfs2 -y ryanlv ryanvg 30G</p>
<p><strong>9)  Lay down your file system</strong> on ryanlv.</p>
<p>AIX# mkfs -o log=/dev/loglv00 -V jfs2 /dev/ryanlv</p>
<p><strong>10) Mount</strong> your filesystem.</p>
<p>AIX# mkdir /mountpoint<br />
AIX# mount -o log=/dev/loglv00 /dev/ryanlv /mountpoint</p>
<p><strong>11) Consider adding to /etc/filesystem</strong>, if everything comes up fine</p>
]]></content:encoded>
			<wfw:commentRss>http://technotes.twosmallcoins.com/?feed=rss2&amp;p=293</wfw:commentRss>
		</item>
	</channel>
</rss>

