<?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>LAMPdocs: Linux, Apache, MySQL, PHP &#187; Linux Tricks</title>
	<atom:link href="http://www.lampdocs.com/blog/category/linux-tricks/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.lampdocs.com/blog</link>
	<description>Linux, Apache, MySQL, PHP: Docs, Tricks and Secrets</description>
	<lastBuildDate>Tue, 24 Aug 2010 08:23:13 +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>How to Start a Daemon Automatically in Linux</title>
		<link>http://www.lampdocs.com/blog/2010/08/how-to-start-a-daemon-automatically-in-linux/</link>
		<comments>http://www.lampdocs.com/blog/2010/08/how-to-start-a-daemon-automatically-in-linux/#comments</comments>
		<pubDate>Tue, 17 Aug 2010 10:43:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux Tricks]]></category>
		<category><![CDATA[start apache automatically]]></category>

		<guid isPermaLink="false">http://www.lampdocs.com/blog/?p=890</guid>
		<description><![CDATA[How to start apache automatically with /etc/init.d/rc.local]]></description>
			<content:encoded><![CDATA[<p>If you need to start anything automatically in Linux, you should alter some files that are processed during system startup. There are lots of ways to do this; I will show you how to <a href="http://www.lampdocs.com/blog/tag/start-apache-automatically/" class="st_tag internal_tag" rel="tag" title="Posts tagged with start apache automatically">start Apache automatically</a>. Note, that this installation of Apache does not allow to start it using <strong>chkconfig httpd on</strong>. </p>
<p>In order to setup automatic start, we will have to deal with <strong>/etc/init.d/rc.local</strong> . This is the file, that is processed on system startup and it will allow you to run anything you like. We need to start Apache using <strong>/usr/local/apache2/bin/apachectl start</strong>. Let&#8217;s add this string to the end of your <strong>/etc/init.d/rc.local</strong></p>
<blockquote><p>#!/bin/sh<br />
#<br />
# This script will be executed *after* all the other init scripts.<br />
# You can put your own initialization stuff in here if you don&#8217;t<br />
# want to do the full Sys V style init stuff.</p>
<p>touch /var/lock/subsys/local<br />
/usr/local/apache2/bin/apachectl start</p></blockquote>
<p>That&#8217;s all! Now your httpd daemon will be automatically started at boot. You can start any daemon this way. If you know any more methods to start daemons, please, add them in comments. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.lampdocs.com/blog/2010/08/how-to-start-a-daemon-automatically-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Delete Files Older Than a Week in a Folder in Linux</title>
		<link>http://www.lampdocs.com/blog/2010/07/how-to-delete-files-older-than-a-week-in-a-folder-in-linux/</link>
		<comments>http://www.lampdocs.com/blog/2010/07/how-to-delete-files-older-than-a-week-in-a-folder-in-linux/#comments</comments>
		<pubDate>Wed, 28 Jul 2010 07:22:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux Tricks]]></category>

		<guid isPermaLink="false">http://www.lampdocs.com/blog/?p=878</guid>
		<description><![CDATA[How to delete files order than a week in linux]]></description>
			<content:encoded><![CDATA[<p>Sometimes you need to delete some archive files, that are older than the specified date. It&#8217;s simple enough in Linux. Here is the command that allows you to do this: </p>
<blockquote><p>find /path/to/folder/* -mtime +7 -exec rm {} \;</p></blockquote>
<p>Please, note, that you need to keep spaces between command arguments. </p>
<p>This command is suitable for folders that contain a large number of files. In order to force file deletion you need to add -f key.</p>
<blockquote><p>find /path/to/folder/* -mtime +7 -exec rm {} \;</p></blockquote>
<p>If you need to move these files instead of deletion, here is the solution:</p>
<blockquote><p>find /path/to/folder/* -mtime +7 -exec mv {} /path/test-mv-to/ \;</p></blockquote>
<p>Hope this helps you to deal with archive files and big folders. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.lampdocs.com/blog/2010/07/how-to-delete-files-older-than-a-week-in-a-folder-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Kill a List of Processes at Once in Linux</title>
		<link>http://www.lampdocs.com/blog/2010/04/how-to-kill-a-list-of-processes-at-once-in-linux/</link>
		<comments>http://www.lampdocs.com/blog/2010/04/how-to-kill-a-list-of-processes-at-once-in-linux/#comments</comments>
		<pubDate>Wed, 28 Apr 2010 13:10:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux Tricks]]></category>
		<category><![CDATA[kill list of processes]]></category>
		<category><![CDATA[kill user processes linux]]></category>

		<guid isPermaLink="false">http://www.lampdocs.com/blog/?p=870</guid>
		<description><![CDATA[A short command that allows to terminate all the processes by their name]]></description>
			<content:encoded><![CDATA[<p>Sometimes we need to kill a bunch of processes. For example, we have run a plenty of PHP scripts from command line, and have noticed there are errors in them. Let&#8217;s say the wrong script is called php_script.php. Then in order to terminate all processes associated with script name, you need to issue the following command: </p>
<p><code><strong>kill `ps aux | grep php_script.php | grep -v grep | awk '{print $2}'`</strong></code></p>
<p>What does this command actually do? It sends process IDs found by ps to the kill command. Then all these processes are killed. This command is used when any other methods, like <strong>killall -9 php</strong> are not acceptable for any reason. </p>

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.lampdocs.com/blog/2008/07/delete-all-processes-of-a-single-user-linux/" title="Delete all Processes of a Single User Linux (July 5, 2008)">Delete all Processes of a Single User Linux</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.lampdocs.com/blog/2010/04/how-to-kill-a-list-of-processes-at-once-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Add Sicky Bit for a Directory in Linux</title>
		<link>http://www.lampdocs.com/blog/2010/04/how-to-add-sicky-bit-for-a-directory-in-linux/</link>
		<comments>http://www.lampdocs.com/blog/2010/04/how-to-add-sicky-bit-for-a-directory-in-linux/#comments</comments>
		<pubDate>Sat, 24 Apr 2010 06:23:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux Tricks]]></category>
		<category><![CDATA[sticky bit]]></category>
		<category><![CDATA[sticky bit /tmp]]></category>
		<category><![CDATA[sticky bit mysql]]></category>

		<guid isPermaLink="false">http://www.lampdocs.com/blog/?p=868</guid>
		<description><![CDATA[How to set sticky bit for your directories]]></description>
			<content:encoded><![CDATA[<p>First of all, let me explain, what the <a href="http://www.lampdocs.com/blog/tag/sticky-bit/" class="st_tag internal_tag" rel="tag" title="Posts tagged with sticky bit">sticky bit</a> is. When set, it tells the operating system to retain the text segment of the application in swap space after the process exited. This speeds up subsequent executions as it allows the kernel to prevent multiple operations of moving the program from swap to real memory. </p>
<p>The most common use of the <a href="http://www.lampdocs.com/blog/tag/sticky-bit/" class="st_tag internal_tag" rel="tag" title="Posts tagged with sticky bit">sticky bit</a> today is related to directories. When the <strong><a href="http://www.lampdocs.com/blog/tag/sticky-bit/" class="st_tag internal_tag" rel="tag" title="Posts tagged with sticky bit">sticky bit</a></strong> is set, only the item&#8217;s owner, the directory&#8217;s owner, or the root can rename, delete, or modify files. Without the <a href="http://www.lampdocs.com/blog/tag/sticky-bit/" class="st_tag internal_tag" rel="tag" title="Posts tagged with sticky bit">sticky bit</a> set, any user with write and execute permissions for the directory can rename or delete contained files, regardless of owner. Typically this is set on the /tmp directory to prevent users from deleting or moving other users&#8217; files. </p>
<p>In order to set the <a href="http://www.lampdocs.com/blog/tag/sticky-bit/" class="st_tag internal_tag" rel="tag" title="Posts tagged with sticky bit">sticky bit</a>, a simple command is used: </p>
<p><code>chmod +t /tmp<br />
</code></p>
<p>In order to check whether the <a href="http://www.lampdocs.com/blog/tag/sticky-bit/" class="st_tag internal_tag" rel="tag" title="Posts tagged with sticky bit">sticky bit</a> is set, here is another command: </p>
<p><code>ls -ld /tmp</code></p>
<p>If you r last bit is &#8216;t&#8217;, then the <a href="http://www.lampdocs.com/blog/tag/sticky-bit/" class="st_tag internal_tag" rel="tag" title="Posts tagged with sticky bit">sticky bit</a> is set to the directory. It is a common practice to protect this folder in such a way as many server applications store their temporary data in this directory. For example, default MySQL configuration is set to store its socket file in /tmp/mysql.sock. You can experience problems if you don&#8217;t set a <a href="http://www.lampdocs.com/blog/tag/sticky-bit/" class="st_tag internal_tag" rel="tag" title="Posts tagged with sticky bit">sticky bit</a> on your /tmp directory. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.lampdocs.com/blog/2010/04/how-to-add-sicky-bit-for-a-directory-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Use Dynamic DNS With a PPP Connection in Linux</title>
		<link>http://www.lampdocs.com/blog/2010/02/how-to-use-dynamic-dns-with-a-ppp-connection-in-linux/</link>
		<comments>http://www.lampdocs.com/blog/2010/02/how-to-use-dynamic-dns-with-a-ppp-connection-in-linux/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 18:04:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[DNS Entries]]></category>
		<category><![CDATA[Linux Tricks]]></category>
		<category><![CDATA[allow dyndns requests]]></category>
		<category><![CDATA[bind dynamic dns]]></category>
		<category><![CDATA[ddns pppd]]></category>
		<category><![CDATA[dynamic dns iptables]]></category>
		<category><![CDATA[dynamic dns setup]]></category>
		<category><![CDATA[dynamic dns setup pppd]]></category>
		<category><![CDATA[inadyn configuration]]></category>
		<category><![CDATA[inadyn dyndns]]></category>
		<category><![CDATA[inadyn setup linux]]></category>

		<guid isPermaLink="false">http://www.lampdocs.com/blog/?p=838</guid>
		<description><![CDATA[Dynamic dns is simple! Just follow our guide to setup it in Linux. ]]></description>
			<content:encoded><![CDATA[<p>Dynamic DNS represents a DNS management system, that allows to periodically update DNS records. Since almost any DNS server provides this functionality, dynamic DNS is used when updates need to be more frequent than usually and updated DNS becomes the most important point in user activity (more than speed, system stability, etc).</p>
<p>When you need to establish connection with a hostname, that has a dynamic IP address (most typical situation &#8211; a hostname, that has an unstable Internet connection), Dynamic DNS becomes a simple yet stable solution.</p>
<p>When a hostname obtains an IP address, it is automatically sent to Dynamic DNS system, but users are able to connect using a symbolic name, that remains unchanged (for example, hostname.com).  In order to prevent IP caching, Dynamic DNS records have low TTL values (e.g. 60 seconds).</p>
<p>We&#8217;re going to cover the process of using such a configuration with a pppd connection, this package is widely used in Linux with almost all types of Internet connections.</p>
<p>We will take <a href="http://www.dyndns.com/">dyndns.org</a> as a Dynamic DNS provider (you&#8217;re welcome to select another one: there is no real difference between them). We won&#8217;t describe the process of signing up and creating DNS records, but you&#8217;re always welcome to follow <a href="http://www.dyndns.com/services/dns/dyndns/howto.html">this guide</a>, and ask us if anything is unclear, though it should be.</p>
<p>We will use<a href="http://www.inatech.eu/inadyn/"> inadyn</a> for our connections. It gives the possibility to have your own fixed hostname registered on the internet, although your IP might be changing. It checks periodically whether the IP address stored by the DNS server is the real current IP address of the machine that is running INADYN. Though there are some limitations, that are described <a href="http://www.dyndns.com/support/kb/using_inadyn_with_dyndns_services.html">here</a>, it is a simple solution, that doesn&#8217;t require any specific knowledge. It is a free software, that allows to connect with many Dynamic DNS providers, and you can obtain it by following <a href="http://cdn.dyndns.com/inadyn.zip">this link</a>.</p>
<p>You will need to download it, unpack and compile using <strong>make</strong>.</p>
<p>We will use it in the following way:</p>
<p>inadyn is started when the connection is being established (pppd acquires an IP address and creates an interface). Immediately after that it tries to perform an update and then remains in memory to periodically check for updates. If inadyn is already present in memory, it will be terminated before running a new instance.</p>
<p>In order to do that, we need to touch /etc/ppp/ip-up.local file (create a new one if it doesn&#8217;t exist) with the following contents:</p>
<blockquote><p>#!/bin/sh<br />
kill `ps -A |grep inadyn |sed &#8216;s/[ |\t].*$//&#8217;`<br />
sleep 1<br />
/etc/ppp/inadyn -u <strong>login</strong> -p <strong>xxxxx </strong>-a <strong>lampdocs.dyndns.org</strong> &#8211;background &#8211;update_period_sec 3600</p></blockquote>
<p>Replace <strong>xxxxx </strong>with your password, <strong>login </strong>with your username, obtained at dyndns.org and <strong>lampdocs.dyndns.org</strong> with a symbolic name you&#8217;ve set for your host with dynamic IP.</p>
<p>You can change kill `ps -A |grep inadyn |sed &#8216;s/[ |\t].*$//&#8217;` if you don&#8217;t like it. Here is another variant:</p>
<blockquote><p>#!/bin/sh<br />
pkill inadyn<br />
sleep 1<br />
/etc/ppp/inadyn -u login -p xxxxx -a lampdocs.dyndns.org &#8211;background &#8211;update_period_sec 3600</p></blockquote>
<p>That&#8217;s enough for configuration. Inadyn will be automatically started when a new pppd connection is established. You might need to enable inadyn requests in firewall, so it could connect using http without any problems. Inadyn requires just 2 addresses to connect, and both of them have fixed IPs:</p>
<blockquote><p>checkip.dyndns.org (IP 208.78.70.70)<br />
members.dyndns.org (IP 204.13.248.112)</p></blockquote>
<p>You can enable these requests by issuing the following commands:</p>
<blockquote><p>iptables -t filter -I OUTPUT -p tcp -d 208.78.70.70 &#8211;destination-port 80 -j ACCEPT<br />
iptables -t filter -I OUTPUT -p tcp -d 204.13.248.112 &#8211;destination -port 80 -j ACCEPT</p></blockquote>
<p>Then you should input</p>
<blockquote><p>iptables -t filter -I INPUT -p tcp -s 208.78.70.70 &#8211;source-port 80 -j ACCEPT<br />
iptables -t filter -I INPUT -p tcp -s 204.13.248.112 &#8211;source-port 80 -j ACCEPT</p></blockquote>
<p>Or</p>
<blockquote><p>iptables -t filter -I INPUT -m state &#8211;state ESTABLISHED,RELATED -j ACCEPT</p></blockquote>
<p>- they have the same functionality for our needs. That&#8217;s all, Dynamic DNS should be working for you. Note, that you will have to configure inadyn if you choose another Dynamic DNS provider, the configuration is not complicated and you can find it in inadyn documentation.</p>
<p>Please, let us know if you have any problems using Dynamic DNS.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lampdocs.com/blog/2010/02/how-to-use-dynamic-dns-with-a-ppp-connection-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to enable GeoIP in Awstats using Cpan</title>
		<link>http://www.lampdocs.com/blog/2010/02/how-to-enable-geoip-in-awstats-using-cpan/</link>
		<comments>http://www.lampdocs.com/blog/2010/02/how-to-enable-geoip-in-awstats-using-cpan/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 08:19:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux Tricks]]></category>
		<category><![CDATA[awstats geoip cpan]]></category>
		<category><![CDATA[awstats geoip support]]></category>
		<category><![CDATA[geoip awstats]]></category>
		<category><![CDATA[geoip installation linux]]></category>
		<category><![CDATA[how to install geoip]]></category>
		<category><![CDATA[install geoip]]></category>

		<guid isPermaLink="false">http://www.lampdocs.com/blog/?p=826</guid>
		<description><![CDATA[Learn how to install geoip support to your awstats. ]]></description>
			<content:encoded><![CDATA[<p>It is very useful to see visitors&#8217; country information when you&#8217;re watching awstats logs. Let me tell you what to do if you don&#8217;t have Geoip support enabled on your server.</p>
<p>First of all, we will need to download and install <a href="http://www.maxmind.com/app/geolitecountry">GeoIP</a>. We will take free version, but if you really require good stats, you may buy one. Let&#8217;s switch to a temporary directory to issue the following commands:</p>
<blockquote><p>wget http://maxmind.com/download/geoip/api/c/GeoIP.tar.gz;<br />
tar xzvf GeoIP.tar.gz;<br />
cd GeoIP-1.4.6;<br />
./configure;<br />
make;<br />
make install;</p></blockquote>
<p>You might need to replace 1.4.6 with your version of Geoip, as 1.4.6 is the latest one for today.</p>
<p>Then we need to install Geoip using <strong>cpan</strong>. I suppose, that you are already familiar with cpan, that&#8217;s why I won&#8217;t describe initial span setup procedure here. In order to install it, we need to enter <strong>cpan </strong>from command line. Then issue the following command:</p>
<blockquote><p>install Geo::IP</p></blockquote>
<p>Then type quit. And the final stage: we will add Geoip support to awstats.conf. You&#8217;re welcome to do it with any editor you like, here is a command line variant using <strong>sed</strong>.</p>
<blockquote><p>sed -i &#8216;s/#LoadPlugin=&#8221;geoip GEOIP_STANDARD \/pathto\/GeoIP.dat&#8221;/LoadPlugin=&#8221;geoip GEOIP_STANDARD \/usr\/local\/share\/GeoIP\/GeoIP.dat&#8221;/&#8217; /etc/awstats/*.conf</p></blockquote>
<p>You&#8217;re done now. Have fun with your updated awstats!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lampdocs.com/blog/2010/02/how-to-enable-geoip-in-awstats-using-cpan/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rar Part Files Are Not Recognized: How to Fix in Linux</title>
		<link>http://www.lampdocs.com/blog/2010/02/rar-part-files-are-not-recognized-how-to-fix-in-linux/</link>
		<comments>http://www.lampdocs.com/blog/2010/02/rar-part-files-are-not-recognized-how-to-fix-in-linux/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 19:56:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux Tricks]]></category>
		<category><![CDATA[file.000]]></category>
		<category><![CDATA[file.001]]></category>
		<category><![CDATA[how to join files hjsplit]]></category>
		<category><![CDATA[join rar multipart]]></category>
		<category><![CDATA[rar part files error]]></category>
		<category><![CDATA[rar parts join]]></category>

		<guid isPermaLink="false">http://www.lampdocs.com/blog/?p=822</guid>
		<description><![CDATA[How to join part files with a single command. Read here. ]]></description>
			<content:encoded><![CDATA[<p>Though RAR provides its own interface to create multipart archives, sometimes users prefer to use another file splitting options. An example could be <a href="http://www.freebyte.com/hjsplit/">HJSPLIT</a>, that provides the ability to split files of any type. Since archives are used to economize space and traffic, splitting an archive into multiple parts may be useful when there are attachment limits, or any other cases that are related to limited space.</p>
<p>How do those files usually look like? For example, there was archive.rar before. When it is splitted into 3 parts, we will have archive.rar.000, archive.rar.001, archive.rar.002. How do we join them together?</p>
<p>There is a simple command line solution for this:</p>
<blockquote><p>
cat archive.rar.* &gt; archive.rar</p></blockquote>
<p>This will join all the parts to a single rar file. Then you fill be able to unrar it. No matter, what was the file type, this is the easiest way to join files together, if they were splitted before.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lampdocs.com/blog/2010/02/rar-part-files-are-not-recognized-how-to-fix-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>stropts.h: No such file or directory &#8211; How to Fix</title>
		<link>http://www.lampdocs.com/blog/2010/01/stropts-h-no-such-file-or-directory-how-to-fix/</link>
		<comments>http://www.lampdocs.com/blog/2010/01/stropts-h-no-such-file-or-directory-how-to-fix/#comments</comments>
		<pubDate>Sat, 30 Jan 2010 18:32:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux Tricks]]></category>
		<category><![CDATA[error: stropts.h: no such file or directory]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[gftp stropts.h]]></category>
		<category><![CDATA[missing file stropts.h]]></category>
		<category><![CDATA[stropts.h]]></category>
		<category><![CDATA[stropts.h error fix]]></category>
		<category><![CDATA[stropts.h pppd]]></category>
		<category><![CDATA[stropts.h pptp]]></category>

		<guid isPermaLink="false">http://www.lampdocs.com/blog/?p=820</guid>
		<description><![CDATA[error: stropts.h: No such file or directory is not a problem anymore! Read the solution here. ]]></description>
			<content:encoded><![CDATA[<p>It is a known issue that modern Linux systems are missing <strong>stropts.</strong><strong>h </strong>file. You will probably have some problems when trying to compile software like pppd, pptp, gftp, etc from sources. Seems to be a strange thing, as you won&#8217;t get any errors in previous versions of Linux. Most recent versions of Fedora don&#8217;t contain this file, that&#8217;s why we need to know what to do if software compilation fails because of missing <strong>stropts.</strong><strong>h. </strong></p>
<p>Let&#8217;s determine when we need to have this file on our machine.When we&#8217;re compiling any &#8220;old&#8221; package from sources, we may receive the following error:</p>
<blockquote><p>error: stropts.h: No such file or directory</p></blockquote>
<p>What could be the reason and why isn&#8217;t this file included into our Linux distribution?This error means that your system doesn&#8217;t support STREAMS.</p>
<p>Linux doesn&#8217;t support STREAMS (many years ago it was available as a third party module, but it hasn&#8217;t worked for years). <strong>stropts.h</strong> is part of a POSIX XSR option, which is not supported in modern Linux distributions. Do we really need it in Linux?</p>
<p>This means that software you&#8217;re trying to compile, will not use the functions listed under <strong>stropts.h</strong> as they&#8217;re not supported by the operating system. So we will do a simple trick that will let you to compile your software without these functions.</p>
<p>Since the <strong>stropts.h</strong> is required for a successful compilation, the most simple way to solve the issue is to <strong>create a blank file</strong> named <strong>stropts.h </strong>under /usr/include. You may want to put any comments there, this way you won&#8217;t forget what was the reason to create this file.</p>
<p>This simple trick will help you to compile pptp (1.7.2),  pppd (2.4.5), and I think that the list will be much bigger. That was just my experience, but the sense remains the same: you need this file for a successful compilation. Just create it and have fun! <img src='http://www.lampdocs.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.lampdocs.com/blog/2010/01/stropts-h-no-such-file-or-directory-how-to-fix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting Up NTP Time Synchronization in CentOS</title>
		<link>http://www.lampdocs.com/blog/2010/01/setting-up-ntp-time-synchronisation-in-centos/</link>
		<comments>http://www.lampdocs.com/blog/2010/01/setting-up-ntp-time-synchronisation-in-centos/#comments</comments>
		<pubDate>Fri, 29 Jan 2010 14:20:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux Tricks]]></category>
		<category><![CDATA[linux date syncronization howto]]></category>
		<category><![CDATA[ntpdate centos]]></category>
		<category><![CDATA[ntpdate no servers can be used]]></category>
		<category><![CDATA[set up ntpdate]]></category>
		<category><![CDATA[set up ntpdate linux]]></category>
		<category><![CDATA[time sync linux]]></category>

		<guid isPermaLink="false">http://www.lampdocs.com/blog/?p=809</guid>
		<description><![CDATA[It is very easy to set up date synchronization in linux. Find out how!]]></description>
			<content:encoded><![CDATA[<p>If you need to have valid date and time on your server, you need to synchronize it with a time server as well. In order to do this in Linux (especially in CentOS),  we will follow my short howto.</p>
<p>1. Ensure you&#8217;ve got ntp installed. Run <strong>rpm -qa | grep ntp</strong> to find out if it already exists on your system and <strong>yum install ntp</strong> if it is not present.</p>
<p>2. Run ntpdate. On CentOS, you will probably get this error:</p>
<blockquote><p>[root@server ~]# <strong>ntpdate</strong><br />
29 Jan 09:52:54 ntpdate[8463]: no servers can be used, exiting</p></blockquote>
<p>This means you have to include a server into your request, just like shown below.</p>
<blockquote><p>[root@server ~]# <strong>ntpdate 0.pool.ntp.org</strong><br />
29 Jan 10:08:07 ntpdate[8853]: step time server 213.198.55.2 offset 676.605025 sec</p></blockquote>
<p>This means my server had a 10-minute time diffrence with the time server. After this command my time has been adjusted.</p>
<p>3. Add time synchronization to your crontab and run it as often as you need.</p>
<blockquote><p><strong>30 * * * * /usr/sbin/ntpdate -s 0.pool.ntp.org</strong></p></blockquote>
<p>Will sync your clock every hour; I think is enough to perform synchronization weekly.  Let&#8217;s do it.</p>
<blockquote><p><strong>30 10 5 * * /usr/sbin/ntpdate -s 0.pool.ntp.org</strong></p></blockquote>
<p>This simple guide will keep your clock synchronized. Have fun!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lampdocs.com/blog/2010/01/setting-up-ntp-time-synchronisation-in-centos/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Sendmail and local-host-names file: Troubleshooting</title>
		<link>http://www.lampdocs.com/blog/2010/01/sendmail-and-local-host-names-file-troubleshooting/</link>
		<comments>http://www.lampdocs.com/blog/2010/01/sendmail-and-local-host-names-file-troubleshooting/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 11:15:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux Tricks]]></category>
		<category><![CDATA[sendmail local-host-names]]></category>
		<category><![CDATA[senmail file accept names]]></category>

		<guid isPermaLink="false">http://www.lampdocs.com/blog/?p=793</guid>
		<description><![CDATA[Sendmail and local-host-names: keep the last line commented. ]]></description>
			<content:encoded><![CDATA[<p>I will not post the whole process of sendmail configuration here, just would like to pay attention to a small detail. </p>
<p>/etc/mail/local-host-names is a text file, that contains the list of domain names and it is taken by sendmail when checking outgoing mail. You should make sure you have this file in the following format: </p>
<blockquote><p># local-host-names sample file<br />
lampdocs.com<br />
test.lampdocs.com<br />
# end of file</p></blockquote>
<p>Please, note, that you should leave the comment on the last line as it is ignored by sendmail. Your local-host-names should have the last line either blank, either commented. Hope this saves someone some time, as this feature is not so well documented and you might have problems with the last domain in the list. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.lampdocs.com/blog/2010/01/sendmail-and-local-host-names-file-troubleshooting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
