Ressources documentaires pour Mandriva Linux et les Logiciels Libres

Billets dans la catégorie Administration

Select best Ubuntu mirror from CLI

Sometimes your Ubuntu mirrors may not be up-to-date or may be down. To check Ubuntu mirrors status, don’t hesitate to consult :

Now here is a handy little script that allow to select a mirror with the lowest latency available : apt-select.

To install it :

  • If you are using Python 2 ( if not use python3-bs4 instead ) : sudo apt-get install python-bs4
  • Download code from github : wget --no-check-certificate -O - | tar -zx
  • cd apt-select-master
  • Start script and select best mirror ( sources.list will be save in script dir ) : ./
  • Don’t hesitate to check sources.list content : view sources.list
  • Update system sources.list : ./
  • Update APT database : apt-get update

Enjoy !!! 🙂

Importing a SVN repository from one server to another one

As now I’m using Netbeans, I had issues with key based authentication for CVS project in Netbeans. That’s why I decide to import my CVS project to SVN. At some point, as the SVN repository was on my own personal computer, I decide to move it to a public server I had, but only allow SSH access to it. So here is the procedure to move a SVN repository to another SVN server, and only allow svn+ssh access ( no webdav, no network svnserve access ) under Mandriva.

  1. On your old SVN server, you have to dump the entire SVN repository : [bash light= »1″]svnadmin dump /path/to/your/repository > /tmp/repository.svn_dump[/bash]
  2. Now copy the dump file somewhere on the new SVN server. You may want to use scp if your SSH key based authentication is working correctly. For example : [bash light= »1″]scp /tmp/repository.svn_dump user@new-svn-server:/tmp[/bash]
  3. Once done, you may want to delete the dump file on the old server and eventually delete also the old SVN repo
  4. On your new server, install the SVN server package and its associated tools : [bash light= »1″]urpmi subversion-server subversion-tools[/bash]
  5. check that svnserve is not started at boot by xinetd. For this check /etc/xinetd.d/svnserve configuration file and check that you have disable = yes as follows : [plain]# default: off
    # description: svnserve is the server part of Subversion.
    service svnserve
    disable             = yes
    port                = 3690
    socket_type         = stream
    protocol            = tcp
    wait                = no
    user                = svn
    server              = /usr/bin/svnserve
    server_args         = -i -r /var/lib/svn/repositories
  6. Now create the repository tree on the new server : [bash light= »1″]svnadmin create /var/lib/svn/repositories/[/bash]
  7. Import the dumped repository file in the new SVN repository : [bash light= »1″]svnadmin load /var/lib/svn/repositories/ < /tmp/repository.svn_dump[/bash]
  8. If the importation is successful, now you should ensure that the users connecting with SSH will have write access to the repository. For this add the users to the svn group : [bash light= »1″]usermod -G svn -a user[/bash]
  9. Now add a default ACL for the group to the repository giving read, write and execute ( rwX ) rights to all members of the svn group : [bash light= »1″]setfacl -R -m d:g:svn:rwX /var/lib/svn/repositories/[/bash]
  10. Check that from a remote computer you can list the content of the repository : [bash light= »1″]svn list svn+ssh://user@new-svn-server/var/lib/svn/repositories[/bash]

Happy coding with Subversion 🙂

Ressources :

How to configure local mail delivery

I have a separate server which hosts my database. Each night, a cron script is run to dump the databases contents and rsynced the backups to another server. The backup script will log the backup in /var/log, but also send a mail. Most of the time I’m using ssmtp to use my ISP SMTP server as a relay. However my database server most of the time is not connected to internet ( and this on purpose ). This is where the issue comes : ssmtp doesn’t allow local mail delivery 🙁 Even stranger, by default local mail delivery seems to not work at all in a default Mandriva installation 🙁

To handle local mail delivery, you need a local Mail Delivery Agent ( MDA ), and your Mail Transfert Agent ( MTA ) should called the local MDA to deliver local mails. So here are 2 methods to handle local mail delivery.


The easiest to have local mail delivery is to install … sendmail. Just install sendmail package and start the corresponding service, and your are done.

  • Install sendmail package : [bash light= »true »]urpmi sendmail[/bash]

  • Check that sendmail is used to provide send command : [bash light= »true »]update-alternatives –display sendmail-command[/bash]

  • If this is not the case, instruct update-alternative to use sendmail : [bash light= »true »]update-alternatives –config sendmail-command[/bash]

  • Start the sendmail service : [bash light= »true »]service sendmail restart[/bash]


Another way is to use ESMTP. i do advised to use ESMTP because it allow to configure easily a SMTP relay host, and handle also local delivery. However by default, ESMTP is not usable in default Mandriva configuration as it will not install a local MDA ( mdv bug #56759 ) and does not provide a default system-wide configuration file ( mdv bug #56757 ). So here his the procedure for a very simple ESMTP configuration which handle a SMTP relay and local mail delivery :

  • Install esmtp and procmail packages : [bash light= »true »]urpmi esmtp procmail[/bash]

  • Check that esmtp is used to emulate sendmail : [bash light= »true »]update-alternatives –display sendmail-command[/bash]

  • If this is not the case, instruct update-alternative to use esmtp : [bash light= »true »]update-alternatives –config sendmail-command[/bash]

  • Once done, create an empty system-wide configuration file for esmtp : [bash light= »true »]touch /etc/esmtprc[/bash]

  • If you want to configure a SMTP relay host to send mails outside, add the hostname option followed by the SMTP address in /etc/esmtprc. For example :
    # The place where the mail goes. The actual machine name is required
    # no MX records are consulted. Commonly mailhosts are named
    hostname =
  • Now add support to procmail as local MDA for local mail delivery by setting the mda option in /etc/esmtprc :
    # Use procmail as MDA for local mail delivery
    mda "/usr/bin/procmail -d %T"
Testing you local mail delivery setup

Now that sendmail or ESMTP are configured, you should test if local mail delivery is working correctly. The easiest way is to use the mail command to send, but also read your local mails. For example to send a mail containing the content of /etc/nsswitch.conf to the root user, just type : [bash light= »true »]mail -v -s "Local mail test" root < /etc/nsswitch.conf[/bash]

. Now log as root, and type mail to consult root mails. you may want to use Mutt eventually to read your mails instead of mail

Comment activer le 5.1 sur une Creative ?

Carte son Creative SBLive Value!/Player/5.1 ou Audigy , emu10k1-tools, drivers OSS/Creative

Tout d’abord il faut que votre carte son soit configur

Comment changer la r

Pour changer la r

Windows, Linux : dans quel ordre installer ?

Il est recommand

Fichiers Zip et Rar sous Linux ?

unrar, unzip

En ligne de commande

les fichiers .rar

Pour les .rar, on utilise le programme nomm

Comment choisir son wm/desktop en runlevel 3 ?

C’est le fichier .xinitrc qui se trouve dans votre r

Comment passer des arguments/options au noyau ?

On peut passer des options au noyau de linux de diff

Comment installer java sous Linux ?



My Tweets