Ressources documentaires pour Mandriva Linux et les Logiciels Libres

Billets dans la catégorie HOWTO

Install Twitter Bootstrap under Mageia using Bower

twitter_bootstrapTwitter Bootstrap is an HTML, CSS, and JS framework for developing responsive, mobile first projects on the web. It was developped by twitter and being released as open source in 2010.

The best way to install Twitter Bootstrap and allow to manage update is to use a Bower manager :

  • Install Node.js : urpmi nodejs
  • Install git : urpmi git
  • Install bower : npm install -g bower
  • Move to your project directory : cd /var/www/myproject
  • Create a default config for bower to install your stuff under inc : vi .bowerrc

    [js]

    {
    "directory": "inc/",

    "analytics": false
    }

    [/js]

  • Install Twitter Bootstrap : bower install bootstrap
  • To check your package list and if updates are available you just have to do in your project directory : bower list
  • To update a package : bower update mypackage

And now you’re done 🙂

References :

Bower pour les nuls

Don’t hesitate to browse Bower packages list

Using Parse-Dia-SQL to generate SQL from UML Dia diagram and how to install it under Mageia

dia2sql_1It can be tedious when designing an application ( and not using frameworks like Symfony ) to design your database and then create corresponding SQL scripts. Thanks to Parse-Dia-SQL you can design your database using Dia and then generate corresponding SQL script for your database.

Ubuntu users just need to install libparse-dia-sql-perl package.

Windows may download Parse-Dia-SQL installer directly from Dia homepage : http://dia-installer.de/parse-dia-sql/index.html

Now let’s see how to install Parse-Dia-SQL under Mageia :

  • Install minimal set of dependencies. To found corresponding Mageia packages, use urpmf –provides –literal. For example to found Html::Lint, just do : urpmf --provides --literal 'perl(Html::Lint)'
  • Install corresponding minimal set of dependencies for http://search.cpan.org/dist/Parse-Dia-SQL/ : urpmi perl-base perl-Log-Log4perl perl-XML-DOM perl-HTML-Lint perl-Text-Table perl-Text-Aligner perl-Test-Exception
  • Install CPAN : urpmi perl-devel make
  • Now install Parse-Dia-SQL from CPAN : cpan /Parse-Dia-SQL/
  • parsediasql should be installed now in /usr/local/bin/
  • Now to create a SQL file from your Dia diagram, just do : parsediasql --file db_model_file.dia --db dbtype
    • Supported values for dbtype are : mysql-innodb, mysql-myisam, postgres ( for PostgreSQL ), db2, oracle, sqlite3, sqlite3fk, mssql and html

Now to create your UML model with Dia, use Dia’s UML shapes :

  • SQL table are UML Class
  • To mark an attribute as being a primary key, set Visibility = protected
  • To add NOT NULL and DEFAULT xxx to your attributes, first add the default value and then the NULL or NOT NULL  in Value field. For example to have DEFAULT CURRENT_TIMESTAMP NOT NULL on your SQL file, just add CURRENT_TIMESTAMP NOT NULL in Value field
  • Additional indexes can be create in [Operations] tab where :
    • Operation Name = Index name ( e.g table_col_idx )
    • Operation Type = Index type ( INDEX or UNIQUE INDEX )
    • Parameters =  Index columns ( one parameter name for each column name in the index )
    • Stereotype: Index type — For PostgreSQL, you can choose other than btree ( hash, gist, gin ). Please note that GIN indexes may be useful for JSON datatype
  • Foreign-keys constraint are done with UML aggregation tool ( line with a diamond at one end ) in which in its properties you are going to specify foreign-key direction and columns

Please note that for PostgreSQL no need to use typemaps for autoincrement columns, just put SERIAL as attribute type 🙂

Links:

Automatic SQL generation using Dia

Database design with Dia

Utilisation de Dia2SQL ( Fr )

Using Dia to Interact With tedia2sql ( Parse-Dia-SQL is a fork of tedia2sql to support latest Dia version, documentation for tedia2sql is relevant for Parse-Dia-SQL too )

Parse-Dia-SQL homepage

 

Using Dokan under Windows to mount your $HOME with SSH

Linux Windows cooperationAt work we are using Windows workstations, but we are working most of the time in our Virtual Machine, hosted in a Cloud, running under Linux. We have access to our Linux VM with NXClient or by using Putty. If you want to transfer some files from your Windows workstations to your Linux VM, several solutions exists. Most solutions are using the built-in SFTP server of OpenSSH : Filezilla, WinSCP. Their drawbacks ? They are just some FTP-like clients, and so you lack integration with Windows, notably the Windows Explorer.

Under Linux we can use SSHFS to mount your SSH server as a filesystem. Nautilus and Dolphin, at least, allow also to mount your remote SSH server in your local filesystem. Under Windows there are 2 solutions : ExpanDrive which a proprietary solution, and Dokan which is an OpenSource and Free implementation of a FUSE-like filesystem.

 

Installing Dokan

In fact Dokan is not really a program but a library implementing a FUSE-like filesystem. So for SSHFS support, you need to install the Dokan library, and then after, you will install the module allowing to use SSHFS protocol.

  1. Download the latest version of the Dokan library : http://dokan-dev.net/en/download/#dokan
  2. Install the Dokan library by running the installer
  3. Download and install the Microsoft Visual C++ 2005 SP1 Redistributable Package.
  4. Download the latest and matching version of the Dokan SSHFS support : http://dokan-dev.net/en/download/#sshfs
  5. Extract the content of the archive ( if you are using the zip version ) in C:\Program Files\Dokan
  6. To start Dokan, just run the binary DokanSSHFS.exe which is located normally in C:\Program Files\Dokan\dokan-sshfs-0.6.0.
  7. You may want to create a shortcut on your Desktop ( right click on DokanSSHFS.exe -> Send To -> Desktop ( create a shortcut )

 

Using Dokan

To use Dokan you just need to run DokanSSHFS.exe, then a window will allow to enter the different settings.

  1. Enter you connection settings ( SSH server Host, username, password or identity file ).
  2. If you want to map directly your $HOME, put the full Linux path to your home directory in Server Root.
  3. Select the Windows letter drive which will map your SSHFS drive.
  4. You can save theses settings by giving a name to the profile and then clicking on [Save] at the top of the window.
  5. Press [Connect] and if everything is fine, you should have a new  drive letter in your Windows Explorer.

 

Links :

 

Dokan SSHFS Configuration windows

Dokan SSHFS Configuration windows

Listing initrd content with lsinitrd

The initrd used by most distribution to boot a Linux OS is most of the time a black magic box for most people. Today i’ve learn a new command from Andrey Borzenkov on the Cooker ML : lsinitrd. This command, from the nash package, allow to list the content of the initrd. For example to list the content of the default initrd used to boot your system, just do the following command as root :
[bash light= »1″]lsinitrd /boot/initrd.img[/bash]

.

With lsinitrd, you will be able to see the list of modules included and thus loaded at boot, or the commands executed. This is especially useful for people needed specific modules not include automatically in the initrd by mkinitrd : they will be able to check if the right modules are icluded, or the right commands used. On a Mandriva cooker system using ext3 on standard partitions ( no LVM, no software RAID, no encryption ), this give the following output :[bash]
[root@info1 boot]# lsinitrd /boot/initrd.img
/boot/initrd.img:
========================================================================
-rwx—— 1 root root 2461 May 27 16:12 init
drwx—— 3 root root 0 May 27 16:12 usr
drwx—— 4 root root 0 May 27 16:12 usr/lib
-rwxr-xr-x 1 root root 801164 May 11 08:59 usr/lib/libglib-2.0.so.0.2100.0
-rwxr-xr-x 1 root root 137824 Dec 18 13:49 usr/lib/libjpeg.so.62.0.0
-rwxr-xr-x 1 root root 13956 Apr 7 23:11 usr/lib/libbdevid.so.6.0.63
lrwxrwxrwx 1 root root 27 May 27 16:12 usr/lib/libpng12.so.0 -> /usr/lib/libpng12.so.0.36.0
-rwxr-xr-x 1 root root 87560 Feb 20 13:31 usr/lib/libelf-0.140.so
lrwxrwxrwx 1 root root 32 May 27 16:12 usr/lib/libglib-2.0.so.0 -> /usr/lib/libglib-2.0.so.0.2100.0
-rwxr-xr-x 1 root root 21940 Apr 18 09:50 usr/lib/libsplashy.so.1.0.0
-rwxr-xr-x 1 root root 106308 Apr 7 23:11 usr/lib/libnash.so.6.0.63
lrwxrwxrwx 1 root root 31 May 27 16:12 usr/lib/libsplashycnf.so.1 -> /usr/lib/libsplashycnf.so.1.0.0
-rwxr-xr-x 1 root root 534584 Mar 12 17:25 usr/lib/libfreetype.so.6.3.20
lrwxrwxrwx 1 root root 31 May 27 16:12 usr/lib/libfusion-1.2.so.0 -> /usr/lib/libfusion-1.2.so.0.7.0
lrwxrwxrwx 1 root root 25 May 27 16:12 usr/lib/liblzo2.so.2 -> /usr/lib/liblzo2.so.2.0.0
drwx—— 7 root root 0 May 27 16:12 usr/lib/directfb-1.2-0
drwx—— 2 root root 0 May 27 16:12 usr/lib/directfb-1.2-0/gfxdrivers
-rw-r–r– 1 root root 21948 Mar 25 19:53 usr/lib/directfb-1.2-0/gfxdrivers/libdirectfb_i810.so
-rw-r–r– 1 root root 38332 Mar 25 19:53 usr/lib/directfb-1.2-0/gfxdrivers/libdirectfb_mach64.so
-rw-r–r– 1 root root 112284 Mar 25 19:53 usr/lib/directfb-1.2-0/gfxdrivers/libdirectfb_nvidia.so
-rw-r–r– 1 root root 17820 Mar 25 19:53 usr/lib/directfb-1.2-0/gfxdrivers/libdirectfb_ati128.so
-rw-r–r– 1 root root 21848 Mar 25 19:53 usr/lib/directfb-1.2-0/gfxdrivers/libdirectfb_savage.so
-rw-r–r– 1 root root 13640 Mar 25 19:53 usr/lib/directfb-1.2-0/gfxdrivers/libdirectfb_sis315.so
-rw-r–r– 1 root root 42620 Mar 25 19:53 usr/lib/directfb-1.2-0/gfxdrivers/libdirectfb_cle266.so
-rw-r–r– 1 root root 46412 Mar 25 19:53 usr/lib/directfb-1.2-0/gfxdrivers/libdirectfb_nsc.so
-rw-r–r– 1 root root 129008 Mar 25 19:53 usr/lib/directfb-1.2-0/gfxdrivers/libdirectfb_radeon.so
-rw-r–r– 1 root root 51028 Mar 25 19:53 usr/lib/directfb-1.2-0/gfxdrivers/libdirectfb_unichrome.so
-rw-r–r– 1 root root 22112 Mar 25 19:53 usr/lib/directfb-1.2-0/gfxdrivers/libdirectfb_cyber5k.so
-rw-r–r– 1 root root 13728 Mar 25 19:53 usr/lib/directfb-1.2-0/gfxdrivers/libdirectfb_neomagic.so
-rw-r–r– 1 root root 17852 Mar 25 19:53 usr/lib/directfb-1.2-0/gfxdrivers/libdirectfb_i830.so
-rw-r–r– 1 root root 13592 Mar 25 19:53 usr/lib/directfb-1.2-0/gfxdrivers/libdirectfb_tdfx.so
drwx—— 5 root root 0 May 27 16:12 usr/lib/directfb-1.2-0/interfaces
drwx—— 2 root root 0 May 27 16:12 usr/lib/directfb-1.2-0/interfaces/IDirectFBFont
-rw-r–r– 1 root root 13716 Mar 25 19:53 usr/lib/directfb-1.2-0/interfaces/IDirectFBFont/libidirectfbfont_ft2.so
-rw-r–r– 1 root root 9564 Mar 25 19:53 usr/lib/directfb-1.2-0/interfaces/IDirectFBFont/libidirectfbfont_dgiff.so
-rw-r–r– 1 root root 26892 Mar 25 19:53 usr/lib/directfb-1.2-0/interfaces/IDirectFBFont/libidirectfbfont_default.so
drwx—— 2 root root 0 May 27 16:12 usr/lib/directfb-1.2-0/interfaces/IDirectFBVideoProvider
-rw-r–r– 1 root root 17816 Mar 25 19:53 usr/lib/directfb-1.2-0/interfaces/IDirectFBVideoProvider/libidirectfbvideoprovider_v4l.so
-rw-r–r– 1 root root 17776 Mar 25 19:53 usr/lib/directfb-1.2-0/interfaces/IDirectFBVideoProvider/libidirectfbvideoprovider_gif.so
drwx—— 2 root root 0 May 27 16:12 usr/lib/directfb-1.2-0/interfaces/IDirectFBImageProvider
-rw-r–r– 1 root root 13632 Mar 25 19:53 usr/lib/directfb-1.2-0/interfaces/IDirectFBImageProvider/libidirectfbimageprovider_gif.so
-rw-r–r– 1 root root 13688 Mar 25 19:53 usr/lib/directfb-1.2-0/interfaces/IDirectFBImageProvider/libidirectfbimageprovider_png.so
-rw-r–r– 1 root root 13676 Mar 25 19:53 usr/lib/directfb-1.2-0/interfaces/IDirectFBImageProvider/libidirectfbimageprovider_jpeg.so
-rw-r–r– 1 root root 9532 Mar 25 19:53 usr/lib/directfb-1.2-0/interfaces/IDirectFBImageProvider/libidirectfbimageprovider_dfiff.so
drwx—— 2 root root 0 May 27 16:12 usr/lib/directfb-1.2-0/wm
-rw-r–r– 1 root root 38520 Mar 25 19:53 usr/lib/directfb-1.2-0/wm/libdirectfbwm_default.so
drwx—— 2 root root 0 May 27 16:12 usr/lib/directfb-1.2-0/systems
-rw-r–r– 1 root root 51152 Mar 25 19:53 usr/lib/directfb-1.2-0/systems/libdirectfb_fbdev.so
drwx—— 2 root root 0 May 27 16:12 usr/lib/directfb-1.2-0/inputdrivers
-rw-r–r– 1 root root 13700 Mar 25 19:53 usr/lib/directfb-1.2-0/inputdrivers/libdirectfb_keyboard.so
-rwxr-xr-x 1 root root 173904 May 8 08:16 usr/lib/libpng12.so.0.36.0
-rwxr-xr-x 1 root root 38412 Mar 25 19:53 usr/lib/libfusion-1.2.so.0.7.0
lrwxrwxrwx 1 root root 24 May 27 16:12 usr/lib/libelf.so.1 -> /usr/lib/libelf-0.140.so
-rwxr-xr-x 1 root root 140648 Dec 21 17:40 usr/lib/liblzo2.so.2.0.0
-rwxr-xr-x 1 root root 529020 Mar 25 19:53 usr/lib/libdirectfb-1.2.so.0.7.0
lrwxrwxrwx 1 root root 31 May 27 16:12 usr/lib/libdirect-1.2.so.0 -> /usr/lib/libdirect-1.2.so.0.7.0
lrwxrwxrwx 1 root root 33 May 27 16:12 usr/lib/libdirectfb-1.2.so.0 -> /usr/lib/libdirectfb-1.2.so.0.7.0
lrwxrwxrwx 1 root root 26 May 27 16:12 usr/lib/libjpeg.so.62 -> /usr/lib/libjpeg.so.62.0.0
lrwxrwxrwx 1 root root 30 May 27 16:12 usr/lib/libfreetype.so.6 -> /usr/lib/libfreetype.so.6.3.20
lrwxrwxrwx 1 root root 31 May 27 16:12 usr/lib/libparted-1.8.so.8 -> /usr/lib/libparted-1.8.so.8.0.0
lrwxrwxrwx 1 root root 28 May 27 16:12 usr/lib/libsplashy.so.1 -> /usr/lib/libsplashy.so.1.0.0
-rwxr-xr-x 1 root root 9576 Apr 18 09:50 usr/lib/libsplashycnf.so.1.0.0
-rwxr-xr-x 1 root root 430348 Feb 26 16:49 usr/lib/libparted-1.8.so.8.0.0
drwx—— 2 root root 0 May 27 16:12 usr/lib/suspend
-rwxr-xr-x 1 root root 31292 Mar 27 12:59 usr/lib/suspend/resume
-rwxr-xr-x 1 root root 88232 Mar 25 19:53 usr/lib/libdirect-1.2.so.0.7.0
drwx—— 2 root root 0 May 27 16:12 sys
drwx—— 2 root root 0 May 27 16:12 proc
drwx—— 2 root root 0 May 27 16:12 firmware
drwx—— 2 root root 0 May 27 16:12 bin
-rwxr-xr-x 1 root root 85008 Apr 7 23:11 bin/nash
lrwxrwxrwx 1 root root 13 May 27 16:12 bin/splashy_chvt -> /sbin/splashy
-rwxr-xr-x 1 root root 30748 Feb 5 15:53 bin/modprobe
-rwxr-xr-x 1 root root 5496 Apr 18 09:50 bin/splashy_update
lrwxrwxrwx 1 root root 23 May 27 16:12 bin/resume -> /usr/lib/suspend/resume
-rwxr-xr-x 1 root root 18368 Apr 18 09:50 bin/splashy
-rwxr-xr-x 1 root root 9832 Feb 5 15:53 bin/rmmod
drwx—— 3 root root 0 May 27 16:12 dev
brw——- 1 root root 1, 1 May 27 16:12 dev/ram1
crw——- 1 root root 1, 3 May 27 16:12 dev/null
lrwxrwxrwx 1 root root 4 May 27 16:12 dev/ram -> ram1
crw——- 1 root root 4, 67 May 27 16:12 dev/ttyS3
crw——- 1 root root 4, 9 May 27 16:12 dev/tty9
crw——- 1 root root 4, 6 May 27 16:12 dev/tty6
crw——- 1 root root 4, 2 May 27 16:12 dev/tty2
crw——- 1 root root 4, 7 May 27 16:12 dev/tty7
crw——- 1 root root 5, 1 May 27 16:12 dev/console
crw——- 1 root root 4, 0 May 27 16:12 dev/tty0
crw——- 1 root root 4, 8 May 27 16:12 dev/tty8
crw——- 1 root root 4, 11 May 27 16:12 dev/tty11
crw——- 1 root root 1, 5 May 27 16:12 dev/zero
brw——- 1 root root 1, 0 May 27 16:12 dev/ram0
crw——- 1 root root 4, 12 May 27 16:12 dev/tty12
crw——- 1 root root 4, 5 May 27 16:12 dev/tty5
crw——- 1 root root 4, 64 May 27 16:12 dev/ttyS0
crw——- 1 root root 4, 1 May 27 16:12 dev/tty1
crw——- 1 root root 5, 0 May 27 16:12 dev/tty
crw——- 1 root root 4, 66 May 27 16:12 dev/ttyS2
crw——- 1 root root 4, 65 May 27 16:12 dev/ttyS1
crw——- 1 root root 5, 2 May 27 16:12 dev/ptmx
drwx—— 2 root root 0 May 27 16:12 dev/mapper
crw——- 1 root root 4, 3 May 27 16:12 dev/tty3
crw——- 1 root root 4, 4 May 27 16:12 dev/tty4
crw——- 1 root root 4, 0 May 27 16:12 dev/systty
crw——- 1 root root 4, 10 May 27 16:12 dev/tty10
drwx—— 2 root root 0 May 27 16:12 mnt
drwx—— 5 root root 0 May 27 16:12 etc
drwx—— 2 root root 0 May 27 16:12 etc/blkid
drwx—— 2 root root 0 May 27 16:12 etc/ld.so.conf.d
-rw-r–r– 1 root root 114 Apr 14 23:00 etc/ld.so.conf.d/standard.conf
-rw-r–r– 1 root root 14 Mar 28 15:03 etc/ld.so.conf.d/libarts1.conf
-rw-r–r– 1 root root 1817 Mar 27 12:58 etc/suspend.conf
-rw-r–r– 1 root root 2207 May 27 16:12 etc/ld.so.cache
-rw-r–r– 1 root root 33 Apr 6 21:21 etc/ld.so.conf
drwx—— 3 root root 0 May 27 16:12 lib
lrwxrwxrwx 1 root root 19 May 27 16:12 lib/libuuid.so.1 -> /lib/libuuid.so.1.2
lrwxrwxrwx 1 root root 22 May 27 16:12 lib/libsysfs.so.2 -> /lib/libsysfs.so.2.0.1
-rwxr-xr-x 1 root root 71380 Apr 6 21:22 lib/libresolv-2.9.so
-rwxr-xr-x 1 root root 9680 Apr 6 21:22 lib/libdl-2.9.so
lrwxrwxrwx 1 root root 16 May 27 16:12 lib/libm.so.6 -> /lib/libm-2.9.so
-rwxr-xr-x 1 root root 149336 Apr 6 21:22 lib/libm-2.9.so
lrwxrwxrwx 1 root root 18 May 27 16:12 lib/libz.so.1 -> /lib/libz.so.1.2.3
-rwxr-xr-x 1 root root 202056 Jan 15 16:43 lib/libpcre.so.0.0.1
lrwxrwxrwx 1 root root 21 May 27 16:12 lib/libpcre.so.0 -> /lib/libpcre.so.0.0.1
lrwxrwxrwx 1 root root 21 May 27 16:12 lib/libpopt.so.0 -> /lib/libpopt.so.0.0.0
-rwxr-xr-x 1 root root 17960 Feb 9 19:01 lib/libuuid.so.1.2
-rwxr-xr-x 1 root root 46612 Dec 22 16:43 lib/libsysfs.so.2.0.1
-rwxr-xr-x 1 root root 44932 Feb 9 19:01 lib/libblkid.so.1.0
-rwxr-xr-x 1 root root 117752 May 19 12:51 lib/libgcc_s-4.4.0.so.1
lrwxrwxrwx 1 root root 24 May 27 16:12 lib/libgcc_s.so.1 -> /lib/libgcc_s-4.4.0.so.1
lrwxrwxrwx 1 root root 20 May 27 16:12 lib/libblkid.so.1 -> /lib/libblkid.so.1.0
-rwxr-xr-x 1 root root 78152 Dec 16 18:45 lib/libz.so.1.2.3
lrwxrwxrwx 1 root root 25 May 27 16:12 lib/libmodprobe.so.0 -> /lib/libmodprobe.so.0.0.0
lrwxrwxrwx 1 root root 21 May 27 16:12 lib/libresolv.so.2 -> /lib/libresolv-2.9.so
-rwxr-xr-x 1 root root 602619 Apr 6 21:15 lib/ld-2.9.so
-rwxr-xr-x 1 root root 90656 Aug 6 2008 lib/libdevmapper.so.1.02
lrwxrwxrwx 1 root root 22 May 27 16:12 lib/libpthread.so.0 -> /lib/libpthread-2.9.so
-rwxr-xr-x 1 root root 26092 Feb 5 15:53 lib/libmodprobe.so.0.0.0
-rwxr-xr-x 1 root root 111636 Apr 6 21:21 lib/libpthread-2.9.so
-rwxr-xr-x 1 root root 1376436 Apr 6 21:22 lib/libc-2.9.so
drwx—— 3 root root 0 May 27 16:12 lib/modules
drwx—— 2 root root 0 May 27 16:12 lib/modules/2.6.30-desktop-0.rc7.1mnb
-rw-r–r– 1 root root 80458 May 26 03:16 lib/modules/2.6.30-desktop-0.rc7.1mnb/scsi_mod.ko.gz
-rw-r–r– 1 root root 19356 May 26 03:16 lib/modules/2.6.30-desktop-0.rc7.1mnb/sd_mod.ko.gz
-rw——- 1 root root 3941 May 27 16:12 lib/modules/2.6.30-desktop-0.rc7.1mnb/modules.alias.bin
-rw-r–r– 1 root root 13270 May 26 03:16 lib/modules/2.6.30-desktop-0.rc7.1mnb/sata_nv.ko.gz
-rw——- 1 root root 757 May 27 16:12 lib/modules/2.6.30-desktop-0.rc7.1mnb/modules.dep.bin
-rw——- 1 root root 22168 May 27 16:12 lib/modules/2.6.30-desktop-0.rc7.1mnb/modules.symbols.bin
-rw-r–r– 1 root root 90624 May 26 03:16 lib/modules/2.6.30-desktop-0.rc7.1mnb/libata.ko.gz
-rw-r–r– 1 root root 2790 May 26 03:16 lib/modules/2.6.30-desktop-0.rc7.1mnb/pata_acpi.ko.gz
-rw——- 1 root root 43 May 27 16:12 lib/modules/2.6.30-desktop-0.rc7.1mnb/modules.seriomap
-rw-r–r– 1 root root 28161 May 26 03:16 lib/modules/2.6.30-desktop-0.rc7.1mnb/jbd.ko.gz
-rw——- 1 root root 73 May 27 16:12 lib/modules/2.6.30-desktop-0.rc7.1mnb/modules.ieee1394map
-rw——- 1 root root 17149 May 27 16:12 lib/modules/2.6.30-desktop-0.rc7.1mnb/modules.symbols
-rw-r–r– 1 root root 1886 May 26 03:16 lib/modules/2.6.30-desktop-0.rc7.1mnb/ide-generic.ko.gz
-rw——- 1 root root 5741 May 27 16:12 lib/modules/2.6.30-desktop-0.rc7.1mnb/modules.pcimap
-rw——- 1 root root 74 May 27 16:12 lib/modules/2.6.30-desktop-0.rc7.1mnb/modules.ofmap
-rw——- 1 root root 442 May 27 16:12 lib/modules/2.6.30-desktop-0.rc7.1mnb/modules.dep
-rw-r–r– 1 root root 75829 May 26 03:16 lib/modules/2.6.30-desktop-0.rc7.1mnb/ext3.ko.gz
-rw-r–r– 1 root root 3031 May 26 03:16 lib/modules/2.6.30-desktop-0.rc7.1mnb/ata_generic.ko.gz
-rw——- 1 root root 4038 May 27 16:12 lib/modules/2.6.30-desktop-0.rc7.1mnb/modules.alias
-rw-r–r– 1 root root 1592 May 26 03:16 lib/modules/2.6.30-desktop-0.rc7.1mnb/crc-t10dif.ko.gz
-rw-r–r– 1 root root 14930 May 26 03:16 lib/modules/2.6.30-desktop-0.rc7.1mnb/ide-gd_mod.ko.gz
-rw-r–r– 1 root root 2332 May 26 03:16 lib/modules/2.6.30-desktop-0.rc7.1mnb/ide-pci-generic.ko.gz
-rw——- 1 root root 189 May 27 16:12 lib/modules/2.6.30-desktop-0.rc7.1mnb/modules.usbmap
-rw——- 1 root root 69 May 27 16:12 lib/modules/2.6.30-desktop-0.rc7.1mnb/modules.ccwmap
-rw——- 1 root root 81 May 27 16:12 lib/modules/2.6.30-desktop-0.rc7.1mnb/modules.isapnpmap
-rw——- 1 root root 141 May 27 16:12 lib/modules/2.6.30-desktop-0.rc7.1mnb/modules.inputmap
-rw-r–r– 1 root root 5350 May 26 03:16 lib/modules/2.6.30-desktop-0.rc7.1mnb/pata_amd.ko.gz
-rw-r–r– 1 root root 59037 May 26 03:16 lib/modules/2.6.30-desktop-0.rc7.1mnb/ide-core.ko.gz
lrwxrwxrwx 1 root root 17 May 27 16:12 lib/libdl.so.2 -> /lib/libdl-2.9.so
lrwxrwxrwx 1 root root 16 May 27 16:12 lib/libc.so.6 -> /lib/libc-2.9.so
lrwxrwxrwx 1 root root 14 May 27 16:12 lib/ld-linux.so.2 -> /lib/ld-2.9.so
-rwxr-xr-x 1 root root 30736 Oct 19 2008 lib/libpopt.so.0.0.0
drwx—— 2 root root 0 May 27 16:12 sysroot
lrwxrwxrwx 1 root root 3 May 27 16:12 sbin -> bin
drwxr-xr-x 2 root root 0 Apr 21 11:18 etc/splashy
-rw-r–r– 1 root root 567 May 27 16:12 etc/splashy/config.xml
drwxr-xr-x 8 root root 0 Apr 18 09:49 etc/splashy/themes
drwxr-xr-x 2 root root 0 Apr 23 16:42 etc/splashy/themes/Mandriva-Powerpack-800×600
-rw-r–r– 1 root root 79193 Apr 23 15:19 etc/splashy/themes/Mandriva-Powerpack-800×600/suspend.jpg
-rw-r–r– 1 root root 3454 Apr 23 15:19 etc/splashy/themes/Mandriva-Powerpack-800×600/theme.xml
drwxr-xr-x 4 root root 0 Apr 18 09:49 usr/share/splashy
drwxr-xr-x 8 root root 0 Apr 18 09:49 usr/share/splashy/themes
-rw-r–r– 4 root root 158823 Apr 23 15:19 etc/splashy/themes/Mandriva-Powerpack-800×600/background.jpg
========================================================================
#!/bin/nash

mount -t proc /proc /proc
setquiet
echo Mounting proc filesystem
echo Mounting sysfs filesystem
mount -t sysfs /sys /sys
echo Creating /dev
mount -o mode=0755 -t tmpfs /dev /dev
mkdir /dev/pts
mount -t devpts -o gid=5,mode=620 /dev/pts /dev/pts
mkdir /dev/shm
mkdir /dev/mapper
echo Creating initial device nodes
mknod /dev/null c 1 3
mknod /dev/zero c 1 5
mknod /dev/systty c 4 0
mknod /dev/tty c 5 0
mknod /dev/console c 5 1
mknod /dev/ptmx c 5 2
mknod /dev/fb c 29 0
mknod /dev/fb0 c 29 0
mknod /dev/tty0 c 4 0
mknod /dev/tty1 c 4 1
mknod /dev/tty2 c 4 2
mknod /dev/tty3 c 4 3
mknod /dev/tty4 c 4 4
mknod /dev/tty5 c 4 5
mknod /dev/tty6 c 4 6
mknod /dev/tty7 c 4 7
mknod /dev/tty8 c 4 8
mknod /dev/tty9 c 4 9
mknod /dev/tty10 c 4 10
mknod /dev/tty11 c 4 11
mknod /dev/tty12 c 4 12
mknod /dev/ttyS0 c 4 64
mknod /dev/ttyS1 c 4 65
mknod /dev/ttyS2 c 4 66
mknod /dev/ttyS3 c 4 67
daemonize –ignore-missing /bin/plymouthd
plymouth –show-splash
echo Starting splash.
nash-if-splash splashy_chvt 8
nash-if-splash splashy boot
echo Setting up hotplug.
hotplug
echo Creating block device nodes.
mkblkdevs
echo "Loading ext3 module"
modprobe -q ext3
echo "Loading crc-t10dif module"
modprobe -q crc-t10dif
echo "Loading scsi_mod module"
modprobe -q scsi_mod
echo "Loading sd_mod module"
modprobe -q sd_mod
echo "Loading libata module"
modprobe -q libata
echo "Loading sata_nv module"
modprobe -q sata_nv
echo "Loading pata_acpi module"
modprobe -q pata_acpi
echo "Loading ide-core module"
modprobe -q ide-core
echo "Loading ide-disk module"
modprobe -q ide-disk
echo "Loading ide-pci-generic module"
modprobe -q ide-pci-generic
echo "Loading ata_generic module"
modprobe -q ata_generic
echo "Loading pata_amd module"
modprobe -q pata_amd
echo "Loading ide_generic module"
modprobe -q ide_generic
echo waiting for root device UUID=8141d62a-0254-4405-be04-40b0dcb52cd1 to appear (timeout 1min)
waitdev –timeout=60000000 –rootdev UUID=8141d62a-0254-4405-be04-40b0dcb52cd1
mkblkdevs
nash-resume
echo Creating root device.
mkrootdev -t ext3 -o relatime,defaults,data=writeback,ro UUID=8141d62a-0254-4405-be04-40b0dcb52cd1
echo Mounting root filesystem.
mount /sysroot
echo Setting up other filesystems.
setuproot
loadpolicy
plymouth –newroot=/sysroot
echo Switching to new root and running init.
nash-if-splash splashy_update "chroot /sysroot"
switchroot
echo Booting has failed.
nash-if-splash splashy_update exit
nash-if-splash splashy_chvt 1
sleep -1
init
========================================================================[/bash]

eZ Components under Mandriva

Since some months, I’m using eZ Components for the intranet of my society. I’m specifically using the Graph component which allow to produce some very beautiful graphs, especially when using the SVG or the Cairo output driver.
At the beginning, I installed eZ Components by using the big tar.bz2 package which contains all the component plus the documentation and the regression tests. This was very big. The best way to install eZ Components and ease its maintenance if your distribution is not providing the packages is to use PEAR. So here is the way to install eZ Components by using PEAR on Mandriva. However this HOWTO may apply to others distributions.

  1. You need to have a working PHP+Apache stack : For this you may use the task-lamp-php metapackage which will install a working Apache + PHP + PEAR setup : [bash light= »1″]urpmi task-lamp-php[/bash]

    As you may noticed, this will install MySQL support. If you’d rather have PostgreSQL support, you just need to install the php-pgsql package.

  2. Install the needed requirements for the eZ Components : Each eZ Components have some requirements on some PHP extensions. You can consult the requirements on the eZ Components requirements page. For all components, you need pcre, reflection and spl support in PHP. Theses supports are available by default in the Mandriva PHP package. The Graph component require for example dom and xml support, and eventually gd support if you want to generate JPG/PNG images. To install the needed requirements, you just need to install the corresponding PHP packages which consist on the PHP extension name prefixed by php- : [bash light= »1″]urpmi php-xml php-dom[/bash]

    . If you want to generate graphics by using the Flash output, you need to install also php-ming. For high quality PNG graphics, you will have to install PHP cairo wrapper. Unfortunately as this package is not bundled in Mandriva, you will have to compile it and install it manually. For this please follow my previous about installation of PHP cairo wrapper under Mandriva

  3. Restart Apache to load PHP extensions : In order to activate the newPHP extension, you need to restart Apache : [bash light= »1″]service httpd restart[/bash]
  4. Add eZ Components PEAR channel : [bash light= »1″]pear channel-discover components.ez.no[/bash]
  5. Install the wanted eZ Components : Now you can easily the components you want to use by using PEAR. For example to install the Graph component you just need to do : [bash light= »1″]pear install ezc/Graph[/bash]

    . If at the contrary you want to install all the eZ Components, then you will use the following commande instead :

    [bash light= »1″]pear install -a ezc/eZComponents[/bash]

  6. Updates handling : To updates the components, you just need to replace install by upgrade in the PEAR command. For example to update the Graph component to a newer version, you will use : [bash light= »1″]pear upgrade ezc/Graph[/bash]

    . People who install the full eZ Components may want to use instead : pear upgrade ezc/eZComponents[/bash]

  7. Add eZ Components support in your PHP script : Adding eZ Components support in your PHP script is easy. On Mandriva, PEAR packages are in the default include/require PATH, so you just need to add the following lines at the top of your PHP scripts to be able to load automatically the different components on demand :
      require_once("ezc/Base/base.php");
      spl_autoload_register( array( 'ezcBase', 'autoload' ) );
    

As you can see, adding eZ Components support in your PHP application is easy, and many components may be useful. In some further HOWTO, we will see how to use the graph components by using a wrapper function. However don’t hesitate to consult the well-written eZ Components documentation.

Comment utiliser urpmi –parallel

Ce HOWTO aura pour but de vous montrer comment utiliser la fonction d’installation parall

Comment installer plusieurs distributions

Il arrive souvent que l’on veuille installer 2 distributions Linux en
parall

Comment utiliser mes partitions FAT32 ?

D’abord on regarde quelles sont les partitions mont

Comment voir les Windows de mon LAN ?

REQUIS :

samba-client

Pour voir les autres ordinateurs Windows d’un r

Comment g

La plupart des d

Catégories

My Tweets