<?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>Zulius &#187; linux</title>
	<atom:link href="http://www.zulius.com/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.zulius.com</link>
	<description>Advanced Application Development</description>
	<lastBuildDate>Tue, 07 Feb 2012 16:09:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Add a static IP to a Redhat/Fedora/CentOS box</title>
		<link>http://www.zulius.com/how-to/add-static-ip-address-to-redhat-fedora-centos-box/</link>
		<comments>http://www.zulius.com/how-to/add-static-ip-address-to-redhat-fedora-centos-box/#comments</comments>
		<pubDate>Thu, 12 Aug 2010 18:12:32 +0000</pubDate>
		<dc:creator>Tim White</dc:creator>
				<category><![CDATA[how-to]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[networking]]></category>

		<guid isPermaLink="false">http://www.zulius.com/?p=947</guid>
		<description><![CDATA[Need to permanently assign a static IP address to a Linux box? This tutorial describes how to add any number of IP addresses to a network interface from the console. Login as root and change directory to /etc/sysconfig/network-scripts and list the configurations of your network interface. In this example, we're assuming the network interface is [...]]]></description>
			<content:encoded><![CDATA[<div class="wp-caption alignleft" style="width: 160px"><img alt="iPhone on T-Mobile" src="/img/blog/addStaticIpLinux.jpg" title="ifcfg-eth0" width="150" height="110" /><p class="wp-caption-text">ifcfg-eth0</p></div>
<p>Need to permanently  assign a static IP address to a Linux box?  This tutorial describes how to add any number of IP addresses to a network interface from the console.</p>
<p>Login as root and change directory to <strong>/etc/sysconfig/network-scripts</strong> and list the configurations of your network interface. In this example, we're assuming the network interface is eth0.</p>
<pre class="brush: plain;">
# cd /etc/sysconfig/network-scripts
# ls -l ifcfg-eth0*
-rw-r--r-- 1 root root 38 Dec  8  2009 ifcfg-eth0
</pre>
<p>Take note of the files listed.  In the above example, eth0 only has one config file, but there could be many.</p>
<pre class="brush: plain;">
# cd /etc/sysconfig/network-scripts
# ls -l ifcfg-eth0*
-rw-r--r-- 5 root root 235 Sep 29  2009 ifcfg-eth0
-rw-r--r-- 1 root root 237 Sep 29  2009 ifcfg-eth0:1
-rw-r--r-- 1 root root 237 Sep 29  2009 ifcfg-eth0:2
-rw-r--r-- 1 root root 237 Sep 29  2009 ifcfg-eth0:3
</pre>
<p>Make a copy of the <strong>ifcfg-eth0</strong> file and name the new file <strong>ifcfg-eth0:X</strong> where <strong>X</strong> is the next increment of the file names.  For example, if there was only a single <strong>ifcfg-eth0</strong> file, the new file should be named <strong>ifcfg-eth0:1</strong>.  If the last config file was <strong>ifcfg-eth0:3</strong>, name the new file <strong>ifcfg-eth0:4</strong>.</p>
<pre class="brush: plain;">
cp ifcfg-eth0 ifcfg-eth0:1
</pre>
<p>Edit the new file and change/add the settings below.  The DEVICE, NETMASK, IPADDR, GATEWAY settings must be set to your specific values.  For example:</p>
<pre class="brush: plain;">
# DEVICE should be the network interface name and increment
DEVICE=eth0:1
IPADDR=192.168.0.102
NETMASK=255.255.255.0
GATEWAY=192.168.0.1
ONBOOT=yes
BOOTPROTO=none
</pre>
<p>Repeat these steps for each IP address you need to add.  For each static IP address, create a new network interface config file named with the ":X" increment, and similarly set the DEVICE directive.</p>
<p>If you're not using DHCP at all, you may need to add/edit your DNS servers.  Open up /etc/resolv.conf and make sure the IP's of your DNS servers are in there. For example:</p>
<pre class="brush: plain;">
nameserver 192.168.0.1
nameserver 192.168.0.2
</pre>
<p>Finally, restart the network interfaces.</p>
<pre class="brush: plain;">
/etc/init.d/network restart
</pre>
<p>If you're SSH'd into the box, don't log out yet.  Log into the box with a new SSH session to verify the network interface came back up.  Once verified, try pinging the new IP from a different box.</p>
<pre class="brush: plain;">
# ping 192.168.0.102
PING 192.168.0.102 (192.168.0.102) 56(84) bytes of data.
64 bytes from 192.168.0.102: icmp_seq=1 ttl=64 time=0.051 ms
64 bytes from 192.168.0.102: icmp_seq=2 ttl=64 time=0.061 ms
64 bytes from 192.168.0.102: icmp_seq=3 ttl=64 time=0.068 ms
</pre>
<img src="http://www.zulius.com/blog/?ak_action=api_record_view&id=947&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.zulius.com/how-to/add-static-ip-address-to-redhat-fedora-centos-box/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Get yum to install a specific package version</title>
		<link>http://www.zulius.com/how-to/yum-install-specific-package-version/</link>
		<comments>http://www.zulius.com/how-to/yum-install-specific-package-version/#comments</comments>
		<pubDate>Fri, 30 Jul 2010 05:53:53 +0000</pubDate>
		<dc:creator>Tim White</dc:creator>
				<category><![CDATA[how-to]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://www.zulius.com/?p=710</guid>
		<description><![CDATA[Every once in a while you may need to install a specific version of a package on your system. If you're using the yum package manager, it isn't blatantly obvious how to do this, even after pouring over the man pages. So let's do this thing. First, if you've already installed a newer version of [...]]]></description>
			<content:encoded><![CDATA[<div class="wp-caption alignleft" style="width: 160px"><img alt="yum fun" src="/img/blog/yumPackageVersion/titleImage.png" title="yum fun" width="150" height="110" /><p class="wp-caption-text">yum fun</p></div>
<p>Every once in a while you may need to install a specific version of a package on your system.  If you're using the yum package manager, it isn't blatantly obvious how to do this, even after pouring over the man pages.</p>
<p>So let's do this thing.</p>
<p>First, if you've already installed a newer version of the package, you'll have to downgrade it.  In that case, make sure you've got yum's downgrade plugin installed:</p>
<pre class="brush: plain;"># yum install yum-allowdowngrade</pre>
<p>Second, do you know exactly which package version you want to install?  If not, list the all available versions using the --showduplicates flag.  This example looks for available versions of the GD extension for PHP.</p>
<pre class="brush: plain;"># yum --showduplicates list php-gd

Available Packages
php-gd.i386                    5.2.3-3.el5s2                        testing
php-gd.i386                    5.2.6-2.el5s2                        testing
php-gd.i386                    5.2.9-2.el5.centos                   testing
php-gd.i386                    5.2.10-1.el5.centos                  testing
</pre>
<p>Yum uses the RPM package manager, and it's package names are based on the <a href="http://en.wikipedia.org/wiki/RPM_Package_Manager#Package_label">RPM package label format</a>.  In the above example, the first column displays the package name and architecture in the format NAME.ARCHITECTURE.  The middle column displays the version and release info in the format VERSION-RELEASE.  Don't ask me why yum rearranges the RPM package label format.</p>
<p>Anyways, if you're downgrading, remove the previous package:</p>
<pre class="brush: plain;"># yum remove php-gd</pre>
<p>Now that you know which version to install, it's a matter of specifying the package name with the version.  Use the format NAME-VERSION.</p>
<pre class="brush: plain;"># yum install php-gd-5.2.6</pre>
<p>Or if you want to get even more specific, use NAME-VERSION-RELEASE (which might be easier to copy/paste since VERSION-RELEASE is the second column).</p>
<pre class="brush: plain;"># yum install php-gd-5.2.6-2.el5s2</pre>
<p>If you're downgrading, you may need to throw in the --allow-downgrade flag.</p>
<pre class="brush: plain;"># yum --allow-downgrade install php-gd-5.2.6</pre>
<p>And you should be good to go.  If you want to lock the version you installed to prevent any future updates, install the versionlock plugin.</p>
<pre class="brush: plain;"># yum install yum-versionlock</pre>
<p>Then lock it.</p>
<pre class="brush: plain;"># yum versionlock php-gd</pre>
<img src="http://www.zulius.com/blog/?ak_action=api_record_view&id=710&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.zulius.com/how-to/yum-install-specific-package-version/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Resolve Windows netbios names from Linux</title>
		<link>http://www.zulius.com/how-to/resolve-windows-netbios-names-from-linux/</link>
		<comments>http://www.zulius.com/how-to/resolve-windows-netbios-names-from-linux/#comments</comments>
		<pubDate>Fri, 26 Feb 2010 11:59:57 +0000</pubDate>
		<dc:creator>Tim White</dc:creator>
				<category><![CDATA[how-to]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[netbios]]></category>
		<category><![CDATA[samba]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.zulius.com/?p=704</guid>
		<description><![CDATA[Platforms: any *nix distro What You'll Need: Samba In a heterogeneous LAN it is often useful to resolve network addresses by a computer's name (ie. netbios name). This is especially true if the LAN does not have a DNS server so that host names can be used instead of IP addresses (which if dynamically assigned, [...]]]></description>
			<content:encoded><![CDATA[<p><div class="wp-caption alignleft" style="width: 159px"><img alt="Ping a Windows box" src="/img/blog/resolveWindowsNetbiosTitleImate.png" title="Ping a Windows box" width="150" height="110" /><p class="wp-caption-text">Ping a Windows box</p></div>
<p><strong>Platforms: </strong><br />any *nix distro</p>
<p><strong>What You'll Need:</strong><br /> <a href="http://www.samba.org/">Samba</a></p>
<p>
In a heterogeneous LAN it is often useful to resolve network addresses by a computer's name (ie. <a href="http://en.wikipedia.org/wiki/NetBIOS">netbios</a> name).  This is especially true if the LAN does not have a DNS server so that host names can be used instead of IP addresses (which if dynamically assigned, could change often).</p>
<p>
To enable Windows netbios name resolution from a Linux computer, make sure that <a href="http://www.samba.org/">Samba</a> is installed (although the smb service does not need to be running).  The Samba suite includes <a href="http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/winbind.html">winbind</a>, which enables Windows host names to be resolved.</p>
<p>Then edit /etc/nsswitch.conf and change this line:</p>
<pre class="brush: plain;">hosts:      files dns</pre>
<p>to this:</p>
<pre class="brush: plain;">hosts:      files dns wins</pre>
<p>Then test by pinging the computer name of Windows machine on the LAN:</p>
<pre class="brush: plain;">$ ping windowsbox
PING windowsbox (192.168.0.100) 56(84) bytes of data.
64 bytes from 192.168.0.100: icmp_seq=1 ttl=128 time=0.117 ms
64 bytes from 192.168.0.100: icmp_seq=2 ttl=128 time=0.127 ms
64 bytes from 192.168.0.100: icmp_seq=3 ttl=128 time=0.127 ms
64 bytes from 192.168.0.100: icmp_seq=4 ttl=128 time=0.127 ms
64 bytes from 192.168.0.100: icmp_seq=5 ttl=128 time=0.128 ms</pre>
<p>This setting really comes in handy when mounting a shared folder of a dynamically IP'ed Windows box from Linux.  Instead of using the Windows' box IP address, just specify it's netbios name.  Example entry in /etc/fstab:</p>
<pre class="brush: plain;">
//windowsbox/my_share/ /mnt/my_mount_point/ cifs rw,username=xxx,password=xxx,domain=xxx 0 0
</pre>
<img src="http://www.zulius.com/blog/?ak_action=api_record_view&id=704&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.zulius.com/how-to/resolve-windows-netbios-names-from-linux/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

