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

<channel>
	<title>Specialist Development</title>
	<atom:link href="http://blog.specialistdevelopment.com/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.specialistdevelopment.com</link>
	<description></description>
	<lastBuildDate>Mon, 07 Feb 2011 15:52:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>MySQL 5.5.8 and Mac OSX 10.6.6 Issues</title>
		<link>http://blog.specialistdevelopment.com/macosx/mysql558-andmac-osx-10-6-6-issues</link>
		<comments>http://blog.specialistdevelopment.com/macosx/mysql558-andmac-osx-10-6-6-issues#comments</comments>
		<pubDate>Mon, 07 Feb 2011 15:52:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MacOSX]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://blog.specialistdevelopment.com/?p=623</guid>
		<description><![CDATA[I have just tried to install MySQL v5.5.8 onto my Mac running OSX v10.6.6 but have run into a problem when trying to start it. Basically it came up with an error every time and failed to start. I have come up with a workaround to get it working. Edit this file Mac:~ root# vi [...]]]></description>
			<content:encoded><![CDATA[<p>I have just tried to install MySQL v5.5.8 onto my Mac running OSX v10.6.6 but have run into a problem when trying to start it. Basically it came up with an error every time and failed to start.</p>
<p>I have come up with a workaround to get it working.</p>
<p>Edit this file<br />
<code><br />
Mac:~ root# vi /usr/local/mysql/support-files/mysql.server<br />
</code></p>
<p>You then need to change this line (around line number 67)<br />
<code><br />
bindir=./bin<br />
</code></p>
<p>to<br />
<code><br />
bindir=/usr/local/mysql/bin<br />
</code></p>
<p>then try to start the server with<br />
<code><br />
Mac:~ root# /usr/local/mysql/support-files/mysql.server start<br />
Starting MySQL<br />
. SUCCESS!<br />
</code></p>
<p>All working <img src='http://blog.specialistdevelopment.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.specialistdevelopment.com/macosx/mysql558-andmac-osx-10-6-6-issues/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apachectl and Mac OS 10.6.5 Ulimit Error</title>
		<link>http://blog.specialistdevelopment.com/macosx/apachectl_and_macosx_ulimit_error</link>
		<comments>http://blog.specialistdevelopment.com/macosx/apachectl_and_macosx_ulimit_error#comments</comments>
		<pubDate>Thu, 03 Feb 2011 20:25:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MacOSX]]></category>

		<guid isPermaLink="false">http://blog.specialistdevelopment.com/?p=618</guid>
		<description><![CDATA[After updating Mac OSX to version 10.6.5 you may come across an error if you try to restart apache via the command line. You will see this error: Mac:~ root# apachectl restart /usr/sbin/apachectl: line 82: ulimit: open files: cannot modify limit: Invalid argument This is due to an update that was released to patch Apache [...]]]></description>
			<content:encoded><![CDATA[<p>After updating Mac OSX to version 10.6.5 you may come across an error if you try to restart apache via the command line.</p>
<p>You will see this error:<br />
<code><br />
Mac:~ root# apachectl restart<br />
/usr/sbin/apachectl: line 82: ulimit: open files: cannot modify limit: Invalid argument<br />
</code></p>
<p>This is due to an update that was released to patch Apache to version 2.2.15 to patch some vulnerabilities in it.</p>
<p>This error can be fixed by editing the ulimit line that is in the apachectl init script.</p>
<p><strong>Fix the Error</strong></p>
<ol>
<li>Open the file<br />
<code>Mac:~ root# vi /usr/sbin/apachectl</code></li>
<li>Find this line<br />
<code>ULIMIT_MAX_FILES="ulimit -S -n `ulimit -H -n`"</code></li>
<li>Replace it with this line<br />
<code>ULIMIT_MAX_FILES=""</code></li>
</ol>
<p>This will fix the error and you will be able to start apache from the command line.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.specialistdevelopment.com/macosx/apachectl_and_macosx_ulimit_error/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tripwire Setup</title>
		<link>http://blog.specialistdevelopment.com/tutorial/tripwire-setup</link>
		<comments>http://blog.specialistdevelopment.com/tutorial/tripwire-setup#comments</comments>
		<pubDate>Wed, 26 Aug 2009 12:50:41 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Tripwire]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://blog.specialistdevelopment.com/?p=370</guid>
		<description><![CDATA[This guide documents how to install and configure Tripwire on a brand new system. This guide is based on installing Tripwire onto a Fedora system. Description of tripwire &#8220;Open Source Tripwire software is a security and data integrity tool useful for monitoring and alerting on specific file change(s) on a range of systems&#8221; Install Tripwire [...]]]></description>
			<content:encoded><![CDATA[<p>This guide documents how to install and configure Tripwire on a brand new system. This guide is based on installing Tripwire onto a Fedora system.</p>
<p>Description of tripwire &#8220;Open Source Tripwire software is a security and data integrity tool useful for monitoring and alerting on specific file change(s) on a range of systems&#8221;</p>
<ol>
<li>
<h2><strong>Install Tripwire</strong></h2>
<p>Install tripwire from the yum repositories.</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">[root@server ~]# yum install tripwire</pre></div></div>

</li>
<li>
<h2><strong>Backup Original Configuration</strong></h2>
<p>Backup original Tripwire configuration files before we make any changes.</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">[root@server ~]# mkdir /home/user/tripwire_backup
[root@server ~]# cp /etc/tripwire/twcfg.txt /home/user/tripwire_backup/twcfg.txt
[root@server ~]# cp /etc/tripwire/twpol.txt /home/user/tripwire_backup/twpol.txt</pre></div></div>

</li>
<li>
<h2><strong>Directory Checking</strong></h2>
<p>Set Loose Directory Checking to true.</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">[root@server ~]# vi /etc/tripwire/twcfg.txt</pre></div></div>

<p>Change</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">LOOSEDIRECTORYCHECKING =false</pre></div></div>

<p>to</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">LOOSEDIRECTORYCHECKING =true</pre></div></div>

</li>
<li>
<h2><strong>Create Keys</strong></h2>
<p>Create the keys for securing Tripwire.</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">[root@server ~]# /usr/sbin/tripwire-setup-keyfiles</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">----------------------------------------------
The Tripwire site and local passphrases are used to sign a  variety  of
files, such as the configuration, policy, and database files.
&nbsp;
Passphrases should be at least 8 characters in length and contain  both
letters and numbers.
&nbsp;
See the Tripwire manual for more information.
&nbsp;
----------------------------------------------
Creating key files…
&nbsp;
(When selecting a passphrase, keep in mind that good passphrases typically
have upper and lower case letters, digits and punctuation marks, and are
at least 8 characters in length.)
&nbsp;
Enter the site keyfile passphrase: &lt;***secret-site-password***&gt;
Verify the site keyfile passphrase: &lt;***secret-site-password***&gt;
Generating key (this may take several minutes)…Key generation complete.
&nbsp;
(When selecting a passphrase, keep in mind that good passphrases typically
have upper and lower case letters, digits and punctuation marks, and are
at least 8 characters in length.)
&nbsp;
Enter the local keyfile passphrase: &lt;***secret-local-password***&gt;
Verify the local keyfile passphrase: &lt;***secret-local-password***&gt;
Generating key (this may take several minutes)…Key generation complete.
&nbsp;
----------------------------------------------
Signing configuration file…
Please enter your site passphrase: &lt;***secret-site-password***&gt;
Wrote configuration file: /etc/tripwire/tw.cfg
&nbsp;
A clear-text version of the Tripwire configuration file:
/etc/tripwire/twcfg.txt
has been preserved for your inspection.  It  is  recommended  that  you
move this file to a secure location and/or encrypt it in place (using a
tool such as GPG, for example) after you have examined it.
&nbsp;
----------------------------------------------
Signing policy file…
Please enter your site passphrase: &lt;***secret-site-password***&gt;
Wrote policy file: /etc/tripwire/tw.pol
&nbsp;
A clear-text version of the Tripwire policy file:
/etc/tripwire/twpol.txt
has been preserved for  your  inspection.  This  implements  a  minimal
policy, intended only to test  essential  Tripwire  functionality.  You
should edit the policy file to  describe  your  system,  and  then  use
twadmin to generate a new signed copy of the Tripwire policy.
&nbsp;
Once you have a satisfactory Tripwire policy file, you should move  the
clear-text version to a secure location  and/or  encrypt  it  in  place
(using a tool such as GPG, for example).
&nbsp;
Now run &quot;tripwire --init&quot; to enter Database Initialization  Mode.  This
reads the policy file, generates a database based on its contents,  and
then cryptographically signs the resulting  database.  Options  can  be
entered on the command line to specify which policy, configuration, and
key files are used  to  create  the  database.  The  filename  for  the
database can be specified as well. If no  options  are  specified,  the
default values from the current configuration file are used.</pre></div></div>

</li>
<li>
<h2><strong>Initialise DB</strong></h2>
<p>Initialize the Tripwire database. (A list of errors will be displayed these will be fixed later on)</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">[root@server ~]# tripwire --init</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">Please enter your local passphrase: &lt;***secret-site-password***&gt;
Parsing policy file: /etc/tripwire/tw.pol
Generating the database…
*** Processing Unix File System ***
### Warning: File system error.
### Filename: /dev/kmem
### No such file or directory
### Continuing…
### Warning: File system error.
### Filename: /proc/ksyms
### No such file or directory
### Continuing…
### Warning: File system error.
### Filename: /dev/initctl
### No such file or directory
### Continuing…
Wrote database file: /var/lib/tripwire/server.twd
The database was successfully generated.</pre></div></div>

</li>
<li>
<h2><strong>Fix Errors</strong></h2>
<p>Fix the Tripwire database errors.</p>
<p>Create a folder for the update process and change into that directory.</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">[root@server ~]# mkdir /home/user/tripwire_update
[root@server ~]# cd /home/user/tripwire_update</pre></div></div>

<p>This command will get all of the files that are causing problems because they dont exist and add them to a file which we will use to edit the policy file.</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">[root@server ~]# tripwire --check | grep &quot;Filename:&quot; | awk {'print $2'} &gt;&gt; ./tripwire_errors</pre></div></div>

<p>Copy the policy file</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">[root@server ~]# cp /etc/tripwire/twpol.txt /home/user/tripwire_update/twpol.txt</pre></div></div>

<p>Create the script that will automatically fix the errors listed in the tripwire_errors file created earlier and comment out the specific lines in the tripwire policy file.</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">[root@server ~]# vi ./tripwire_fix_script.sh</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
&nbsp;
    <span style="color: #007800;">TWERR</span>=<span style="color: #ff0000;">&quot;./tripwire_errors&quot;</span>
    <span style="color: #007800;">TWPOL</span>=<span style="color: #ff0000;">&quot;./twpol.txt&quot;</span>
&nbsp;
    <span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">IFS</span>=$<span style="color: #ff0000;">'\n'</span>
    <span style="color: #000000; font-weight: bold;">for</span> i <span style="color: #000000; font-weight: bold;">in</span> $<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #007800;">$TWERR</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>;
    <span style="color: #000000; font-weight: bold;">do</span>
        <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #007800;">$i</span> <span style="color: #007800;">$TWPOL</span>
        <span style="color: #000000; font-weight: bold;">then</span>
            <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #660033;">-i</span> <span style="color: #ff0000;">&quot;s!<span style="color: #007800;">$i</span>!# <span style="color: #007800;">$i</span>!g&quot;</span> <span style="color: #007800;">$TWPOL</span>
        <span style="color: #000000; font-weight: bold;">fi</span>
    <span style="color: #000000; font-weight: bold;">done</span></pre></div></div>

<p>Run the script.</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">[root@server ~]# sh ./tripwire_fix_script.sh</pre></div></div>

<p>Now copy the update policy file back to the original location.</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">[root@server ~]# cp /home/user/tripwire_update/twpol.txt /etc/tripwire/twpol.txt</pre></div></div>

<p>Update the tripwire database from the tripwire policy we have created.</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">[root@server ~]# tripwire --update-policy -Z low /etc/tripwire/twpol.txt</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">Parsing policy file: /etc/tripwire/twpol.txt
Please enter your local passphrase: &lt;***secret-local-password***&gt;
Please enter your site passphrase: &lt;***secret-site-password***&gt;
======== Policy Update: Processing section Unix File System.
======== Step 1: Gathering information for the new policy.
======== Step 2: Updating the database with new objects.
======== Step 3: Pruning unneeded objects from the database.
Wrote policy file: /etc/tripwire/tw.pol
Wrote database file: /var/lib/tripwire/server.twd</pre></div></div>

<p>Run a tripwire check.</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">[root@server ~]# tripwire --check</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">Parsing policy file: /etc/tripwire/tw.pol
*** Processing Unix File System ***
Performing integrity check…
Wrote report file: /var/lib/tripwire/report/server-20090818-131022.twr
&nbsp;
Open Source Tripwire® 2.4.1 Integrity Check Report
&nbsp;
Report generated by:          root
Report created on:            Tue 18 Aug 2009 13:10:22 BST
Database last updated on:     Tue 18 Aug 2009 13:08:30 BST
&nbsp;
===============================================================================
Report Summary:
===============================================================================
&nbsp;
Host name:                    server
Host IP address:              127.0.0.1
Host ID:                      None
Policy file used:             /etc/tripwire/tw.pol
Configuration file used:      /etc/tripwire/tw.cfg
Database file used:           /var/lib/tripwire/server.twd
Command line used:            tripwire --check
&nbsp;
===============================================================================
Rule Summary:
===============================================================================
&nbsp;
-------------------------------------------------------------------------------
Section: Unix File System
-------------------------------------------------------------------------------
&nbsp;
Rule Name                       Severity Level    Added    Removed  Modified
---------                       --------------    -----    -------  --------
Invariant Directories           66                0        0        0
Temporary directories           33                0        0        0
* Tripwire Data Files             100               0        0        1
Critical devices                100               0        0        0
User binaries                   66                0        0        0
Tripwire Binaries               100               0        0        0
Libraries                       66                0        0        0
File System and Disk Administraton Programs
100               0        0        0
Kernel Administration Programs  100               0        0        0
Networking Programs             100               0        0        0
System Administration Programs  100               0        0        0
Hardware and Device Control Programs
100               0        0        0
System Information Programs     100               0        0        0
Application Information Programs
100               0        0        0
(/sbin/rtmon)
Shell Related Programs          100               0        0        0
Operating System Utilities      100               0        0        0
Critical Utility Sym-Links      100               0        0        0
Shell Binaries                  100               0        0        0
Critical system boot files      100               0        0        0
System boot changes             100               0        0        0
OS executables and libraries    100               0        0        0
Critical configuration files    100               0        0        0
Security Control                100               0        0        0
Login Scripts                   100               0        0        0
Root config files               100               0        0        0
&nbsp;
Total objects scanned:  14663
Total violations found:  1
&nbsp;
===============================================================================
Object Summary:
===============================================================================
&nbsp;
-------------------------------------------------------------------------------
# Section: Unix File System
-------------------------------------------------------------------------------
&nbsp;
-------------------------------------------------------------------------------
Rule Name: Tripwire Data Files (/etc/tripwire/tw.pol)
Severity Level: 100
-------------------------------------------------------------------------------
&nbsp;
Modified:
&quot;/etc/tripwire/tw.pol&quot;
&nbsp;
===============================================================================
Error Report:
===============================================================================
&nbsp;
No Errors
&nbsp;
-------------------------------------------------------------------------------
*** End of report ***
&nbsp;
Open Source Tripwire 2.4 Portions copyright 2000 Tripwire, Inc. Tripwire is a registered
trademark of Tripwire, Inc. This software comes with ABSOLUTELY NO WARRANTY;
for details use --version. This is free software which may be redistributed
or modified only under certain conditions; see COPYING for details.
All rights reserved.
Integrity check complete.</pre></div></div>

</li>
<li>
<h2><strong>Run a check</strong></h2>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">[root@server ~]# /etc/cron.daily/tripwire-check</pre></div></div>

<p></lli></p>
<li>
<h2><strong>Update (Again)</strong></h2>
<p>Update again to fix the error that will be displayed because we have updated the policy file. Change YYYYMMDD &#038; HHMMSS to the date and time that you ran the first check. To find the latest one just do an ls-la on /var/lib/tripwire/report/</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">tripwire --update --twrfile /var/lib/tripwire/report/server-YYYMMDD-HHMMSS.twr</pre></div></div>

</li>
<li>
<h2><strong>Email Reports</strong></h2>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">[root@server ~]# vi /etc/cron.daily/tripwire-check</pre></div></div>

<p>Change:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">test -f /etc/tripwire/tw.cfg &amp;&amp;  /usr/sbin/tripwire --check</pre></div></div>

<p>to</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">test -f /etc/tripwire/tw.cfg &amp;&amp;  /usr/sbin/tripwire --check | /bin/mail -s &quot;File Integrity Report (Tripwire) - servername&quot; user@domain.tld</pre></div></div>

</li>
<li>
<h2><strong>Directory Checking (Revert)</strong></h2>
<p>Set Loose Directory Checking to false.</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">[root@server ~]# vi /etc/tripwire/twcfg.txt</pre></div></div>

<p>Change</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">LOOSEDIRECTORYCHECKING =true</pre></div></div>

<p>to</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">LOOSEDIRECTORYCHECKING =false</pre></div></div>

</li>
<li>
<h2><strong>Testing</strong></h2>
<p>This will run the cron.daily tripwire check script and email out a report to the email address you have specified.</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">[root@server ~]# /etc/cron.daily/tripwire-check</pre></div></div>

</li>
</ol>
<p>You now have a working tripwire setup, if any changes are made to your file system you will see them in the report that gets emailed out to you everyday. If you have made the changes dont forget to update, otherwise you will just see loads of errors and wont be able to tell if something is actually wrong.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.specialistdevelopment.com/tutorial/tripwire-setup/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache and SSL Setup</title>
		<link>http://blog.specialistdevelopment.com/apache/create-an-ssl-certificate-and-setup-apache-with-ssl</link>
		<comments>http://blog.specialistdevelopment.com/apache/create-an-ssl-certificate-and-setup-apache-with-ssl#comments</comments>
		<pubDate>Tue, 11 Aug 2009 13:27:01 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[SSL]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://blog.specialistdevelopment.com/?p=312</guid>
		<description><![CDATA[Ok this post documents how to setup Apache with SSL and either be your own singing authority or use one like Thawte I assume that you already have apache installed. Create a Key Pair Create your site RSA private Key and CSR (Certificate Signing Request) [root@server ~]# openssl genrsa -des3 -out domain.tld.key 1024 You will [...]]]></description>
			<content:encoded><![CDATA[<p>Ok this post documents how to setup <a href="http://www.apache.org" target="_blank">Apache</a> with SSL and either be your own singing authority or use one like <a href="http://www.thawte.com" target="_blank">Thawte</a></p>
<p>I assume that you already have apache installed.</p>
<ol>
<li>
<h2><strong>Create a Key Pair</strong></h2>
<p>Create your site RSA private Key and CSR (Certificate Signing Request)</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">[root@server ~]# openssl genrsa -des3 -out domain.tld.key 1024</pre></div></div>

<p>You will be asked to enter a pass phrase for the key, remember this as you will need it later.<br />
A key size of 1024 is used because it is stronger than 512. Anything over 1024 can cause problems with some browsers.</p>
<p>This where you have to choose to either sign the certificate yourself or get it signed by a CA (Certification Authority)</p>
<p>This next steps document how to get a certificate signed by a CA such as <a href="http://www.thawte.com" target="_blank">Thawte</a>. If you want to sign it yourself jump to step 4.
</li>
<li>
<h2><strong>Create a CSR</strong></h2>
<p>Create a CSR (Certificate Signing Request)</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">[root@server ~]# openssl req -new -key domain.tld.key -out domain.tld.csr</pre></div></div>

</li>
<li>
<h2><strong>Sign the CSR (Signed by Signing Authority)</strong></h2>
<p>You now have to send the generated CSR (Certificate Signing Request) to a CA (Certifying Authority) to be signed. Most CA&#8217;s will charge for this service. Once the CSR has been sent to them, using which ever method they prefer (Email, online form) they will the process it and send you a certificate back usually with a .crt extension. Once you have the domain.tld.key file and the domain.tld.crt file jump to part 5
</li>
<li>
<h2><strong>Sign the CSR (Signed by Yourself)</strong></h2>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">[root@server ~]# openssl req -new -x509 -nodes -sha1 -days 365 -key domain.tld.key -out domain.tld.crt</pre></div></div>

</li>
<li>
<h2><strong>Configure Apache</strong></h2>
<p>You now have your domain.tld.key (Key) file and your domain.tld.crt (Certificate) file. We will now need to configure Apache to use these.
</li>
<li>
<h2><strong>Install MOD_SSL</strong></h2>
<p>Install mod_ssl via the yum repos.</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">[root@server ~]# yum install mod_ssl</pre></div></div>

</li>
<li>
<h2><strong>Move the Key and Certificate</strong></h2>
<p>Move the key and certificate. I usually create the directory &#8220;/etc/httpd/ssl&#8221; and then put my key and certificate in there.</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">[root@server ~]# mkdir /etc/httpd/ssl
[root@server ~]# mv domain.tld.key /etc/httpd/ssl/domain.tld.key
[root@server ~]# mv domain.tld.crt /etc/httpd/ssl/domain.tld.crt</pre></div></div>

</li>
<li>
<h2><strong>Configure Apache (Password needed to restart Apache)</strong></h2>
<p>Configure apache to use the Certificate and Key.</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">[root@server ~]# vi /etc/httpd/conf.d/ssl.conf</pre></div></div>

<p>Configure the following paths:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">SSLCertificateFile /etc/httpd/ssl/domain.tld.crt
SSLCertificateKeyFile /etc/httpd/ssl/domain.tld.key</pre></div></div>

</li>
<li>
<h2><strong>Restart Apache</strong></h2>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">[root@server ~]# /sbin/service httpd restart</pre></div></div>

<p>You will be asked to enter a passphrase to start Apache, this is the password we typed right at the start for the Key. once you have typed the correct passphrase apache will startup using SSL.
</li>
<li>
<h2><strong>Configure Apache (Password NOT needed to restart Apache)</strong></h2>
<p>If you dont want to enter a passphrase to restart apache you have to remove the encryption.</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">[root@server ~]# cp domain.tld.key domain.tld.key.org
[root@server ~]# openssl rsa -in domain.tld.key.org -out domain.tld.key
[root@server ~]# chmod 400 domain.tld.key</pre></div></div>

<p>This removes the encryption and sets the key to only be readable by root.
</li>
<li>
<h2><strong>Restart Apache</strong></h2>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">[root@server ~]# /sbin/service httpd restart</pre></div></div>

<p>You shouldnt now be prompted to enter a passphrase and Apache will start.
</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://blog.specialistdevelopment.com/apache/create-an-ssl-certificate-and-setup-apache-with-ssl/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Intel SS4000-E Enable SSH</title>
		<link>http://blog.specialistdevelopment.com/tutorial/intel-ss4000-e-enable-ssh</link>
		<comments>http://blog.specialistdevelopment.com/tutorial/intel-ss4000-e-enable-ssh#comments</comments>
		<pubDate>Fri, 24 Jul 2009 12:05:29 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[NAS]]></category>
		<category><![CDATA[SS4000-E]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://blog.specialistdevelopment.com/?p=294</guid>
		<description><![CDATA[This explains how to enables SSH access on an Intel SS4000-E NAS (Network Attached Storage) There is a CGI page included with your NAS that isnt documented anywhere. Luckily someone found it. To enable SSH just navigate here: http://xxx.xxx.xxx.xxx/ssh_controlF.cgi substitute xxx.xxx.xxx.xxx with internal IP of your NAS When the device is rebooted, SSH will be [...]]]></description>
			<content:encoded><![CDATA[<p>This explains how to enables SSH access on an Intel SS4000-E NAS (Network Attached Storage)</p>
<p>There is a CGI page included with your NAS that isnt documented anywhere. Luckily someone found it.</p>
<p>To enable SSH just navigate here: <a href="http://xxx.xxx.xxx.xxx/ssh_controlF.cgi" target="_blank">http://xxx.xxx.xxx.xxx/ssh_controlF.cgi</a></p>
<p>substitute xxx.xxx.xxx.xxx with internal IP of your NAS</p>
<p>When the device is rebooted, SSH will be disabled again.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.specialistdevelopment.com/tutorial/intel-ss4000-e-enable-ssh/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HP SMHP Setup on Fedora</title>
		<link>http://blog.specialistdevelopment.com/tutorial/hp-system-managment-homepage-on-fedora</link>
		<comments>http://blog.specialistdevelopment.com/tutorial/hp-system-managment-homepage-on-fedora#comments</comments>
		<pubDate>Fri, 26 Jun 2009 09:06:33 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[HP]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://blog.specialistdevelopment.com/?p=243</guid>
		<description><![CDATA[I have a HP DL380 running Fedora, but the problem is I cant install the HP tools, which are really useful, they provide things from PSU monitoring to array configuration all through a nice web interface. See this link: http://h18006.www1.hp.com/products/servers/management/agents/index.html HP only provide this software for a few Linux Distributions such as SUSE and RHEL, [...]]]></description>
			<content:encoded><![CDATA[<p>I have a HP DL380 running Fedora, but the problem is I cant install the HP tools, which are really useful, they provide things from PSU monitoring to array configuration all through a nice web interface.</p>
<p>See this link: <a href="http://h18006.www1.hp.com/products/servers/management/agents/index.html" target="_blank">http://h18006.www1.hp.com/products/servers/management/agents/index.html</a></p>
<p>HP only provide this software for a few Linux Distributions such as SUSE and RHEL, which are all paid for support / update OS&#8217;s.</p>
<p>I have managed to get this HP software working under Fedora to provide most if not all of the functionality you would normally. I have posted the instructions I have used below.</p>
<p><b>1.</b> Update the system and reboot if needed</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">[root@server ~]# yum -y update</pre></div></div>

<p>Trick the HP software so it thinks Redhat Enterprise is installed</p>
<p><b>2.</b> Backup the redhat-release file</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">[root@server ~]# cp /etc/redhat-release /home/user/redhat-release.bak</pre></div></div>

<p><b>3.</b> Edit the redhat-release file</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">[root@server ~]# vi /etc/redhat-release</pre></div></div>

<p>Replace &#8220;Fedora release XX (Xxxxxxxxxxxxx)&#8221; with &#8220;Red Hat Enterprise Linux ES release 5&#8243;</p>
<p><b>4.</b> Change the posix version</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">[root@server ~]# export _POSIX2_VERSION=199209</pre></div></div>

<p><b>5.</b> Download the Proliant Support Pack (PSP) from the HP website.</p>
<p><b>6.</b> Unzip the package that you have downloaded.</p>
<p><b>7.</b> In the directory that was created there will be a installXX.sh script, run this and follow the on screen instructions.</p>
<p><i>Note:</i> Some of the packages failed to install because of dependencies, you can install these but I found most of them can be ignored. The packages that didn’t install for me were the hp-snmp and hp-smh-templates packages. once the RPM&#8217;s were unzipped I tried a manual install using rpm -Uvh which failed due to dependencies. After checking the dependencies, i had the packages installed but the wrong lib versions, the software needs .so.10 and i had .so.15. so i just used rpm -Uvh &#8211;nodeps, the package installed and the software just worked.</p>
<p><b>8.</b> Move the original redhat-release file back</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">[root@server ~]# mv /home/user/redhat-release.bak /etc/redhat-release</pre></div></div>

<p>All done.</p>
<p>Now you should be able to browse to <a href="https://you-server-name:2381" target="_blank">https://you-server-name:2381</a> and login with your root account. (Check firewall rules)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.specialistdevelopment.com/tutorial/hp-system-managment-homepage-on-fedora/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HP ILO Port Numbers</title>
		<link>http://blog.specialistdevelopment.com/hp/hp-servers-ilo-ports</link>
		<comments>http://blog.specialistdevelopment.com/hp/hp-servers-ilo-ports#comments</comments>
		<pubDate>Mon, 22 Jun 2009 14:40:18 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[Firewall Ports]]></category>
		<category><![CDATA[HP]]></category>

		<guid isPermaLink="false">http://blog.specialistdevelopment.com/?p=214</guid>
		<description><![CDATA[If you use HP hardware, you might be aware of ILO (Integrated Lights Out) This provides remote administration capabilities for HP hardware such as the DL series of servers. If you want to use this software you will need to open up a few ports on the firewall in front of your server. Port Name [...]]]></description>
			<content:encoded><![CDATA[<p>If you use HP hardware, you might be aware of ILO (Integrated Lights Out) This provides remote administration capabilities for HP hardware such as the DL series of servers.</p>
<p>If you want to use this software you will need to open up a few ports on the firewall in front of your server.</p>
<table>
<tr>
<td>Port Name</td>
<td>Default Value</td>
<td>Port Description</td>
</tr>
<tr>
<td>Web Server Non-SSL (HTTP)</td>
<td>80</td>
<td>Web server displaying ILO page</td>
</tr>
<tr>
<td>Web Server SSL (HTTPS)</td>
<td>443</td>
<td>Web server displaying ILO page over a secure link</td>
</tr>
<tr>
<td>Virtual Media</td>
<td>17988</td>
<td>Virtual cd-rom or floppy using images / ISOs</td>
</tr>
<tr>
<td>Remote Console / telnet</td>
<td>23</td>
<td>Display for remote console</td>
</tr>
<tr>
<td>Terminal Services</td>
<td>3389</td>
<td>Connect to the ILO display over RDP</td>
</tr>
<tr>
<td>Secure Shell (SSH)</td>
<td>22</td>
<td>Connect to the ILO via SSH</td>
</tr>
</table>
<p>Hope this helps as I know I have spent ages trying to work out why the virtual media would not work correctly, after opening up port 17988 it all worked fine.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.specialistdevelopment.com/hp/hp-servers-ilo-ports/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sun Virtual Box Copy Hard Disk</title>
		<link>http://blog.specialistdevelopment.com/windows/sun-virtual-box-copy-hard-disk</link>
		<comments>http://blog.specialistdevelopment.com/windows/sun-virtual-box-copy-hard-disk#comments</comments>
		<pubDate>Mon, 20 Apr 2009 15:28:43 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[Virtualisation]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://blog.specialistdevelopment.com/?p=555</guid>
		<description><![CDATA[Running Virtual Box on a Windows machine, I want to copy a disk rather than building a new system, so copy the drive and add it to the media manager and add it to a new VM, it will most likely say that the UUID is already in existence. So you will have to give [...]]]></description>
			<content:encoded><![CDATA[<p>Running Virtual Box on a Windows machine, I want to copy a disk rather than building a new system, so copy the drive and add it to the media manager and add it to a new VM, it will most likely say that the UUID is already in existence. So you will have to give it a new UUID:</p>
<p>C:\Program Files\Sun\VirtualBox>VBoxManage internalcommands setvdiuuid C:\
<path to vdi disk>\disk01.vdi<br />
Sun VirtualBox Command Line Management Interface Version 3.1.6<br />
(C) 2005-2010 Sun Microsystems, Inc.<br />
All rights reserved.</p>
<p>UUID changed to: 3abdc988-3095-4d36-8119-63ac11e7b3d8</p>
<p>All done.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.specialistdevelopment.com/windows/sun-virtual-box-copy-hard-disk/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Add new drive array to linux HP server</title>
		<link>http://blog.specialistdevelopment.com/tutorial/add-new-drive-array-to-linux-hp-server</link>
		<comments>http://blog.specialistdevelopment.com/tutorial/add-new-drive-array-to-linux-hp-server#comments</comments>
		<pubDate>Wed, 25 Mar 2009 11:45:35 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[HP]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://blog.specialistdevelopment.com/?p=181</guid>
		<description><![CDATA[This post is gonig to show you how to add a second drive array to a linux hp server. I am using a HP DL380 G3 and my current setup is 2 drives configured as a raid 1+0 set to install my OS on and now i need to use the other 4 drives to [...]]]></description>
			<content:encoded><![CDATA[<p>This post is gonig to show you how to add a second drive array to a linux hp server. I am using a HP DL380 G3 and my current setup is 2 drives configured as a raid 1+0 set to install my OS on and now i need to use the other 4 drives to configure a raid 5 set to use as storage. The OS is installed and up and running.</p>
<p>Explaing naming conventions for HP Disks<br />
/dev/cciss/c0d1</p>
<p>Now lets configure the array</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">[root@server ~]# /sbin/fdisk /dev/cciss/c0d1
&nbsp;
The number of cylinders for this disk is set to 52299.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)
&nbsp;
Command (m for help):</pre></div></div>

<p>See if there are any arrays configured already</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">Command (m for help): p
&nbsp;
Disk /dev/cciss/c0d1: 218.5 GB, 218501038080 bytes
255 heads, 32 sectors/track, 52299 cylinders
Units = cylinders of 8160 * 512 = 4177920 bytes
Disk identifier: 0x1680ee20
&nbsp;
           Device Boot      Start         End      Blocks   Id  System
/dev/cciss/c0d1p1               1       52299   213379904    5  Extended</pre></div></div>

<p>Delete the current partition</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">Command (m for help): d
Selected partition 1</pre></div></div>

<p>Now there shouldnt be any partitions left</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">Command (m for help): p
&nbsp;
Disk /dev/cciss/c0d1: 218.5 GB, 218501038080 bytes
255 heads, 32 sectors/track, 52299 cylinders
Units = cylinders of 8160 * 512 = 4177920 bytes
Disk identifier: 0x1680ee20
&nbsp;
           Device Boot      Start         End      Blocks   Id  System</pre></div></div>

<p>Creating a new disk</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-52299, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-52299, default 52299):
Using default value 52299</pre></div></div>

<p>set the type</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">Command (m for help): t
Selected partition 1
Hex code (type L to list codes): 83</pre></div></div>

<p>Check that everything has been done correctly</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">Command (m for help): p
&nbsp;
Disk /dev/cciss/c0d1: 218.5 GB, 218501038080 bytes
255 heads, 32 sectors/track, 52299 cylinders
Units = cylinders of 8160 * 512 = 4177920 bytes
Disk identifier: 0x1680ee20
&nbsp;
           Device Boot      Start         End      Blocks   Id  System
/dev/cciss/c0d1p1               1       52299   213379919+  83  Linux</pre></div></div>

<p>write the changes</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">Command (m for help): w
The partition table has been altered!
&nbsp;
Calling ioctl() to re-read partition table.
Syncing disks.</pre></div></div>

<p>We now need to format the disk so that we can use it, I have chosen to use ext3.</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">[root@server ~]# /sbin/mkfs -t ext3 /dev/cciss/c0d1p1
mke2fs 1.41.3 (12-Oct-2008)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
13336576 inodes, 53344979 blocks
2667248 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
1628 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000, 7962624, 11239424, 20480000, 23887872
&nbsp;
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
&nbsp;
This filesystem will be automatically checked every 31 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.</pre></div></div>

<p>We will use the UUID (Universally Unique IDentifier) to reference the disk we have just created. To get the UUID we need to run the following command:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">[root@server ~]# /lib/udev/vol_id -u /dev/cciss/c0d1p1
f5fff8af-f51f-4398-9e8f-dfb9e72ed362</pre></div></div>

<p>Now we have to take the UUID and add it to the fstab. First create the directory you want the new storage to be mounted as, for this example I will use /storage01.</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">[root@server ~]# mkdir /storage01
[root@server ~]# vi /etc/fstab
&nbsp;
#
# /etc/fstab
# Created by anaconda on Fri Feb 20 09:49:19 2009
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or vol_id(8) for more info
#
UUID=201df672-e84b-4495-bcdc-a76e1a5d91b8 /                       ext3    defaults        1 1
UUID=765f9b40-3f89-406c-a19a-5f4c47343a81 /boot                   ext3    defaults        1 2
UUID=f5fff8af-f51f-4398-9e8f-dfb9e72ed362 /storage01                ext3    defaults        0 0
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
UUID=cb67c89a-7888-4760-8023-78e6a5398085 swap                    swap    defaults        0 0</pre></div></div>

<p>View the mounts</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">[user@server ~]$ df -kh
Filesystem            Size  Used Avail Use% Mounted on
/dev/cciss/c0d0p2      61G  1.5G   57G   3% /
/dev/cciss/c0d0p1      99M   20M   74M  22% /boot
/dev/cciss/c0d1p1     201G  188M  190G   1% /u01
tmpfs                 2.9G     0  2.9G   0% /dev/shm</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.specialistdevelopment.com/tutorial/add-new-drive-array-to-linux-hp-server/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Time Stamp in BASH History</title>
		<link>http://blog.specialistdevelopment.com/bash/history-with-a-timestamp</link>
		<comments>http://blog.specialistdevelopment.com/bash/history-with-a-timestamp#comments</comments>
		<pubDate>Mon, 09 Mar 2009 16:58:17 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[Bash]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://blog.specialistdevelopment.com/?p=185</guid>
		<description><![CDATA[The history command is used to display a list of all executed commands at the shell. It is a useful tool to find out what command was executed before a certain problem arose with a server. (e.g. a file is deleted, you can look through the history to see who executed the command) The problem [...]]]></description>
			<content:encoded><![CDATA[<p>The history command is used to display a list of all executed commands at the shell. It is a useful tool to find out what command was executed before a certain problem arose with a server. (e.g. a file is deleted, you can look through the history to see who executed the command) The problem with this is you will have to do a bit of investigation work before you can see when the command was executed.</p>
<p>You can look through the logins of users and work out who was logged in using the last command, but this takes a bit of time.</p>
<p>Wouldnt things be easier if you could have a timestamp next to the command when you execute the history command. Well you can, you just need to set one variable: HISTTIMEFORMAT.</p>
<p>HISTTIMEFORMAT takes format string of strftime. Check out the strftime manual to choose and construct the timestamp that suit your taste. I use “%F %T “, this outputs 2009-03-09 14:01.</p>
<p>Ok to illistrate how this works type</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">[user@server ~]$ history
    1  vi /etc/sysconfig/iptables
    2  su
    3  vi /etc/hosts
    4  ls
    5  su
    6  free -g
    7  yum search apache
    8  cat /proc/cpuinfo
    9  uname -r
   10  su</pre></div></div>

<p>Now run this</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">[user@server ~]$ export HISTTIMEFORMAT=&quot;%F %T &quot;</pre></div></div>

<p>Now if you run the history command you get this</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">[user@server ~]$ history
    1  2009-03-09 16:43:20 vi /etc/sysconfig/iptables
    2  2009-03-09 16:43:20 su
    3  2009-03-09 16:43:20 vi /etc/hosts
    4  2009-03-09 16:43:20 ls
    5  2009-03-09 16:43:20 su
    6  2009-03-09 16:43:20 free -g
    7  2009-03-09 16:43:20 yum search apache
    8  2009-03-09 16:43:20 cat /proc/cpuinfo
    9  2009-03-09 16:43:20 uname -r
   10  2009-03-09 16:43:20 su</pre></div></div>

<p>As you can see because these command were run before timestamps were stored they are all given the current date and time, after this they will be stamped correctly.</p>
<p>To make this permanente if you put the export into ~/.bash_profile as well as /root/.bash_profile. In case you do not have .bash_profile, you can choose to put into ~/.bashrc.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.specialistdevelopment.com/bash/history-with-a-timestamp/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

