<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" xml:lang="en">
  
  <title type="html">Ludo's notes</title>
  <subtitle type="html" />
  
  <link href="http://www.zoxx.net/notes/index.php/" rel="alternate" type="text/html" title="" />
  <updated>2012-05-18T23:22:14-07:00</updated>
  <author>
    <name />
  </author>
  <id>urn:md5:39b8dad6d1ef07126c50bb520ec539b8</id>
  <generator uri="http://www.dotclear.org/">Dotclear</generator>
  
    
  <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/lfrancois" /><feedburner:info uri="lfrancois" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry>
    <title>How to install Bind-DLZ on Linux Fedora</title>
    <link href="http://feedproxy.google.com/~r/lfrancois/~3/jx-QigaVsII/How-to-install-Bind-DLZ-on-Linux-Fedora" rel="alternate" type="text/html" title="How to install Bind-DLZ on Linux Fedora" />
    <id>urn:md5:1fab7355f2f423d8c26fd8eb804c3b95</id>
    <published>2012-03-24T11:21:00-07:00</published>
    <updated>2012-03-31T17:08:24-07:00</updated>
    <author><name>Ludovic Francois</name></author>
        <dc:subject>unix</dc:subject>
            
    <content type="html">    &lt;h2&gt;Introduction&lt;/h2&gt;


&lt;p&gt;Bind is a great DNS server, but sometimes we can see some limitations to use a flat file to manage the zone. This is the case we can use Bind-DLZ.&lt;/p&gt;


&lt;p&gt;DLZ (Dynamically Loadable Zones) is a patch for BIND version 9 that simplifies BIND administration and reduces memory usage and startup time. DLZ allows you to store your zone data in a database. Unlike using scripts, the changes in your database are immediately reflected in BIND's response to DNS queries, so there is no need to reload or restart BIND. You see, BIND "dynamically loads" the "zone" data it needs to answer a query from the database.&lt;/p&gt;


&lt;h2&gt;Install gcc and build tools&lt;/h2&gt;

&lt;pre&gt;
[root@fedora ~]# yum install patch gcc
&lt;/pre&gt;


&lt;h2&gt;Install MySQL and MySQL-devel&lt;/h2&gt;

&lt;pre&gt;
[root@fedora ~]# yum install mysql mysql-server mysql-devel

[root@fedora ~]# chkconfig mysqld on

[root@fedora ~]# /etc/init.d/mysqld start
Starting mysqld (via systemctl):                           [  OK  ]
[root@fedora ~]# 

[root@fedora ~]# mysqladmin -u root password password
&lt;/pre&gt;


&lt;h2&gt;Get Bind DLZ patch&lt;/h2&gt;

&lt;pre&gt;
[root@fedora ~]# wget http://downloads.sourceforge.net/project/bind-dlz/Bind%20DLZ/DLZ-0.7.0/DLZ-0.7.0.tar.gz

[root@fedora ~]# mkdir dlz
[root@fedora ~]# cd dlz/
[root@fedora dlz]# tar xvzf ../DLZ-0.7.0.tar.gz
README.txt
bind_dlz.txt
changelog.txt
dlz.patch
dlz.schema
dlz_interface.txt
sdlz_helper.txt
sdlz_interface.txt
[root@soa3 dlz]# 
&lt;/pre&gt;


&lt;h2&gt;Get Bind version 9.2.2&lt;/h2&gt;


&lt;p&gt;When I published this article for the first time it was the only version of Bind supported, you need to check carefully in the README.txt from the DLZ patch what version is currently supported.&lt;/p&gt;

&lt;pre&gt;
[root@fedora ~]# wget ftp://ftp.isc.org/isc/bind9/9.2.2/bind-9.2.2.tar.gz

[root@fedora ~]# tar xvzf bind-9.2.2.tar.gz 
&lt;/pre&gt;


&lt;h2&gt;Apply DLZ patch to Bind&lt;/h2&gt;

&lt;pre&gt;
[root@fedora ~]# patch -p0 &amp;lt; dlz/dlz.patch 
&lt;/pre&gt;


&lt;h2&gt;Create a symbolic link to make sure autotools find the libmysql&lt;/h2&gt;


&lt;p&gt;I could LD_LIBRARY_PATH or C_INCLUDE_PATH to fix it, but something didn't work correctly so I went to the easiest way since I didn't have a lot of time to get it working. So it's why the symbolic link from the 32 bits to 64 bits directory was the solution I used.&lt;/p&gt;

&lt;pre&gt;
[root@fedora bind-9.2.2]# locate mysql.h | head -1
/usr/include/mysql/mysql.h
[root@fedora bind-9.2.2]# 
[root@fedora bind-9.2.2]# locate libmysqlclient
/usr/lib64/mysql/libmysqlclient.so
/usr/lib64/mysql/libmysqlclient.so.18
/usr/lib64/mysql/libmysqlclient.so.18.0.0
/usr/lib64/mysql/libmysqlclient_r.so
[root@fedora bind-9.2.2]# 

[root@fedora lib]# pwd
/usr/lib
[root@fedora lib]# ln -s ../lib64/mysql/
&lt;/pre&gt;


&lt;h2&gt;Compile and install Bind&lt;/h2&gt;

&lt;pre&gt;
[root@fedora bind-9.2.2]# ./configure --with-dlz-mysql
[root@fedora bind-9.2.2]# make
[root@fedora bind-9.2.2]# make install
&lt;/pre&gt;


&lt;h2&gt;Setup Bind-DLZ&lt;/h2&gt;

&lt;pre&gt;
ludo@idefix:~/Downloads % scp named.conf named.dlz.zones SP_Bind_DLZ.sql root@108.166.82.6:conf         
named.conf                                                                                                 100%  237     0.2KB/s   00:00   
named.dlz.zones                                                                                            100% 1124     1.1KB/s   00:00   
SP_Bind_DLZ.sql                                                                                            100% 2951     2.9KB/s   00:00   
ludo@idefix:~/Downloads %         
&lt;/pre&gt;

&lt;pre&gt;
[root@fedora ~]# mkdir /var/named
[root@fedora ~]# mv conf/ /usr/local/etc/bind
&lt;/pre&gt;

&lt;pre&gt;
[root@fedora ~]# cat /usr/local/etc/bind/named.conf
options {
        listen-on port 53 { any; };
        listen-on-v6 port 53 { ::1; };
        directory       &amp;quot;/var/named&amp;quot;;
        allow-query     { any; };
        recursion no;
};

include &amp;quot;/usr/local/etc/bind/named.dlz.zones&amp;quot;;
[root@fedora ~]#
&lt;/pre&gt;


&lt;p&gt;For the zone file I used the example from the DLZ website&lt;/p&gt;

&lt;pre&gt;
[root@fedora ~]# cat /usr/local/etc/bind/named.dlz.zones
dlz &amp;quot;Mysql zone&amp;quot; {
   database &amp;quot;mysql
   {host=localhost dbname=SP_Bind_DLZ user=bind-dlz pass=spDNSuser ssl=tRue}
   {select zone from dns_records where zone = '%zone%'}
   {select ttl, type, mx_priority, case when lower(type)='txt' then concat('\&amp;quot;', data, '\&amp;quot;')
        when lower(type) = 'soa' then concat_ws(' ', data, resp_person, serial, refresh, retry, expire, minimum)
        else data end from dns_records where zone = '%zone%' and host = '%record%'}&amp;quot;;
};

[root@fedora ~]#
&lt;/pre&gt;


&lt;p&gt;You need to load your MySQL library with the current information&lt;/p&gt;

&lt;pre&gt;
[root@fedora ~]# cat /usr/local/etc/bind/SP_Bind_DLZ.sql
USE SP_Bind_DLZ
-- ----------------------------
-- Table structure for dns_records
-- ----------------------------
CREATE TABLE `dns_records` (
  `id` varchar(32) NOT NULL DEFAULT '',
  `zone` varchar(255) DEFAULT NULL,
  `host` varchar(255) DEFAULT NULL,
  `type` varchar(10) DEFAULT NULL,
  `data` text NOT NULL,
  `ttl` int(11) DEFAULT '3600',
  `mx_priority` text,
  `refresh` int(11) DEFAULT NULL,
  `retry` int(11) DEFAULT NULL,
  `expire` int(11) DEFAULT NULL,
  `minimum` int(11) DEFAULT NULL,
  `serial` bigint(20) DEFAULT NULL,
  `resp_person` text,
  `primary_ns` text,
  `dynaload` tinyint(1) NOT NULL,
  `datestamp` datetime NOT NULL,
  `regnumber` varchar(64) NOT NULL DEFAULT '0000000',
  PRIMARY KEY (`id`),
  KEY `host_index` (`host`),
  KEY `zone_index` (`zone`),
  KEY `type_index` (`type`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- ----------------------------
-- Table structure for inactive_zones
-- ----------------------------
CREATE TABLE `inactive_zones` (
  `zone` varchar(255) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- ----------------------------
-- Table structure for meta_data
-- ----------------------------
CREATE TABLE `meta_data` (
  `next_id` int(8) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- ----------------------------
-- Table structure for replication_heartbeat
-- ----------------------------
CREATE TABLE `replication_heartbeat` (
  `timestamp` datetime NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- ----------------------------
-- Table structure for xfr_table
-- ----------------------------
CREATE TABLE `xfr_table` (
  `zone` varchar(255) NOT NULL,
  `client` varchar(255) NOT NULL,
  KEY `zone_client_index` (`zone`,`client`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- ----------------------------
-- Records
-- ----------------------------
INSERT INTO `dns_records` VALUES ('server1', 'zoxx.net', null, 'server', 'server1.sparkplug.net.', '3600', null, '43200', '3600', '604800', '172800', '2010111801', 'smtp.zoxx.net.', null, '0', '0000-00-00 00:00:00', '0');
INSERT INTO `dns_records` VALUES ('10001', 'zoxx.net', null, 'NS', 'server1.zoxx.net.', '3600', null, null, null, null, null, null, null, null, '0', '0000-00-00 00:00:00', '0');
INSERT INTO `dns_records` VALUES ('10002', 'sparkplugbb.net', 'ns1', 'A', '10.10.10.10', '3600', null, null, null, null, null, null, null, null, '0', '0000-00-00 00:00:00', '0');
INSERT INTO `meta_data` VALUES ('230915');
INSERT INTO `replication_heartbeat` VALUES ('2012-03-20 02:09:14');
[root@fedora ~]# 
&lt;/pre&gt;


&lt;h2&gt;Create mysql database&lt;/h2&gt;

&lt;pre&gt;
[root@fedora bind]# mysqladmin create SP_Bind_DLZ -p
Enter password:
[root@fedora bind]# 

[root@fedora bind]# mysql -p
mysql&amp;gt; grant all on SP_Bind_DLZ.* to &amp;quot;bind-dlz&amp;quot;@&amp;quot;localhost&amp;quot; identified by &amp;quot;spDNSuser&amp;quot;;

[root@fedora bind]# mysql -u bind-dlz -p &amp;lt; SP_Bind_DLZ.sql
Enter password:
[root@fedora bind]#
&lt;/pre&gt;


&lt;h2&gt;Check the configuration is working&lt;/h2&gt;

&lt;pre&gt;
[root@fedora ~]# named-checkconf /usr/local/etc/bind/named.conf
[root@fedora ~]# echo $?
0
[root@fedora ~]# 
&lt;/pre&gt;


&lt;p&gt;In the example below we can see we forgot to create the rndc.key file&lt;/p&gt;
&lt;pre&gt;
[root@fedora ~]# named -g -c /usr/local/etc/bind/named.conf
Mar 20 23:45:32.458 starting BIND 9.2.2 -g -c /usr/local/etc/bind/named.conf
Mar 20 23:45:32.458 using 1 CPU
Mar 20 23:45:32.459 loading configuration from '/usr/local/etc/bind/named.conf'
Mar 20 23:45:32.460 no IPv6 interfaces found
Mar 20 23:45:32.460 listening on IPv4 interface lo, 127.0.0.1#53
Mar 20 23:45:32.460 listening on IPv4 interface eth0
Mar 20 23:45:32.460 listening on IPv4 interface eth1
Mar 20 23:45:32.460 Loading 'Mysql zone' using driver mysql
Mar 20 23:45:32.465 none:0: open: /etc/rndc.key: file not found
Mar 20 23:45:32.465 couldn't add command channel 127.0.0.1#953: file not found
Mar 20 23:45:32.465 ignoring config file logging statement due to -g option
Mar 20 23:45:32.466 running
&lt;/pre&gt;


&lt;h2&gt;Create the rndc.key file&lt;/h2&gt;


&lt;p&gt;If you see this message, you need to create a rndc.key file&lt;/p&gt;

&lt;pre&gt;
Mar 21 02:46:17.760 none:0: open: /etc/rndc.key: file not found
&lt;/pre&gt;


&lt;p&gt;You need to use rndc-confgen to create an unique key&lt;/p&gt;

&lt;pre&gt;
[root@fedora bind]# rndc-confgen -r /dev/urandom -b 512 |     grep -m 1 &amp;quot;secret&amp;quot; | cut -d '&amp;quot;' -f 2
KyEA7MOt6kNn+VA6CciGn+eyTY9ANALf39+5EBgsluPeP5IWlKVdTrmYMbLiqoncFmOZMhXiS1M99MhtfOHYJA==
[root@fedora bind]#
&lt;/pre&gt;


&lt;p&gt;Once you have it, you can include it in the /etc/rndc.key file&lt;/p&gt;

&lt;pre&gt;
[root@fedora bind]# cat /etc/rndc.key
key rndc_key {
     algorithm &amp;quot;hmac-md5&amp;quot;;
         secret &amp;quot;KyEA7MOt6kNn+VA6CciGn+eyTY9ANALf39+5EBgsluPeP5IWlKVdTrmYMbLiqoncFmOZMhXiS1M99MhtfOHYJA==&amp;quot;;
    };
[root@fedora bind]# 
&lt;/pre&gt;


&lt;h2&gt;Check the DNS server responds correctly&lt;/h2&gt;

&lt;pre&gt;
[root@fedora ~]# host server1.zoxx.net localhost
Using domain server:
Name: localhost
Address: 127.0.0.1#53
Aliases:

server1.zoxx.net has address 10.10.10.10
[root@soa3 ~]# 
&lt;/pre&gt;



&lt;h2&gt;Setup the init script&lt;/h2&gt;


&lt;p&gt;The bind tarball doesn't come with any init script for for Fedora, so I had to create one&lt;/p&gt;

&lt;pre&gt;
[root@fedora ~]# cat /etc/init.d/bind
#!/bin/bash
#

# named          Start up the named server daemon
#
# chkconfig: 2345 99 1
# description: named
#              This service starts up the named server daemon.
#
# processname: named
# config: /usr/local/etc/bind/named.conf
# pidfile: /var/run/named.pid

### BEGIN INIT INFO
# Provides: named
# Required-Start: $local_fs $network $syslog
# Required-Stop: $local_fs $syslog
# Should-Start: $syslog
# Should-Stop: $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start up the named server daemon
# Description:       named is a protocol for DNS.
#               This service starts up the named server daemon.
### END INIT INFO

# source function library
. /etc/rc.d/init.d/functions

RETVAL=0
prog=&amp;quot;named&amp;quot;
lockfile=/var/lock/subsys/$prog

# Some functions to make the below more readable
NAMED=/usr/local/sbin/named
NAMED_CONFIG=/usr/local/etc/bind/named.conf
PID_FILE=/var/run/named.pid

runlevel=$(set -- $(runlevel); eval &amp;quot;echo \$$#&amp;quot; )

start()
{
     [ -x $NAMED ] || exit 5
     [ -f $NAMED_CONFIG ] || exit 6

     echo -n $&amp;quot;Starting $prog: &amp;quot;
     $NAMED -c $NAMED_CONFIG &amp;amp;&amp;amp; success || failure
     RETVAL=$?
     [ $RETVAL -eq 0 ] &amp;amp;&amp;amp; touch $lockfile
     echo
     return $RETVAL
}

stop()
{
     echo -n $&amp;quot;Stopping $prog: &amp;quot;
     if [ -n &amp;quot;`pidfileofproc $NAMED`&amp;quot; ] ; then
         killproc $NAMED
     else
         failure $&amp;quot;Stopping $prog&amp;quot;
     fi
     RETVAL=$?
     # if we are in halt or reboot runlevel kill all running sessions
     # so the TCP connections are closed cleanly
     if [ &amp;quot;x$runlevel&amp;quot; = x0 -o &amp;quot;x$runlevel&amp;quot; = x6 ] ; then
         trap '' TERM
         killall $prog 2&amp;gt;/dev/null
         trap TERM
     fi
     [ $RETVAL -eq 0 ] &amp;amp;&amp;amp; rm -f $lockfile
     echo
}

reload()
{
     echo -n $&amp;quot;Reloading $prog: &amp;quot;
     if [ -n &amp;quot;`pidfileofproc $NAMED`&amp;quot; ] ; then
         killproc $NAMED -HUP
     else
         failure $&amp;quot;Reloading $prog&amp;quot;
     fi
     RETVAL=$?
     echo
}

restart() {
     stop
     start
}

force_reload() {
     restart
}

rh_status() {
     status -p $PID_FILE named
}

rh_status_q() {
     rh_status &amp;gt;/dev/null 2&amp;gt;&amp;amp;1
}

case &amp;quot;$1&amp;quot; in
     start)
          rh_status_q &amp;amp;&amp;amp; exit 0
          start
          ;;
     stop)
          if ! rh_status_q; then
               rm -f $lockfile
               exit 0
          fi
          stop
          ;;
     restart)
          restart
          ;;
     reload)
          rh_status_q || exit 7
          reload
          ;;
     force-reload)
          force_reload
          ;;
     condrestart|try-restart)
          rh_status_q || exit 0
          if [ -f $lockfile ] ; then
               do_restart_sanity_check
               if [ $RETVAL -eq 0 ] ; then
                    stop
                    # avoid race
                    sleep 3
                    start
               else
                    RETVAL=6
               fi
          fi
          ;;
     status)
          rh_status
          RETVAL=$?
          if [ $RETVAL -eq 3 -a -f $lockfile ] ; then
               RETVAL=2
          fi
          ;;
     *)
          echo $&amp;quot;Usage: $0 {start|stop|restart|reload|force-reload|condrestart|try-restart|status}&amp;quot;
          RETVAL=2
esac
exit $RETVAL
[root@fedora ~]# 
&lt;/pre&gt;


&lt;p&gt;I added it in the list of script to start&lt;/p&gt;

&lt;pre&gt;
[root@fedora init.d]# chkconfig --add bind
&lt;/pre&gt;


&lt;h2&gt;Start bind from /etc/rc.local making sure it doesn't start too fast&lt;/h2&gt;


&lt;p&gt;Unfortunately I didn't find a correct way to get bind-dlz started after mysql is correctly up and running. So my work around was to start it from /etc/rc.local with a sleep enough long to allow mysql to start.&lt;/p&gt;

&lt;pre&gt;
[root@fedora ~]# cat /etc/rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local
sleep 300 &amp;amp;&amp;amp; /etc/init.d/bind restart
[root@fedora ~]#
&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/lfrancois/~4/jx-QigaVsII" height="1" width="1"/&gt;</content>
    
    

    
          <wfw:comment>http://www.zoxx.net/notes/index.php/post/2012/03/24/How-to-install-Bind-DLZ-on-Linux-Fedora#comment-form</wfw:comment>
      <wfw:commentRss>http://www.zoxx.net/notes/index.php/feed/atom/comments/169</wfw:commentRss>
      <feedburner:origLink>http://www.zoxx.net/notes/index.php/post/2012/03/24/How-to-install-Bind-DLZ-on-Linux-Fedora</feedburner:origLink></entry>
    
  <entry>
    <title>How to use the user-data field to setup your AWS EC2 instance</title>
    <link href="http://feedproxy.google.com/~r/lfrancois/~3/PtC2KTXQW0Y/How-to-use-the-user-data-field-to-setup-your-AWS-EC2-instance" rel="alternate" type="text/html" title="How to use the user-data field to setup your AWS EC2 instance" />
    <id>urn:md5:d97fad0e78de9f211979b381dac33a9f</id>
    <published>2012-02-11T22:07:00-08:00</published>
    <updated>2012-02-11T23:07:02-08:00</updated>
    <author><name>Ludovic Francois</name></author>
        <dc:subject>unix</dc:subject>
            
    <content type="html">    &lt;p&gt;EC2 allows you to give some information, which one will be read and interpreted by your instance during the install.&lt;/p&gt;


&lt;h2&gt;How to provide the data&lt;/h2&gt;


&lt;p&gt;You have different way to provide this information:
•	Basic script shell (user-data-file)
•	CloudInit configuration file (user-data-file)
•	File pointing to an URL (user-data-file)
•	CloudInit commands (user-data)&lt;/p&gt;



&lt;h2&gt;User data file example&lt;/h2&gt;


&lt;h3&gt;Basic script shell&lt;/h3&gt;

&lt;pre&gt;
root@blackbox:~/ec2# cat test.sh 
#! /bin/bash -ex

# The stdout and stderr of your user-data script is output in /var/log/syslog 
# and you can review this for any success and failure messages. It will contain 
# both things you echo directly in the script as well as output from programs you run.

LOGS=&amp;quot;/root/post-install.$(date -I).$$&amp;quot;
exec &amp;gt; $LOGS 2&amp;gt;&amp;amp;1

echo &amp;quot;* [$(date -R)] The server is up and running!&amp;quot; 
root@blackbox:~/ec2#
&lt;/pre&gt;

&lt;pre&gt;
root@blackbox:~/ec2# ec2-run-instances ami-3323f25a --instance-type t1.micro --region us-east-1 --key ${EC2_KEYPAIR} --user-data-file test.sh
&lt;/pre&gt;


&lt;h3&gt;File pointing to an URL&lt;/h3&gt;

&lt;pre&gt;
root@blackbox:~/ec2# cat include_url 
#include
http://ludo9166.s3.amazonaws.com/first-boot.sh
root@blackbox:~/ec2#
&lt;/pre&gt;

&lt;pre&gt;
root@blackbox:~/ec2# ec2-run-instances ami-3323f25a --instance-type t1.micro --region us-east-1 --key ${EC2_KEYPAIR} --user-data-file include_url
&lt;/pre&gt;


&lt;h2&gt;User data example&lt;/h2&gt;

&lt;pre&gt;
root@blackbox:~/ec2# ec2-run-instances ami-3323f25a --instance-type t1.micro --region us-east-1 --key ${EC2_KEYPAIR} --user-data &amp;quot;#include http://ludo9166.s3.amazonaws.com/first-boot.sh&amp;quot;
&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/lfrancois/~4/PtC2KTXQW0Y" height="1" width="1"/&gt;</content>
    
    

    
          <wfw:comment>http://www.zoxx.net/notes/index.php/post/2012/02/11/How-to-use-the-user-data-field-to-setup-your-AWS-EC2-instance#comment-form</wfw:comment>
      <wfw:commentRss>http://www.zoxx.net/notes/index.php/feed/atom/comments/168</wfw:commentRss>
      <feedburner:origLink>http://www.zoxx.net/notes/index.php/post/2012/02/11/How-to-use-the-user-data-field-to-setup-your-AWS-EC2-instance</feedburner:origLink></entry>
    
  <entry>
    <title>How to create and use an Amazon Web Services S3 bucket with s3cmd tool</title>
    <link href="http://feedproxy.google.com/~r/lfrancois/~3/-U80T7td2NQ/How-to-create-and-use-an-Amazon-Web-Services-S3-bucket-with-s3cmd-tool" rel="alternate" type="text/html" title="How to create and use an Amazon Web Services S3 bucket with s3cmd tool" />
    <id>urn:md5:02ed765e2e4663180c93bad476a68736</id>
    <published>2012-02-09T05:11:00-08:00</published>
    <updated>2012-02-09T06:15:52-08:00</updated>
    <author><name>Ludovic Francois</name></author>
        <dc:subject>unix</dc:subject>
        <dc:subject>aws</dc:subject><dc:subject>cloud</dc:subject><dc:subject>s3</dc:subject><dc:subject>ubuntu</dc:subject>    
    <content type="html">    &lt;p&gt;&lt;a href="http://www.zoxx.net/notes/public/aws_s3_credentials.png" title="AWS S3 crendentials"&gt;&lt;img src="http://www.zoxx.net/notes/public/.aws_s3_credentials_m.jpg" alt="AWS S3 crendentials" style="display:block; margin:0 auto;" title="AWS S3 crendentials, Feb 2012" /&gt;&lt;/a&gt;&lt;/p&gt;


&lt;p&gt;I had to create and use an AWS S3 bucket. I decided to use s3cmd tool to access this bucket.&lt;/p&gt;


&lt;p&gt;You can find this tool at:
•	http://s3tools.org/s3cmd.&lt;/p&gt;


&lt;h5&gt;Install s3cmd&lt;/h5&gt;

&lt;pre&gt;
root@blackbox:~/ec2# apt-get install s3cmd
Reading package lists... Done
Building dependency tree      
Reading state information... Done
The following NEW packages will be installed:
  s3cmd
0 upgraded, 1 newly installed, 0 to remove and 4 not upgraded.
Need to get 58.8 kB of archives.
After this operation, 303 kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu/ oneiric/universe s3cmd all 1.0.0-1 [58.8 kB]
Fetched 58.8 kB in 1s (55.5 kB/s)
Selecting previously deselected package s3cmd.
(Reading database ... 154045 files and directories currently installed.)
Unpacking s3cmd (from .../archives/s3cmd_1.0.0-1_all.deb) ...
Processing triggers for man-db ...
Setting up s3cmd (1.0.0-1) ...
root@blackbox:~/ec2#
&lt;/pre&gt;


&lt;h5&gt;Check the command is there&lt;/h5&gt;

&lt;pre&gt;
root@blackbox:~/ec2# s3cmd
ERROR: /root/.s3cfg: No such file or directory
ERROR: Configuration file not available.
ERROR: Consider using --configure parameter to create one.
root@blackbox:~/ec2#
&lt;/pre&gt;

&lt;p&gt; &lt;/p&gt;

&lt;h5&gt;Configure s3cmd&lt;/h5&gt;


&lt;h4&gt;Get the information&lt;/h4&gt;


&lt;p&gt;To configure s3cmd, you need two information:
•	Access Key
•	Secret Key&lt;/p&gt;


&lt;p&gt;You can get these credentials from:
•	https://aws-portal.amazon.com/gp/aws/securityCredentials&lt;/p&gt;


&lt;h4&gt;Run “s3cmd –configure” command&lt;/h4&gt;

&lt;pre&gt;
root@blackbox:~/ec2# s3cmd --configure

Enter new values or accept defaults in brackets with Enter.
Refer to user manual for detailed description of all options.

Access key and Secret key are your identifiers for Amazon S3
Access Key: __[Your Access Key]__
Secret Key: __[Your Secret Key]__

Encryption password is used to protect your files from reading
by unauthorized persons while in transfer to S3
Encryption password: __[Your passphrase to protect your Secret Key]__
Path to GPG program [/usr/bin/gpg]:

When using secure HTTPS protocol all communication with Amazon S3
servers is protected from 3rd party eavesdropping. This method is
slower than plain HTTP and can't be used if you're behind a proxy
Use HTTPS protocol [No]: yes

New settings:
  Access Key: [Your Access Key]
  Secret Key: [Your Secret Key]
  Encryption password: [Your passphrase to protect your Secret Key]
  Path to GPG program: /usr/bin/gpg
  Use HTTPS protocol: True
  HTTP Proxy server name:
  HTTP Proxy server port: 0

Test access with supplied credentials? [Y/n]
Please wait...
Success. Your access key and secret key worked fine :-)

Now verifying that encryption works...
Success. Encryption and decryption worked fine :-)

Save settings? [y/N] y
Configuration saved to '/root/.s3cfg'
root@blackbox:~/ec2#
&lt;/pre&gt;


&lt;h5&gt;Create the S3 bucket&lt;/h5&gt;

&lt;pre&gt;
root@blackbox:~/ec2# s3cmd mb s3://ludo$$
Bucket 's3://ludo9166/' created
root@blackbox:~/ec2# 
&lt;/pre&gt;


&lt;h5&gt;Put a public file on this bucket&lt;/h5&gt;

&lt;pre&gt;
root@blackbox:/tmp# s3cmd --acl-public put first-boot.sh s3://ludo9166
first-boot.sh -&amp;gt; s3://ludo9166/first-boot.sh  [1 of 1]
 1685 of 1685   100% in    0s     4.12 kB/s  done
Public URL of the object is: http://ludo9166.s3.amazonaws.com/first-boot.sh
root@blackbox:/tmp# 
&lt;/pre&gt;


&lt;h5&gt;Check the file is there&lt;/h5&gt;

&lt;pre&gt;
root@blackbox:/tmp# s3cmd ls s3://ludo9166
2012-02-09 03:26      1685   s3://ludo9166/first-boot.sh
root@blackbox:/tmp#
&lt;/pre&gt;


&lt;h5&gt;Get the file through s3cmd&lt;/h5&gt;

&lt;pre&gt;
root@blackbox:/tmp# s3cmd get s3://ludo9166/first-boot.sh
&lt;/pre&gt;


&lt;h5&gt;Get the file through basic http request&lt;/h5&gt;

&lt;pre&gt;
root@blackbox:/tmp# curl -O http://ludo9166.s3.amazonaws.com/first-boot.sh
&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/lfrancois/~4/-U80T7td2NQ" height="1" width="1"/&gt;</content>
    
    

    
          <wfw:comment>http://www.zoxx.net/notes/index.php/post/2012/02/09/How-to-create-and-use-an-Amazon-Web-Services-S3-bucket-with-s3cmd-tool#comment-form</wfw:comment>
      <wfw:commentRss>http://www.zoxx.net/notes/index.php/feed/atom/comments/167</wfw:commentRss>
      <feedburner:origLink>http://www.zoxx.net/notes/index.php/post/2012/02/09/How-to-create-and-use-an-Amazon-Web-Services-S3-bucket-with-s3cmd-tool</feedburner:origLink></entry>
    
  <entry>
    <title>FreeBSD on EC2 Amazon Web Services</title>
    <link href="http://feedproxy.google.com/~r/lfrancois/~3/d82j8Lrh9l0/FreeBSD-on-EC2-Amazon-Web-Services" rel="alternate" type="text/html" title="FreeBSD on EC2 Amazon Web Services" />
    <id>urn:md5:aa1a61578b6545ddefb0d9fe65c63444</id>
    <published>2012-01-18T09:54:00-08:00</published>
    <updated>2012-01-18T11:35:42-08:00</updated>
    <author><name>Ludovic Francois</name></author>
        <dc:subject>unix</dc:subject>
        <dc:subject>aws</dc:subject><dc:subject>cloud</dc:subject><dc:subject>ec2</dc:subject><dc:subject>freebsd</dc:subject>    
    <content type="html">    &lt;p&gt;&lt;img src="http://www.zoxx.net/notes/public/.freebsd_ec2_01_m.jpg" alt="AWS Console with FreeBSD instance running" style="display:block; margin:0 auto;" title="AWS Console with FreeBSD instance running, Jan 2012" /&gt;&lt;/p&gt;


&lt;p&gt;As now the only way to have FreeBSD running on Amazon is to have it running with the Windows AMIs.&lt;/p&gt;


&lt;h2&gt;Find FreeBSD instance&lt;/h2&gt;

&lt;pre&gt;
root@blackbox:~/ec2# ec2-describe-images -a | grep -i freebsd | grep -iv windows
IMAGE   ami-0d08cc64    118940168514/FreeBSD/EC2 7.4b-RELEASE Cluster Compute   118940168514    available       public          x86_64  machine                             ebs     hvm     xen
IMAGE   ami-d29b6abb    118940168514/FreeBSD/EC2 8.2-RC1        118940168514    available       public          i386    machine aki-407d9529
                        ebs     paravirtual     xen
IMAGE   ami-4a15e423    118940168514/FreeBSD/EC2 8.2-RC1.5      118940168514    available       public          i386    machine aki-407d9529
                        ebs     paravirtual     xen
IMAGE   ami-c003f3a9    118940168514/FreeBSD/EC2 8.2-RC3        118940168514    available       public          i386    machine aki-407d9529
                        ebs     paravirtual     xen
IMAGE   ami-423bc82b    118940168514/FreeBSD/EC2 8.2-RELEASE    118940168514    available       public          i386    machine aki-407d9529
                        ebs     paravirtual     xen
IMAGE   ami-646c9e0d    118940168514/FreeBSD/EC2 8.2a-RELEASE amd64/HVM 118940168514    available       public          x86_64  machine    ebs      hvm     xen
IMAGE   ami-290eca40    118940168514/FreeBSD/EC2 8.2b-RELEASE Cluster Compute   118940168514    available       public          x86_64  machine                             ebs     hvm     xen
IMAGE   ami-b55f99dc    118940168514/FreeBSD/EC2 8.2b-RELEASE i386/XEN  118940168514    available       public          i386    machine aki-407d9529                        ebs     paravirtual     xen
IMAGE   ami-c01aeca9    118940168514/FreeBSD/EC2 9.0-CURRENT 2010-12-12 118940168514    available       public          i386    machine aki-407d9529                        ebs     paravirtual     xen
IMAGE   ami-a0fc0dc9    118940168514/FreeBSD/EC2 9.0-CURRENT 2010-12-29 118940168514    available       public          i386    machine aki-407d9529                        ebs     paravirtual     xen
IMAGE   ami-f4db2a9d    118940168514/FreeBSD/EC2 9.0-CURRENT 2011-01-01 118940168514    available       public          i386    machine aki-407d9529                        ebs     paravirtual     xen
IMAGE   ami-8cce3fe5    118940168514/FreeBSD/EC2 9.0-CURRENT 2011-01-04 118940168514    available       public          i386    machine aki-407d9529                        ebs     paravirtual     xen
IMAGE   ami-479f482e    118940168514/FreeBSD/EC2 9.0-RELEASE Cluster Compute    118940168514    available       public          x86_64  machine                             ebs     hvm     xen
IMAGE   ami-7a41b713    844886073610/FreeBSD-9 Base     844886073610    available       public          i386    machine aki-407d9529       ebs      paravirtual     xen
IMAGE   ami-c841b7a1    844886073610/FreeBSD-9 Python   844886073610    available       public          i386    machine aki-407d9529       ebs      paravirtual     xen
root@blackbox:~/ec2#
&lt;/pre&gt;


&lt;h2&gt;Start your FreeBSD instance&lt;/h2&gt;

&lt;pre&gt;
root@blackbox:~/ec2# ec2-run-instances ami-7a41b713 -k ${EC2_KEYPAIR} -t t1.micro
RESERVATION     r-79e5d618      955701963229    default
INSTANCE        i-cec7c0ac      ami-7a41b713                    pending ec2-keypair     0               t1.micro        2012-01-18T18:17:21+0000    us-east-1a      aki-407d9529                    monitoring-disabled                                     ebs                        paravirtual      xen             sg-7ac33e12     default
root@blackbox:~/ec2# 
&lt;/pre&gt;


&lt;h2&gt;Check the instance is running&lt;/h2&gt;

&lt;pre&gt;
root@blackbox:~/ec2# ec2-describe-instances i-cec7c0ac
RESERVATION     r-79e5d618      955701963229    default
INSTANCE        i-cec7c0ac      ami-7a41b713    ec2-23-20-17-21.compute-1.amazonaws.com ip-10-244-135-190.ec2.internal  running ec2-keypair0
                t1.micro        2012-01-18T18:17:21+0000        us-east-1a      aki-407d9529                    monitoring-disabled     23.20.17.21 10.244.135.190                  ebs                                     paravirtual     xen             sg-7ac33e12     default
BLOCKDEVICE     /dev/sda1       vol-094d7364    2012-01-18T18:18:05.000Z
BLOCKDEVICE     /dev/sdb        vol-0b4d7366    2012-01-18T18:18:05.000Z
root@blackbox:~/ec2# 
0*$ zsh                    
&lt;/pre&gt;


&lt;h2&gt;Wait few minutes to get the instance fully loaded and ssh&lt;/h2&gt;

&lt;pre&gt;
root@blackbox:~/ec2# ssh -i ec2-keypair ec2-23-20-17-21.compute-1.amazonaws.com
&lt;/pre&gt;


&lt;h2&gt;If you are not able to login check what is going on in the console&lt;/h2&gt;

&lt;pre&gt;
root@blackbox:~/ec2# ec2-get-console-output i-cec7c0ac
i-cec7c0ac
2012-01-18T18:20:55+0000
Xen Minimal OS!
  start_info: 0xa01000(VA)
    nr_pages: 0x26700
  shared_inf: 0xdf617000(MA)
     pt_base: 0xa04000(VA)
nr_pt_frames: 0x9
    mfn_list: 0x967000(VA)
   mod_start: 0x0(VA)
     mod_len: 0
       flags: 0x0
    cmd_line: root=/dev/sda1 ro 4
  stack:      0x946780-0x966780
MM: Init
      _text: 0x0(VA)
     _etext: 0x621f5(VA)
   _erodata: 0x76000(VA)
     _edata: 0x7b6d4(VA)
stack start: 0x946780(VA)
       _end: 0x966d34(VA)
  start_pfn: a10
    max_pfn: 26700
Mapping memory range 0xc00000 - 0x26700000
setting 0x0-0x76000 readonly
skipped 0x1000
MM: Initialise page allocator for b3e000(b3e000)-0(26700000)
MM: done
Demand map pfns at 26701000-36701000.
Heap resides at 36702000-76702000.
Initialising timer interface
Initialising console ... done.
gnttab_table mapped at 0x26701000.
Initialising scheduler
Thread &amp;quot;Idle&amp;quot;: pointer: 0x36702008, stack: 0xbf0000
Initialising xenbus
Thread &amp;quot;xenstore&amp;quot;: pointer: 0x36702478, stack: 0x26600000
Dummy main: start_info=0x966880
Thread &amp;quot;main&amp;quot;: pointer: 0x367028e8, stack: 0x26610000
&amp;quot;main&amp;quot; &amp;quot;root=/dev/sda1&amp;quot; &amp;quot;ro&amp;quot; &amp;quot;4&amp;quot; 
vbd 2049 is hd0
******************* BLKFRONT for device/vbd/2049 **********


backend at /local/domain/0/backend/vbd/524/2049
Failed to read /local/domain/0/backend/vbd/524/2049/feature-barrier.
Failed to read /local/domain/0/backend/vbd/524/2049/feature-flush-cache.
2097152 sectors of 0 bytes
**************************
vbd 2064 is hd1
******************* BLKFRONT for device/vbd/2064 **********


backend at /local/domain/0/backend/vbd/524/2064
Failed to read /local/domain/0/backend/vbd/524/2064/feature-barrier.
Failed to read /local/domain/0/backend/vbd/524/2064/feature-flush-cache.
18874368 sectors of 0 bytes
**************************
[H[J  Booting 'FreeBSD kernel'

root (hd0)
 Filesystem type is ext2fs, using whole disk
kernel /boot/kernel/kernel vfs.root.mountfrom=ufs:da1s1,machdep.idle_mwait=0,bo
ot_verbose=1

xc_dom_probe_bzimage_kernel: kernel is not a bzImage
close blk: backend at /local/domain/0/backend/vbd/524/2049
close blk: backend at /local/domain/0/backend/vbd/524/2064
WARNING: loader(8) metadata is missing!
GDB: no debug ports present
KDB: debugger backends: ddb
KDB: current backend: ddb
APIC: Using the MPTable enumerator.
SMP: Added CPU 0 (BSP)
Copyright (c) 1992-2010 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
	The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 9.0-CURRENT #68: Sun Dec 12 03:52:29 UTC 2010
    root@chch.daemonology.net:/usr/obj/i386.i386/usr/src/sys/XEN i386
WARNING: WITNESS option enabled, expect reduced performance.
Xen reported: 2659.998 MHz processor.
Timecounter &amp;quot;ixen&amp;quot; frequency 1953125 Hz quality 0
CPU: Intel(R) Xeon(R) CPU           E5430  @ 2.66GHz (2660.00-MHz 686-class CPU)
  Origin = &amp;quot;GenuineIntel&amp;quot;  Id = 0x1067a  Family = 6  Model = 17  Stepping = 10
  Features=0xbfe3fbff&amp;lt;FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE&amp;gt;
  Features2=0x40ce3bd&amp;lt;SSE3,DTES64,MON,DS_CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,DCA,SSE4.1,XSAVE&amp;gt;
  AMD Features=0x20100000&amp;lt;NX,LM&amp;gt;
  AMD Features2=0x1&amp;lt;LAHF&amp;gt;

Instruction TLB: 4 KB Pages, 4-way set associative, 128 entries
1st-level instruction cache: 32 KB, 8-way set associative, 64 byte line size
1st-level data cache: 32 KB, 8-way set associative, 64 byte line size
L2 cache: 6144 kbytes, 16-way associative, 64 bytes/line
real memory  = 644874240 (615 MB)
Physical memory chunk(s):
0x00000000007d0000 - 0x0000000025b4dfff, 624418816 bytes (152446 pages)
avail memory = 621105152 (592 MB)
[XEN] IPI cpu=0 irq=128 vector=RESCHEDULE_VECTOR (0)
[XEN] IPI cpu=0 irq=129 vector=CALL_FUNCTION_VECTOR (1)
Event-channel device installed.
random: &amp;lt;entropy source, Software, Yarrow&amp;gt;
io: &amp;lt;I/O&amp;gt;
mem: &amp;lt;memory&amp;gt;
Pentium Pro MTRR support enabled
null: &amp;lt;null device, zero device&amp;gt;
nfslock: pseudo-device
[XEN] xen_rtc_probe: probing Hypervisor RTC clock
rtc0: &amp;lt;Xen Hypervisor Clock&amp;gt; on motherboard
[XEN] xen_rtc_attach: attaching Hypervisor RTC clock
rtc0: registered as a time-of-day clock (resolution 1000000us, adjustment 0.500000000s)
xs_probe: Probe retuns 0
xenstore0: &amp;lt;XenStore&amp;gt; on motherboard
Grant table initialized
xc0: &amp;lt;Xen Console&amp;gt; on motherboard
Device configuration finished.
procfs registered
Timecounters tick every 10.000 msec
[XEN] hypervisor wallclock nudged; nudging TOD.
lo0: bpf attached
xenbusb_front0: &amp;lt;Xen Frontend Devices&amp;gt; on xenstore0
xn0: &amp;lt;Virtual Network Interface&amp;gt; at device/vif/0 on xenbusb_front0
xn0: bpf attached
xn0: Ethernet address: 12:31:3d:00:80:50
xenbusb_back0: &amp;lt;Xen Backend Devices&amp;gt; on xenstore0
xctrl0: &amp;lt;Xen Control Device&amp;gt; on xenstore0
xbd0: 1024MB &amp;lt;Virtual Block Device&amp;gt; at device/vbd/2049 on xenbusb_front0
xbd0: attaching as da0
GEOM: new disk da0
xbd1: 9216MB &amp;lt;Virtual Block Device&amp;gt; at device/vbd/2064 on xenbusb_front0
xbd1: attaching as da1
WARNING: WITNESS option enabled, expect reduced performance.
GEOM: new disk da1
command 0xc2ab1800 not in queue, flags = 0xdeadc0de, bit = 0x10
panic: command not in queue
cpuid = 0
KDB: enter: panic
[ thread pid 12 tid 100024 ]
Stopped at      kdb_enter+0x3a: movl    $0,kdb_why
db&amp;gt; 
root@blackbox:~/ec2# 
&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/lfrancois/~4/d82j8Lrh9l0" height="1" width="1"/&gt;</content>
    
    

    
          <wfw:comment>http://www.zoxx.net/notes/index.php/post/2012/01/18/FreeBSD-on-EC2-Amazon-Web-Services#comment-form</wfw:comment>
      <wfw:commentRss>http://www.zoxx.net/notes/index.php/feed/atom/comments/166</wfw:commentRss>
      <feedburner:origLink>http://www.zoxx.net/notes/index.php/post/2012/01/18/FreeBSD-on-EC2-Amazon-Web-Services</feedburner:origLink></entry>
    
  <entry>
    <title>Fedora 15 Postfix SMTP relay server with MySql Authentication</title>
    <link href="http://feedproxy.google.com/~r/lfrancois/~3/e476zWFjLi4/Fedora-15-Postfix-SMTP-relay-server-with-MySql-Authentication" rel="alternate" type="text/html" title="Fedora 15 Postfix SMTP relay server with MySql Authentication" />
    <id>urn:md5:9b1c751faef77901189d8164cf1bd5bb</id>
    <published>2012-01-10T08:59:00-08:00</published>
    <updated>2012-01-16T08:35:43-08:00</updated>
    <author><name>Ludovic Francois</name></author>
        <dc:subject>unix</dc:subject>
        <dc:subject>fedora</dc:subject><dc:subject>linux</dc:subject><dc:subject>postfix</dc:subject><dc:subject>smtp</dc:subject><dc:subject>swaks</dc:subject>    
    <content type="html">    &lt;h3&gt;Host information&lt;/h3&gt;

&lt;pre&gt;
[root@smtp1 ~]# cat /etc/redhat-release
Fedora release 15 (Lovelock)
[root@smtp1 ~]#
&lt;/pre&gt;


&lt;h3&gt;How to add a new mysql user&lt;/h3&gt;

&lt;pre&gt;
[root@smtp1 ~]# mysql -u postfix -p
Enter password:

mysql&amp;gt; use postfix
mysql&amp;gt; INSERT INTO users VALUES ('new_user', ENCRYPT('password'));
&lt;/pre&gt;


&lt;h3&gt;MySql Setup&lt;/h3&gt;


&lt;h4&gt;Install MySql&lt;/h4&gt;

&lt;pre&gt;
[root@smtp1 ~]# yum install mysql mysql-server
&lt;/pre&gt;


&lt;h4&gt;Turn on the service&lt;/h4&gt;

&lt;pre&gt;
[root@smtp1 ~]# chkconfig mysqld on
&lt;/pre&gt;


&lt;h4&gt;Start the service (or reboot your server)&lt;/h4&gt;

&lt;pre&gt;
[root@smtp1 ~]# /etc/init.d/mysqld start
Starting mysqld (via systemctl):                           [  OK  ]
[root@smtp1 ~]# 
&lt;/pre&gt;


&lt;h4&gt;Check the mysql server is working correctly&lt;/h4&gt;

&lt;pre&gt;
[root@smtp1 ~]# mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.5.18 MySQL Community Server (GPL)

Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql&amp;gt; show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| test               |
+--------------------+
4 rows in set (0.00 sec)

mysql&amp;gt;
&lt;/pre&gt;


&lt;h4&gt;Assign the root password&lt;/h4&gt;

&lt;pre&gt;
[root@smtp1 ~]# mysqladmin -u root password password
&lt;/pre&gt;


&lt;h4&gt;Try this new password&lt;/h4&gt;
&lt;pre&gt;
[root@smtp1 ~]# mysql -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 6
Server version: 5.5.18 MySQL Community Server (GPL)

Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql&amp;gt; show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| test               |
+--------------------+
4 rows in set (0.00 sec)

mysql&amp;gt;
&lt;/pre&gt;


&lt;h4&gt;Create a postfix database in mysql (to store our virtual users)&lt;/h4&gt;

&lt;pre&gt;
[root@smtp1 ~]# mysqladmin create postfix -p
Enter password:
[root@smtp1 ~]#
&lt;/pre&gt;


&lt;h4&gt;Assign the postfix user to the postfix database&lt;/h4&gt;

&lt;pre&gt;
[root@smtp1 ~]# mysql -p

Enter password:
mysql&amp;gt; grant all on postfix.* to postfix@&amp;quot;localhost&amp;quot; identified by &amp;quot;postfix&amp;quot;;
&lt;/pre&gt;


&lt;h4&gt;Create the table dedicated to store smtp users information&lt;/h4&gt;

&lt;pre&gt;
[root@smtp1 postfix]# mysql -u postfix -p
Enter password:
mysql&amp;gt; use postfix
mysql&amp;gt; CREATE TABLE users ( user varchar(255) NOT NULL, password varchar(255) NOT NULL, PRIMARY KEY (user) ) ;
Query OK, 0 rows affected (0.04 sec)

mysql&amp;gt; show tables;
+-------------------+
| Tables_in_postfix |
+-------------------+
| users             |
+-------------------+
1 row in set (0.00 sec)


mysql&amp;gt;
&lt;/pre&gt;


&lt;h3&gt;Postfix setup&lt;/h3&gt;


&lt;h4&gt;Install Postfix&lt;/h4&gt;

&lt;pre&gt;
[root@smtp1 ~]# rpm -qa | grep postfix
postfix-2.8.2-2.fc15.x86_64
[root@smtp1 ~]#
&lt;/pre&gt;


&lt;h4&gt;Check mysql is built-in in this postfix version&lt;/h4&gt;

&lt;pre&gt;
[root@smtp1 postfix]# postconf -m | grep mysql
mysql
[root@smtp1 postfix]# 
&lt;/pre&gt;


&lt;h4&gt;Turn on postfix service&lt;/h4&gt;

&lt;pre&gt;
[root@smtp1 ~]# chkconfig --list | grep postfix

Note: This output shows SysV services only and does not include native
      systemd services. SysV configuration data might be overridden by native
      systemd configuration.

postfix             0:off     1:off     2:off     3:off     4:off     5:off     6:off

[root@smtp1 ~]#

[root@smtp1 ~]# chkconfig postfix on

[root@smtp1 ~]# /etc/init.d/postfix start
Starting postfix (via systemctl):                          [  OK  ]
[root@smtp1 ~]#
&lt;/pre&gt;


&lt;h4&gt;Check the daemon is running&lt;/h4&gt;

&lt;pre&gt;
[root@smtp1 ~]# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 smtp1.rack.airband.net ESMTP Postfix
HELO idefix
250 smtp1.rack.airband.net
MAIL FROM: ludo@epita.fr250 2.1.0 Ok
RCPT TO: ludo@epita.fr
250 2.1.5 Ok

DATA
354 End data with &amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;.&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
test
.
250 2.0.0 Ok: queued as 78F0A3841E
^]
telnet&amp;gt; close
Connection closed.
[root@smtp1 ~]# 
&lt;/pre&gt;


&lt;h4&gt;Check the queue works correctly&lt;/h4&gt;

&lt;pre&gt;
[root@smtp1 log]# mailq
-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
78F0A3841E      308 Mon Jan  9 15:26:34  ludo@epita.fr
(host mx-2.ig-iit.com[163.5.42.12] refused to talk to me: 450 See http://en.wikipedia.org/wiki/Greylisting - Try later)
                                         ludo@epita.fr

-- 0 Kbytes in 1 Request.
[root@smtp1 log]#
&lt;/pre&gt;


&lt;h4&gt;Send a test email&lt;/h4&gt;

&lt;pre&gt;
[root@smtp1 log]# ( echo subject: test; echo ) | sendmail -Am -v lfrancois@gmail.comMail Delivery Status Report will be mailed to &amp;lt;root&amp;gt;.
[root@smtp1 log]# mailq
Mail queue is empty

[root@smtp1 log]#
&lt;/pre&gt;


&lt;h4&gt;Create postfix configuration file defining how to pull user information from mysql&lt;/h4&gt;

&lt;pre&gt;
[root@smtp1 mysql]# pwd
/etc/postfix/mysql
[root@smtp1 mysql]# cat mysql-virtual_mailboxes.cf
user = postfix
password = postfix
dbname = postfix
table = users
select_field = CONCAT(SUBSTRING_INDEX(user,'@',-1),'/',SUBSTRING_INDEX(user,'@',1),'/')
where_field = user
hosts = 127.0.0.1
[root@smtp1 mysql]# 
&lt;/pre&gt;


&lt;h4&gt;Modify main.cf postfix configuration file&lt;/h4&gt;


&lt;h5&gt;Save a copy of the original file&lt;/h5&gt;
&lt;pre&gt;
[root@smtp1 postfix]# cp -a main.cf main.cf.$(date -I)
&lt;/pre&gt;


&lt;h5&gt;Define how to access the user accounts&lt;/h5&gt;
&lt;pre&gt;
[root@smtp1 ~]# postconf -e 'virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql/mysql-virtual_mailboxes.cf'
&lt;/pre&gt;


&lt;h5&gt;Enable SASL Auth&lt;/h5&gt;
&lt;pre&gt;
[root@smtp1 ~]# postconf -e 'smtpd_sasl_auth_enable = yes'
[root@smtp1 ~]# postconf -e 'broken_sasl_auth_clients = yes'
&lt;/pre&gt;


&lt;h5&gt;Make sure only authenticated clients have access to the smtp server&lt;/h5&gt;
&lt;pre&gt;
[root@smtp1 ~]# postconf -e 'smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination'
&lt;/pre&gt;


&lt;h5&gt;Turn on TLS and define where are the keys&lt;/h5&gt;
&lt;pre&gt;
[root@smtp1 ~]# postconf -e 'smtpd_use_tls = yes'
[root@smtp1 ~]# postconf -e 'smtpd_tls_cert_file = /etc/postfix/smtpd.cert'
[root@smtp1 ~]# postconf -e 'smtpd_tls_key_file = /etc/postfix/smtpd.key'
&lt;/pre&gt;


&lt;h5&gt;Below the final configuration file once settings applied&lt;/h5&gt;
&lt;pre&gt;
[root@smtp1 ~]# diff -u /etc/postfix/main.cf.2012-01-09 /etc/postfix/main.cf
--- /etc/postfix/main.cf.2012-01-09     2011-03-23 18:51:43.000000000 +0000
+++ /etc/postfix/main.cf        2012-01-10 00:24:11.000000000 +0000
@@ -113,7 +113,7 @@
 #inet_interfaces = all
 #inet_interfaces = $myhostname
 #inet_interfaces = $myhostname, localhost
-inet_interfaces = localhost
+inet_interfaces = all
 
 # Enable IPv4, and IPv6 if supported
 inet_protocols = all
@@ -248,7 +248,7 @@
 #
 #mynetworks_style = class
 #mynetworks_style = subnet
-#mynetworks_style = host
+mynetworks_style = host
 
 # Alternatively, you can specify the mynetworks list by hand, in
 # which case Postfix ignores the mynetworks_style setting.
@@ -674,3 +674,10 @@
 # readme_directory: The location of the Postfix README files.
 #
 readme_directory = /usr/share/doc/postfix-2.8.2/README_FILES
+virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql/mysql-virtual_mailboxes.cf
+smtpd_sasl_auth_enable = yes
+broken_sasl_auth_clients = yes
+smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
+smtpd_use_tls = yes
+smtpd_tls_cert_file = /etc/postfix/smtpd.cert
+smtpd_tls_key_file = /etc/postfix/smtpd.key
[root@smtp1 ~]# 
&lt;/pre&gt;


&lt;h4&gt;Modify master.cf file to enable 465 and 587 ports&lt;/h4&gt;

&lt;pre&gt;
[root@smtp1 postfix]# cp -a master.cf master.cf.$(date -I)
[root@smtp1 ~]# diff -u /etc/postfix/master.cf.2012-01-09 /etc/postfix/master.cf
--- /etc/postfix/master.cf.2012-01-09   2011-03-23 18:51:42.000000000 +0000
+++ /etc/postfix/master.cf      2012-01-09 19:14:08.000000000 +0000
@@ -13,16 +13,16 @@
 #smtpd     pass  -       -       n       -       -       smtpd
 #dnsblog   unix  -       -       n       -       0       dnsblog
 #tlsproxy  unix  -       -       n       -       0       tlsproxy
-#submission inet n       -       n       -       -       smtpd
-#  -o smtpd_tls_security_level=encrypt
-#  -o smtpd_sasl_auth_enable=yes
-#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
-#  -o milter_macro_daemon_name=ORIGINATING
-#smtps     inet  n       -       n       -       -       smtpd
-#  -o smtpd_tls_wrappermode=yes
-#  -o smtpd_sasl_auth_enable=yes
-#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
-#  -o milter_macro_daemon_name=ORIGINATING
+submission inet n       -       n       -       -       smtpd
+  -o smtpd_tls_security_level=encrypt
+  -o smtpd_sasl_auth_enable=yes
+  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
+  -o milter_macro_daemon_name=ORIGINATING
+smtps     inet  n       -       n       -       -       smtpd
+  -o smtpd_tls_wrappermode=yes
+  -o smtpd_sasl_auth_enable=yes
+  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
+  -o milter_macro_daemon_name=ORIGINATING
 #628       inet  n       -       n       -       -       qmqpd
 pickup    fifo  n       -       n       60      1       pickup
 cleanup   unix  n       -       n       -       0       cleanup
[root@smtp1 ~]# 
&lt;/pre&gt;


&lt;h3&gt;ssl key generation&lt;/h3&gt;


&lt;h4&gt;Generate the key&lt;/h4&gt;

&lt;pre&gt;
[root@smtp1 postfix]# openssl req -new -outform PEM -out /etc/postfix/smtpd.cert -newkey rsa:2048 -nodes -keyout /etc/postfix/smtpd.key -keyform PEM -days 3650 -x509Generating a 2048 bit RSA private key
..............................+++
......................................................+++
writing new private key to '/etc/postfix/smtpd.key'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [XX]:US
State or Province Name (full name) []:
Locality Name (eg, city) [Default City]:Los Angeles
Organization Name (eg, company) [Default Company Ltd]:MyCompany
Organizational Unit Name (eg, section) []:
Common Name (eg, your name or your server's hostname) []:
Email Address []:support@zoxx.net
[root@smtp1 postfix]#
&lt;/pre&gt;


&lt;h4&gt;Make sure the files are at the correct place and change the permissions&lt;/h4&gt;
&lt;pre&gt;
[root@smtp1 postfix]# ls -altr smtpd.*
-rw-r----- 1 root postfix 1704 Jan  9 19:11 smtpd.key
-rw-r----- 1 root postfix 1281 Jan  9 19:11 smtpd.cert
[root@smtp1 postfix]# 
&lt;/pre&gt;



&lt;h3&gt;saslauthd configuration&lt;/h3&gt;


&lt;h4&gt;Install saslauthd with the sql module&lt;/h4&gt;
&lt;pre&gt;
[root@smtp1 postfix]# yum install cyrus-sasl cyrus-sasl-sql
&lt;/pre&gt;


&lt;h4&gt;Setup saslauthd&lt;/h4&gt;

&lt;pre&gt;
[root@smtp1 postfix]# cd /etc/sasl2
[root@smtp1 sasl2]# diff -u smtpd.conf.2012-01-10 smtpd.conf
--- smtpd.conf.2012-01-10       2011-03-23 18:51:44.000000000 +0000
+++ smtpd.conf  2012-01-10 00:33:18.000000000 +0000
@@ -1,2 +1,9 @@
 pwcheck_method: saslauthd
 mech_list: plain login
+allow_plaintext: true
+auxprop_plugin: mysql
+sql_hostnames: 127.0.0.1
+sql_user: postfix
+sql_passwd: postfix
+sql_database: mail
+sql_select: select password from users where user = '%u'
[root@smtp1 sasl2]# 
&lt;/pre&gt;


&lt;h4&gt;Turn on sasl&lt;/h4&gt;

&lt;pre&gt;
[root@smtp1 ~]# chkconfig saslauthd on
[root@smtp1 ~]# mkdir -p /var/run/saslauthd
[root@smtp1 ~]# /etc/init.d/saslauthd start
Starting saslauthd (via systemctl):                        [  OK  ]
[root@smtp1 ~]#
&lt;/pre&gt;


&lt;h3&gt;Configure PAM to get smtp information on MySQL&lt;/h3&gt;

&lt;pre&gt;
[root@smtp1 pam.d]# ls -altr | grep smtp
-rw-r--r--.  1 root root   76 Mar 23  2011 smtp.postfix
lrwxrwxrwx.  1 root root   25 Aug 25 13:15 smtp -&amp;gt; /etc/alternatives/mta-pam
[root@smtp1 pam.d]#

[root@smtp1 pam.d]# cat smtp
auth required pam_mysql.so user=postfix passwd=postfix host=127.0.0.1 db=postfix table=users usercolumn=user passwdcolumn=password crypt=1
account sufficient pam_mysql.so user=postfix passwd=postfix host=127.0.0.1 db=postfix table=users usercolumn=user passwdcolumn=password crypt=1
[root@smtp1 pam.d]#
&lt;/pre&gt;


&lt;h3&gt;Restart all services a last time&lt;/h3&gt;

&lt;pre&gt;
[root@smtp1 ~]# /etc/init.d/mysql restart
[root@smtp1 ~]# /etc/init.d/saslauthd restart
[root@smtp1 ~]# /etc/init.d/postfix restart
&lt;/pre&gt;


&lt;h3&gt;How to add a new mysql user&lt;/h3&gt;

&lt;pre&gt;
[root@smtp1 ~]# mysql -u postfix -p
Enter password:

mysql&amp;gt; use postfixmysql&amp;gt; INSERT INTO users VALUES ('new_user', ENCRYPT('password'));
&lt;/pre&gt;


&lt;h3&gt;Test with Swaks the server is working correctly&lt;/h3&gt;

&lt;pre&gt;
falabala:~# swaks --from ludo@zoxx.net --to lfrancois@gmail.com --server smtp1.zoxx.net -a -au ludo -ap password -tls --port 25
=== Trying smtp1.zoxx.net:25...
=== Connected to smtp1.zoxx.net.
&amp;lt;-  220 smtp1.zoxx.net ESMTP Postfix
 -&amp;gt; EHLO falbala.dedibox.fr
&amp;lt;-  250-smtp1.zoxx.net
&amp;lt;-  250-PIPELINING
&amp;lt;-  250-SIZE 10240000
&amp;lt;-  250-VRFY
&amp;lt;-  250-ETRN
&amp;lt;-  250-STARTTLS
&amp;lt;-  250-AUTH LOGIN PLAIN
&amp;lt;-  250-AUTH=LOGIN PLAIN
&amp;lt;-  250-ENHANCEDSTATUSCODES
&amp;lt;-  250-8BITMIME
&amp;lt;-  250 DSN
 -&amp;gt; STARTTLS
&amp;lt;-  220 2.0.0 Ready to start TLS
=== TLS started w/ cipher DHE-RSA-AES256-SHA
=== TLS peer subject DN=&amp;quot;/C=US/L=Los Angeles/O=MyCompany/emailAddress=support@zoxx.net&amp;quot;
 ~&amp;gt; EHLO falbala.dedibox.fr
&amp;lt;~  250-smtp1.zoxx.net
&amp;lt;~  250-PIPELINING
&amp;lt;~  250-SIZE 10240000
&amp;lt;~  250-VRFY
&amp;lt;~  250-ETRN
&amp;lt;~  250-AUTH LOGIN PLAIN
&amp;lt;~  250-AUTH=LOGIN PLAIN
&amp;lt;~  250-ENHANCEDSTATUSCODES
&amp;lt;~  250-8BITMIME
&amp;lt;~  250 DSN
 ~&amp;gt; AUTH LOGIN
&amp;lt;~  334 VXNlcm5hbWU6
 ~&amp;gt; bHVkbw==
&amp;lt;~  334 UGFzc3dvcmQ6
 ~&amp;gt; cGFzc3dvcmQ=
&amp;lt;~  235 2.7.0 Authentication successful
 ~&amp;gt; MAIL FROM:&amp;lt;ludo@zoxx.net&amp;gt;
&amp;lt;~  250 2.1.0 Ok
 ~&amp;gt; RCPT TO:&amp;lt;lfrancois@gmail.com&amp;gt;
&amp;lt;~  250 2.1.5 Ok
 ~&amp;gt; DATA
&amp;lt;~  354 End data with &amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;.&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
 ~&amp;gt; Date: Tue, 10 Jan 2012 03:14:12 +0100
 ~&amp;gt; To: lfrancois@gmail.com
 ~&amp;gt; From: ludo@zoxx.net
 ~&amp;gt; Subject: test Tue, 10 Jan 2012 03:14:12 +0100
 ~&amp;gt; X-Mailer: swaks v20100211.0 jetmore.org/john/code/swaks/
 ~&amp;gt;
 ~&amp;gt; This is a test mailing
 ~&amp;gt;
 ~&amp;gt; .
&amp;lt;~  250 2.0.0 Ok: queued as B7ACF3841C
 ~&amp;gt; QUIT
&amp;lt;~  221 2.0.0 Bye
=== Connection closed with remote host.
falabala:~# 
&lt;/pre&gt;


&lt;h3&gt;Check the server is not in open relay and denied&lt;/h3&gt;

&lt;pre&gt;
ludo@idefix:~ % telnet smtp1.zoxx.net 25             
Trying smtp1.zoxx.net...
Connected to smtp1.zoxx.net.
Escape character is '^]'.
220 smtp1.zoxx.net ESMTP Postfix
HELO idefix
250 smtp1.zoxx.net
MAIL FROM: ludo@epita.fr
250 2.1.0 Ok
RCPT TO: lfrancois@gmail.com
554 5.7.1 &amp;lt;lfrancois@gmail.com&amp;gt;: Relay access denied
^]
telnet&amp;gt; close
Connection closed.
ludo@idefix:~ %
&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/lfrancois/~4/e476zWFjLi4" height="1" width="1"/&gt;</content>
    
    

    
          <wfw:comment>http://www.zoxx.net/notes/index.php/post/2012/01/10/Fedora-15-Postfix-SMTP-relay-server-with-MySql-Authentication#comment-form</wfw:comment>
      <wfw:commentRss>http://www.zoxx.net/notes/index.php/feed/atom/comments/165</wfw:commentRss>
      <feedburner:origLink>http://www.zoxx.net/notes/index.php/post/2012/01/10/Fedora-15-Postfix-SMTP-relay-server-with-MySql-Authentication</feedburner:origLink></entry>
    
  <entry>
    <title>Why does btrfs show up twice the capacity available?</title>
    <link href="http://feedproxy.google.com/~r/lfrancois/~3/jVvsV4TQuho/Why-does-btrfs-show-up-twice-the-capacity-available" rel="alternate" type="text/html" title="Why does btrfs show up twice the capacity available?" />
    <id>urn:md5:ae5003e14a8f9dc0ad4809fab32da4bc</id>
    <published>2011-12-15T20:52:00-08:00</published>
    <updated>2012-03-24T10:47:32-07:00</updated>
    <author><name>Ludovic Francois</name></author>
        <dc:subject>unix</dc:subject>
        <dc:subject>btrfs</dc:subject><dc:subject>dd</dc:subject><dc:subject>debian</dc:subject><dc:subject>file system</dc:subject><dc:subject>mkfs</dc:subject><dc:subject>storage</dc:subject><dc:subject>ubuntu</dc:subject>    
    <content type="html">    &lt;p&gt;If you decide to use the btrfs data (or/and metadata) replication, you will see the df command reports you your storage get used twice as fast as you expect. Btrfs doesn't act as for example mdadm. Each file will get striped at the block level across all devices available depending on the replication policy selected.&lt;/p&gt;


&lt;h3&gt;Create a new test file system&lt;/h3&gt;

&lt;pre&gt;
root@blackbox:~# mkfs.btrfs -m raid1 -d raid1 -L btrfs01 /dev/sdb /dev/sdc

WARNING! - Btrfs Btrfs v0.19 IS EXPERIMENTAL
WARNING! - see http://btrfs.wiki.kernel.org before using

adding device /dev/sdc id 2
fs created label btrfs01 on /dev/sdb
     nodesize 4096 leafsize 4096 sectorsize 4096 size 298.02GB
Btrfs Btrfs v0.19
root@blackbox:~#
&lt;/pre&gt;


&lt;h3&gt;Mount it&lt;/h3&gt;

&lt;pre&gt;
root@blackbox:~# mkdir /mnt/btrfs01

root@blackbox:~# mkdir /mnt/btrfs01
root@blackbox:~# mount /dev/sdb /mnt/btrfs01/
&lt;/pre&gt;


&lt;h3&gt;Check the capacity available&lt;/h3&gt;

&lt;pre&gt;
root@blackbox:~# df -h -F btrfs
Filesystem            Size  Used Avail Use% Mounted on
/dev/sdb              299G   56K  296G   1% /mnt/btrfs01
root@blackbox:~#
&lt;/pre&gt;


&lt;h3&gt;Create a new file (dd)&lt;/h3&gt;

&lt;pre&gt;
root@blackbox:~# dd if=/dev/zero of=/mnt/btrfs01/file.10G bs=1M count=$((10*1024))
10240+0 records in
10240+0 records out
10737418240 bytes (11 GB) copied, 176.188 s, 60.9 MB/s
root@blackbox:~#
&lt;/pre&gt;


&lt;h3&gt;Check how much space this file uses on the file system&lt;/h3&gt;

&lt;pre&gt;
root@blackbox:~# df -h -F btrfs
Filesystem            Size  Used Avail Use% Mounted on
/dev/sdb              299G   21G  276G   7% /mnt/btrfs01
root@blackbox:~#

root@blackbox:~# btrfs-show
Label: btrfs01  uuid: d2b77569-a8be-4ec7-862a-d0fc1e6c8511
     Total devices 2 FS bytes used 10.01GB
     devid    1 size 149.01GB used 12.03GB path /dev/sdb
     devid    2 size 149.01GB used 12.01GB path /dev/sdc

Btrfs Btrfs v0.19
root@blackbox:~#
&lt;/pre&gt;


&lt;h3&gt;Get the usage explanation from btrfs tool&lt;/h3&gt;

&lt;pre&gt;
root@blackbox:~# btrfs filesystem df /mnt/btrfs01/
Data, RAID1: total=11.00GB, used=10.00GB
Data: total=8.00MB, used=0.00
System, RAID1: total=8.00MB, used=4.00KB
System: total=4.00MB, used=0.00
Metadata, RAID1: total=1.00GB, used=14.11MB
Metadata: total=8.00MB, used=0.00
root@blackbox:~#
&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/lfrancois/~4/jVvsV4TQuho" height="1" width="1"/&gt;</content>
    
    

    
          <wfw:comment>http://www.zoxx.net/notes/index.php/post/2011/12/15/Why-does-btrfs-show-up-twice-the-capacity-available#comment-form</wfw:comment>
      <wfw:commentRss>http://www.zoxx.net/notes/index.php/feed/atom/comments/164</wfw:commentRss>
      <feedburner:origLink>http://www.zoxx.net/notes/index.php/post/2011/12/15/Why-does-btrfs-show-up-twice-the-capacity-available</feedburner:origLink></entry>
    
  <entry>
    <title>Create a btrfs file system on Debian wheezy</title>
    <link href="http://feedproxy.google.com/~r/lfrancois/~3/iewB7o2hT9E/Create-a-btrfs-file-system-on-Debian-wheezy" rel="alternate" type="text/html" title="Create a btrfs file system on Debian wheezy" />
    <id>urn:md5:f5e0d6fbdbdfbfa0db14fd61a9b1e691</id>
    <published>2011-12-15T18:34:00-08:00</published>
    <updated>2011-12-15T19:40:03-08:00</updated>
    <author><name>Ludovic Francois</name></author>
        <dc:subject>unix</dc:subject>
        <dc:subject>btrfs</dc:subject><dc:subject>debian</dc:subject><dc:subject>file system</dc:subject><dc:subject>linux</dc:subject><dc:subject>mkfs</dc:subject><dc:subject>storage</dc:subject>    
    <content type="html">    &lt;h3&gt;Debian version&lt;/h3&gt;

&lt;pre&gt;
ludo@blackbox:~ % cat /etc/debian_version          
wheezy/sid
ludo@blackbox:~ % uname -a                               
Linux blackbox 3.0.0-12-generic #20-Ubuntu SMP Fri Oct 7 14:50:42 UTC 2011 i686 athlon i386 GNU/Linux
ludo@blackbox:~ %     
&lt;/pre&gt;


&lt;h3&gt;btrfs package install&lt;/h3&gt;

&lt;pre&gt;
root@blackbox:~# apt-get install btrfs-tools
&lt;/pre&gt;


&lt;h3&gt;Reinitialize all LUNs in use for this new file system&lt;/h3&gt;

&lt;pre&gt;
root@blackbox:~# dd if=/dev/zero of=/dev/sdb bs=1M count=512
512+0 records in
512+0 records out
536870912 bytes (537 MB) copied, 9.07636 s, 59.2 MB/s
root@blackbox:~# dd if=/dev/zero of=/dev/sdc bs=1M count=512
512+0 records in
512+0 records out
536870912 bytes (537 MB) copied, 9.06802 s, 59.2 MB/s
root@blackbox:~# 
&lt;/pre&gt;


&lt;h3&gt;Check if any btrfs file system are already present on the system&lt;/h3&gt;

&lt;pre&gt;
root@blackbox:~# btrfs-show
Btrfs Btrfs v0.19
root@blackbox:~# 
&lt;/pre&gt;


&lt;h3&gt;Create btrfs file system (metadata and data replicated)&lt;/h3&gt;

&lt;pre&gt;
root@blackbox:~# mkfs.btrfs -m raid1 -d raid1 -L btrfs01 /dev/sdb /dev/sdc

WARNING! - Btrfs Btrfs v0.19 IS EXPERIMENTAL
WARNING! - see http://btrfs.wiki.kernel.org before using

adding device /dev/sdc id 2
fs created label btrfs01 on /dev/sdb
     nodesize 4096 leafsize 4096 sectorsize 4096 size 298.02GB
Btrfs Btrfs v0.19
root@blackbox:~#
&lt;/pre&gt;


&lt;h3&gt;mount btrfs01&lt;/h3&gt;

&lt;pre&gt;
root@blackbox:~# mkdir /mnt/btrfs01
root@blackbox:~# mount /dev/sdb /mnt/btrfs01/
&lt;/pre&gt;


&lt;h3&gt;check the file system is mounted (it shows up twice the capacity really available)&lt;/h3&gt;

&lt;pre&gt;
root@blackbox:~# df -h -F btrfs
Filesystem            Size  Used Avail Use% Mounted on
/dev/sdb              299G   56K  296G   1% /mnt/btrfs01
root@blackbox:~#
&lt;/pre&gt;


&lt;h3&gt;make a test to understand how the data are stripped across the LUNs&lt;/h3&gt;

&lt;pre&gt;
root@blackbox:~# dd if=/dev/zero of=/mnt/btrfs01/file.10G bs=1M count=$((10*1024))
10240+0 records in
10240+0 records out
10737418240 bytes (11 GB) copied, 176.188 s, 60.9 MB/s
root@blackbox:~#
&lt;/pre&gt;

&lt;pre&gt;
root@blackbox:~# df -h -F btrfs
Filesystem            Size  Used Avail Use% Mounted on
/dev/sdb              299G   21G  276G   7% /mnt/btrfs01
root@blackbox:~#
&lt;/pre&gt;

&lt;pre&gt;
root@blackbox:~# btrfs-show
Label: btrfs01  uuid: d2b77569-a8be-4ec7-862a-d0fc1e6c8511
     Total devices 2 FS bytes used 10.01GB
     devid    1 size 149.01GB used 12.03GB path /dev/sdb
     devid    2 size 149.01GB used 12.01GB path /dev/sdc

Btrfs Btrfs v0.19
root@blackbox:~#
&lt;/pre&gt;

&lt;pre&gt;
root@blackbox:~# btrfs filesystem df /mnt/btrfs01/
Data, RAID1: total=11.00GB, used=10.00GB
Data: total=8.00MB, used=0.00
System, RAID1: total=8.00MB, used=4.00KB
System: total=4.00MB, used=0.00
Metadata, RAID1: total=1.00GB, used=14.11MB
Metadata: total=8.00MB, used=0.00
root@blackbox:~#
&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/lfrancois/~4/iewB7o2hT9E" height="1" width="1"/&gt;</content>
    
    

    
          <wfw:comment>http://www.zoxx.net/notes/index.php/post/2011/12/15/Create-a-btrfs-file-system-on-Debian-wheezy#comment-form</wfw:comment>
      <wfw:commentRss>http://www.zoxx.net/notes/index.php/feed/atom/comments/163</wfw:commentRss>
      <feedburner:origLink>http://www.zoxx.net/notes/index.php/post/2011/12/15/Create-a-btrfs-file-system-on-Debian-wheezy</feedburner:origLink></entry>
    
  <entry>
    <title>Ubuntu 11.10 XDMCP remote access from MAC OS X (Lion)</title>
    <link href="http://feedproxy.google.com/~r/lfrancois/~3/utLpHa7wqs8/Ubuntu-11.10-XDMCP-remote-access-from-MAC-OS-X-%28Lion%29" rel="alternate" type="text/html" title="Ubuntu 11.10 XDMCP remote access from MAC OS X (Lion)" />
    <id>urn:md5:fb407410dbcc38a719b410312f6d5bd6</id>
    <published>2011-12-08T02:31:00-08:00</published>
    <updated>2011-12-08T03:44:26-08:00</updated>
    <author><name>Ludovic Francois</name></author>
        <dc:subject>unix</dc:subject>
        <dc:subject>linux</dc:subject><dc:subject>os x</dc:subject><dc:subject>ubuntu</dc:subject><dc:subject>xdcmp</dc:subject>    
    <content type="html">    &lt;p&gt;&lt;a href="http://www.zoxx.net/notes/public/xdcmp_session_os_x_ubuntu.png" title="XDCMP Session from OS X to Ubuntu"&gt;&lt;img src="http://www.zoxx.net/notes/public/.xdcmp_session_os_x_ubuntu_m.jpg" alt="XDCMP Session from OS X to Ubuntu" style="display:block; margin:0 auto;" title="XDCMP Session from OS X to Ubuntu, Dec 2011" /&gt;&lt;/a&gt;&lt;/p&gt;


&lt;h2&gt;Enable XDMCP on Ubuntu 11.10&lt;/h2&gt;

&lt;pre&gt;
root@blackbox:~# cp /etc/lightdm/lightdm.conf /etc/lightdm/lightdm.conf.$(date -I)
root@blackbox:~# cat /etc/lightdm/lightdm.conf

[SeatDefaults]
greeter-session=unity-greeter
user-session=ubuntu

[XDMCPServer]
enabled=true
root@blackbox:~#
&lt;/pre&gt;


&lt;h2&gt;Restart X display manager&lt;/h2&gt;

&lt;pre&gt;
root@blackbox:~# restart lightdm
lightdm start/running, process 5684
root@blackbox:~#
&lt;/pre&gt;


&lt;h2&gt;Open X session from OS X to Ubuntu&lt;/h2&gt;

&lt;pre&gt;
ludo@idefix:~ % uname -a                                                                                                
Darwin idefix 11.2.0 Darwin Kernel Version 11.2.0: Tue Aug  9 20:54:00 PDT 2011; root:xnu-1699.24.8~1/RELEASE_X86_64 x86_64
ludo@idefix:~ %

ludo@idefix:~ % Xephyr :1 -screen 1024x768 -query blackbox
&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/lfrancois/~4/utLpHa7wqs8" height="1" width="1"/&gt;</content>
    
    

    
          <wfw:comment>http://www.zoxx.net/notes/index.php/post/2011/12/08/Ubuntu-11.10-XDMCP-remote-access-from-MAC-OS-X-%28Lion%29#comment-form</wfw:comment>
      <wfw:commentRss>http://www.zoxx.net/notes/index.php/feed/atom/comments/162</wfw:commentRss>
      <feedburner:origLink>http://www.zoxx.net/notes/index.php/post/2011/12/08/Ubuntu-11.10-XDMCP-remote-access-from-MAC-OS-X-%28Lion%29</feedburner:origLink></entry>
    
  <entry>
    <title>CherryPy help access</title>
    <link href="http://feedproxy.google.com/~r/lfrancois/~3/edHN0Y1I6qE/CherryPy-help-access" rel="alternate" type="text/html" title="CherryPy help access" />
    <id>urn:md5:bc567629cdb5165b4583fbe6a04b6012</id>
    <published>2009-10-14T22:25:00-07:00</published>
    <updated>2009-10-15T19:44:05-07:00</updated>
    <author><name>Ludovic Francois</name></author>
        <dc:subject>languages</dc:subject>
        <dc:subject>cherrypy</dc:subject><dc:subject>python</dc:subject>    
    <content type="html">    &lt;p&gt;I am playing in CherryPy these days, the most helpful documentation is directly from the python command line.&lt;/p&gt;

&lt;pre&gt;
[ludo@falbala ~]$ python2.6
Python 2.6.3 (r263:75183, Oct  9 2009, 13:58:37) 
[GCC 4.1.2 20071124 (Red Hat 4.1.2-42)] on linux2
Type &amp;quot;help&amp;quot;, &amp;quot;copyright&amp;quot;, &amp;quot;credits&amp;quot; or &amp;quot;license&amp;quot; for more information.
&amp;gt;&amp;gt;&amp;gt; import cherrypy
&amp;gt;&amp;gt;&amp;gt; help(cherrypy)
&amp;gt;&amp;gt;&amp;gt; help(cherrypy.config)
&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/lfrancois/~4/edHN0Y1I6qE" height="1" width="1"/&gt;</content>
    
    

    
          <wfw:comment>http://www.zoxx.net/notes/index.php/post/2009/10/14/CherryPy-help-access#comment-form</wfw:comment>
      <wfw:commentRss>http://www.zoxx.net/notes/index.php/feed/atom/comments/161</wfw:commentRss>
      <feedburner:origLink>http://www.zoxx.net/notes/index.php/post/2009/10/14/CherryPy-help-access</feedburner:origLink></entry>
    
  <entry>
    <title>macbook very slow after snow leopard upgrade</title>
    <link href="http://feedproxy.google.com/~r/lfrancois/~3/rWWEx7It6wM/macbook-very-slow-after-snow-leopard-upgrade" rel="alternate" type="text/html" title="macbook very slow after snow leopard upgrade" />
    <id>urn:md5:ab31fa9abe066fb9849db217d7d587b6</id>
    <published>2009-09-29T14:51:00-07:00</published>
    <updated>2009-09-29T15:03:48-07:00</updated>
    <author><name>Ludovic Francois</name></author>
        <dc:subject>os x</dc:subject>
        <dc:subject>cache</dc:subject><dc:subject>os x</dc:subject><dc:subject>snow leopard</dc:subject>    
    <content type="html">    &lt;p&gt;After I decided to upgrade my macbook to snow leopard it became very slow, specially softwares like safari.&lt;/p&gt;


&lt;p&gt;To fix it I just installed "snow leopard cache cleaner" (slcc). Once you installed the demo version launch it:&lt;/p&gt;


&lt;p&gt;&lt;a href="http://www.zoxx.net/notes/public/slcc_start.png"&gt;&lt;img src="http://www.zoxx.net/notes/public/.slcc_start_m.jpg" alt="slcc started" style="display:block; margin:0 auto;" title="slcc started, Sep 2009" /&gt;&lt;/a&gt;&lt;/p&gt;


&lt;p&gt;Perform a deep cleaning on your system and restart your computer:&lt;/p&gt;


&lt;p&gt;&lt;a href="http://www.zoxx.net/notes/public/slcc_deep_cleaning.png"&gt;&lt;img src="http://www.zoxx.net/notes/public/.slcc_deep_cleaning_m.jpg" alt="slcc cache deep cleaning" style="display:block; margin:0 auto;" title="slcc cache deep cleaning, Sep 2009" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/lfrancois/~4/rWWEx7It6wM" height="1" width="1"/&gt;</content>
    
    

    
          <wfw:comment>http://www.zoxx.net/notes/index.php/post/2009/09/29/macbook-very-slow-after-snow-leopard-upgrade#comment-form</wfw:comment>
      <wfw:commentRss>http://www.zoxx.net/notes/index.php/feed/atom/comments/160</wfw:commentRss>
      <feedburner:origLink>http://www.zoxx.net/notes/index.php/post/2009/09/29/macbook-very-slow-after-snow-leopard-upgrade</feedburner:origLink></entry>
    
  <entry>
    <title>Configurer sendmail comme simple relai vers un autre serveur email</title>
    <link href="http://feedproxy.google.com/~r/lfrancois/~3/3IxG-4Ym4Dw/37-configurer-sendmail-comme-simple-relai-vers-un-autre-serveur-email" rel="alternate" type="text/html" title="Configurer sendmail comme simple relai vers un autre serveur email" />
    <id>urn:md5:c6cfb9bfe834d4318d20a7f46a8331ce</id>
    <published>2007-04-27T21:49:54+00:00</published>
    <updated>2007-04-27T21:49:54+00:00</updated>
    <author><name>Ludovic Francois</name></author>
        <dc:subject>General</dc:subject>
            
    <content type="html">&lt;p&gt;Configurer sendmail comme simple relai vers un autre serveur email&lt;/p&gt;    &lt;h3&gt;Configuration du relai&lt;/h3&gt;


&lt;p&gt;Editer votre sendmail.mc&lt;/p&gt;


&lt;pre&gt;MASQUERADE_AS(`your_domain.com')
MASQUERADE_DOMAIN(`your_domain.com')
MASQUERADE_DOMAIN(`localhost')
MASQUERADE_DOMAIN(`localhost.localdomain')
MASQUERADE_DOMAIN(`your_machine.your_domain.com')
FEATURE(`masquerade_entire_domain')&lt;/pre&gt;


&lt;p&gt;Faire un "make" pour construire votre nouveau sendmail.mc&lt;/p&gt;


&lt;h3&gt;Autoriser les emails venant de l'utilisateur root à passer à travers ce relai&lt;/h3&gt;


&lt;p&gt;Si vous êtes sur de ce que vous faites et décidez de faire ca, vous avez juste besoin de commenter cette ligne&amp;nbsp;:&lt;/p&gt;


&lt;pre&gt;dnl EXPOSED_USER(`root')&lt;/pre&gt;


&lt;h3&gt;Outil pour tester si ca marche&lt;/h3&gt;


&lt;p&gt;Pour tester si ca marche bien, sendmail offre un outil assez simple pour obtenir un affichage complet de la transaction en cours entre toi et ton daemon sendmail.&lt;/p&gt;


&lt;pre&gt;( echo subject: test; echo ) | sendmail -Am -v your_name@your_domain.com&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/lfrancois/~4/3IxG-4Ym4Dw" height="1" width="1"/&gt;</content>
    
    

    
          <wfw:comment>http://www.zoxx.net/notes/index.php/post/2007/04/27/37-configurer-sendmail-comme-simple-relai-vers-un-autre-serveur-email#comment-form</wfw:comment>
      <wfw:commentRss>http://www.zoxx.net/notes/index.php/feed/atom/comments/154</wfw:commentRss>
      <feedburner:origLink>http://www.zoxx.net/notes/index.php/post/2007/04/27/37-configurer-sendmail-comme-simple-relai-vers-un-autre-serveur-email</feedburner:origLink></entry>
    
  <entry>
    <title>Configure a simple relay-only mail transport agent with sendmail</title>
    <link href="http://feedproxy.google.com/~r/lfrancois/~3/h4xYoMXsksA/36-configure-a-simple-relay-only-mail-transport-agent-with-sendmail" rel="alternate" type="text/html" title="Configure a simple relay-only mail transport agent with sendmail" />
    <id>urn:md5:85d605ad5aa05753e882f4661644d128</id>
    <published>2007-04-27T21:41:29+00:00</published>
    <updated>2007-04-27T21:42:10+00:00</updated>
    <author><name>Ludovic Francois</name></author>
        <dc:subject>General</dc:subject>
            
    <content type="html">&lt;p&gt;Configure a simple relay-only mail transport agent with sendmail&lt;/p&gt;    &lt;h3&gt;Relay host configuration&lt;/h3&gt;


&lt;p&gt;Edit your sendmail.mc&lt;/p&gt;


&lt;pre&gt;MASQUERADE_AS(`your_domain.com')
MASQUERADE_DOMAIN(`your_domain.com')
MASQUERADE_DOMAIN(`localhost')
MASQUERADE_DOMAIN(`localhost.localdomain')
MASQUERADE_DOMAIN(`your_machine.your_domain.com')
FEATURE(`masquerade_entire_domain')&lt;/pre&gt;


&lt;p&gt;Do a "make" to build your new sendmail.mc&lt;/p&gt;


&lt;h3&gt;Authorize root email to go through the gate&lt;/h3&gt;


&lt;p&gt;If you decide to do it, you need just to comment this line like this:&lt;/p&gt;


&lt;pre&gt;dnl EXPOSED_USER(`root')&lt;/pre&gt;


&lt;h3&gt;Test if it works&lt;/h3&gt;


&lt;p&gt;To test if it's working, there is a nice tool released with sendmail to get a full debug log of the transaction between you and your sendmail daemon.&lt;/p&gt;


&lt;pre&gt;( echo subject: test; echo ) | sendmail -Am -v your_name@your_domain.com&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/lfrancois/~4/h4xYoMXsksA" height="1" width="1"/&gt;</content>
    
    

    
      <feedburner:origLink>http://www.zoxx.net/notes/index.php/post/2007/04/27/36-configure-a-simple-relay-only-mail-transport-agent-with-sendmail</feedburner:origLink></entry>
    
  <entry>
    <title>vmware-server-console: erreur libpng sur Debian GNU/Linux</title>
    <link href="http://feedproxy.google.com/~r/lfrancois/~3/linOtEBt2PI/34-vmware-server-console-erreur-libpng-sur-debian-gnu-linux" rel="alternate" type="text/html" title="vmware-server-console: erreur libpng sur Debian GNU/Linux" />
    <id>urn:md5:81ec0ec28ef5842700a431124a38e925</id>
    <published>2006-12-30T22:34:56+00:00</published>
    <updated>2006-12-30T22:34:56+00:00</updated>
    <author><name>Ludovic Francois</name></author>
        <dc:subject>General</dc:subject>
        <dc:subject>vmware</dc:subject>    
    <content type="html">&lt;p&gt;J'utilise vmware-server pour tester de nouvelles distributions et des outils relatifs aux clusters. Normalement j'atteins ces serveurs uniquement par ssh, il y a quelques semaines je voulais installer une nouvelle distribution mais le programme vmware-server-console ne fonctionnait plus depuis ma Debian instable.&lt;/p&gt;    &lt;p&gt;J'obtiens ce message d'erreur:&lt;/p&gt;


&lt;pre&gt;$ vmware-server-console
/usr/lib/vmware-server-console/bin/vmware-server-console: /usr/lib/vmware-server-console/lib/libpng12.so.0/libpng12.so.0: no version information available (required by /usr/lib/libcairo.so.2)
/usr/lib/vmware-server-console/bin/vmware-server-console: /usr/lib/vmware-server-console/lib/libpng12.so.0/libpng12.so.0: no version information available (required by /usr/lib/libcairo.so.2)
/usr/lib/vmware-server-console/bin/vmware-server-console: /usr/lib/vmware-server-console/lib/libpng12.so.0/libpng12.so.0: no version information available (required by /usr/lib/libcairo.so.2)
$&lt;/pre&gt;


&lt;p&gt;J'ai essayé d'installer la dernière version de vmware-server-console:&lt;/p&gt;

&lt;pre&gt;# unzip VMware-server-linux-client-1.0.1-29996.zip
# tar xvzf VMware-server-console-1.0.1-29996.tar.gz
# cd vmware-server-console-distrib
# ./vmware-install.pl&lt;/pre&gt;


&lt;p&gt;Mais j'obtiens à nouveau le message d'erreur:&lt;/p&gt;


&lt;pre&gt;$ vmware-server-console
/usr/lib/vmware-server-console/bin/vmware-server-console: /usr/lib/vmware-server-console/lib/libpng12.so.0/libpng12.so.0: no version information available (required by /usr/lib/libcairo.so.2)
/usr/lib/vmware-server-console/bin/vmware-server-console: /usr/lib/vmware-server-console/lib/libpng12.so.0/libpng12.so.0: no version information available (required by /usr/lib/libcairo.so.2)
/usr/lib/vmware-server-console/bin/vmware-server-console: /usr/lib/vmware-server-console/lib/libpng12.so.0/libpng12.so.0: no version information available (required by /usr/lib/libcairo.so.2)
$&lt;/pre&gt;


&lt;p&gt;Après quelques recherches sur google, j'ai trouvé la solution:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Supprimer le fichier libpng12.so.0 distribué avec vmware-server-console&lt;/li&gt;
&lt;li&gt;Créer un lien symbolique depuis la libpng livré avec Debian dans le répertoire lib de vmware-server-console&lt;/li&gt;
&lt;li&gt;Supprimer libdbus-1-2&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;$ su -
# rm /usr/lib/vmware-server-console/lib/libpng12.so.0/libpng12.so.0
# cd /usr/lib/vmware-server-console/lib/libpng12.so.0/
# ln -s /usr/lib/libpng12.so.0 /usr/lib/vmware-server-console/lib/libpng12.so.0/
# apt-get remove libdbus-1-2                                                                                   17:05 #10024
Reading package lists... Done
Building dependency tree... Done
The following packages will be REMOVED
  bluez-pin libdbus-1-2 libnautilus-burn2 python2.4-dbus
0 upgraded, 0 newly installed, 4 to remove and 3 not upgraded.
Need to get 0B of archives.
After unpacking 1348kB disk space will be freed.
Do you want to continue [Y/n]?
(Reading database ... 197795 files and directories currently installed.)
Removing bluez-pin ...
Removing libnautilus-burn2 ...
Removing python2.4-dbus ...
dpkg - warning: while removing python2.4-dbus, directory `/usr/lib/python2.4/site-packages/dbus' not empty so not removed.
Removing libdbus-1-2 ...
$&lt;/pre&gt;


&lt;p&gt;Et ca fonctionne:&lt;/p&gt;

&lt;pre&gt;$ vmware-server-console&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/lfrancois/~4/linOtEBt2PI" height="1" width="1"/&gt;</content>
    
    

    
          <wfw:comment>http://www.zoxx.net/notes/index.php/post/2006/12/30/34-vmware-server-console-erreur-libpng-sur-debian-gnu-linux#comment-form</wfw:comment>
      <wfw:commentRss>http://www.zoxx.net/notes/index.php/feed/atom/comments/151</wfw:commentRss>
      <feedburner:origLink>http://www.zoxx.net/notes/index.php/post/2006/12/30/34-vmware-server-console-erreur-libpng-sur-debian-gnu-linux</feedburner:origLink></entry>
    
  <entry>
    <title>vmware-server-console: libpng error on Debian GNU/Linux</title>
    <link href="http://feedproxy.google.com/~r/lfrancois/~3/ARYwy9VMeWs/33-vmware-server-console-libpng-error-on-debian-gnu-linux" rel="alternate" type="text/html" title="vmware-server-console: libpng error on Debian GNU/Linux" />
    <id>urn:md5:969ac846e20cab977f9d5f7e0165b276</id>
    <published>2006-12-30T22:15:10+00:00</published>
    <updated>2006-12-30T22:37:02+00:00</updated>
    <author><name>Ludovic Francois</name></author>
        <dc:subject>General</dc:subject>
            
    <content type="html">&lt;p&gt;I use vmware-server to test some new distribution and cluster tools. Normally I reach servers only by ssh but some weeks ago I would install a new distribution and my vmware-server-console was not still working from my Debian unstable.&lt;/p&gt;    &lt;p&gt;I got this message:&lt;/p&gt;


&lt;pre&gt;$ vmware-server-console
/usr/lib/vmware-server-console/bin/vmware-server-console: /usr/lib/vmware-server-console/lib/libpng12.so.0/libpng12.so.0: no version information available (required by /usr/lib/libcairo.so.2)
/usr/lib/vmware-server-console/bin/vmware-server-console: /usr/lib/vmware-server-console/lib/libpng12.so.0/libpng12.so.0: no version information available (required by /usr/lib/libcairo.so.2)
/usr/lib/vmware-server-console/bin/vmware-server-console: /usr/lib/vmware-server-console/lib/libpng12.so.0/libpng12.so.0: no version information available (required by /usr/lib/libcairo.so.2)
$&lt;/pre&gt;


&lt;p&gt;I tried to install a new version of vmware-server-console:&lt;/p&gt;


&lt;pre&gt;# unzip VMware-server-linux-client-1.0.1-29996.zip
# tar xvzf VMware-server-console-1.0.1-29996.tar.gz
# cd vmware-server-console-distrib
# ./vmware-install.pl&lt;/pre&gt;


&lt;p&gt;But I got the same message:&lt;/p&gt;


&lt;pre&gt;$ vmware-server-console
/usr/lib/vmware-server-console/bin/vmware-server-console: /usr/lib/vmware-server-console/lib/libpng12.so.0/libpng12.so.0: no version information available (required by /usr/lib/libcairo.so.2)
/usr/lib/vmware-server-console/bin/vmware-server-console: /usr/lib/vmware-server-console/lib/libpng12.so.0/libpng12.so.0: no version information available (required by /usr/lib/libcairo.so.2)
/usr/lib/vmware-server-console/bin/vmware-server-console: /usr/lib/vmware-server-console/lib/libpng12.so.0/libpng12.so.0: no version information available (required by /usr/lib/libcairo.so.2)
$&lt;/pre&gt;


&lt;p&gt;After some research on google I got the solution:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Remove the libpng12.so.0 file delivered with vmware-server-console&lt;/li&gt;
&lt;li&gt;Create a symbolic link from the Debian libpng to vmware-server-console directory&lt;/li&gt;
&lt;li&gt;remove the libdbus-1-2&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;$ su -
# rm /usr/lib/vmware-server-console/lib/libpng12.so.0/libpng12.so.0
# cd /usr/lib/vmware-server-console/lib/libpng12.so.0/
# ln -s /usr/lib/libpng12.so.0 /usr/lib/vmware-server-console/lib/libpng12.so.0/
# apt-get remove libdbus-1-2                                                                                   17:05 #10024
Reading package lists... Done
Building dependency tree... Done
The following packages will be REMOVED
  bluez-pin libdbus-1-2 libnautilus-burn2 python2.4-dbus
0 upgraded, 0 newly installed, 4 to remove and 3 not upgraded.
Need to get 0B of archives.
After unpacking 1348kB disk space will be freed.
Do you want to continue [Y/n]?
(Reading database ... 197795 files and directories currently installed.)
Removing bluez-pin ...
Removing libnautilus-burn2 ...
Removing python2.4-dbus ...
dpkg - warning: while removing python2.4-dbus, directory `/usr/lib/python2.4/site-packages/dbus' not empty so not removed.
Removing libdbus-1-2 ...
$&lt;/pre&gt;


&lt;p&gt;And it works:&lt;/p&gt;

&lt;pre&gt;$ vmware-server-console&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/lfrancois/~4/ARYwy9VMeWs" height="1" width="1"/&gt;</content>
    
    

    
          <wfw:comment>http://www.zoxx.net/notes/index.php/post/2006/12/30/33-vmware-server-console-libpng-error-on-debian-gnu-linux#comment-form</wfw:comment>
      <wfw:commentRss>http://www.zoxx.net/notes/index.php/feed/atom/comments/150</wfw:commentRss>
      <feedburner:origLink>http://www.zoxx.net/notes/index.php/post/2006/12/30/33-vmware-server-console-libpng-error-on-debian-gnu-linux</feedburner:origLink></entry>
    
  <entry>
    <title>Essential Unix commands when you browse a file system</title>
    <link href="http://feedproxy.google.com/~r/lfrancois/~3/uRG_Ek7b88o/Essential-Unix-commands-when-you-browse-a-file-system" rel="alternate" type="text/html" title="Essential Unix commands when you browse a file system" />
    <id>urn:md5:25ccf030c496e011f4baee822ece3396</id>
    <published>2006-12-30T00:22:00-08:00</published>
    <updated>2009-08-06T00:32:22-07:00</updated>
    <author><name>Ludovic Francois</name></author>
        <dc:subject>unix</dc:subject>
            
    <content type="html">    &lt;h4&gt;df -k&lt;/h4&gt;


&lt;p&gt;This command allows you to know where we are in the file system and to find back from where do we mount this file system, specially if you use a lot of automount crossed or nfs shares.&lt;/p&gt;

&lt;pre&gt;
obelix:/var/www# df -k .
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/mapper/vg01-var   3096336   2713092    225960  93% /var
obelix:/var/www# 
&lt;/pre&gt;


&lt;h4&gt;showmount -e&lt;/h4&gt;


&lt;p&gt;When you want to troubleshoot any nfs issue, you have to know the command showmount, if this command fails you can be sure you will fail to mount your network file system.&lt;/p&gt;

&lt;pre&gt;
obelix:~ # showmount -e localhost
Export list for localhost:
/goinfre 192.168.1.44
obelix:~ #          
idefix:~ # showmount -e obelix
mount clntudp_create: RPC: Program not registered
idefix:~ #
&lt;/pre&gt;


&lt;p&gt;In this specific case, it means the nfs client idefix doesn't have rpc.statd started, to fix it on debian you need just to run it:&lt;/p&gt;

&lt;pre&gt;
idefix:~ # /etc/init.d/nfs-common start
Starting NFS common utilities: statd
idefix:~ # showmount -e obelix
&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/lfrancois/~4/uRG_Ek7b88o" height="1" width="1"/&gt;</content>
    
    

    
          <wfw:comment>http://www.zoxx.net/notes/index.php/post/2009/08/06/Essential-Unix-commands-when-you-browse-a-file-system#comment-form</wfw:comment>
      <wfw:commentRss>http://www.zoxx.net/notes/index.php/feed/atom/comments/156</wfw:commentRss>
      <feedburner:origLink>http://www.zoxx.net/notes/index.php/post/2009/08/06/Essential-Unix-commands-when-you-browse-a-file-system</feedburner:origLink></entry>
    
  <entry>
    <title>Realtek 8180L avec ndiswrapper sous Debian GNU/Linux</title>
    <link href="http://feedproxy.google.com/~r/lfrancois/~3/TnerGWhfM2E/32-realtek-8180l-avec-ndiswrapper-sous-debian-gnu-linux" rel="alternate" type="text/html" title="Realtek 8180L avec ndiswrapper sous Debian GNU/Linux" />
    <id>urn:md5:f629a2a29830b93327cefe645f6700c3</id>
    <published>2006-11-24T00:50:12+00:00</published>
    <updated>2006-11-24T00:50:12+00:00</updated>
    <author><name>Ludovic Francois</name></author>
        <dc:subject>General</dc:subject>
            
    <content type="html">&lt;p&gt;J'avais une  ancienne carte wifi  802.11b dans un placard,  je voulais
utiliser  celle-ci pour  créer un  routeur wifi  avec  portail captif.
Ci-dessous  vous verrez  comment  configurer cette  carte sous  Debian
GNU/Linux.&lt;/p&gt;    &lt;h3&gt;0- RTL8180L&lt;/h3&gt;


&lt;pre&gt;root@obelix:~ # lspci | grep 8180
00:0c.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8180L 802.11b MAC (rev 20)&lt;/pre&gt;

&lt;h3&gt;I- Outil ndiswrapper en mode utilisateur&lt;/h3&gt;


&lt;h4&gt;Téléchargement et installation de ndiswrapper&lt;/h4&gt;


&lt;pre&gt;root@obelix:~ # apt-get install ndiswrapper&lt;/pre&gt;


&lt;h4&gt;Télécharger le driver windows realtek 8180&lt;/h4&gt;



&lt;pre&gt;root@obelix:~ # wget "ftp://202.65.194.18/cn/wlan/ndis5x-8180(173).zip"
--21:17:40--  ftp://202.65.194.18/cn/wlan/ndis5x-8180(173).zip
           =&amp;gt; `ndis5x-8180(173).zip'
Connecting to 202.65.194.18:21... connected.
Logging in as anonymous ... Logged in!
==&amp;gt; SYST ... done.    ==&amp;gt; PWD ... done.
==&amp;gt; TYPE I ... done.  ==&amp;gt; CWD /cn/wlan ... done.
==&amp;gt; PASV ... done.    ==&amp;gt; RETR ndis5x-8180(173).zip ... done.
Length: 104,101 (102K) (unauthoritative)

100%[====================================================&amp;gt;] 104,101       45.30K/s

21:17:50 (45.24 KB/s) - `ndis5x-8180(173).zip' saved [104101]

root@obelix:~ #
root@obelix:~ # unzip ndis5x-8180\(173\).zip
Archive:  ndis5x-8180(173).zip
  inflating: rtl8180.sys             
  inflating: NET8180.INF             
  inflating: Release.txt&lt;/pre&gt;

&lt;h4&gt;Installer le driver windows 8180 sur la Debian GNU/Linux&lt;/h4&gt;


&lt;pre&gt;root@obelix:~ # ndiswrapper -i NET8180.INF
Installing net8180
root@obelix:~ # ndiswrapper -l
Installed ndis drivers:
net8180 driver present, hardware present 
root@obelix:~ #&lt;/pre&gt;


&lt;h3&gt;II- Modules kernel&lt;/h3&gt;


&lt;h4&gt;Récupérer les sources&lt;/h4&gt;


&lt;pre&gt;root@obelix:~ # apt-get install ndiswrapper-source&lt;/pre&gt;


&lt;h4&gt;Les décompresser&lt;/h4&gt;


&lt;pre&gt;root@obelix:/usr/src # tar xvjf ndiswrapper-source.tar.bz2&lt;/pre&gt;


&lt;h4&gt;Les compiler et les installer&lt;/h4&gt;


&lt;pre&gt;root@obelix:/usr/src/modules/ndiswrapper # make
root@obelix:/usr/src/modules/ndiswrapper # make install&lt;/pre&gt;


&lt;h4&gt;Une fois que j'ai fait ça, J'ai eu quelques problèmes pour charger le module ndiswrapper&lt;/h4&gt;



&lt;pre&gt;root@obelix:~/ndiswrapper-1.29 # modprobe ndiswrapper
FATAL: Error inserting ndiswrapper (/lib/modules/2.6.18.2-obelix/misc/ndiswrapper.ko): Unknown symbol in module, or unknown parameter (see dmesg) 
root@obelix:~/ndiswrapper-1.29 # dmesg | tail -1
ndiswrapper: Unknown symbol wireless_send_event
root@obelix:~/ndiswrapper-1.29 #&lt;/pre&gt;


&lt;h4&gt;Après quelques recherches sur google, J'ai trouvé la solution&lt;/h4&gt;


&lt;p&gt;http://ndiswrapper.sourceforge.net/mediawiki/index.php/FAQ&lt;/p&gt;



&lt;blockquote&gt;&lt;p&gt;If you  get the compilation error  Unknown symbol: wireless_send_event
you will need to enable the CONFIG_NET_RADIO option and recompile your
kernel or find a kernel with this option already enabled. Checking for
the /proc/net/wireless file is not a  good way of making sure you have
this  option  enabled   since  it  will  exist  if   one  or  both  of
CONFIG_NET_RADIO and CONFIG_NET_PCMCIA_RADIO options are enabled.&lt;/p&gt;&lt;/blockquote&gt;



&lt;pre&gt;root@obelix:~ # modprobe ndiswrapper
root@obelix:~ # iwconfig wlan0
wlan0     IEEE 802.11b  ESSID:off/any  
          Mode:Auto  Frequency:2.437 GHz  Access Point: Not-Associated   
          Bit Rate:11 Mb/s   Tx-Power:20 dBm   Sensitivity=0/3  
          RTS thr:2432 B   Fragment thr:2432 B   
          Encryption key:off
          Power Management:off
          Link Quality:0  Signal level:0  Noise level:0
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

root@obelix:~ #&lt;/pre&gt;


&lt;h4&gt;Maintenant nous sommes capable de configurer la nouvelle interface&lt;/h4&gt;



&lt;pre&gt;root@obelix:~ # iwconfig wlan0 essid FON_zoxx
root@obelix:~ # iwconfig wlan0 
wlan0     IEEE 802.11b  ESSID:"FON_zoxx"  
          Mode:Managed  Frequency:2.417 GHz  Access Point: 00:18:84:11:6D:81   
          Bit Rate:11 Mb/s   Tx-Power:20 dBm   Sensitivity=0/3  
          RTS thr:2432 B   Fragment thr:2432 B   
          Encryption key:off
          Power Management:off
          Link Quality:73/100  Signal level:-49 dBm  Noise level:-96 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:-1068288296  Invalid misc:-1373815975   Missed beacon:0

root@obelix:~ #&lt;/pre&gt;


&lt;p&gt;Malheureusement il  est seulement possible  d'utiliser notre interface
ndiswrapper  en mode  "managed"  ou "ad-hoc".  Donc  aucune chance  de
l'utiliser en mode "Master".&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/lfrancois/~4/TnerGWhfM2E" height="1" width="1"/&gt;</content>
    
    

    
          <wfw:comment>http://www.zoxx.net/notes/index.php/post/2006/11/24/32-realtek-8180l-avec-ndiswrapper-sous-debian-gnu-linux#comment-form</wfw:comment>
      <wfw:commentRss>http://www.zoxx.net/notes/index.php/feed/atom/comments/149</wfw:commentRss>
      <feedburner:origLink>http://www.zoxx.net/notes/index.php/post/2006/11/24/32-realtek-8180l-avec-ndiswrapper-sous-debian-gnu-linux</feedburner:origLink></entry>
    
  <entry>
    <title>Realtek 8180L with ndiswrapper on Debian GNU/Linux</title>
    <link href="http://feedproxy.google.com/~r/lfrancois/~3/Q1XpLOmMr-I/31-realtek-8180l-with-ndiswrapper-on-debian-gnu-linux" rel="alternate" type="text/html" title="Realtek 8180L with ndiswrapper on Debian GNU/Linux" />
    <id>urn:md5:665e672019050d64794fa9740a6da63a</id>
    <published>2006-11-24T00:28:30+00:00</published>
    <updated>2006-11-24T00:48:35+00:00</updated>
    <author><name>Ludovic Francois</name></author>
        <dc:subject>General</dc:subject>
            
    <content type="html">&lt;p&gt;A old wifi 802.11b pci card was on the shelf, so I would use it to create an open wifi router at home. Below you will see how configure this nic card on Debian GNU/Linux.&lt;/p&gt;    &lt;h3&gt;0- RTL8180L&lt;/h3&gt;



&lt;pre&gt;root@obelix:~ # lspci | grep 8180
00:0c.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8180L 802.11b MAC (rev 20)&lt;/pre&gt;

&lt;h3&gt;I- Userland tool&lt;/h3&gt;


&lt;h4&gt;Download the command line tool and install it&lt;/h4&gt;


&lt;pre&gt;root@obelix:~ # apt-get install ndiswrapper&lt;/pre&gt;


&lt;h4&gt;Download the realtek 8180 windows driver&lt;/h4&gt;



&lt;pre&gt;root@obelix:~ # wget "ftp://202.65.194.18/cn/wlan/ndis5x-8180(173).zip"
--21:17:40--  ftp://202.65.194.18/cn/wlan/ndis5x-8180(173).zip
           =&amp;gt; `ndis5x-8180(173).zip'
Connecting to 202.65.194.18:21... connected.
Logging in as anonymous ... Logged in!
==&amp;gt; SYST ... done.    ==&amp;gt; PWD ... done.
==&amp;gt; TYPE I ... done.  ==&amp;gt; CWD /cn/wlan ... done.
==&amp;gt; PASV ... done.    ==&amp;gt; RETR ndis5x-8180(173).zip ... done.
Length: 104,101 (102K) (unauthoritative)

100%[====================================================&amp;gt;] 104,101       45.30K/s

21:17:50 (45.24 KB/s) - `ndis5x-8180(173).zip' saved [104101]

root@obelix:~ #
root@obelix:~ # unzip ndis5x-8180\(173\).zip
Archive:  ndis5x-8180(173).zip
  inflating: rtl8180.sys             
  inflating: NET8180.INF             
  inflating: Release.txt&lt;/pre&gt;

&lt;h4&gt;Install the 8180 windows driver on your Debian GNU/Linux&lt;/h4&gt;


&lt;pre&gt;root@obelix:~ # ndiswrapper -i NET8180.INF
Installing net8180
root@obelix:~ # ndiswrapper -l
Installed ndis drivers:
net8180 driver present, hardware present 
root@obelix:~ #&lt;/pre&gt;


&lt;h3&gt;II- Kernel modules&lt;/h3&gt;


&lt;h4&gt;get sources&lt;/h4&gt;


&lt;pre&gt;root@obelix:~ # apt-get install ndiswrapper-source&lt;/pre&gt;


&lt;h4&gt;uncompress them&lt;/h4&gt;


&lt;pre&gt;root@obelix:/usr/src # tar xvjf ndiswrapper-source.tar.bz2&lt;/pre&gt;


&lt;h4&gt;compile and install them&lt;/h4&gt;


&lt;pre&gt;root@obelix:/usr/src/modules/ndiswrapper # make
root@obelix:/usr/src/modules/ndiswrapper # make install&lt;/pre&gt;


&lt;h4&gt;once I did it, I got some problems to load the module ndiswrapper&lt;/h4&gt;



&lt;pre&gt;root@obelix:~/ndiswrapper-1.29 # modprobe ndiswrapper
FATAL: Error inserting ndiswrapper (/lib/modules/2.6.18.2-obelix/misc/ndiswrapper.ko): Unknown symbol in module, or unknown parameter (see dmesg) 
root@obelix:~/ndiswrapper-1.29 # dmesg | tail -1
ndiswrapper: Unknown symbol wireless_send_event
root@obelix:~/ndiswrapper-1.29 #&lt;/pre&gt;


&lt;h4&gt;after some research on google, I got a solution&lt;/h4&gt;


&lt;p&gt;http://ndiswrapper.sourceforge.net/mediawiki/index.php/FAQ&lt;/p&gt;



&lt;blockquote&gt;&lt;p&gt;If you  get the compilation error  Unknown symbol: wireless_send_event
you will need to enable the CONFIG_NET_RADIO option and recompile your
kernel or find a kernel with this option already enabled. Checking for
the /proc/net/wireless file is not a  good way of making sure you have
this  option  enabled   since  it  will  exist  if   one  or  both  of
CONFIG_NET_RADIO and CONFIG_NET_PCMCIA_RADIO options are enabled.&lt;/p&gt;&lt;/blockquote&gt;



&lt;pre&gt;root@obelix:~ # modprobe ndiswrapper
root@obelix:~ # iwconfig wlan0
wlan0     IEEE 802.11b  ESSID:off/any  
          Mode:Auto  Frequency:2.437 GHz  Access Point: Not-Associated   
          Bit Rate:11 Mb/s   Tx-Power:20 dBm   Sensitivity=0/3  
          RTS thr:2432 B   Fragment thr:2432 B   
          Encryption key:off
          Power Management:off
          Link Quality:0  Signal level:0  Noise level:0
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

root@obelix:~ #&lt;/pre&gt;


&lt;h4&gt;Now we are able to set up this new interface&lt;/h4&gt;



&lt;pre&gt;root@obelix:~ # iwconfig wlan0 essid FON_zoxx
root@obelix:~ # iwconfig wlan0 
wlan0     IEEE 802.11b  ESSID:"FON_zoxx"  
          Mode:Managed  Frequency:2.417 GHz  Access Point: 00:18:84:11:6D:81   
          Bit Rate:11 Mb/s   Tx-Power:20 dBm   Sensitivity=0/3  
          RTS thr:2432 B   Fragment thr:2432 B   
          Encryption key:off
          Power Management:off
          Link Quality:73/100  Signal level:-49 dBm  Noise level:-96 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:-1068288296  Invalid misc:-1373815975   Missed beacon:0

root@obelix:~ #&lt;/pre&gt;


&lt;p&gt;Unfortunately It's  only possible to use our  ndiswrapper interface in
managed or ad-hoc mode. No chance to use it in Master mode :(.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/lfrancois/~4/Q1XpLOmMr-I" height="1" width="1"/&gt;</content>
    
    

    
          <wfw:comment>http://www.zoxx.net/notes/index.php/post/2006/11/24/31-realtek-8180l-with-ndiswrapper-on-debian-gnu-linux#comment-form</wfw:comment>
      <wfw:commentRss>http://www.zoxx.net/notes/index.php/feed/atom/comments/148</wfw:commentRss>
      <feedburner:origLink>http://www.zoxx.net/notes/index.php/post/2006/11/24/31-realtek-8180l-with-ndiswrapper-on-debian-gnu-linux</feedburner:origLink></entry>
    
  <entry>
    <title>Install of adobe flashplayer 9 on Debian GNU/Linux with Firefox</title>
    <link href="http://feedproxy.google.com/~r/lfrancois/~3/av8BO-xW30I/24-install-of-adobe-flashplayer-9-on-debian-gnu-linux-with-firefox" rel="alternate" type="text/html" title="Install of adobe flashplayer 9 on Debian GNU/Linux with Firefox" />
    <id>urn:md5:96c200c65678a23e1007809623221373</id>
    <published>2006-10-23T19:03:43+00:00</published>
    <updated>2006-11-04T23:54:52+00:00</updated>
    <author><name>Ludovic Francois</name></author>
        <dc:subject>debian</dc:subject>
            
    <content type="html">&lt;p&gt;Installation of flashplayer9 plugin with Firefox on Debian.&lt;/p&gt;    &lt;h3&gt;Website&lt;/h3&gt;


&lt;p&gt;http://labs.adobe.com/downloads/flashplayer9.html
http://www.adobe.com/go/fp9_update_b1_installer_linuxplugin&lt;/p&gt;


&lt;h3&gt;Download&lt;/h3&gt;


&lt;pre&gt;root@idefix:/tmp # wget http://www.adobe.com/go/fp9_update_b1_installer_linuxplugin
--09:25:59--  http://www.adobe.com/go/fp9_update_b1_installer_linuxplugin
           =&amp;gt; `fp9_update_b1_installer_linuxplugin'
Resolving www.adobe.com... 192.150.19.60
Connecting to www.adobe.com|192.150.19.60|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://download.macromedia.com/pub/labs/flashplayer9_update/FP9_plugin_beta_101806.tar.gz [following]
--09:26:00--  http://download.macromedia.com/pub/labs/flashplayer9_update/FP9_plugin_beta_101806.tar.gz
           =&amp;gt; `FP9_plugin_beta_101806.tar.gz'
Resolving download.macromedia.com... 88.221.15.191
Connecting to download.macromedia.com|88.221.15.191|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2,609,188 (2.5M) [application/x-gzip]

100%[=============================================================================================================================&amp;gt;] 2,609,188    581.99K/s    ETA 00:00

09:26:04 (557.29 KB/s) - `FP9_plugin_beta_101806.tar.gz' saved [2609188/2609188]

root@idefix:/tmp #&lt;/pre&gt;

&lt;h3&gt;Tarball Uncompressing&lt;/h3&gt;


&lt;pre&gt;root@idefix:/tmp # tar xvzf FP9_plugin_beta_101806.tar.gz                                                                                                    
flash-player-plugin-9.0.21.55/
flash-player-plugin-9.0.21.55/libflashplayer.so
flash-player-plugin-9.0.21.55/readme.txt&lt;/pre&gt;

&lt;h3&gt;http://www.proteines.fr before flashplayer 9&lt;/h3&gt;


&lt;p&gt;&lt;img src="http://www.zoxx.net/notes/images/images_flashplayer9/proteines_fr_01_before_flash9.jpg" alt="" /&gt;&lt;/p&gt;


&lt;h3&gt;installation of the flash plugin&lt;/h3&gt;


&lt;pre&gt;root@idefix:/tmp # cd flash-player-plugin-9.0.21.55
root@idefix:...flash-player-plugin-9.0.21.55 # cp libflashplayer.so /usr/lib/firefox/plugins/libflashplayer.so
root@idefix:...flash-player-plugin-9.0.21.55 # ls -al !$                                                                                                     
ls -al /usr/lib/firefox/plugins/libflashplayer.so
lrwxrwxrwx 1 root root 39 2006-03-23 08:49 /usr/lib/firefox/plugins/libflashplayer.so -&amp;gt; ../../mozilla/plugins/libflashplayer.so
root@idefix:...flash-player-plugin-9.0.21.55 #&lt;/pre&gt;


&lt;h3&gt;http://www.proteines.fr after flashplayer 9&lt;/h3&gt;


&lt;p&gt;&lt;img src="http://www.zoxx.net/notes/images/images_flashplayer9/proteines_fr_02_after_flash9.jpg" alt="" /&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/lfrancois/~4/av8BO-xW30I" height="1" width="1"/&gt;</content>
    
    

    
          <wfw:comment>http://www.zoxx.net/notes/index.php/post/2006/10/23/24-install-of-adobe-flashplayer-9-on-debian-gnu-linux-with-firefox#comment-form</wfw:comment>
      <wfw:commentRss>http://www.zoxx.net/notes/index.php/feed/atom/comments/141</wfw:commentRss>
      <feedburner:origLink>http://www.zoxx.net/notes/index.php/post/2006/10/23/24-install-of-adobe-flashplayer-9-on-debian-gnu-linux-with-firefox</feedburner:origLink></entry>
    
  <entry>
    <title>Installation d'Adobe flashplayer 9 sur Debian GNU/Linux avec Firefox</title>
    <link href="http://feedproxy.google.com/~r/lfrancois/~3/aayCNjCzu2w/25-installation-d-adobe-flashplayer-9-sur-debian-gnu-linux-avec-firefox" rel="alternate" type="text/html" title="Installation d'Adobe flashplayer 9 sur Debian GNU/Linux avec Firefox" />
    <id>urn:md5:196a4d2cec0c83aae1131f516edf32b1</id>
    <published>2006-10-23T19:03:43+00:00</published>
    <updated>2006-11-04T23:55:20+00:00</updated>
    <author><name>Ludovic Francois</name></author>
        <dc:subject>debian</dc:subject>
            
    <content type="html">&lt;p&gt;Installation d'Adobe flashplayer 9 avec Firefox sur Debian.&lt;/p&gt;    &lt;h3&gt;Sites web&lt;/h3&gt;


&lt;p&gt;http://labs.adobe.com/downloads/flashplayer9.html
http://www.adobe.com/go/fp9_update_b1_installer_linuxplugin&lt;/p&gt;


&lt;h3&gt;Téléchargement&lt;/h3&gt;


&lt;pre&gt;root@idefix:/tmp # wget http://www.adobe.com/go/fp9_update_b1_installer_linuxplugin
--09:25:59--  http://www.adobe.com/go/fp9_update_b1_installer_linuxplugin
           =&amp;gt; `fp9_update_b1_installer_linuxplugin'
Resolving www.adobe.com... 192.150.19.60
Connecting to www.adobe.com|192.150.19.60|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://download.macromedia.com/pub/labs/flashplayer9_update/FP9_plugin_beta_101806.tar.gz [following]
--09:26:00--  http://download.macromedia.com/pub/labs/flashplayer9_update/FP9_plugin_beta_101806.tar.gz
           =&amp;gt; `FP9_plugin_beta_101806.tar.gz'
Resolving download.macromedia.com... 88.221.15.191
Connecting to download.macromedia.com|88.221.15.191|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2,609,188 (2.5M) [application/x-gzip]

100%[=============================================================================================================================&amp;gt;] 2,609,188    581.99K/s    ETA 00:00

09:26:04 (557.29 KB/s) - `FP9_plugin_beta_101806.tar.gz' saved [2609188/2609188]

root@idefix:/tmp #&lt;/pre&gt;

&lt;h3&gt;Décompression de l'archive&lt;/h3&gt;


&lt;pre&gt;root@idefix:/tmp # tar xvzf FP9_plugin_beta_101806.tar.gz                                                                                                    
flash-player-plugin-9.0.21.55/
flash-player-plugin-9.0.21.55/libflashplayer.so
flash-player-plugin-9.0.21.55/readme.txt&lt;/pre&gt;

&lt;h3&gt;http://www.proteines.fr avant flashplayer 9&lt;/h3&gt;


&lt;p&gt;&lt;img src="http://www.zoxx.net/notes/images/images_flashplayer9/proteines_fr_01_before_flash9.jpg" alt="" /&gt;&lt;/p&gt;


&lt;h3&gt;installation du plugin flash&lt;/h3&gt;


&lt;pre&gt;root@idefix:/tmp # cd flash-player-plugin-9.0.21.55
root@idefix:...flash-player-plugin-9.0.21.55 # cp libflashplayer.so /usr/lib/firefox/plugins/libflashplayer.so
root@idefix:...flash-player-plugin-9.0.21.55 # ls -al !$                                                                                                     
ls -al /usr/lib/firefox/plugins/libflashplayer.so
lrwxrwxrwx 1 root root 39 2006-03-23 08:49 /usr/lib/firefox/plugins/libflashplayer.so -&amp;gt; ../../mozilla/plugins/libflashplayer.so
root@idefix:...flash-player-plugin-9.0.21.55 #&lt;/pre&gt;


&lt;h3&gt;http://www.proteines.fr après l'installation de flashplayer 9&lt;/h3&gt;


&lt;p&gt;&lt;img src="http://www.zoxx.net/notes/images/images_flashplayer9/proteines_fr_02_after_flash9.jpg" alt="" /&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/lfrancois/~4/aayCNjCzu2w" height="1" width="1"/&gt;</content>
    
    

    
          <wfw:comment>http://www.zoxx.net/notes/index.php/post/2006/10/23/25-installation-d-adobe-flashplayer-9-sur-debian-gnu-linux-avec-firefox#comment-form</wfw:comment>
      <wfw:commentRss>http://www.zoxx.net/notes/index.php/feed/atom/comments/142</wfw:commentRss>
      <feedburner:origLink>http://www.zoxx.net/notes/index.php/post/2006/10/23/25-installation-d-adobe-flashplayer-9-sur-debian-gnu-linux-avec-firefox</feedburner:origLink></entry>
    
  <entry>
    <title>Automate rpm and src.rpm builds in Makefile.am with autotools</title>
    <link href="http://feedproxy.google.com/~r/lfrancois/~3/QcG-MoKN6i0/23-automate-rpm-and-srcrpm-builds-in-makefileam-with-autotools" rel="alternate" type="text/html" title="Automate rpm and src.rpm builds in Makefile.am with autotools" />
    <id>urn:md5:1fea1db0ef436bffc71b5bc3d6cffb5a</id>
    <published>2006-08-31T23:24:54+00:00</published>
    <updated>2006-12-30T22:44:51+00:00</updated>
    <author><name>Ludovic Francois</name></author>
        <dc:subject>code</dc:subject>
            
    <content type="html">&lt;p&gt;Automate rpm and src.rpm builds in Makefile.am with autotools&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;RPM Tree&lt;/li&gt;
&lt;li&gt;SPEC files&lt;/li&gt;
&lt;li&gt;Makefile.am&lt;/li&gt;
&lt;/ul&gt;    &lt;h3&gt;RPM TREE&lt;/h3&gt;


&lt;p&gt;First you need to get a rpm working directory.&lt;/p&gt;


&lt;h4&gt;set your rpm topdir in your rpmmacros file&lt;/h4&gt;


&lt;pre&gt;ludo@idefix:~ % echo "%_topdir /home/ludo/rpm" &amp;gt; ~/.rpmmacros&lt;/pre&gt;

&lt;h4&gt;create your rpm directories tree&lt;/h4&gt;


&lt;pre&gt;ludo@idefix:~ % for dir in rpm rpm/BUILD rpm/SPECS rpm/SRPMS rpm/SOURCES rpm/RPMS rpm/RPMS/i386
for&amp;gt; do
for&amp;gt;  mkdir $dir
for&amp;gt; done
ludo@idefix:~ %&lt;/pre&gt;

&lt;h3&gt;SPEC FILE&lt;/h3&gt;


&lt;h4&gt;our spec file&lt;/h4&gt;


&lt;pre&gt;ludo@idefix:.../common/s2a/api_tools/s2a_bin % cat packages/rpm/s2a.spec
Vendor:       Ludovic Francois
Name:         s2a
Release:      3
License:      GPL (cf http://www.fsf.org)
Group:        unsorted
Provides:     s2a
Packager:     lfrancois@datadirectnet.com
Version:      0.0.1
Summary:      Monitoring and administration tools for DataDirect Networks s2a
Source:       s2a-0.0.1.tar.gz 
BuildRoot:    /var/tmp/%{name}-buildroot
%description
Monitoring and administration tools for DataDirect Networks s2a appliances.
This tools supports:
  - s2a6000
  - s2a3000
  - s2a8500
  - s2a9500
You will find  the main binary named s2a, with  this binary you could
get a remote access on the storage system and make all cli monitoring
and administration tasks from your unix command line.
%prep
%setup
%build
./configure --prefix=/usr --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --sysconfdir=/etc/s2a
make
%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install
install -d -m 755               ${RPM_BUILD_ROOT}/etc/cron.d/
install -m 644 debian/cron.d    ${RPM_BUILD_ROOT}/etc/cron.d/s2a
install -d -m 755               ${RPM_BUILD_ROOT}/usr/share/doc/s2a/
install -m 644 ChangeLog        ${RPM_BUILD_ROOT}/usr/share/doc/s2a/ChangeLog
install -m 644 README           ${RPM_BUILD_ROOT}/usr/share/doc/s2a/README
install -m 644 TODO             ${RPM_BUILD_ROOT}/usr/share/doc/s2a/TODO
install -m 644 src/scripts/README.ddn_disk_rebuild  ${RPM_BUILD_ROOT}/usr/share/doc/s2a/README.ddn_disk_rebuild
install -m 644 src/scripts/README.ddn_rrdtool       ${RPM_BUILD_ROOT}/usr/share/doc/s2a/README.ddn_rrdtool
install -m 644 COPYING          ${RPM_BUILD_ROOT}/usr/share/doc/s2a/copyright
%files
%defattr(-,root,root)
/etc/s2a/ddn_uptodate/ddn_uptodate_default.cfg
/etc/s2a/ddn_uptodate/ddn_uptodate_sgi.cfg
/etc/cron.d/s2a
/usr/bin/s2a
/usr/bin/ddn_tree
/usr/bin/ddn_disk_rebuild
/usr/bin/ddn_rrdtool
/usr/bin/ddn_diff
/usr/bin/ddn_dump
/usr/bin/ddn_restore
/usr/bin/ddn_richmedia
/usr/bin/ddn_uptodate
/usr/bin/ddn_temperature
/usr/share/s2a/images/ddn_logo.gif
/usr/share/s2a/images/DDNlogo.jpg
/usr/share/s2a/images/DDNtoasterview-logo.png
/usr/share/s2a/images/splash_s2a_bin.jpg
/usr/share/s2a/images/splash_s2a_bin.png
/usr/share/man/man1/s2a.1.gz
/usr/share/doc/s2a/README
/usr/share/doc/s2a/TODO
/usr/share/doc/s2a/README.ddn_disk_rebuild
/usr/share/doc/s2a/README.ddn_rrdtool
/usr/share/doc/s2a/copyright
/usr/share/doc/s2a/ChangeLog
ludo@idefix:.../common/s2a/api_tools/s2a_bin %&lt;/pre&gt;

&lt;h3&gt;Makefile.am&lt;/h3&gt;


&lt;h4&gt;rule in my Makefile.am&lt;/h4&gt;


&lt;pre&gt;# Build source and binary rpms. For rpm-3.0 and above, the ~/.rpmmacros
# must contain the following line:
# %_topdir /home/ludo/rpm
# cd /home/ludo/rpm ; mkdir -p SOURCES BUILD RPMS/i386 SPECS SRPMS

rpm:
    $(MAKE) distdir ; \
    mv $(PACKAGE)-$(VERSION) $(PACKAGE)-0.0.1 ; \
    tar cvzf $(PACKAGE)-0.0.1.tar.gz $(PACKAGE)-0.0.1 ; \
    $(RM) -rf $(PACKAGE)-0.0.1 ; \
    RPM_TOPDIR=`rpm --showrc | perl -n -e 'print if(s/.*_topdir\s+(.*)/$$1/)'` ; \
    cp $(srcdir)/packages/rpm/s2a.spec $$RPM_TOPDIR/SPECS ; \
    cp $(PACKAGE)-0.0.1.tar.gz $$RPM_TOPDIR/SOURCES/ ; \
    rpmbuild -ba --clean --rmsource $$RPM_TOPDIR/SPECS/$(PACKAGE).spec ; \
    mv $$RPM_TOPDIR/RPMS/i386/$(PACKAGE)-*.rpm packages/rpm ; \
    mv $$RPM_TOPDIR/SRPMS/$(PACKAGE)-*.src.rpm packages/rpm&lt;/pre&gt;

&lt;h4&gt;command to launch&lt;/h4&gt;


&lt;pre&gt;ludo@idefix:.../common/s2a/api_tools/s2a_bin % make rpm
[...]
Wrote: /home/ludo/rpm/SRPMS/s2a-0.0.1-3.src.rpm
Wrote: /home/ludo/rpm/RPMS/i386/s2a-0.0.1-3.i386.rpm
Executing(--clean): /bin/sh -e /var/tmp/rpm-tmp.96254
+ umask 022
+ cd /home/ludo/rpm/BUILD
+ rm -rf s2a-0.0.1
+ exit 0
ludo@idefix:.../common/s2a/api_tools/s2a_bin %&lt;/pre&gt;

&lt;h4&gt;results&lt;/h4&gt;


&lt;pre&gt;ludo@idefix:.../common/s2a/api_tools/s2a_bin % find | egrep "s2a.*rpm"
./packages/rpm/s2a-0.0.1-3.i386.rpm
./packages/rpm/s2a-0.0.1-3.src.rpm
ludo@idefix:.../common/s2a/api_tools/s2a_bin %&lt;/pre&gt;

&lt;h3&gt;Errors&lt;/h3&gt;


&lt;h4&gt;check-files&lt;/h4&gt;


&lt;pre&gt;Checking for unpackaged file(s): /usr/lib/rpm/check-files /var/tmp/s2a-buildroot
error: Installed (but unpackaged) file(s) found:
   /usr/bin/s2a&lt;/pre&gt;

&lt;h4&gt;if you have some files you don't want in the BuildRoot add in your spec file at the files section the define below:&lt;/h4&gt;


&lt;pre&gt;%files
%defattr(-,root,root)
%define _unpackaged_files_terminate_build 0&lt;/pre&gt;


&lt;h4&gt;Or it's maybe the same problem I got, you need just to clean your buildroot in your spec file:&lt;/h4&gt;


&lt;pre&gt;%install
rm -rf $RPM_BUILD_ROOT&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/lfrancois/~4/QcG-MoKN6i0" height="1" width="1"/&gt;</content>
    
    

    
          <wfw:comment>http://www.zoxx.net/notes/index.php/post/2006/08/31/23-automate-rpm-and-srcrpm-builds-in-makefileam-with-autotools#comment-form</wfw:comment>
      <wfw:commentRss>http://www.zoxx.net/notes/index.php/feed/atom/comments/140</wfw:commentRss>
      <feedburner:origLink>http://www.zoxx.net/notes/index.php/post/2006/08/31/23-automate-rpm-and-srcrpm-builds-in-makefileam-with-autotools</feedburner:origLink></entry>
  
</feed>

