<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Derwynd's Weblog</title>
	<atom:link href="http://derwynd.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://derwynd.com</link>
	<description>Just another WordPress.com weblog</description>
	<lastBuildDate>Fri, 05 Mar 2010 07:08:07 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='derwynd.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/476e114da567d2d92b9627dab0dd2f97?s=96&#038;d=http://s2.wp.com/i/buttonw-com.png</url>
		<title>Derwynd's Weblog</title>
		<link>http://derwynd.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://derwynd.com/osd.xml" title="Derwynd&#8217;s Weblog" />
	<atom:link rel='hub' href='http://derwynd.com/?pushpress=hub'/>
		<item>
		<title>File Password Protection</title>
		<link>http://derwynd.com/2010/03/05/file-password-protection/</link>
		<comments>http://derwynd.com/2010/03/05/file-password-protection/#comments</comments>
		<pubDate>Fri, 05 Mar 2010 07:04:41 +0000</pubDate>
		<dc:creator>derwynd</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://derwynd.com/?p=73</guid>
		<description><![CDATA[A &#62; How do I password protect / encrypt a file within Linux using OpenSSL ?
The file we will encrypt will be the file secretfile.txt.As you can see it is just a plain text file.
Encrypt File
Use the openssl comand to encrypt your file and then test the new file is fully encrypted.
$ openssl aes-256-cbc -salt [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=derwynd.com&blog=4330525&post=73&subd=derwynd&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p><strong>A &gt; <em>How do I password protect / encrypt a file within Linux using OpenSSL ?</em></strong></p>
<p>The file we will encrypt will be the file secretfile.txt.As you can see it is just a plain text file.</p>
<p><strong>Encrypt File</strong></p>
<p>Use the openssl comand to encrypt your file and then test the new file is fully encrypted.</p>
<p>$ openssl aes-256-cbc -salt -in secretfile.txt -out secretfile.txt.aes<br />
enter aes-256-cbc encryption password:<br />
Verifying &#8211; enter aes-256-cbc encryption password:</p>
<p>$  cat  secretfile.txt.aes<br />
binary data</p>
<p><strong>Decrypt File</strong></p>
<p>Decrypt the file and then confirm the decypted file is readable.</p>
<p>$  openssl aes-256-cbc -d -salt -in secretfile.txt.aes -out secretfile.txt<br />
enter aes-256-cbc decryption password:</p>
<p>$ cat secretfile.txt<br />
This is a secret file that we do not want anyone to read.</p>
<p><strong>B &gt; <em>How do I password protect / encrypt a file within Linux using Mcrypt ?</em></strong></p>
<p><strong>Encrypt File</strong></p>
<p>Use the mcrypt comand to encrypt your file and then test the new file is fully encrypted.</p>
<p>$ mcrypt secretfile.txt </p>
<p>Output:<br />
Enter the passphrase (maximum of 512 characters)<br />
Please use a combination of upper and lower case letters and numbers.<br />
Enter passphrase:<br />
Enter passphrase:</p>
<p>A new file is created with the extension .nc</p>
<p>$ ls secretfile.txt.nc </p>
<p><strong>Decrypt File</strong></p>
<p>Decrypt the file and then confirm the decypted file is readable.</p>
<p>$ mcrypt -d secretfile.txt.nc</p>
<p>Output:</p>
<p>Enter passphrase:<br />
File secretfile.txt.nc was decrypted.</p>
<p><strong>C &gt;<em> How do I password protect / encrypt a file within Linux using GPG ?</em></strong></p>
<p><strong>Encrypt File</strong></p>
<p>Use the gpg comand to encrypt your file and then test the new file is fully encrypted.</p>
<p>$ gpg -c secretfile.txt</p>
<p>Output:<br />
Enter passphrase:<br />
Repeat passphrase:</p>
<p>This will create a secretfile.txt.gpg file.</p>
<p><strong>Decrypt File</strong></p>
<p>Decrypt the file and then confirm the decypted file is readable.</p>
<p>$ gpg secretfile.txt.gpg</p>
<p>Decrypt file and write output to file </p>
<p>$ gpg secretfile.txt.gpg -o somefile.txt</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/derwynd.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/derwynd.wordpress.com/73/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/derwynd.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/derwynd.wordpress.com/73/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/derwynd.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/derwynd.wordpress.com/73/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/derwynd.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/derwynd.wordpress.com/73/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/derwynd.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/derwynd.wordpress.com/73/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=derwynd.com&blog=4330525&post=73&subd=derwynd&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://derwynd.com/2010/03/05/file-password-protection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/89de0963d0123cd6c2d3b997a3ac44d1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">derwynd</media:title>
		</media:content>
	</item>
		<item>
		<title>Building modules for rhel5 kernel</title>
		<link>http://derwynd.com/2010/01/14/building-modules-for-rhel5-kernel/</link>
		<comments>http://derwynd.com/2010/01/14/building-modules-for-rhel5-kernel/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 13:45:34 +0000</pubDate>
		<dc:creator>derwynd</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://derwynd.com/?p=71</guid>
		<description><![CDATA[Build modules for kernel instead of building the whole kernel
Download the kernel rpm
    $ rpm -ivh kernel-2.6.18-x.x.x.el5.src.rpm
    $ cd /usr/src/redhat/SPECS/
    $  rpmbuild -bp kernel-2.6.spec
will take some time but less than rebuilding the entire kernel hopefully
    $ cd /usr/src/redhat/BUILD/kernel-2.6.18/linux-2.6.18.x86_64
    $ [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=derwynd.com&blog=4330525&post=71&subd=derwynd&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>Build modules for kernel instead of building the whole kernel</p>
<p>Download the kernel rpm<br />
    $ rpm -ivh kernel-2.6.18-x.x.x.el5.src.rpm<br />
    $ cd /usr/src/redhat/SPECS/<br />
    $  rpmbuild -bp kernel-2.6.spec</p>
<p>will take some time but less than rebuilding the entire kernel hopefully<br />
    $ cd /usr/src/redhat/BUILD/kernel-2.6.18/linux-2.6.18.x86_64<br />
    $ cp /boot/config-2.6.18-x.x.x.el5 .config<br />
    $ make menuconfig</p>
<p>Here for examplepurpose i&#8217;m taking xfs and reiserfs module hopefully it works with whatever you chose<br />
* For xfs/reiserfs make sure to chose xfs and reiserfs as the module<br />
    $ make fs/xfs/xfs.ko<br />
In case of error run<br />
    $ make SUBDIRS=fs/xfs/ modules<br />
and rerun<br />
    $ make fs/xfs/xfs.ko<br />
    $ mkdir -p /lib/modules/`uname -r`/kernel/fs/xfs<br />
Copy the module into the /lib/modules/`uname -r`/kernel/fs/xfs<br />
    $ cp fs/xfs/xfs.ko /lib/modules/`uname -r`/kernel/fs/xfs<br />
    $ make fs/reiserfs/reiserfs.ko<br />
In case of error run<br />
    $ make SUBDIRS=fs/reiserfs/ modules<br />
and rerun<br />
    $ make fs/reiserfs/reiserfs.ko<br />
    $ mkdir -p /lib/modules/`uname -r`/kernel/fs/reiserfs<br />
Copy the module into the /lib/modules/`uname -r`/kernel/fs/reiserfs<br />
    $ cp fs/xfs/xfs.ko /lib/modules/`uname -r`/kernel/fs/reiserfs</p>
<p>Change permissions<br />
    $ chmod 744 /lib/modules/`uname -r`/kernel/fs/reiserfs/reiserfs.ko<br />
    $ chmod 744 /lib/modules/`uname -r`/kernel/fs/xfs/xfs.ko</p>
<p>insmod the required module<br />
    $ insmod /lib/modules/`uname -r`/kernel/fs/reiserfs/reiserfs.ko<br />
    $ insmod /lib/modules/`uname -r`/kernel/fs/xfs/xfs.ko<br />
Make entry into /etc/modules.conf<br />
    $ echo &#8220;install reiserfs /sbin/insmod /lib/modules/2.6.18-x.x.x.el5/kernel/fs/reiserfs/reiserfs.ko &#8221; &gt;&gt; /etc/modules.conf<br />
    $ echo &#8220;install xfs /sbin/insmod /lib/modules/2.6.18-x.x.x.el5/kernel/fs/xfs/xfs.ko &#8221; &gt;&gt; /etc/modules.conf</p>
<p>    $ modprobe reiserfs<br />
    $ modprobe xfs<br />
    $ depmod -a<br />
Should be done hopefully </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/derwynd.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/derwynd.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/derwynd.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/derwynd.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/derwynd.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/derwynd.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/derwynd.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/derwynd.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/derwynd.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/derwynd.wordpress.com/71/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=derwynd.com&blog=4330525&post=71&subd=derwynd&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://derwynd.com/2010/01/14/building-modules-for-rhel5-kernel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/89de0963d0123cd6c2d3b997a3ac44d1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">derwynd</media:title>
		</media:content>
	</item>
		<item>
		<title>Open SSL help</title>
		<link>http://derwynd.com/2010/01/14/open-ssl-help/</link>
		<comments>http://derwynd.com/2010/01/14/open-ssl-help/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 11:23:15 +0000</pubDate>
		<dc:creator>derwynd</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://derwynd.com/?p=67</guid>
		<description><![CDATA[General OpenSSL Commands
These commands allow you to generate CSRs, Certificates, Private Keys and do other miscellaneous tasks.
    * Generate a new private key and Certificate Signing Request
     #  openssl req -out CSR.csr -pubkey -new -keyout privateKey.key
    * Generate a self-signed certificate
    [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=derwynd.com&blog=4330525&post=67&subd=derwynd&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>General OpenSSL Commands</p>
<p>These commands allow you to generate CSRs, Certificates, Private Keys and do other miscellaneous tasks.</p>
<p>    * Generate a new private key and Certificate Signing Request</p>
<p>     #  openssl req -out CSR.csr -pubkey -new -keyout privateKey.key</p>
<p>    * Generate a self-signed certificate</p>
<p>     # openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout privateKey.key -out certificate.crt</p>
<p>    * Generate a certificate signing request (CSR) for an existing private key</p>
<p>     # openssl req -out CSR.csr -key privateKey.key -new</p>
<p>    * Generate a certificate signing request based on an existing certificate</p>
<p>     # openssl x509 -x509toreq -in certificate.crt -out CSR.csr -signkey privateKey.key</p>
<p>    * Remove a passphrase from a private key</p>
<p>     # openssl rsa -in privateKey.pem -out newPrivateKey.pem</p>
<p>Checking Using OpenSSL</p>
<p>If you need to check the information within a Certificate, CSR or Private Key, use these commands. You can also check CSRs and check certificates using our online tools.</p>
<p>    * Check a Certificate Signing Request (CSR)</p>
<p>     #  openssl req -text -noout -verify -in CSR.csr</p>
<p>    * Check a private key</p>
<p>     #  openssl rsa -in privateKey.key -check</p>
<p>    * Check a certificate</p>
<p>      # openssl x509 -in certificate.crt -text -noout</p>
<p>    * Check a PKCS#12 file (.pfx or .p12)</p>
<p>     #  openssl pkcs12 -info -in keyStore.p12</p>
<p>Debugging Using OpenSSL</p>
<p>If you are receiving an error that the private doesn’t match the certificate or that a certificate that you installed to a site is not trusted, try one of these commands. If you are trying to verify that an SSL certificate is installed correctly, be sure to check out the SSL Checker.</p>
<p>    * Check an MD5 hash of the public key to ensure that it matches with what is in a CSR or private key</p>
<p>    #  openssl x509 -noout -modulus -in certificate.crt | openssl md5openssl rsa -noout -modulus -in privateKey.key | openssl md5openssl req -noout -modulus -in CSR.csr | openssl md5</p>
<p>    * Check an SSL connection. All the certificates (including Intermediates) should be displayed</p>
<p>     # openssl s_client -connect www.paypal.com:443</p>
<p>Converting Using OpenSSL</p>
<p>These commands allow you to convert certificates and keys to different formats to make them compatible with specific types of servers or software. For example, you can convert a normal PEM file that would work with Apache to a PFX (PKCS#12) file and use it with Tomcat or IIS. Use our SSL Converter to convert certificates without messing with OpenSSL.</p>
<p>    * Convert a DER file (.crt .cer .der) to PEM</p>
<p>       # openssl x509 -inform der -in certificate.cer -out certificate.pem</p>
<p>    * Convert a PEM file to DER</p>
<p>      # openssl x509 -outform der -in certificate.pem -out certificate.der</p>
<p>    * Convert a PKCS#12 file (.pfx .p12) containing a private key and certificates to PEM</p>
<p>      # openssl pkcs12 -in keyStore.pfx -out keyStore.pem -nodes</p>
<p>      You can add -nocerts to only output the private key or add -nokeys to only output the certificates.<br />
    * Convert a PEM certificate file and a private key to PKCS#12 (.pfx .p12)</p>
<p>      # openssl pkcs12 -export -out certificate.pfx -inkey privateKey.key -in certificate.crt -certfile CACert.crt</p>
<p>    * To test SSL connections to a mail server, use the openssl command with the s_client parameter:</p>
<p>      # openssl s_client -connect smtp.myhost.com:25 -starttls smtp</p>
<p>This essentially opens a telnet-like connection to smtp.myhost.com on port 25 using the STARTTLS extension. This is an interactive session, so you can send commands to the remote SMTP server as well as view the certificate used, view the details of the SSL session, and more. To test SMTP over SSL, don&#8217;t use the -starttls option:</p>
<p>      # openssl s_client -connect smtp.myhost.com:465</p>
<p>    * The above can also be used to connect to any service that uses SSL, such as HTTPS (port 443), POP3 over SSL (port 995), and so forth.</p>
<p>    * The openssl command can also be used to create digests of a file, which can be used to verify that a file has not been tampered with:</p>
<p>      # echo &#8220;test file&#8221;&gt; foo.txt</p>
<p>      # openssl dgst -md5 foo.txt</p>
<p>      MD5(foo.txt)= b05403312f66bdc8ccc597fedf6cd5fe</p>
<p>      # openssl dgst -sha1 foo.txt</p>
<p>      SHA1(foo.txt)= 0181d93fff60b818g3f92e470ea97a2aff4ca56a</p>
<p>    * To view the other message digests that can be used, look at the output of openssl list-message-digest-commands.</p>
<p>    * You can also use openssl to encrypt files. To view the list of available ciphers, use openssl list-cipher-commands. Once you&#8217;ve chosen a cipher to use, you can encrypt the file using the following commands:</p>
<p>      # openssl enc -aes-256-cbc -salt -in foo.txt -out foo.enc</p>
<p>      enter aes-256-cbc encryption password:</p>
<p>      Verifying &#8211; enter aes-256-cbc encryption password:</p>
<p>      # file foo.enc</p>
<p>      foo.enc: data</p>
<p>      # cat foo.enc</p>
<p>      Salted__yvi{!e????i&#8221;Yt?;(Ѱ e%<br />
      # openssl enc -d -aes-256-cbc -in foo.enc</p>
<p>      enter aes-256-cbc decryption password:</p>
<p>      test file</p>
<p>In the above example, the file foo.txt was encrypted using 256-bit AES in CBC mode, the encrypted copy being saved as the file foo.enc. Looking at the contents of the file provide gibberish. Decrypting the file is done using the -d option; however, keep in mind that not only do you need to remember the password, you also need to know the cipher used.</p>
<p>As you can see, OpenSSL provides more than just a library for other applications to use, and the openssl command-line binary is a powerful program in its own right, allowing for many uses.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/derwynd.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/derwynd.wordpress.com/67/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/derwynd.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/derwynd.wordpress.com/67/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/derwynd.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/derwynd.wordpress.com/67/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/derwynd.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/derwynd.wordpress.com/67/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/derwynd.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/derwynd.wordpress.com/67/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=derwynd.com&blog=4330525&post=67&subd=derwynd&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://derwynd.com/2010/01/14/open-ssl-help/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/89de0963d0123cd6c2d3b997a3ac44d1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">derwynd</media:title>
		</media:content>
	</item>
		<item>
		<title>Extracting certificates from java keystore to use in apache.conf</title>
		<link>http://derwynd.com/2010/01/14/extracting-certificates-from-java-keystore-to-use-in-apache-conf/</link>
		<comments>http://derwynd.com/2010/01/14/extracting-certificates-from-java-keystore-to-use-in-apache-conf/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 11:14:53 +0000</pubDate>
		<dc:creator>derwynd</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://derwynd.com/?p=65</guid>
		<description><![CDATA[So you have a javakeystore and want to extract the certificate&#8230;.
heres what I did .. of course I had the passphrase 
Downloaded &#8230;.
$ java-1.6.0-openjdk-1.6.0.0-0.25.b09.el5.x86_64.rpm
$ rpm -ivh java-1.6.0-openjdk-1.6.0.0-0.25.b09.el5.x86_64.rpm	
$ cd /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/bin/keytool
and
$ ./keytool -importkeystore -srckeystore /opt/certs/final/NetworthKeyStore -destkeystore /tmp/mystore.p12 -srcstoretype JKS -deststoretype PKCS12   -noprompt
Enter destination keystore password:
Re-enter new password:
Enter source keystore password:
Entry for alias networthpnbkey successfully imported.
Import [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=derwynd.com&blog=4330525&post=65&subd=derwynd&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>So you have a javakeystore and want to extract the certificate&#8230;.</p>
<p>heres what I did .. of course I had the passphrase </p>
<p>Downloaded &#8230;.<br />
$ java-1.6.0-openjdk-1.6.0.0-0.25.b09.el5.x86_64.rpm</p>
<p>$ rpm -ivh java-1.6.0-openjdk-1.6.0.0-0.25.b09.el5.x86_64.rpm	</p>
<p>$ cd /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/bin/keytool</p>
<p>and<br />
$ ./keytool -importkeystore -srckeystore /opt/certs/final/NetworthKeyStore -destkeystore /tmp/mystore.p12 -srcstoretype JKS -deststoretype PKCS12   -noprompt</p>
<p>Enter destination keystore password:<br />
Re-enter new password:<br />
Enter source keystore password:<br />
Entry for alias networthpnbkey successfully imported.<br />
Import command completed:  1 entries successfully imported, 0 entries failed or cancelled</p>
<p>where KeyStore is the java keystore name</p>
<p>So I got a  /tmp/mystore.p12 with everything  great<br />
 now for some ssl magic<br />
$ openssl pkcs12 -info -in /tmp/mystore.p12</p>
<p>Enter Import Password:<br />
MAC Iteration 1024<br />
MAC verified OK<br />
PKCS7 Data<br />
Shrouded Keybag: pbeWithSHA1And3-KeyTripleDES-CBC, Iteration 1024<br />
Bag Attributes<br />
    friendlyName: pubkey<br />
    localKeyID: 52 69 3D 69 50 41 22 69 33 34 36 36 32 34 34 36 30 35<br />
Key Attributes:<br />
Enter PEM pass phrase:<br />
Verifying &#8211; Enter PEM pass phrase:</p>
<p>Copy the following from output&#8230;&#8230;.</p>
<p>&#8212;&#8211;BEGIN RSA PRIVATE KEY&#8212;&#8211;<br />
Proc-Type: 4,ENCRYPTED<br />
DEK-Info: DES-EDE3-CBC,FE731BD9D499A31B</p>
<p>d12tLvqVX0a3FxOba+uwCiJIxEC8dESEI9GI5Doz1hieu8pZKoz3bwozDBLfLlFA<br />
lvPj4Qi2FmazrZWRTNHQOUcv4aVQ1TmauRtw/LMoieR0b4+VkqTzk/eAe6d3pfr/<br />
BoZxs40f0YaYsgMyYj0HWOIFXmCZnfEgzQBVZPIqcUzBxrV4g7xwjbLBXHJ+wAv+<br />
p+3/ejYvxz/lfn+Nd00TlUZu770wPlRzQT4hwjWuNVfmadA+FpBMk4uW8dDSEMMc<br />
KyW2Qg2nLfXlxMxLIb7DB86eJUS5W5bAHi1S5RNiSNRxXkFZP4xIKnoamsQqoGg7<br />
o1zlVjRo3R/wh7idgLKDSUXX07qHhfOObEem3lbAbu6WuvpPW1Qy8Cr8N4aqHhBW<br />
VvBzyvwajE0yBD9cQSPDZnLhWqu4z9MpQLexSHV398Yd/iOnnTmWnxVxhuINaJr0<br />
40aZ9YsU7EpuCsaJ4Ifuu4Zu5LdC2G+KqRw/RvcLyPc5ie7AB2/mox1qH14W9d60<br />
FZFCd8ZDpS7eNkUMx2qyWRKoaBdkPLp1baY8BWLZR2N7z59RkjGMfQsUpSCArgE/<br />
63+BdMMSqFsRWKfWAWIqFshp/Q7AUdr0Dgftj9A3Ao6i6qA9HGB2MwomH/LXaoxl<br />
759dFjWBMcJ3Fj1+eqoRZWw/+MdZhADhIyTEiksP8FJ8EXrEmalT+jIqVaxVPH51<br />
WnQhGmTXvu3YU99NCpgyTjUo7z3OPyAT5z4QT6PdcPOXM5wR90ExR1YnxTnHLuwE<br />
KhictV+isaH8xAPGB3okffvtYqS/xSubJ88MP5VPfEOvUkGAmqFj4A==<br />
&#8212;&#8211;END RSA PRIVATE KEY&#8212;&#8211;</p>
<p>&#8212;&#8211;BEGIN CERTIFICATE&#8212;&#8211;<br />
MIIB4DCCAUkCAQAwgZ8xCzAJBgNVBAYTAkdCMRYwFAYDVQQIEw1XZXN0IE1pZGxh<br />
bmRzMREwDwYDVQQHEwhDb3ZlbnRyeTETMBEGAAUEChMKUGxhbmV0bGFyZzEUMBIG<br />
HBiePsg26oDwlQ5XOvi+jslQN+u6CQo2rlzMn4OoKrBufp3g2IgRrrwRSxOLpJeX<br />
A1UECxMLSURDIHN1cHBvcnQxFzAVBgNVBAMTDnd3dy5kb21haW4uY29tMSEwHwYJ<br />
KoZIhvcNAQkBFhJpZGNAcGxhbmV0bGFyZy5uZXQwgZ8wDQYJKoZIhvcNAQEBBQAD<br />
gY0AMIGJAoGBAMQt4q36X3KQ5795HeQSl5D57TAHOeRGw9kEb8WWjZCaCNCFeXU4<br />
XB4ZleozGJVvlhcua1fSSWuEhZOWms5y628sMud5YuxG/rrXrDM4tkNHwsLob3yo<br />
2+5fZyZvopWnWs9Z+Vz/GbOJJvtgkngnVm3rP3cbHEmaWXCzIVgUWPYJAgMBAAGg<br />
ADANBgkqhkiG9w0BAQUFAAOBgQB2rRr2bc+3iQEGvc5zSr9/nw1YBCGJBfMThe+V<br />
KoZIhvcNAQkBFhJpZGNAcGxhbmV0bGFyZy5uZXQwgZ8wDQYJKoZIhvcNAQEBBQAD<br />
A1UECxMLSURDIHN1cHBvcnQxFzAVBgNVBAMTDnd3dy5kb21haW4uY29tMSEwHwYJ<br />
ADANBgkqhkiG9w0BAQUFAAOBgQB2rRr2bc+3iQEGvc5zSr9/nw1YBCGJBfMThe+V<br />
bmRzMREwDwYDVQQHEwhDb3ZlbnRyeTETMBEGAAUEChMKUGxhbmV0bGFyZzEUMBIG<br />
WdIpJN6cONDEF8hXtEKbpSmeu7ioUsLWDiQJ/Vab/XR9Uz9gsjs7ztm6ZTFhlYUD<br />
HBiePsg26oDwlQ5XOvi+jslQN+u6CQo2rlzMn4OoKrBufp3g2IgRrrwRSxOLpJeX<br />
KaAO32si+7euiprm79a3CcRrWSjpfKX6FhkGIu9BbQ==<br />
&#8212;&#8211;END CERTIFICATE&#8212;&#8211;</p>
<p>Go ahead and import in your apache config</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/derwynd.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/derwynd.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/derwynd.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/derwynd.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/derwynd.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/derwynd.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/derwynd.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/derwynd.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/derwynd.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/derwynd.wordpress.com/65/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=derwynd.com&blog=4330525&post=65&subd=derwynd&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://derwynd.com/2010/01/14/extracting-certificates-from-java-keystore-to-use-in-apache-conf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/89de0963d0123cd6c2d3b997a3ac44d1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">derwynd</media:title>
		</media:content>
	</item>
		<item>
		<title>What is bonding?</title>
		<link>http://derwynd.com/2010/01/06/what-is-bonding/</link>
		<comments>http://derwynd.com/2010/01/06/what-is-bonding/#comments</comments>
		<pubDate>Wed, 06 Jan 2010 09:55:27 +0000</pubDate>
		<dc:creator>derwynd</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://derwynd.com/?p=61</guid>
		<description><![CDATA[What is bonding?
The Linux bonding driver provides a method for aggregating multiple network interfaces into a single logical &#8220;bonded&#8221; interface.
The behavior of the bonded interfaces depends upon the mode; generally speaking, modes provide either hot standby or load balancing services.
Additionally, link integrity monitoring may be performed. 
ie you can aggregate three megabits ports (1 mb [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=derwynd.com&blog=4330525&post=61&subd=derwynd&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>What is bonding?<br />
The Linux bonding driver provides a method for aggregating multiple network interfaces into a single logical &#8220;bonded&#8221; interface.<br />
The behavior of the bonded interfaces depends upon the mode; generally speaking, modes provide either hot standby or load balancing services.<br />
Additionally, link integrity monitoring may be performed. </p>
<p>ie you can aggregate three megabits ports (1 mb each) into a three-megabits trunk port.<br />
That is equivalent with having one interface with three megabits speed.</p>
<p>This small howto will try to cover the most used bonding types.<br />
The following script will configure a bond interface (bond0) using two ethernet interface (eth0 and eth1). </p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
#!/bin/bash<br />
set -x<br />
# 1: Create a bond0 configuration file<br />
touch /etc/sysconfig/network-scripts/ifcfg-bond0<br />
echo &#8220;DEVICE=bond0<br />
IPADDR=192.168.x.x<br />
NETWORK=192.168.0.0<br />
NETMASK=255.255.255.0<br />
USERCTL=no<br />
BOOTPROTO=static<br />
ONBOOT=yes&#8221; &gt; /etc/sysconfig/network-scripts/ifcfg-bond0</p>
<p># 2: Modify eth0 and eth1 config files:<br />
echo &#8220;USERCTL=no<br />
MASTER=bond0<br />
SLAVE=yes&#8221; &gt;&gt; /etc/sysconfig/network-scripts/ifcfg-eth0<br />
echo &#8220;USERCTL=no<br />
MASTER=bond0<br />
SLAVE=yes&#8221; &gt;&gt; /etc/sysconfig/network-scripts/ifcfg-eth1<br />
sed -i &#8217;s/ONBOOT=.*/ONBOOT=yes/g&#8217; /etc/sysconfig/network-scripts/ifcfg-eth0<br />
sed -i &#8217;s/ONBOOT=.*/ONBOOT=yes/g&#8217; /etc/sysconfig/network-scripts/ifcfg-eth1<br />
sed -i &#8217;s/BOOTPROTO=.*/BOOTPROTO=static/g&#8217; /etc/sysconfig/network-scripts/ifcfg-eth0<br />
sed -i &#8217;s/BOOTPROTO=.*/BOOTPROTO=static/g&#8217; /etc/sysconfig/network-scripts/ifcfg-eth1</p>
<p># 3: Load bond driver/module<br />
echo &#8220;alias bond0 bonding<br />
options bond0 mode=1 miimon=100&#8243; &gt;&gt; /etc/modprobe.conf</p>
<p># 4: Test configuration<br />
modprobe bonding<br />
service network restart<br />
sleep 2<br />
cat /proc/net/bonding/bond0<br />
echo &#8221; ifconfig  for bonding&#8221;<br />
/sbin/ifconfig | grep bond</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>You can set up your bond interface mode according to your needs. Changing one parameter (mode=X) in /etc/modeprobe.conf you can have the following bonding types:</p>
<p>* mode=0 (balance-rr or 0)<br />
Round-robin policy: Transmit packets in sequential order from the first available slave through the last. This mode provides load balancing and fault tolerance.</p>
<p>* mode=1 (active-backup or 1)<br />
Active-backup policy: Only one slave in the bond is active. A different slave becomes active if, and only if, the active slave fails. The bond&#8217;s MAC address is externally visible on only one port (network adapter) to avoid confusing the switch. This mode provides fault tolerance. The primary option affects the behavior of this mode.</p>
<p>* mode=2 (balance-xor or 2)<br />
XOR policy: Transmit based on [(source MAC address XOR'd with destination MAC address) modulo slave count]. This selects the same slave for each destination MAC address. This mode provides load balancing and fault tolerance.</p>
<p>* mode=3 (broadcast or 3)<br />
Broadcast policy: transmits everything on all slave interfaces. This mode provides fault tolerance.</p>
<p>* mode=4 (802.3ad or 4)<br />
IEEE 802.3ad Dynamic link aggregation. Creates aggregation groups that share the same speed and duplex settings. Utilizes all slaves in the active aggregator according to the 802.3ad specification.</p>
<p>	Pre-requisites:<br />
	1. Ethtool support in the base drivers for retrieving<br />
	the speed and duplex of each slave.<br />
	2. A switch that supports IEEE 802.3ad Dynamic link<br />
	aggregation.<br />
	Most switches will require some type of configuration<br />
	to enable 802.3ad mode.</p>
<p>* mode=5 (balance-tlb or 5)<br />
Adaptive transmit load balancing: channel bonding that does not require any special switch support. The outgoing traffic is distributed according to the current load (computed relative to the speed) on each slave. Incoming traffic is received by the current slave. If the receiving slave fails, another slave takes over the MAC address of the failed receiving slave.</p>
<p>	Prerequisite:<br />
	Ethtool support in the base drivers for retrieving the<br />
	speed of each slave.</p>
<p>* mode=6 (balance-alb or 6)<br />
Adaptive load balancing: includes balance-tlb plus receive load balancing (rlb) for IPV4 traffic, and does not require any special switch support. The receive load balancing is achieved by ARP negotiation. The bonding driver intercepts the ARP Replies sent by the local system on their way out and overwrites the source hardware address with the unique hardware address of one of the slaves in the bond such that different peers use different hardware addresses for the server.</p>
<p>The contents of the ifcfg-bondX file is as follows:</p>
<p>BOOTPROTO=&#8221;static&#8221;<br />
BROADCAST=&#8221;10.0.2.255&#8243;<br />
IPADDR=&#8221;10.0.2.10&#8243;<br />
NETMASK=&#8221;255.255.0.0&#8243;<br />
NETWORK=&#8221;10.0.2.0&#8243;<br />
REMOTE_IPADDR=&#8221;"<br />
STARTMODE=&#8221;onboot&#8221;<br />
BONDING_MASTER=&#8221;yes&#8221;<br />
BONDING_MODULE_OPTS=&#8221;mode=active-backup miimon=100&#8243;<br />
BONDING_SLAVE0=&#8221;eth0&#8243;<br />
BONDING_SLAVE1=&#8221;bus-pci-0000:06:08.1&#8243;</p>
<p>Replace the sample BROADCAST, IPADDR, NETMASK and NETWORK values with the appropriate values for your network.</p>
<p>Notes:<br />
	* For later versions of initscripts, such as that found with Fedora 7 and Red Hat Enterprise Linux version 5 (or later), it is possible, and, indeed, preferable, to specify the bonding options in the ifcfg-bond0 file, e.g. a line of the format:</p>
<p>BONDING_OPTS=&#8221;mode=active-backup arp_interval=60 arp_ip_target=+192.168.1.254&#8243;</p>
<p>    * To restore your slaves MAC addresses, you need to detach them from the bond (`ifenslave -d bond0 eth0&#8242;). The bonding driver will then restore the MAC addresses that the slaves had before they were enslaved.<br />
    * The bond MAC address will be the taken from its first slave device.<br />
    * Promiscous mode: According to your bond type, when you put the bond interface in the promiscous mode it will propogates the setting to the slave devices as follow:<br />
          o for mode=0,2,3 and 4 the promiscuous mode setting is propogated to all slaves.<br />
          o for mode=1,5 and 6 the promiscuous mode setting is propogated only to the active slave.<br />
            For balance-tlb mode the active slave is the slave currently receiving inbound traffic, for balance-alb mode the active slave is the slave used as a &#8220;primary.&#8221; and for the active-backup, balance-tlb and balance-alb modes, when the active slave changes (e.g., due to a link failure), the promiscuous setting will be propogated to the new active slave.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/derwynd.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/derwynd.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/derwynd.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/derwynd.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/derwynd.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/derwynd.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/derwynd.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/derwynd.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/derwynd.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/derwynd.wordpress.com/61/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=derwynd.com&blog=4330525&post=61&subd=derwynd&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://derwynd.com/2010/01/06/what-is-bonding/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/89de0963d0123cd6c2d3b997a3ac44d1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">derwynd</media:title>
		</media:content>
	</item>
		<item>
		<title>Xen rescue paravirtualization</title>
		<link>http://derwynd.com/2010/01/06/xen-rescue-paravirtualization/</link>
		<comments>http://derwynd.com/2010/01/06/xen-rescue-paravirtualization/#comments</comments>
		<pubDate>Wed, 06 Jan 2010 08:11:06 +0000</pubDate>
		<dc:creator>derwynd</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://derwynd.com/?p=58</guid>
		<description><![CDATA[===Rescue===
Shut down the GuestOS safely by logging into the GuestOS and issuing the command poweroff or 

$ xm shutdown alfa

Copy or download the &#8221;&#8217;initrd.img&#8221;&#8217; and &#8221;&#8217;vmlinuz&#8221;&#8217; files from /images/xen/ directory of Red Hat Enterprise Linux install media tree to Red Hat Enterprise Linux Virtualization Host. In this test case these files are copied to the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=derwynd.com&blog=4330525&post=58&subd=derwynd&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>===Rescue===</p>
<p>Shut down the GuestOS safely by logging into the GuestOS and issuing the command poweroff or </p>
<pre>
$ xm shutdown alfa
</pre>
<p>Copy or download the &#8221;&#8217;initrd.img&#8221;&#8217; and &#8221;&#8217;vmlinuz&#8221;&#8217; files from /images/xen/ directory of Red Hat Enterprise Linux install media tree to Red Hat Enterprise Linux Virtualization Host. In this test case these files are copied to the directory &#8221;&#8217;/var/lib/xen/images/tmp/&#8221;&#8217; of the Virtualization host.</p>
<p>Modify the GuestOS configuration file on the Virtualization Host itself to enable boot it from rescue environment. In this test case the GuesOS in question is called alfa and its configuration file is /etc/xen/alfa</p>
<p>1. copy the config file &#8221;&#8217;/etc/xen/alfa&#8221;&#8217; to &#8221;&#8217;/etc/xen/alfa_rescue&#8221;&#8217;</p>
<p>2. In the config file &#8221;&#8217;/etc/xen/alfa_rescue&#8221;&#8217;, comment the bootloader line: </p>
<pre>#bootloader="/usr/bin/pygrub"</pre>
<p>3. Append the following to the configuration before the &#8221;&#8217;disk =&#8221;&#8217; line file temporarily and save it.</p>
<pre>
kernel = "/var/lib/xen/images/tmp/vmlinuz"
ramdisk = "/var/lib/xen/images/tmp/initrd.img"
extra = "rescue"
</pre>
<p>4. Sample</p>
<pre>
name = "alfa"
uuid = "96b6da3e-70a7-a0a0-7c68-67a0f83d8264"
maxmem = 512
memory = 512
vcpus = 1
#bootloader = "/usr/bin/pygrub"
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
vfb = [  ]
kernel = "/var/lib/xen/images/tmp/vmlinuz"
ramdisk = "/var/lib/xen/images/tmp/initrd.img"
extra = "rescue"
disk = [ "tap:aio:/var/lib/xen/images/alfa.img,xvda,w" ]
vif = [ "mac=00:16:3e:13:62:2f,bridge=xenbr0" ]
</pre>
<p>5. Re-create (start) the GuestOS with xm command </p>
<pre>
 xm create -c alfa_rescue
</pre>
<p>6.</p>
<pre>
                   +---------+ Choose a Language +---------+
                   |                                       |
                   | What language would you like to use   |
                   | during the installation process?      |
                   |                                       |
                   |       Catalan                ^        |
                   |       Chinese(Simplified)    :        |
                   |       Chinese(Traditional)   #        |
                   |       Croatian               :        |
                   |       Czech                  :        |
                   |       Danish                 :        |
                   |       Dutch                  :        |
                   |       English                v        |
                   |                                       |
                   |                +----+                 |
                   |                | OK |                 |
                   |                +----+                 |
                   |                                       |
                   |                                       |
                   +---------------------------------------+
</pre>
<p>7. Chose HTTP</p>
<pre>
               +---------------+ Rescue Method +----------------+
               |                                                |
               | What type of media contains the rescue image?  |
               |                                                |
               |                  Local CDROM                   |
               |                  Hard drive                    |
               |                  NFS image                     |
               |                  FTP                           |
               |                  HTTP                          |
               |                                                |
               |        +----+                 +------+         |
               |        | OK |                 | Back |         |
               |        +----+                 +------+         |
               |                                                |
               |                                                |
               +------------------------------------------------+
</pre>
<p>8. Set IP</p>
<pre>
             +----------------+ Configure TCP/IP +----------------+
             |                                                    |
             | [*] Enable IPv4 support                            |
             |        ( ) Dynamic IP configuration (DHCP)         |
             |        (*) Manual configuration                    |
             |                                                    |
             | [ ] Enable IPv6 support                            |
             |        (*) Automatic neighbor discovery (RFC 2461) |
             |        ( ) Dynamic IP configuration (DHCP)         |
             |        ( ) Manual configuration                    |
             |                                                    |
             |          +----+                  +------+          |
             |          | OK |                  | Back |          |
             |          +----+                  +------+          |
             |                                                    |
             |                                                    |
             +----------------------------------------------------+
</pre>
<pre>
         +--------------+ Manual TCP/IP Configuration +---------------+
         |                                                            |
         | Enter the IPv4 and/or the IPv6 address and prefix          |
         | (address / prefix).  For IPv4, the dotted-quad netmask     |
         | or the CIDR-style prefix are acceptable. The gateway and   |
         | name server fields must be valid IPv4 or IPv6 addresses.   |
         |                                                            |
         | IPv4 address: 192.168.y.yy__ / 255.255.255.0_____          |
         | Gateway:      192.168.z.zz____________________________    |
         | Name Server:  192.168.z.zz____________________________    |
         |                                                            |
         |            +----+                      +------+            |
         |            | OK |                      | Back |            |
         |            +----+                      +------+            |
         |                                                            |
         |                                                            |
         +------------------------------------------------------------+
</pre>
<p>9. Http setting</p>
<pre>
    +---------------------------+ HTTP Setup +----------------------------+
    |                                                                     |
    |           Please enter the following information:                   |
    |                                                                     |
    |               o the name or IP number of your Web server            |
    |               o the directory on that server containing             |
    |                 Red Hat Enterprise Linux Server for                 |
    |           your architecture                                         |
    |                                                                     |
    | Web site name:                             192.168.x.x___________ |
    | Red Hat Enterprise Linux Server directory: rhelxxx_________________ |
    |                                                                     |
    |              +----+                           +------+              |
    |              | OK |                           | Back |              |
    |              +----+                           +------+              |
    |                                                                     |
    |                                                                     |
    +---------------------------------------------------------------------+
</pre>
<p>10. Rescue</p>
<pre>
            +---------------------+ Rescue +----------------------+
            |                                                     |
            | The rescue environment will now attempt to find   ^ |
            | your Linux installation and mount it under the    # |
            | directory /mnt/sysimage.  You can then make any   : |
            | changes required to your system.  If you want     : |
            | to proceed with this step choose 'Continue'.      : |
            | You can also choose to mount your file systems    : |
            | read-only instead of read-write by choosing       : |
            | 'Read-Only'.                                      : |
            |                                                   : |
            | If for some reason this process fails you can     : |
            | choose 'Skip' and this step will be skipped and   : |
            | you will go directly to a command shell.          v |
            |                                                     |
            |   +----------+      +-----------+      +------+     |
            |   | Continue |      | Read-Only |      | Skip |     |
            |   +----------+      +-----------+      +------+     |
            |                                                     |
            |                                                     |
            +-----------------------------------------------------+
</pre>
<pre>
                  +---------------+ Rescue +----------------+
                  |                                         |
                  | Your system has been mounted under      |
                  | /mnt/sysimage.                          |
                  |                                         |
                  | Press  to get a shell. If you   |
                  | would like to make your system the      |
                  | root environment, run the command:      |
                  |                                         |
                  |         chroot /mnt/sysimage            |
                  |                                         |
                  | The system will reboot automatically    |
                  | when you exit from the shell.           |
                  |                                         |
                  |                 +----+                  |
                  |                 | OK |                  |
                  |                 +----+                  |
                  |                                         |
                  |                                         |
                  +-----------------------------------------+
</pre>
<pre>
Your system is mounted under the /mnt/sysimage directory.
When finished please exit from the shell and your system will reboot.

sh-3.2#
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/derwynd.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/derwynd.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/derwynd.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/derwynd.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/derwynd.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/derwynd.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/derwynd.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/derwynd.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/derwynd.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/derwynd.wordpress.com/58/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=derwynd.com&blog=4330525&post=58&subd=derwynd&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://derwynd.com/2010/01/06/xen-rescue-paravirtualization/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/89de0963d0123cd6c2d3b997a3ac44d1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">derwynd</media:title>
		</media:content>
	</item>
		<item>
		<title>flash player on firfox 64 bit</title>
		<link>http://derwynd.com/2009/12/05/flash-player-on-firfox-64-bit/</link>
		<comments>http://derwynd.com/2009/12/05/flash-player-on-firfox-64-bit/#comments</comments>
		<pubDate>Sat, 05 Dec 2009 04:58:48 +0000</pubDate>
		<dc:creator>derwynd</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://derwynd.com/?p=56</guid>
		<description><![CDATA[After upgrading my firefox found out the flash was not working.
Downloaded libflashplayer-10.0.32.18.linux-x86_64.so.tar.gz from Adobe site
This contains libflashplayer.so
Just copy it to /usr/lib64/mozilla/plugins/
Restart browser and check.
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=derwynd.com&blog=4330525&post=56&subd=derwynd&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>After upgrading my firefox found out the flash was not working.</p>
<p>Downloaded libflashplayer-10.0.32.18.linux-x86_64.so.tar.gz from Adobe site<br />
This contains libflashplayer.so</p>
<p>Just copy it to /usr/lib64/mozilla/plugins/<br />
Restart browser and check.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/derwynd.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/derwynd.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/derwynd.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/derwynd.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/derwynd.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/derwynd.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/derwynd.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/derwynd.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/derwynd.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/derwynd.wordpress.com/56/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=derwynd.com&blog=4330525&post=56&subd=derwynd&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://derwynd.com/2009/12/05/flash-player-on-firfox-64-bit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/89de0963d0123cd6c2d3b997a3ac44d1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">derwynd</media:title>
		</media:content>
	</item>
		<item>
		<title>Samba4 HOWTO + Fedora</title>
		<link>http://derwynd.com/2009/04/06/samba4-howto-fedora/</link>
		<comments>http://derwynd.com/2009/04/06/samba4-howto-fedora/#comments</comments>
		<pubDate>Mon, 06 Apr 2009 05:29:23 +0000</pubDate>
		<dc:creator>derwynd</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://derwynd.com/2009/04/06/samba4-howto-fedora/</guid>
		<description><![CDATA[ $ cd samba-master/
 $ rm .git/objects/info/alternates
 $ rm .git/refs/tags/*
 $ rm -r .git/refs/remotes/
 $ git config remote.origin.url git://git.samba.org/samba.git
 $ git config &#8211;add remote.origin.fetch +refs/tags/*:refs/tags/* (this line is optional)
 $ git fetch
untar  samba4.tgz
$ cd samba-master/source4
$ ./autogen.sh
$ cd samba-master/source4
$ ./configure
$ make
$ make install
PATH=/usr/local/samba/bin:/usr/local/samba/sbin:$PATH
export PATH
cd source4
./setup/provision &#8211;realm=SAMBA &#8211;domain=example.com &#8211;adminpass=qwerasdf &#8211;server-role=&#8217;domain controller&#8217;
Output
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-
Note
Server Role:    domain [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=derwynd.com&blog=4330525&post=55&subd=derwynd&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p> $ cd samba-master/<br />
 $ rm .git/objects/info/alternates<br />
 $ rm .git/refs/tags/*<br />
 $ rm -r .git/refs/remotes/<br />
 $ git config remote.origin.url git://git.samba.org/samba.git<br />
 $ git config &#8211;add remote.origin.fetch +refs/tags/*:refs/tags/* (this line is optional)<br />
 $ git fetch</p>
<p>untar  samba4.tgz<br />
$ cd samba-master/source4<br />
$ ./autogen.sh</p>
<p>$ cd samba-master/source4<br />
$ ./configure<br />
$ make</p>
<p>$ make install</p>
<p>PATH=/usr/local/samba/bin:/usr/local/samba/sbin:$PATH<br />
export PATH</p>
<p>cd source4</p>
<p>./setup/provision &#8211;realm=SAMBA &#8211;domain=example.com &#8211;adminpass=qwerasdf &#8211;server-role=&#8217;domain controller&#8217;</p>
<p>Output<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
Note<br />
Server Role:    domain controller<br />
Hostname:       samba<br />
NetBIOS Domain: EXAMPLE.COM<br />
DNS Domain:     samba<br />
DOMAIN SID:     S-1-5-21-3157024369-3348094622-1625297388<br />
Admin password: qwerasdf<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>this will setup /usr/local/samba/etc/smb.conf<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
[globals]<br />
        netbios name    = samba<br />
        workgroup       = example.com<br />
        realm           = SAMBA<br />
        server role     = domain controller</p>
<p>[netlogon]<br />
        path = /usr/local/samba/var/locks/sysvol/your.realm/scripts<br />
        read only = no</p>
<p>[sysvol]<br />
        path = /usr/local/samba/var/locks/sysvol<br />
        read only = no<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>vim /usr/local/samba/etc/smb.conf</p>
<p> [test]<br />
       path = /data/test<br />
       read only = no</p>
<p>To start in single instance for testing purpose</p>
<p>cd /usr/local/samba/sbin/<br />
./samba  -i -M single</p>
<p>on another konsole<br />
smbclient //localhost/test -Uadministrator%qwerasdf</p>
<p>for ldap<br />
test<br />
ldapsearch -h  -x -b DC=samba</p>
<p>cd /usr/local/samba/private</p>
<p>install bind-9.5.1-0.5.b1.i386.rpm bind-libs-9.5.1-0.5.b1.i386.rpm bind-devel-9.5.1-0.5.b1.i386.rpm bind-utils-9.5.1-0.5.b1.i<br />
386.rpm</p>
<p>or upgrade what comes with centos</p>
<p>Copy *just* your.realm.zone to /etc/bind/ (or wherever you want to store zone files) and then take a look at named.conf in th<br />
e local directory.<br />
cd /usr/local/samba/private</p>
<p>cp *.zone /etc/named/<br />
cp named.conf /etc/named.samba<br />
mv /etc/krb5.conf /etc/krb5.conf.ORIG<br />
cp krb5.conf /etc/<br />
cp /usr/local/samba/private/dns.keytab /etc/named/dns.keytab</p>
<p>chgrp named /etc/named/dns.keytab<br />
chmod g+r /etc/named/dns.keytab</p>
<p>please read named.txt file</p>
<p>in the /etc/named.conf file under the options section below<br />
// query-source address * port 53;<br />
add<br />
        tkey-gssapi-credential &#8220;DNS/samba&#8221;;<br />
        tkey-domain &#8220;SAMBA&#8221;;</p>
<p>and and<br />
include &#8220;/etc/named.samba&#8221;; below the option section</p>
<p>in the /etc/init.d/named add<br />
KEYTAB_FILE=&#8221;/usr/local/samba/private/dns.keytab&#8221;;<br />
export KRB5_KTNAME=&#8221;/usr/local/samba/private/dns.keytab&#8221;;</p>
<p>and now restart the service</p>
<p>test via<br />
dig _ldap._tcp.dc._msdcs.samba SRV @localhost<br />
respose</p>
<p>; &lt;&gt; DiG 9.5.1b1-RedHat-9.5.1-0.5.b1 &lt;&gt; _ldap._tcp.dc._msdcs.samba SRV @localhost<br />
;; global options:  printcmd<br />
;; Got answer:<br />
;; -&gt;&gt;HEADER&lt;&lt;- opcode: QUERY, status: NOERROR, id: 65383<br />
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1</p>
<p>;; QUESTION SECTION:<br />
;_ldap._tcp.dc._msdcs.samba.    IN      SRV</p>
<p>;; ANSWER SECTION:<br />
_ldap._tcp.dc._msdcs.samba. 604800 IN   SRV     0 100 389 samba.samba.</p>
<p>;; AUTHORITY SECTION:<br />
samba.                  604800  IN      NS      samba.samba.</p>
<p>;; ADDITIONAL SECTION:<br />
samba.samba.            604800  IN      A       192.168.50.80</p>
<p>;; Query time: 3 msec<br />
;; SERVER: 127.0.0.1#53(127.0.0.1)<br />
;; WHEN: Wed Jan 21 11:01:40 2009<br />
;; MSG SIZE  rcvd: 105</p>
<p>stop iptables<br />
chkconfig &#8211;level 2345 iptables off<br />
chkconfig &#8211;level 2345 named on</p>
<p>ln -s /usr/local/samba/lib/libtalloc.so.1 /lib/<br />
ln -s /usr/local/samba/lib/libtalloc.so.1 /usr/lib/<br />
ln -s /usr/local/samba/lib/libtdb.so.1 /usr/lib/<br />
ln -s /usr/local/samba/lib/libtdb.so.1 /lib/<br />
ln -s /usr/local/samba/lib/libwbclient.so.0 /lib/<br />
ln -s /usr/local/samba/lib/libwbclient.so.0 /usr/lib/</p>
<p>################################Windows for samba#########################################</p>
<p>configure a windows mc and download the exe for Domain administration &amp; services.<br />
Connect to the dns for administration and add users as in windows.<br />
Use the added user to test linux compatibility</p>
<p>#########################################################################<br />
On linux mc to configure the auth to the samba4 server<br />
first configure samba3  and start service<br />
smb.conf</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;Other Linux mc for samba&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
[global]<br />
#&#8211;authconfig&#8211;start-line&#8211;</p>
<p># Generated by authconfig on 2009/01/28 13:30:34<br />
# DO NOT EDIT THIS SECTION (delimited by &#8211;start-line&#8211;/&#8211;end-line&#8211;)<br />
# Any modification may be deleted or altered by authconfig in future</p>
<p>   workgroup = EXAMPLE.COM<br />
   password server = samba.example.com<br />
   realm = SAMBA<br />
   security = domain<br />
   idmap uid = 16777216-33554431<br />
   idmap gid = 16777216-33554431<br />
   winbind separator = +<br />
   template homedir = /samba/%U<br />
   template shell = /bin/bash<br />
   winbind use default domain = true<br />
   winbind offline logon = false<br />
#&#8211;authconfig&#8211;end-line&#8211;<br />
;        workgroup = EXAMPLE.COM<br />
;        security = DOMAIN<br />
;        password server = samba.example.com<br />
        ldap ssl = no<br />
;        idmap uid = 16777216-33554431<br />
;        idmap gid = 16777216-33554431<br />
;        template homedir = /samba/%U<br />
;        template shell = /bin/bash<br />
;        winbind separator = +<br />
        winbind cache time = 10<br />
;        winbind use default domain = Yes<br />
        username = %u<br />
        add user script = /usr/sbin/adduser &#8211;quiet &#8211;disabled-password &#8211;gecos &#8220;&#8221; %u</p>
<p>[homes]<br />
        comment = Home Directories<br />
        path = %H<br />
        read only = No</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
configure authentication<br />
system-config-authentication<br />
User info<br />
        enable winbind support<br />
Authentication<br />
        enable kerberos support</p>
<p>/usr/bin/net join -w EXAMPLE.COM -S samba.example.com -U Administrator</p>
<p>check with<br />
wbinfo -u samba.example.com</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/derwynd.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/derwynd.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/derwynd.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/derwynd.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/derwynd.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/derwynd.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/derwynd.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/derwynd.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/derwynd.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/derwynd.wordpress.com/55/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=derwynd.com&blog=4330525&post=55&subd=derwynd&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://derwynd.com/2009/04/06/samba4-howto-fedora/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/89de0963d0123cd6c2d3b997a3ac44d1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">derwynd</media:title>
		</media:content>
	</item>
		<item>
		<title>MRTG HowTo</title>
		<link>http://derwynd.com/2009/01/14/mrtg-howto/</link>
		<comments>http://derwynd.com/2009/01/14/mrtg-howto/#comments</comments>
		<pubDate>Wed, 14 Jan 2009 05:53:08 +0000</pubDate>
		<dc:creator>derwynd</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://derwynd.com/2009/01/14/mrtg-howto/</guid>
		<description><![CDATA[$ yum install net-snmp-utils net-snmp net-snmp-libs
SNMP
======
$ vi /etc/snmp/snmpd.conf
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;
com2sec local     localhost           public
com2sec mynetwork &#60;ip&#62;/class          public
group MyRWGroup v1         local
group MyRWGroup v2c        local
group MyRWGroup usm        local
group MyROGroup v1         mynetwork
group MyROGroup v2c        mynetwork
group MyROGroup usm        mynetwork
view all    included  .1                               80
access MyROGroup &#8220;&#8221;      any       noauth    exact  all    none   none
access MyRWGroup &#8220;&#8221;      any       noauth    exact  all    all    none
syslocation Linux (Hostname), hostname.
syscontact [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=derwynd.com&blog=4330525&post=54&subd=derwynd&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>$ yum install net-snmp-utils net-snmp net-snmp-libs</p>
<p>SNMP<br />
======</p>
<p>$ vi /etc/snmp/snmpd.conf<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
com2sec local     localhost           public<br />
com2sec mynetwork &lt;ip&gt;/class          public</p>
<p>group MyRWGroup v1         local<br />
group MyRWGroup v2c        local<br />
group MyRWGroup usm        local<br />
group MyROGroup v1         mynetwork<br />
group MyROGroup v2c        mynetwork<br />
group MyROGroup usm        mynetwork</p>
<p>view all    included  .1                               80</p>
<p>access MyROGroup &#8220;&#8221;      any       noauth    exact  all    none   none<br />
access MyRWGroup &#8220;&#8221;      any       noauth    exact  all    all    none</p>
<p>syslocation Linux (Hostname), hostname.<br />
syscontact name &lt;emailid&gt;<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>$ service snmpd start<br />
$ chkconfig &#8211;add snmpd</p>
<p>Test via<br />
$ snmpwalk -v 1 -c public localhost IP-MIB::ipAdEntIfIndex<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
IP-MIB::ipAdEntIfIndex.10.0.0.2 = INTEGER: 3<br />
IP-MIB::ipAdEntIfIndex.127.0.0.1 = INTEGER: 1<br />
IP-MIB::ipAdEntIfIndex.203.201.253.231 = INTEGER: 2<br />
IP-MIB::ipAdEntIfIndex.203.201.253.233 = INTEGER: 2<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>MRTG<br />
======<br />
$ yum install mrtg<br />
$ mkdir -p /var/www/mrtg</p>
<p>create mrtg configuration file:<br />
$ cfgmaker &#8211;global &#8216;WorkDir: /var/www/mrtg&#8217; &#8211;output /etc/mrtg/mymrtg.cfg public@localhost</p>
<p>Create default index page for your MRTG configuration:<br />
$ indexmaker &#8211;output=/var/www/mrtg/index.html /etc/mrtg/mymrtg.cfg</p>
<p>Run mrtg command from command line with your configuration file:<br />
Run this 3 times ignoring errors</p>
<p>$ env LANG=C /usr/bin/mrtg /etc/mrtg/mymrtg.cfg</p>
<p>Add to crontab</p>
<p>*/5 * * * * env LANG=C /usr/bin/mrtg /etc/mrtg/mymrtg.cfg</p>
<p>HTTP<br />
======</p>
<p>/etc/httpd/conf.d/mrtg.conf</p>
<p>Allow from 127.0.0.1 &lt;your ip&gt;</p>
<p>/etc/init.d/httpd restart</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/derwynd.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/derwynd.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/derwynd.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/derwynd.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/derwynd.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/derwynd.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/derwynd.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/derwynd.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/derwynd.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/derwynd.wordpress.com/54/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=derwynd.com&blog=4330525&post=54&subd=derwynd&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://derwynd.com/2009/01/14/mrtg-howto/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/89de0963d0123cd6c2d3b997a3ac44d1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">derwynd</media:title>
		</media:content>
	</item>
		<item>
		<title>Fedora/Redhat Kernel RPM with Xen &amp; reiserfs</title>
		<link>http://derwynd.com/2008/11/10/fedoraredhat-kernel-rpm-with-xen-reiserfs/</link>
		<comments>http://derwynd.com/2008/11/10/fedoraredhat-kernel-rpm-with-xen-reiserfs/#comments</comments>
		<pubDate>Mon, 10 Nov 2008 11:56:20 +0000</pubDate>
		<dc:creator>derwynd</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://derwynd.wordpress.com/?p=45</guid>
		<description><![CDATA[Download the src rpm
(eg. kernel-2.6.18-92.el5.src.rpm)
$ rpm -ivh kernel-2.6.18-92.el5.src.rpm
$ cd /usr/src/redhat/SPECS/
$ rpmbuild -bb kernel-2.6.spec
This will build
kernel-2.6.18-92.el5.x86_64.rpm                   kernel-devel-2.6.18-92.el5.x86_64.rpm
kernel-debug-2.6.18-92.el5.x86_64.rpm             kernel-headers-2.6.18-92.el5.x86_64.rpm
kernel-debug-debuginfo-2.6.18-92.el5.x86_64.rpm   kernel-xen-2.6.18-92.el5.x86_64.rpm
kernel-debug-devel-2.6.18-92.el5.x86_64.rpm       kernel-xen-debuginfo-2.6.18-92.el5.x86_64.rpm
kernel-debuginfo-2.6.18-92.el5.x86_64.rpm         kernel-xen-devel-2.6.18-92.el5.x86_64.rpm
kernel-debuginfo-common-2.6.18-92.el5.x86_64.rpm
Install the following rpm
$ kernel-xen-2.6.18-53.el5 xen-libs
Check the grub.conf file the xen lines will be added
#boot=/dev/sda
default=2
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux Server (2.6.18-53.el5xen)
root (hd0,0)
kernel /xen.gz-2.6.18-53.el5
module /vmlinuz-2.6.18-53.el5xen ro root=/dev/VolGroup00/LogVol00 rhgb quiet
module /initrd-2.6.18-53.el5xen.img
title Red Hat Enterprise Linux Server (2.6.18-53.el5)
root (hd0,0)
kernel [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=derwynd.com&blog=4330525&post=45&subd=derwynd&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>Download the src rpm</p>
<p>(eg. kernel-2.6.18-92.el5.src.rpm)</p>
<p>$ rpm -ivh kernel-2.6.18-92.el5.src.rpm</p>
<p>$ cd /usr/src/redhat/SPECS/</p>
<p>$ rpmbuild -bb kernel-2.6.spec</p>
<p>This will build<br />
kernel-2.6.18-92.el5.x86_64.rpm                   kernel-devel-2.6.18-92.el5.x86_64.rpm<br />
kernel-debug-2.6.18-92.el5.x86_64.rpm             kernel-headers-2.6.18-92.el5.x86_64.rpm<br />
kernel-debug-debuginfo-2.6.18-92.el5.x86_64.rpm   kernel-xen-2.6.18-92.el5.x86_64.rpm<br />
kernel-debug-devel-2.6.18-92.el5.x86_64.rpm       kernel-xen-debuginfo-2.6.18-92.el5.x86_64.rpm<br />
kernel-debuginfo-2.6.18-92.el5.x86_64.rpm         kernel-xen-devel-2.6.18-92.el5.x86_64.rpm<br />
kernel-debuginfo-common-2.6.18-92.el5.x86_64.rpm</p>
<p>Install the following rpm<br />
$ kernel-xen-2.6.18-53.el5 xen-libs</p>
<p>Check the grub.conf file the xen lines will be added</p>
<p>#boot=/dev/sda<br />
default=2<br />
timeout=5<br />
splashimage=(hd0,0)/grub/splash.xpm.gz<br />
hiddenmenu<br />
title Red Hat Enterprise Linux Server (2.6.18-53.el5xen)<br />
root (hd0,0)<br />
kernel /xen.gz-2.6.18-53.el5<br />
module /vmlinuz-2.6.18-53.el5xen ro root=/dev/VolGroup00/LogVol00 rhgb quiet<br />
module /initrd-2.6.18-53.el5xen.img<br />
title Red Hat Enterprise Linux Server (2.6.18-53.el5)<br />
root (hd0,0)<br />
kernel /vmlinuz-2.6.18-53.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet<br />
initrd /initrd-2.6.18-53.el5.img</p>
<p>If you list the files in /boot/ are added<br />
vmlinuz-2.6.18-53.el5<br />
initrd-2.6.18-53.el5.img<br />
xen.gz-2.6.18-53.el5<br />
xen-syms-2.6.18-53.el5</p>
<p>Now to build the kernel from the BUILD dir</p>
<p>$ cd /usr/src/redhat/BUILD/kernel-2.6.18/linux-2.6.18.x86_64/<br />
$ make menuconfig</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>Processor type and features  &#8212;&gt;<br />
[*] Enable Xen compatible kernel</p>
<p>File systems  &#8212;&gt;<br />
&lt;M&gt; Reiserfs support<br />
[ ]   Enable reiserfs debug mode<br />
[ ]   Stats in /proc/fs/reiserfs<br />
[*]   ReiserFS extended attributes<br />
[ ]     ReiserFS POSIX Access Control Lists<br />
[ ]     ReiserFS Security Labels</p>
<p>XEN  &#8212;&gt;<br />
[*] Privileged Guest (domain 0)<br />
&lt;*&gt; Backend driver support<br />
&lt;M&gt;   Block-device backend driver<br />
&lt;M&gt;   Block-device tap backend driver<br />
&lt;M&gt;   Network-device backend driver<br />
[ ]     Pipelined transmitter (DANGEROUS)<br />
&lt;M&gt;     Network-device loopback driver<br />
&lt;M&gt;   PCI-device backend driver<br />
PCI Backend Mode (Virtual PCI)  &#8212;&gt;<br />
[ ]     PCI Backend Debugging<br />
&lt; &gt;   TPM-device backend driver<br />
&lt;M&gt; Block-device frontend driver<br />
&lt;M&gt; Network-device frontend driver<br />
&lt;*&gt; Framebuffer-device frontend driver<br />
&lt;*&gt;   Keyboard-device frontend driver<br />
[*] Scrub memory before freeing it to Xen<br />
[ ] Disable serial port drivers<br />
&lt;*&gt; Export Xen attributes in sysfs<br />
Xen version compatibility (3.0.2 and later)  &#8212;&gt;</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
Build the kernel (if you have not changed the Makefile the subversion is EXTRAVERSION = -92.el5debug)</p>
<p>This will create vmlinuz-2.6.18-92.el5debug</p>
<p>$ mkinitrd /boot/initrd-2.6.18-92.el5debug.img 2.6.18-92.el5debug<br />
(For the initrd img)</p>
<p>Add lines to grub.conf<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
default=2<br />
timeout=5<br />
splashimage=(hd0,0)/grub/splash.xpm.gz<br />
hiddenmenu<br />
title Red Hat Enterprise Linux Server (2.6.18-53.el5xen)<br />
root (hd0,0)<br />
kernel /xen.gz-2.6.18-53.el5<br />
module /vmlinuz-2.6.18-53.el5xen ro root=/dev/VolGroup00/LogVol00 rhgb quiet<br />
module /initrd-2.6.18-53.el5xen.img<br />
title Red Hat Enterprise Linux Server (2.6.18-53.el5)<br />
root (hd0,0)<br />
kernel /vmlinuz-2.6.18-53.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet<br />
initrd /initrd-2.6.18-53.el5.img<br />
title Red Hat Enterprise Linux Server (2.6.18-53.el5Debxen)<br />
root (hd0,0)<br />
kernel /xen.gz-2.6.18-53.el5<br />
module /vmlinuz-2.6.18-92.el5debug ro root=/dev/VolGroup00/LogVol00 rhgb quiet<br />
module /initrd-2.6.18-92.el5debug.img<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>Reboot</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/derwynd.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/derwynd.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/derwynd.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/derwynd.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/derwynd.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/derwynd.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/derwynd.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/derwynd.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/derwynd.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/derwynd.wordpress.com/45/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=derwynd.com&blog=4330525&post=45&subd=derwynd&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://derwynd.com/2008/11/10/fedoraredhat-kernel-rpm-with-xen-reiserfs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/89de0963d0123cd6c2d3b997a3ac44d1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">derwynd</media:title>
		</media:content>
	</item>
	</channel>
</rss>