<?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>MDLog:/sysadmin &#187; Centos</title> <atom:link href="http://www.ducea.com/category/linux/centos/feed/" rel="self" type="application/rss+xml" /><link>http://www.ducea.com</link> <description>The Journal Of A Linux Sysadmin</description> <lastBuildDate>Tue, 13 Jul 2010 02:03:18 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.0</generator> <item><title>Apache2 umask</title><link>http://www.ducea.com/2009/08/03/apache2-umask/</link> <comments>http://www.ducea.com/2009/08/03/apache2-umask/#comments</comments> <pubDate>Mon, 03 Aug 2009 23:21:49 +0000</pubDate> <dc:creator>- Marius -</dc:creator> <category><![CDATA[Centos]]></category> <category><![CDATA[Debian]]></category> <category><![CDATA[Fedora]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[RHEL]]></category> <category><![CDATA[Tips & Tricks]]></category> <category><![CDATA[Ubuntu]]></category> <category><![CDATA[apache]]></category> <category><![CDATA[apache-tips-and-tricks]]></category> <category><![CDATA[tips]]></category><guid
isPermaLink="false">http://www.ducea.com/?p=951</guid> <description><![CDATA[Many times you might want to fine tune the default permissions of the files created on a linux system. This is very simple and usually if you are using bash all you have to do is to define somewhere in the bash startup files (/etc/profile is a good place for this) a new value for [...]]]></description> <content:encoded><![CDATA[<p>Many times you might want to fine tune the <strong>default permissions</strong> of the files created on a linux system. This is very simple and usually if you are using <strong>bash</strong> all you have to do is to define somewhere in the bash startup files (<em>/etc/profile</em> is a good place for this) a new value for <strong>umask</strong> like this:<br
/> <code>umask 002</code><br
/> (this will allow by default group write permissions on the newly created files)</p><p>Normally on modern linux distributions this is by <em>default set to 022</em> and you can easily find out what it is on your system by running the umask command:<br
/> <code>umask</code></p><p>Contrary to what you might think, this is not enough to have this working for all applications and daemons on the system. This works fine for any files created from a shell session, but the files created by other processes, like the web server for example, will still use the default, unless otherwise configured. In order to have <strong>apache</strong> use a <strong>different umask</strong> we can define this inside <strong>/etc/apache2/envvars</strong> (debian, and ubuntu systems) or /etc/sysconfig/httpd (rhel,centos systems) like this:<br
/> <code>umask 002</code><br
/> and restart apache to enable it.</p><p>Other daemons will have different locations where you can define this to overwrite the default setting for umask (check their documentation if you are unsure).</p>]]></content:encoded> <wfw:commentRss>http://www.ducea.com/2009/08/03/apache2-umask/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>PHP Sessions in Memcached</title><link>http://www.ducea.com/2009/06/02/php-sessions-in-memcached/</link> <comments>http://www.ducea.com/2009/06/02/php-sessions-in-memcached/#comments</comments> <pubDate>Tue, 02 Jun 2009 10:15:34 +0000</pubDate> <dc:creator>- Marius -</dc:creator> <category><![CDATA[Centos]]></category> <category><![CDATA[Debian]]></category> <category><![CDATA[Fedora]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[RHEL]]></category> <category><![CDATA[Scaling]]></category> <category><![CDATA[Ubuntu]]></category> <category><![CDATA[memcached]]></category> <category><![CDATA[pecl]]></category> <category><![CDATA[php5]]></category> <category><![CDATA[php_extensions]]></category> <category><![CDATA[php_modules]]></category><guid
isPermaLink="false">http://www.ducea.com/?p=903</guid> <description><![CDATA[The moment a PHP application grows to run on more servers, normally people will see problems caused by PHP sessions. If the application is not persistent you are lucky and don&#8217;t care about this, but if not you will quickly see this regardless of how good the load balancer you use is handling stickiness (sending [...]]]></description> <content:encoded><![CDATA[<p>The moment a <em>PHP application grows to run on more servers</em>, normally people will see problems caused by <strong>PHP sessions</strong>. If the application is not persistent you are lucky and don&#8217;t care about this, but if not you will quickly see this regardless of how good the load balancer you use is handling stickiness (sending the users to the same real server), this will slowly become a major issue. There are various solutions that can be used to store PHP sessions in a <strong>shared location</strong>, but I want to present today one solution that is very simple to implement, yet very efficient and on the long term better suited than using a database backend for this: using <a
href="http://danga.com/memcached" target="_blank"><strong>memcache</strong></a> to store the sessions.</p><p>The <a
href="http://pecl.php.net/package/memcache" target="_blank">pecl memcache php extension</a> has supported for a long time the memcache session.save_handler, but with the release <strong>3.0.x</strong> (still in beta at this time) this brings in a set of interesting <a
href="http://pecl.php.net/package/memcache/3.0.0" target="_blank">features</a> for us:<br
/> - UDP support<br
/> - Binary protocol support<br
/> - Non-blocking IO using select()<br
/> - Key and session redundancy (values are written to N mirrors)<br
/> - Improved error reporting and failover handling</p><p><span
id="more-903"></span>Installing the php memcache module is very simple and can be done either by using distribution repositories (the version we want to use 3.0.x will probably not be available) or by using pecl or manual compilation:</p><p>Using pecl:<br
/> <code>pecl install memcache-3.0.4</code></p><p>or manually:<br
/> <code>wget http://pecl.php.net/get/memcache-3.0.4.tgz<br
/> tar xvfz memcache-3.0.4.tgz<br
/> cd memcache-3.0.4<br
/> phpize<br
/> ./configure<br
/> make<br
/> make install</code></p><p>Finally, we need to <em>activate the module in php.ini</em>. I normally prefer to create a new file for this <strong>memcache.ini</strong> inside the include directory of the php build (for ex. in debian this is under <strong>/etc/php5/conf.d/memcache.ini</strong>) like this:<br
/> <code>extension=memcache.so<br
/> memcache.allow_failover = 1<br
/> memcache.redundancy = 1<br
/> memcache.session_redundancy = 2</code></p><p>To use memcached to store the <strong>php sessions</strong> we will have to edit php.ini and replace the default file handler settings with something like:<br
/> <code>; Use memcache as a session handler<br
/> session.save_handler = memcache<br
/> ; Use a comma separated list of server urls to use for storage:<br
/> session.save_path="udp://&lt;memcache_server&gt;:11211?persistent=1&amp;weight=1&amp;timeout=1&amp;retry_interval=15"</code></p><p>or if we don&#8217;t want to use this serverwide, we can just define it inside a php block like this:</p><pre><code>$session_save_path = "tcp://&lt;memcache_server1&gt;:11211?persistent=1&amp;weight=1&amp;timeout=1&amp;retry_interval=15, tcp://&lt;memcache_server2&gt;:11211";
ini_set('session.save_handler', 'memcache');
ini_set('session.save_path', $session_save_path);</code></pre><p>Note: as you can see I used in the above example tcp and udp also. Please be sure that your memcached server has udp support enabled if you want to use that. Also ensure that the web server can connect to the memcache server/port (use proper firewall rules to allow this) in order for this to work.</p><p>After restarting apache, it will start using memcache to store the php sessions. If redundancy is needed (why not?) we will probably want to use the internal php memcache support to save the sessions to more servers, or if you prefer you can use an external solution to replicate the memcached server data &#8211; <a
href="http://repcached.lab.klab.org/" target="_blank">repcached</a>.</p>]]></content:encoded> <wfw:commentRss>http://www.ducea.com/2009/06/02/php-sessions-in-memcached/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>iopp: howto get i/o information per process</title><link>http://www.ducea.com/2009/03/09/iopp-howto-get-io-information-per-process/</link> <comments>http://www.ducea.com/2009/03/09/iopp-howto-get-io-information-per-process/#comments</comments> <pubDate>Mon, 09 Mar 2009 10:30:16 +0000</pubDate> <dc:creator>- Marius -</dc:creator> <category><![CDATA[Centos]]></category> <category><![CDATA[Debian]]></category> <category><![CDATA[Fedora]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[RHEL]]></category> <category><![CDATA[Tools]]></category> <category><![CDATA[Ubuntu]]></category> <category><![CDATA[iopp]]></category> <category><![CDATA[vmstat]]></category><guid
isPermaLink="false">http://www.ducea.com/?p=712</guid> <description><![CDATA[We all know and love vmstat, but wouldn&#8217;t it be nice to get such information on a per process basis, to be able to better understand what is causing i/o problems? This is exactly what iopp, written by Mark Wong and released as open source does: &#8220;It&#8217;s a custom tool to go through the Linux [...]]]></description> <content:encoded><![CDATA[<p>We all know and love <strong>vmstat</strong>, but wouldn&#8217;t it be nice to get such information on a <strong>per process</strong> basis, to be able to better understand what is causing <strong>i/o</strong> problems? This is exactly what <strong>iopp</strong>, written by <em>Mark Wong</em> and released as open source does:<br
/> <em>&#8220;It&#8217;s a custom tool to go through the Linux process table to get i/o statistics per process. It is open source and can be downloaded from: <a
href="http://git.postgresql.org/?p=~markwkm/iopp.git;a=summary" target="_blank">http://git.postgresql.org/?p=~markwkm/iopp.git;a=summary</a>&#8220;</em></p><p>Now this sounds interesting, and I am sure anyone that has dealt with i/o issues in the past will probably find this very useful. Let&#8217;s see how we can <strong>install </strong>it and what kind of reporting we get. We will install this from source and here are some quick steps to do this (you will need git and cmake for this):<br
/> <code>git clone git://git.postgresql.org/git/~markwkm/iopp.git<br
/> cd iopp<br
/> cmake CMakeLists.txt<br
/> make</code></p><p><span
id="more-712"></span>And install it:<br
/> <code>make install DESTDIR=/usr<br
/> [100%] Built target iopp<br
/> Install the project...<br
/> -- Install configuration: ""<br
/> -- Installing /usr/bin/iopp<br
/> -- Installing /usr/share/man/man8/iopp.8</code><br
/> after this <strong>iopp </strong>will be installed into <strong>/usr/bin</strong>.</p><p>Let&#8217;s see what are the program parameters:<br
/> <code>iopp -h<br
/> usage: iopp -h|--help<br
/> usage: iopp [-ci] [-k|-m] [delay [count]]<br
/> -c, --command display full command line<br
/> -h, --help display help<br
/> -i, --idle hides idle processes<br
/> -k, --kilobytes display data in kilobytes<br
/> -m, --megabytes display data in megabytes<br
/> -u, --human-readable display data in kilo-, mega-, or giga-bytes</code></p><p>And finally let&#8217;s test it:<br
/> <code>iopp -i -u 5<br
/> pid rchar wchar    syscr    syscw reads writes cwrites command<br
/> 2464    0B    0B        0        0    0B  8192B      0B kjournald<br
/> 3364  515K    0B     1336        0    0B     0B      0B mysqld<br
/> 4664    0B  134B        0        4    0B     0B      0B apache2<br
/> 4685  803K  114K      454       80    0B     0B      0B collectd<br
/> 20758   82K   82K      329      329    0B    84K      0B cronolog<br
/> 26236   67K 3754B       59       27    0B     0B      0B apache2<br
/> ...</code></p><p>The manual page explains each output field:</p><ul><li> <strong>pid</strong>: The process id.</li><li> <strong>rchar</strong>: The number of bytes which this task has caused to be read from storage.</li><li> <strong>wchar</strong>: The number of bytes which this task has caused, or shall cause to be written to disk.</li><li> <strong>syscr</strong>: Count of the number of read I/O operations.</li><li> <strong>syscw</strong>: Count of the number of write I/O operations.</li><li> <strong>rbytes rkb rmb reads</strong>: Count of the number of bytes which this process really did cause to be fetched from the storage layer.</li><li> <strong>wbytes wkb wmb writes</strong>: Count of the number of bytes which this process really did cause to be sent to the storage layer.</li><li> <strong>cwbytes cwkb cwmb cwrites</strong>: The number of bytes which this process caused to not happen, by truncating pagecache.</li><li> <strong>command</strong>: Filename of the executable.</li></ul><p>Other similar tools are <strong><a
href="http://guichaz.free.fr/iotop/" target="_blank">iotop</a> </strong>and <strong>pidstat </strong>from newer <strong>sysstat </strong>packages and I will describe them in a future post.</p>]]></content:encoded> <wfw:commentRss>http://www.ducea.com/2009/03/09/iopp-howto-get-io-information-per-process/feed/</wfw:commentRss> <slash:comments>6</slash:comments> </item> <item><title>Mdadm Cheat Sheet</title><link>http://www.ducea.com/2009/03/08/mdadm-cheat-sheet/</link> <comments>http://www.ducea.com/2009/03/08/mdadm-cheat-sheet/#comments</comments> <pubDate>Sun, 08 Mar 2009 11:19:20 +0000</pubDate> <dc:creator>- Marius -</dc:creator> <category><![CDATA[Centos]]></category> <category><![CDATA[Debian]]></category> <category><![CDATA[Fedora]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[RHEL]]></category> <category><![CDATA[Tips & Tricks]]></category> <category><![CDATA[Tools]]></category> <category><![CDATA[Ubuntu]]></category> <category><![CDATA[cheatsheet]]></category> <category><![CDATA[mdadm]]></category> <category><![CDATA[raid]]></category> <category><![CDATA[tips]]></category><guid
isPermaLink="false">http://www.ducea.com/?p=691</guid> <description><![CDATA[Mdadm is the modern tool most Linux distributions use these days to manage software RAID arrays; in the past raidtools was the tool we have used for this. This cheat sheet will show the most common usages of mdadm to manage software raid arrays; it assumes you have a good understanding of software RAID and [...]]]></description> <content:encoded><![CDATA[<p><strong>Mdadm </strong>is the modern tool most Linux distributions use these days to manage <strong>software RAID</strong> arrays; in the past <em>raidtools </em>was the tool we have used for this. This cheat sheet will show the most <em>common usages of mdadm</em> to manage software raid arrays; it assumes you have a good understanding of software RAID and Linux in general, and it will just explain the commands line usage of mdadm. The examples bellow use RAID1, but they can be adapted for any RAID level the Linux kernel driver supports.</p><h3>1. Create a new RAID array</h3><p>Create (mdadm &#8211;create) is used to create a new array:<br
/> <code>mdadm --create --verbose /dev/md0 --level=1 /dev/sda1 /dev/sdb2</code><br
/> <span
id="more-691"></span>or using the compact notation:<br
/> <code>mdadm -Cv /dev/md0 -l1 -n2 /dev/sd[ab]1</code></p><h3>2. /etc/mdadm.conf</h3><p>/etc/mdadm.conf or /etc/mdadm/mdadm.conf (on debian) is the main configuration file for mdadm. After we create our RAID arrays we add them to this file using:<br
/> <code>mdadm --detail --scan &gt;&gt; /etc/mdadm.conf</code><br
/> or on debian<br
/> <code>mdadm --detail --scan &gt;&gt; /etc/mdadm/mdadm.conf</code></p><h3>3. Remove a disk from an array</h3><p>We can&#8217;t remove a disk directly from the array, unless it is failed, so we first have to fail it (if the drive it is failed this is normally already in failed state and this step is not needed):<br
/> <code>mdadm --fail /dev/md0 /dev/sda1</code><br
/> and now we can remove it:<br
/> <code>mdadm --remove /dev/md0 /dev/sda1</code></p><p>This can be done in a single step using:<br
/> <code>mdadm /dev/md0 --fail /dev/sda1 --remove /dev/sda1</code></p><h3>4. Add a disk to an existing array</h3><p>We can add a new disk to an array (replacing a failed one probably):<br
/> <code>mdadm --add /dev/md0 /dev/sdb1</code></p><h3>5. Verifying the status of the RAID arrays</h3><p>We can check the status of the arrays on the system with:<br
/> <code>cat /proc/mdstat</code><br
/> or<br
/> <code>mdadm --detail /dev/md0</code></p><p>The output of this command will look like:</p><pre><code>cat /proc/mdstat
Personalities : [raid1]
md0 : active raid1 sdb1[1] sda1[0]
104320 blocks [2/2] [UU]

md1 : active raid1 sdb3[1] sda3[0]
19542976 blocks [2/2] [UU]

md2 : active raid1 sdb4[1] sda4[0]
223504192 blocks [2/2] [UU]</code></pre><p>here we can see both drives are used and working fine &#8211; <strong>U</strong>. A failed drive will show as <strong>F</strong>, while a degraded array will miss the second disk <strong>-</strong></p><p>Note: while monitoring the status of a RAID rebuild operation using watch can be useful:<br
/> <code>watch cat /proc/mdstat</code></p><h3>6. Stop and delete a RAID array</h3><p>If we want to completely remove a raid array we have to stop if first and then remove it:<br
/> <code>mdadm --stop /dev/md0<br
/> mdadm --remove /dev/md0</code><br
/> and finally we can even delete the superblock from the individual drives:<br
/> <code>mdadm --zero-superblock /dev/sda</code></p><p>Finally in using RAID1 arrays, where we create <strong>identical partitions</strong> on both drives this can be useful to copy the partitions from sda to sdb:<br
/> <code>sfdisk -d /dev/sda | sfdisk /dev/sdb</code></p><p>(this will dump the partition table of sda, removing completely the existing partitions on sdb, so be sure you want this before running this command, as it will not warn you at all).</p><p>There are many other usages of <strong>mdadm </strong>particular for each type of RAID level, and I would recommend to use the manual page (<em>man mdadm</em>) or the help (<em>mdadm &#8211;help</em>) if you need more details on its usage. Hopefully these quick examples will put you on the fast track with how mdadm works.</p>]]></content:encoded> <wfw:commentRss>http://www.ducea.com/2009/03/08/mdadm-cheat-sheet/feed/</wfw:commentRss> <slash:comments>27</slash:comments> </item> <item><title>HowTo force remote devices (routers/switches) to refresh their arp cache entry for a machine</title><link>http://www.ducea.com/2009/03/06/howto-force-remote-devices-routersswitches-to-refresh-their-arp-cache-entry-for-a-machine/</link> <comments>http://www.ducea.com/2009/03/06/howto-force-remote-devices-routersswitches-to-refresh-their-arp-cache-entry-for-a-machine/#comments</comments> <pubDate>Fri, 06 Mar 2009 20:02:14 +0000</pubDate> <dc:creator>- Marius -</dc:creator> <category><![CDATA[Centos]]></category> <category><![CDATA[Debian]]></category> <category><![CDATA[Fedora]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[RHEL]]></category> <category><![CDATA[Tips & Tricks]]></category> <category><![CDATA[Ubuntu]]></category> <category><![CDATA[arp]]></category> <category><![CDATA[arping]]></category> <category><![CDATA[router]]></category> <category><![CDATA[switch]]></category> <category><![CDATA[tips]]></category><guid
isPermaLink="false">http://www.ducea.com/?p=679</guid> <description><![CDATA[The Address Resolution Protocol (ARP) is the method for finding a host&#8217;s link layer (hardware) address when only its Internet Layer (IP) or some other Network Layer address is known. ARP is a Link Layer protocol (Layer 2) because it only operates on the local area network or point-to-point link that a host is connected [...]]]></description> <content:encoded><![CDATA[<p>The <strong><a
href="http://en.wikipedia.org/wiki/Address_Resolution_Protocol" target="_blank">Address Resolution Protocol</a> (ARP)</strong> is the method for finding a host&#8217;s link layer (hardware) address when only its Internet Layer (IP) or some other Network Layer address is known. ARP is a Link Layer protocol (Layer 2) because it only operates on the local area network or point-to-point link that a host is connected to. When we <strong>migrate one IP</strong> from a machine to another one, we might have problems caused by &#8216;<strong>arp caching</strong>&#8216;. Various devices will cache the arp information for a specified amount of time and even after we moved the IP this will not be seen by some devices that will still use the cached information. I am talking about directly connected <strong>switches or routers</strong>, that we might have control or maybe not. If we have control on all the external devices, normally we just connect to the router or switch and remove the arp entry, forcing the device to query again for the information. This post will try to help in the situation where<em> we <strong>don&#8217;t </strong>have direct control on the external devices </em>(we are collocated or use rented servers in a remote datacenter, etc.), to <strong>minimize the downtime</strong> associated with this type of IP migration.</p><p>It is quite frequent to use separate IPs for various services on the same machine, and move those IPs to another server if needed. These are sometimes called <strong>portable IPs</strong> that can be migrated to any server in a particular colo/lan. This is done normally to minimized downtime and keep maintenance of such operations minimal (and to not rely on dns changes). Still <strong>arp caching</strong> on various network devices can cause big problems. Let&#8217;s assume we moved the IP from one server to another one in the same LAN to move away some service from our main web server. Taking down the IP from the existing server and bringing it up on the new server will complete our direct work if we don&#8217;t have access on the switches/routers in front of us. <em>Again if you have control on all devices just connect to them and delete the arp cache for this ip to allow it to be re-cached on the new machine.</em></p><p><span
id="more-679"></span>So after we have the IP moved on the new machine and now have to wait&#8230; The arp cache depends on the actual devices and can be anything from <em>5 minutes to not expire</em>. Let&#8217;s assume for this example that the ip is <em>192.168.0.101</em> and after we run <strong>ifup </strong>and <strong>ifdown </strong>we have the IP correctly showing on the new server, <em>srv02</em>. If we don&#8217;t want to wait helpless for this to happen automatically, the solution is to <strong>broadcast </strong>from our new machine the arp with the source of the IP. Hopefully this will make the remote device to verify and invalidate its existing cache entry. For this we can use <strong>arping</strong>; installation is simple as it should be in most modern linux distributions by default. On debian you would install arping just by running:<br
/> <code>aptitude install arping</code><br
/> finally we use a command like:<br
/> <code>arping -S &lt;our_IP&gt; -B</code><br
/> that will <strong>broadcast </strong>our source IP and direct it to the broadcast address (255.255.255.255) . If your arp command uses different parameters notations, you should looks for something similar (to set the source and ping the broadcast). In our example with the IP 192.168.0.101 we would use:<br
/> <code>srv02:~# arping -S 192.168.0.101 -B<br
/> ARPING 255.255.255.255<br
/> --- 255.255.255.255 statistics ---<br
/> 16 packets transmitted, 0 packets received, 100% unanswered</code><br
/> (stop it with CTRL-C once it is working).</p><p>Normally after this, all should be ok and the remote device should <strong>cache the new arp entry</strong>, invalidating the existing cached one. If this is not the case, then call your datacenter to minimize the downtime <img
src='http://www.ducea.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> . I would always suggest testing this first and seeing what downtime to expect and if you can minimize it like this with <strong>arping</strong>, first try with a non-production test IP. Don&#8217;t do this with live, production IP/service until you know what to expect. I hope this post will help you if you will have to deal with a similar situation. If this doesn’t work as expected in your case, please let us know what devices you found problematic, and if you were able to use a different workaround.</p>]]></content:encoded> <wfw:commentRss>http://www.ducea.com/2009/03/06/howto-force-remote-devices-routersswitches-to-refresh-their-arp-cache-entry-for-a-machine/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>HowTo ignore some files/folders from awstats reports</title><link>http://www.ducea.com/2009/02/09/howto-ignore-some-filesfolders-from-awstats-reports/</link> <comments>http://www.ducea.com/2009/02/09/howto-ignore-some-filesfolders-from-awstats-reports/#comments</comments> <pubDate>Mon, 09 Feb 2009 12:14:42 +0000</pubDate> <dc:creator>- Marius -</dc:creator> <category><![CDATA[Centos]]></category> <category><![CDATA[Debian]]></category> <category><![CDATA[Fedora]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[News from Outside]]></category> <category><![CDATA[RHEL]]></category> <category><![CDATA[Security]]></category> <category><![CDATA[Tools]]></category> <category><![CDATA[Ubuntu]]></category> <category><![CDATA[awstats]]></category><guid
isPermaLink="false">http://www.ducea.com/?p=565</guid> <description><![CDATA[Awstats will consider as a page hit any entry from the log it processes. By default some file extensions (for regular image types and css/js) are excluded from what awstats will consider as a page: NotPageList="css js class gif jpg jpeg png bmp ico"(this is the default). All other file types will be counted as [...]]]></description> <content:encoded><![CDATA[<p><strong>Awstats </strong>will consider as a page hit any entry from the log it processes. <em>By default some file extensions</em> (for regular image types and css/js) are excluded from what awstats will consider as a page:<br
/> <code>NotPageList="css js class gif jpg jpeg png bmp ico"</code>(this is the default). All other file types will be counted as pages. Now, if we want to completely ignore some files, or even all the content of one folder from the awstats processing we can use the <strong>SkipFiles </strong>parameter. We might want to do this to ignore some frames, hidden pages, ajax calls, etc.</p><p><span
id="more-565"></span>The <strong>SkipFiles </strong>parameter is <em>by default empty</em>, and in order to use it we have to add the appropriate config in our <em>awstats.conf</em> file.  For example to ignore a file called <em>somefile.php</em> we will add <em>&#8220;/somefile.php</em>&#8220;:<br
/> <code>SkipFiles="/somefile.php"</code><br
/> while if we want to ignore all the pages in a folder called <em>somefolder </em>we will have to use a regex value like: <em>&#8220;REGEX[^\/somefolder]&#8220;</em><br
/> We can add several rules separated by spaces:<br
/> <code>SkipFiles="/somefile.php REGEX[^\/somefolder]"</code></p><p><em>Note</em>: this will be effective only for <strong>new updates</strong>; meaning existing data will not be affected by this (if really needed you will have to regenerate your stats to get rid of those pages in old stats).</p>]]></content:encoded> <wfw:commentRss>http://www.ducea.com/2009/02/09/howto-ignore-some-filesfolders-from-awstats-reports/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Sendmail Multiple Queues</title><link>http://www.ducea.com/2008/08/19/sendmail-multiple-queues/</link> <comments>http://www.ducea.com/2008/08/19/sendmail-multiple-queues/#comments</comments> <pubDate>Tue, 19 Aug 2008 12:00:05 +0000</pubDate> <dc:creator>- Marius -</dc:creator> <category><![CDATA[Centos]]></category> <category><![CDATA[Debian]]></category> <category><![CDATA[Fedora]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[RHEL]]></category> <category><![CDATA[Ubuntu]]></category> <category><![CDATA[sendmail]]></category> <category><![CDATA[tuning]]></category><guid
isPermaLink="false">http://www.ducea.com/?p=300</guid> <description><![CDATA[Sendmail will use by default a single mail queue. This is what most users will need, and if you don&#8217;t have any special requirement you will not care about this. Still for high traffic mail servers it might be useful to split the queue over several directories, as thousands of files in a single directory [...]]]></description> <content:encoded><![CDATA[<p><strong>Sendmail </strong>will use by default <strong>a single mail queue</strong>. This is what most users will need, and if you don&#8217;t have any special requirement you will not care about this. Still for high traffic mail servers it might be useful to <em>split the queue over several directories</em>, as thousands of files in a single directory will become a performance penalty at some point and also processing the queue sequentially will become very slow. <em>This post will show how we can implement multiple mail queues with modern sendmail versions</em>.</p><p><span
id="more-300"></span>Let&#8217;s start by assuming we want to use <strong>8 mail queues</strong>. First thing is to <strong>create the actual directories</strong> as sendmail will not do this by default:<br
/> <code>mkdir /var/spool/mqueue/q{1,2,3,4,5,6,7,8}</code><br
/> And fix the permissions to the ones of the original folder /var/spool/mqueue. For ex. this might look like:<br
/> <code>chown -R smmta:smmsp /var/spool/mqueue/q*</code><br
/> using a default sendmail install running on debian. Fix the users to the specific ones found on your system (ls -al /var/spool/mqueue if you are uncertain of this).</p><p>Next, we need to <strong>enable the multiple queues in the sendmail configuration</strong>. For this we will edit <strong>sendmail.mc</strong> (normally found under /etc/mail) and append one line:<br
/> <code>define(`QUEUE_DIR', `/var/spool/mqueue/q*')dnl</code><br
/> and now regenerate <strong>sendmail.cf</strong>; this is done normally running:<br
/> <code>m4 sendmail.mc &gt; /etc/mail/sendmail.cf</code><br
/> (fix your paths appropriately), or if you are using debian sendmail you can just run <strong>make all</strong> in <em>/etc/mail</em>.</p><p>After <strong>restarting </strong>sendmail, it will start using the multiple queues we defined. Running <strong>mailq </strong>will output each of the queues:<br
/> <code>mailq<br
/> /var/spool/mqueue/q6 is empty<br
/> /var/spool/mqueue/q4 is empty<br
/> /var/spool/mqueue/q3 is empty<br
/> /var/spool/mqueue/q2 is empty<br
/> /var/spool/mqueue/q5 is empty<br
/> /var/spool/mqueue/q1 is empty<br
/> /var/spool/mqueue/q7 is empty<br
/> /var/spool/mqueue/q8 is empty<br
/> Total requests: 0</code></p><p><strong>Note</strong>: if you want to add more folders to the configuration all you have to do is to create the respective folders, set the appropriate permissions and restart sendmail.</p><p>If you had existing mails in the queue (most likely if you were looking for this solution), if you want them still processed, move them from /var/spool/mqueue in one of the newly created queues (q1 for ex).</p><p>Individual queue directories can be symbolic links to other partitions to spreads load among multiple disks. Queue IDs are unique across queues so you can move the items among queues if you have to.</p>]]></content:encoded> <wfw:commentRss>http://www.ducea.com/2008/08/19/sendmail-multiple-queues/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>CentOS 5.2 Released</title><link>http://www.ducea.com/2008/06/25/centos-52-released/</link> <comments>http://www.ducea.com/2008/06/25/centos-52-released/#comments</comments> <pubDate>Wed, 25 Jun 2008 16:48:30 +0000</pubDate> <dc:creator>- Marius -</dc:creator> <category><![CDATA[Centos]]></category> <category><![CDATA[releases]]></category><guid
isPermaLink="false">http://www.ducea.com/?p=252</guid> <description><![CDATA[One month after RedHat released Red Hat Enterprise Linux 5.2 (20080521), the CentOS team released yesterday their own 5.2 update for CentOS-5. There are available new iso images for the i386 and x86_64 architectures, while PowerPC, IA64 and Sparc are planned and will be released soon. CentOS-5.2 is based on the upstream release EL 5.2.0, [...]]]></description> <content:encoded><![CDATA[<p>One month after <strong>RedHat </strong>released <em>Red Hat Enterprise Linux 5.2</em> (20080521), the CentOS team <a
href="http://lists.centos.org/pipermail/centos-announce/2008-June/014999.html" target="_blank">released</a> yesterday their own <strong>5.2</strong> update for <strong>CentOS-5</strong>. There are available new iso images for the <strong>i386 </strong>and <strong>x86_64</strong> architectures, while PowerPC, IA64 and Sparc are planned and will be released soon. <em>CentOS-5.2 is based on the upstream release EL 5.2.0, and includes packages from all variants including Server and Client. All upstream repositories have been combined into one, to make it easier for end users to work with.</em></p><p>Besides the changes introduced by <a
href="http://www.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5.2/html/Release_Notes/x86/index.html" target="_blank">rhel5.2</a> you can find the centos particularities <a
href="http://wiki.centos.org/Manuals/ReleaseNotes/CentOS5.2" target="_blank">here</a>.</p><h3>Updating from CentOS-5.0 and 5.1:</h3><p>Systems running CentOS-5 (either 5.0 or 5.1) will notice the update in the yum/up2date repositories and can be upgraded immediately by running:<br
/> <code>yum upgrade</code></p><p><span
id="more-252"></span>ps. if you will be upgrading your system live depending from the number of packages you have installed this can take a while. For ex. here is a sample output of a typical system that will upgrade ~ 190 packages and require downloading 257M:</p><pre><code>=============================================================================
 Package                 Arch       Version          Repository        Size
=============================================================================
Installing:
 dhcpv6-client           i386       1.0.10-4.el5_2.2  updates           121 k
     replacing  dhcpv6_client.i386 0.10-33.el5
 kernel                  i686       2.6.18-92.1.1.el5  updates            14 M
 kernel-devel            i686       2.6.18-92.1.1.el5  updates           4.8 M
 libhugetlbfs            i386       1.2-5.el5        base               14 k
     replacing  libhugetlbfs-lib.i386 1.0.1-1.el5
Updating:
 Deployment_Guide-en-US  noarch     5.2-9.el5.centos  base              7.0 M
 acl                     i386       2.2.39-3.el5     base               67 k
 amtu                    i386       1.0.6-1.el5      base               24 k
 apr-util                i386       1.2.7-7.el5      base               76 k
 at-spi                  i386       1.7.11-3.el5     base              289 k
 audit                   i386       1.6.5-9.el5      base              287 k
 audit-libs              i386       1.6.5-9.el5      base               67 k
 audit-libs-python       i386       1.6.5-9.el5      base               73 k
 authconfig              i386       5.3.21-3.el5     base              452 k
 autofs                  i386       1:5.0.1-0.rc2.88  base              850 k
 bash                    i386       3.2-21.el5       base              1.9 M
 bind                    i386       30:9.3.4-6.P1.el5  base              957 k
 bind-libs               i386       30:9.3.4-6.P1.el5  base              847 k
 bind-utils              i386       30:9.3.4-6.P1.el5  base              166 k
 binutils                i386       2.17.50.0.6-6.el5  base              2.9 M
 caching-nameserver      i386       30:9.3.4-6.P1.el5  base               58 k
 cairo                   i386       1.2.4-5.el5      base              394 k
 centos-release          i386       10:5-2.el5.centos  base               19 k
 centos-release-notes    i386       5.2-2            base               39 k
 checkpolicy             i386       1.33.1-4.el5     base              253 k
 chkconfig               i386       1.3.30.1-2       base              159 k
 coolkey                 i386       1.1.0-6.el5      base               89 k
 coolkey-devel           i386       1.1.0-6.el5      base               16 k
 coreutils               i386       5.97-14.el5      base              3.6 M
 cpp                     i386       4.1.2-42.el5     base              2.7 M
 cpuspeed                i386       1:1.2.1-3.el5    base               29 k
 crash                   i386       4.0-5.0.3.el5.centos  base              1.5 M
 createrepo              noarch     0.4.11-3.el5     base               59 k
 cups                    i386       1:1.2.4-11.18.el5_2.1  updates           2.7 M
 cups-libs               i386       1:1.2.4-11.18.el5_2.1  updates           181 k
 dbus                    i386       1.0.0-7.el5      base              468 k
 dbus-devel              i386       1.0.0-7.el5      base               37 k
 device-mapper           i386       1.02.24-1.el5    base              656 k
 device-mapper-multipath  i386       0.4.7-17.el5     base              2.0 M
 dhclient                i386       12:3.0.5-13.el5  base              275 k
 diffstat                i386       1.41-1.2.3.el5   updates            18 k
 diffutils               i386       2.8.1-15.2.3.el5  base              210 k
 dmraid                  i386       1.0.0.rc13-9.el5  base              557 k
 e2fsprogs               i386       1.39-15.el5      base              964 k
 e2fsprogs-devel         i386       1.39-15.el5      base              568 k
 e2fsprogs-libs          i386       1.39-15.el5      base              116 k
 file                    i386       4.17-13          base              320 k
 freetype                i386       2.2.1-20.el5_2   updates           313 k
 freetype-devel          i386       2.2.1-20.el5_2   updates           151 k
 frysk                   i686       0.0.1.2008.03.19.rh1-1.el5  base               38 M
 gcc                     i386       4.1.2-42.el5     base              5.2 M
 gcc-c++                 i386       4.1.2-42.el5     base              3.4 M
 gcc-gfortran            i386       4.1.2-42.el5     base              3.1 M
 gdb                     i386       6.5-37.el5_2.2   updates           3.1 M
 glibc                   i686       2.5-24           base              5.2 M
 glibc-common            i386       2.5-24           base               16 M
 glibc-devel             i386       2.5-24           base              2.0 M
 glibc-headers           i386       2.5-24           base              610 k
 gnutls                  i386       1.4.1-3.el5_1    updates           350 k
 grub                    i386       0.97-13.2        base              491 k
 gtk2                    i386       2.10.4-20.el5    base              6.5 M
 gzip                    i386       1.3.5-10.el5.centos  base              100 k
 hal                     i386       0.5.8.1-35.el5   base              376 k
 htmlview                noarch     4.0.0-2.el5      base              7.7 k
 hwdata                  noarch     0.213.6-1.el5    base              339 k
 initscripts             i386       8.45.19.EL-1.el5.centos.1  base              1.6 M
 iproute                 i386       2.6.18-7.el5     base              802 k
 iptables                i386       1.3.5-4.el5      base              235 k
 iptables-ipv6           i386       1.3.5-4.el5      base              160 k
 irqbalance              i386       2:0.55-10.el5    base               19 k
 kbd                     i386       1.12-20.el5      base              1.0 M
 kernel-headers          i386       2.6.18-92.1.1.el5  updates           843 k
 kpartx                  i386       0.4.7-17.el5     base              406 k
 krb5-devel              i386       1.6.1-25.el5     base              1.9 M
 krb5-libs               i386       1.6.1-25.el5     base              656 k
 krb5-workstation        i386       1.6.1-25.el5     base              872 k
 ksh                     i386       20060214-1.7     base              1.1 M
 kudzu                   i386       1.2.57.1.17-1    base              221 k
 kudzu-devel             i386       1.2.57.1.17-1    base              130 k
 libX11                  i386       1.0.3-9.el5      base              795 k
 libX11-devel            i386       1.0.3-9.el5      base              666 k
 libacl                  i386       2.2.39-3.el5     base               19 k
 libacl-devel            i386       2.2.39-3.el5     base               81 k
 libgcc                  i386       4.1.2-42.el5     base               93 k
 libgcj                  i386       4.1.2-42.el5     base               17 M
 libgfortran             i386       4.1.2-42.el5     base              230 k
 libgomp                 i386       4.1.2-42.el5     base               82 k
 libselinux              i386       1.33.4-5.el5     base               94 k
 libselinux-devel        i386       1.33.4-5.el5     base              131 k
 libselinux-python       i386       1.33.4-5.el5     base               58 k
 libstdc++               i386       4.1.2-42.el5     base              360 k
 libstdc++-devel         i386       4.1.2-42.el5     base              2.9 M
 libuser                 i386       0.54.7-2.el5.5   base              437 k
 libuser-devel           i386       0.54.7-2.el5.5   base               56 k
 libvolume_id            i386       095-14.16.el5    base               39 k
 libvorbis               i386       1:1.1.2-3.el5_1.2  updates           194 k
 libvorbis-devel         i386       1:1.1.2-3.el5_1.2  updates           542 k
 libxslt                 i386       1.1.17-2.el5_1.1  updates           485 k
 libxslt-devel           i386       1.1.17-2.el5_1.1  updates           295 k
 logwatch                noarch     7.3-6.el5        base              247 k
 ltrace                  i386       0.5-7.45svn.el5  base               59 k
 lvm2                    i386       2.02.32-4.el5    base              2.3 M
 m2crypto                i386       0.16-6.el5.2     base              490 k
 make                    i386       1:3.81-3.el5     base              466 k
 mcstrans                i386       0.2.7-1.el5      base               16 k
 mkinitrd                i386       5.1.19.6-28      base              449 k
 module-init-tools       i386       3.3-0.pre3.1.37.el5  base              417 k
 mysql                   i386       5.0.45-7.el5     base              4.1 M
 mysql-devel             i386       5.0.45-7.el5     base              2.4 M
 mysql-server            i386       5.0.45-7.el5     base              9.7 M
 nash                    i386       5.1.19.6-28      base              1.1 M
 net-snmp                i386       1:5.3.1-24.el5_2.1  updates           698 k
 net-snmp-libs           i386       1:5.3.1-24.el5_2.1  updates           1.2 M
 net-snmp-utils          i386       1:5.3.1-24.el5_2.1  updates           182 k
 net-tools               i386       1.60-78.el5      base              360 k
 newt                    i386       0.52.2-10.el5    base              107 k
 newt-devel              i386       0.52.2-10.el5    base               75 k
 nfs-utils               i386       1:1.0.9-33.el5   base              374 k
 notification-daemon     i386       0.3.5-9.el5      base               47 k
 nscd                    i386       2.5-24           base              158 k
 nspr                    i386       4.7.0.99.2-1.el5  base              119 k
 nss                     i386       3.11.99.5-2.el5.centos  base              1.1 M
 nss-tools               i386       3.11.99.5-2.el5.centos  base              2.1 M
 nss_db                  i386       2.2-35.3         base              775 k
 nss_ldap                i386       253-12.el5       base              1.4 M
 ntp                     i386       4.2.2p1-8.el5.centos.1  base              1.3 M
 ntsysv                  i386       1.3.30.1-2       base               24 k
 oddjob                  i386       0.27-9.el5       base               56 k
 oddjob-libs             i386       0.27-9.el5       base               32 k
 openssh                 i386       4.3p2-26.el5     base              284 k
 openssh-clients         i386       4.3p2-26.el5     base              446 k
 openssh-server          i386       4.3p2-26.el5     base              254 k
 openssl                 i686       0.9.8b-10.el5    base              1.4 M
 openssl-devel           i386       0.9.8b-10.el5    base              1.8 M
 oprofile                i386       0.9.3-16.el5     base              2.1 M
 pam                     i386       0.99.6.2-3.27.el5  base              973 k
 pam-devel               i386       0.99.6.2-3.27.el5  base              188 k
 paps                    i386       0.6.6-18.el5     updates            32 k
 parted                  i386       1.8.1-17.el5     base              539 k
 pciutils                i386       2.2.3-5          base               83 k
 pciutils-devel          i386       2.2.3-5          base               40 k
 pcsc-lite               i386       1.4.4-0.1.el5    base              124 k
 pcsc-lite-devel         i386       1.4.4-0.1.el5    base               16 k
 pcsc-lite-libs          i386       1.4.4-0.1.el5    base               23 k
 perl                    i386       4:5.8.8-10.el5_2.3  updates            12 M
 php                     i386       5.1.6-20.el5     base              1.1 M
 php-cli                 i386       5.1.6-20.el5     base              2.1 M
 php-common              i386       5.1.6-20.el5     base              153 k
 php-mysql               i386       5.1.6-20.el5     base               83 k
 php-pdo                 i386       5.1.6-20.el5     base               62 k
 php-snmp                i386       5.1.6-20.el5     base               28 k
 pkgconfig               i386       1:0.21-2.el5     base               59 k
 pm-utils                i386       0.99.3-6.el5.centos.19  base               66 k
 policycoreutils         i386       1.33.12-14.el5   base              623 k
 popt                    i386       1.10.2-48.el5    base               69 k
 procps                  i386       3.2.7-9.el5      base              207 k
 psmisc                  i386       22.2-6           base               61 k
 pygtk2                  i386       2.10.1-12.el5    base              1.1 M
 python                  i386       2.4.3-21.el5     base              5.9 M
 python-devel            i386       2.4.3-21.el5     base              3.0 M
 python-tools            i386       2.4.3-21.el5     base              955 k
 redhat-rpm-config       noarch     8.0.45-24.el5    base               54 k
 rpm                     i386       4.4.2-48.el5     base              638 k
 rpm-build               i386       4.4.2-48.el5     base              553 k
 rpm-devel               i386       4.4.2-48.el5     base              1.3 M
 rpm-libs                i386       4.4.2-48.el5     base              968 k
 rpm-python              i386       4.4.2-48.el5     base               54 k
 selinux-policy          noarch     2.4.6-137.el5    base              381 k
 selinux-policy-targeted  noarch     2.4.6-137.el5    base              911 k
 shadow-utils            i386       2:4.0.17-13.el5  base              1.0 M
 shared-mime-info        i386       0.19-5.el5       base              148 k
 smartmontools           i386       1:5.36-4.el5     base              294 k
 sudo                    i386       1.6.8p12-12.el5  base              217 k
 sysklogd                i386       1.4.1-44.el5     base               73 k
 system-config-network-tui  noarch     1.3.99.10-2.el5  base              1.8 M
 system-config-securitylevel-tui  i386       1.6.29.1-2.1.el5  base              253 k
 systemtap               i386       0.6.2-1.el5      base              1.3 M
 systemtap-runtime       i386       0.6.2-1.el5      base               47 k
 tcpdump                 i386       14:3.9.4-12.el5  base              451 k
 tkinter                 i386       2.4.3-21.el5     base              279 k
 traceroute              i386       3:2.0.1-3.el5    base               39 k
 udev                    i386       095-14.16.el5    base              2.3 M
 usermode                i386       1.88-3.el5.1     base              157 k
 util-linux              i386       2.13-0.47.el5    base              1.8 M
 xorg-x11-server-Xvfb    i386       1.1.1-48.41.el5_2.1  updates           1.6 M
 xorg-x11-xinit          i386       1.0.2-15.el5     base               26 k
 yum                     noarch     3.2.8-9.el5.centos.2.1  updates           582 k
 yum-metadata-parser     i386       1.1.2-2.el5      base               25 k
Installing for dependencies:
 device-mapper-event     i386       1.02.24-1.el5    base               19 k
 python-iniparse         noarch     0.2.3-4.el5      base               34 k
 yum-fastestmirror       noarch     1.1.10-9.el5.centos  base               13 k
Transaction Summary
=============================================================================
Install      7 Package(s)
Update     183 Package(s)
Remove       0 Package(s)
Total download size: 257 M</code></pre>]]></content:encoded> <wfw:commentRss>http://www.ducea.com/2008/06/25/centos-52-released/feed/</wfw:commentRss> <slash:comments>4</slash:comments> </item> <item><title>When should we expect Centos 5.2?</title><link>http://www.ducea.com/2008/05/30/when-should-we-expect-centos-52/</link> <comments>http://www.ducea.com/2008/05/30/when-should-we-expect-centos-52/#comments</comments> <pubDate>Fri, 30 May 2008 18:52:57 +0000</pubDate> <dc:creator>- Marius -</dc:creator> <category><![CDATA[Centos]]></category> <category><![CDATA[RHEL]]></category> <category><![CDATA[distributions]]></category> <category><![CDATA[releases]]></category><guid
isPermaLink="false">http://www.ducea.com/?p=240</guid> <description><![CDATA[Last week RedHat released RHEL5.2 on the 21st, and probably most people running Centos 5 are wandering when they will get the updated Centos5.2 release as well. From past releases I have noticed that this takes a couple of weeks, close to a month, but didn&#8217;t really track the exact time lag between the releases. [...]]]></description> <content:encoded><![CDATA[<p>Last week RedHat released <strong>RHEL5.2</strong> on the <strong>21st</strong>, and probably most people running <a
href="http://www.centos.org/" target="_blank">Centos 5</a> are wandering when they will get the updated <strong>Centos5.2</strong> release as well. From past releases I have noticed that this takes a couple of weeks, close to a month, but didn&#8217;t really track the exact time lag between the releases.</p><p>Reading from <strong>Tim Verhoeven&#8217;s</strong> <a
href="http://misterd77.blogspot.com/2008/05/centos-52.html" target="_blank">explanation</a>:</p><p>&#8220;For some background information, why does it take <strong>3,5 weeks</strong> ? First we need to remove all the logos and trademarks of Upstream. Secondly we need to build everything from source and this for both i386 and x86_64. Then everything that gets build goes past the QA team that verify that everything works as it should. From all the build packages install media will be created and these also need to be tested by the QA team. For each release a set of release notes are created and these are translated in different languages (12 for 5.1). Finally all the packages and media need to be uploaded in distributed to the mirror network so you can download it.&#8221;</p><p>we learn that we should expect Centos 5.2 released sometimes <em>around June 14th 2008</em> (sooner or later).</p>]]></content:encoded> <wfw:commentRss>http://www.ducea.com/2008/05/30/when-should-we-expect-centos-52/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Postfix Newaliases</title><link>http://www.ducea.com/2008/02/02/postfix-newaliases/</link> <comments>http://www.ducea.com/2008/02/02/postfix-newaliases/#comments</comments> <pubDate>Sat, 02 Feb 2008 22:16:25 +0000</pubDate> <dc:creator>- Marius -</dc:creator> <category><![CDATA[Centos]]></category> <category><![CDATA[Debian]]></category> <category><![CDATA[Fedora]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[RHEL]]></category> <category><![CDATA[Ubuntu]]></category> <category><![CDATA[postfix]]></category><guid
isPermaLink="false">http://www.ducea.com/2008/02/02/postfix-newaliases/</guid> <description><![CDATA[Anyone coming from the &#8220;sendmail world&#8221; to postfix will notice immediately the care taken by postfix developers to make the transition as easy as possible. The same commands you would be used to, like for ex. mailq, newaliases, are working in postfix also. The newaliases command works on postfix as expected, rebuilding the aliases database: [...]]]></description> <content:encoded><![CDATA[<p>Anyone coming from the &#8220;<em>sendmail world</em>&#8221; to <a
href="http://www.postfix.org/" target="_blank">postfix</a> will notice immediately the care taken by postfix developers to make the transition as easy as possible. The same commands you would be used to, like for ex. <strong>mailq</strong>, <strong>newaliases</strong>, are working in <strong>postfix </strong>also.</p><p>The <strong>newaliases </strong>command works on postfix as expected, rebuilding the aliases database:<br
/> <code>newaliases</code></p><p><span
id="more-217"></span>One nice feature is that even if you don&#8217;t specify any location of the aliases file (yes you can put it in a different location than /etc/aliases), the command will be smart enough to find the <strong>alias_database </strong>setting from <strong>main.cf</strong> and processes the correct file. Cool! So even if I had defined my aliases in a nonstandard location like for ex, /etc/postfix/aliases:<br
/> <code>main.cf:<br
/> alias_database = hash:/etc/postfix/aliases</code><br
/> newaliases will manage to find that file and process it appropriately.</p><p>Newaliases functions by calling the <strong>postalias </strong>command (that you can of course also use for this purpose). The <a
href="http://www.postfix.org/postalias.1.html" target="_blank">full manual</a> page of postalias shows all the usable parameters.</p><p><em>Note: it may take a minute or so before an alias database update becomes visible. Use the &#8220;postfix reload&#8221; command to eliminate this delay.</em></p>]]></content:encoded> <wfw:commentRss>http://www.ducea.com/2008/02/02/postfix-newaliases/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- Served from: www.ducea.com @ 2010-07-31 16:51:22 by W3 Total Cache -->