Dino's profilexS BlogBlogLists Tools Help
View Dino Lupo's profile on LinkedIn

Dino

Occupation
Location

Feed

The owner hasn't specified a feed for this module yet.

xS Blog

by Dino "dinux" Lupo
April 30

Linux - Ubuntu - Debian: moving from one machine or server to another.

Hi,

when you move one Linux virtual machine based on Debian from a phisical server to another, you may see that the network does not work anymore. It is disappeared and when you digit ifconfig you see only lo (localhost).

To solve this go to:

/etc/udev/rules.d

and

sudo vim 70-persistent-net.rules
(or sudo nano 70-persistent-net.rules)

and delete all lines.

sudo reboot

et voilà! eth0 again!

Explanation: in that file debian associates mac address with ethernet devices, so the old interface is blocked with the old mac address and cannot start since the new vmware server has generated a new mac address for that interface. Deleting it will permit to associate the new mac address to the net interface.

Bye all.
Dino.
April 17

Apache2 Subversion list projects in root folder does not work with SVNListParentPath on parameter.

How to list projects in apache2 - subversion (if "SVNParentPathList on" does not work).

I tried this on apache2 - subversion 1.4.6

1. If you don't have php, enable it doing the following:

sudo apt-get install php5 
sudo a2enmod php5 
sudo /etc/init.d/apache2 force-reload 
sudo /etc/init.d/apache2 restart

2. Add the file svn_index.php in the web root folder (mine is at /var/www) with the following content:

<html>
<head>
<title>Subversion Repositories</title>
</head>
<body>

<h2>Subversion Repositories</h2>
<p>
<?php
    $svnparentpath = "/svn";
    $svnparenturl = "/svn";

    $dh = opendir( $svnparentpath );
    if( $dh ) {
        while( $dir = readdir( $dh ) ) {
            $svndir = $svnparentpath . "/" . $dir;
            $svndbdir = $svndir . "/db";
            $svnfstypefile = $svndbdir . "/fs-type";
            if( is_dir( $svndir ) && is_dir( $svndbdir ) ) {
                echo "<a href=\"" . $svnparenturl . "/" .
                        $dir . "\">" . $dir . "</a>\n";
                if( file_exists( $svnfstypefile ) ) {
                    $handle = fopen ("$svnfstypefile", "r");
                    $buffer = fgets($handle, 4096);
                    fclose( $handle );
                    $buffer = chop( $buffer );
                    if( strcmp( $buffer, "fsfs" )==0 ) {
                        echo " (FSFS) <br />\n";
                    } else {
                        echo " (BDB) <br />\n";
                    }
                } else {
                    echo " (BDB) <br />\n";
                }
            }
        }
        closedir( $dh );
    }
?>
</p>

</body>
</html> 

bear in mind that in the code I assume that the root path of svn ($svnparentpath) is /svn (if you are in windows write C:\svn instead).

3. create a symbolic link to enable mod rewriting:

sudo ln –s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/rewrite.load

4. Add the following lines to /etc/apache2/mods-enabled/dav_svn.conf just below the <Location /svn/> tag (my root repository url is /svn/):

RewriteEngine on
RewriteRule ^/svn$ /svn_index.php [PT]
RewriteRule ^/svn/$ /svn_index.php [PT]
RewriteRule ^/svn/index.html$ /svn_index.php [PT] 


5. Restart Apache2

sudo /etc/init.d/apache2 restart
April 02

Function/arrow keys, etc. not working in vmware on linux

Some keys like arrows, or ctrl-alt-del do not work under linux with vmware server 2.0.

Here is the solution:

Add this line to ~/.vmware/config (create file if necessary):
xkeymap.nokeycodeMap = true
and reboot.

Also note that the CTRL-ALT-INS on linux vmware may not work, so try instead to use the numeric keypad DEL instead of the INS button.

Bye,
Dino.

November 12

Silverlight

I'm studying Silverlight 2 from Microsoft. I have to say that I like it.
A great place to start with is http://silverlight.net/learn.
I'm watching the webcasts and they are fantastic.

Bye!
July 04

Blog... dear blog... VMware on linux ext3

It's been a long time since I updated this blog....

Here is a tip to work with vmware on linux ext3 filesystem.
You have to add this line in your .vmx file:

mainMem.useNamedFile=FALSE 

put that at the end or anywhere you like.

I tried to use Ubuntu 64 and VMware 64 bit to run a windows 2003 server (32 bit) and I did of course the 32-bit library installation in order to work with 32 bit operating systems.

Bye,
Dino.