LEFEVRE Damien .net

< 1 2 3 4 5 6 7 8 >

Sunday 8 October 2006, 19:32

Configuring SAMBA

To be able to browse files from Windows machine you need to add a user to the user list:

smbpasswd -a user

The linux user account has to exist. Then when you write files from the Windows machine, they will have the right owner on the linux disk.

Wednesday 4 October 2006, 19:04

Installing Apache2, PHP, MySQL, PHPMyAdmin on Debian

Follow the guide and install the elements one by one! I tried to install everything in a row and it screwed everything.

APACHE2:
This will install and configure APACHE. The root folder is /var/www..

# apt-get install apache2

PHP5:
This will install and configure PHP5 to work with APACHE2.

# apt-get install php5

To check if the interaction between PHP and APACHE is functional, create /var/www/essay.php containing:

<?php
    phpinfo();
?>

Then launch it from your explorer from http://localhost/essay.php
To configure PHP:
PHP is modular, several module exist and can be loaded or not in /etc/php.ini

A list of available modules for PHP is at http://www.php.net, and the debian package corresponding are:

$ apt-cache search php5 | less

MySQL:

# apt-get install mysql-server

Configuring MySQL:
One need to know that UNIX and MySQL users are different. We start by typing in a root terminal:

mysql

We should then get something like:

Welcome to the MySQL monitor.  Commands end with ; or g. 
Your MySQL connection id is 133 to server version: 3.23.49-log
Type 'help;' or 'h' for help. Type 'c' to clear the buffer.
mysql>

The SQL connection to the server works properly. Now exit :

mysql> quit 
Bye

We need to give a password to the root user for Mysql :

mysqladmin password yourpassword

Make a root connection to the SQL server :

mysql -p
Enter password : 
Welcome to the MySQL monitor.  Commands end with ; or g.
Your MySQL connection id is 9 to server version: 5.0.20-Debian_1-log

Type 'help;' or 'h' for help. Type 'c' to clear the buffer.

mysql>

To prevent using root for the connections, we now create a adminsql user:

mysql> use mysql;  
mysql> select * from user;
mysql>  GRANT ALL PRIVILEGES ON *.* TO adminmysql@localhost IDENTIFIED BY 'motdepasse' WITH GRANT OPTION;
mysql>  FLUSH PRIVILEGES;
mysql> select * from user where User='adminmysql';
mysql> quit
Bye

Now we connect like:

mysql -u adminmysql -p

That's it for the first MySQL configuration

To check the SQL server :

ps aux |grep mysql

The porcess is called mysqld.

/etc/init.d/mysql stop // to stop the service
/etc/init.d/mysql start // to start the service

To insure a good interaction between PHP5 et mysql :

apt-get install php5-mysql

PhpMyAdmin:
PhpMyAdmin is not mandatory but it's a great help to manage databases!

apt-get install phpmyadmin

To check that everything is functional, go to : http://localhost/phpmyadmin/
If you followed the previous steps, you should get the PhpMyAdmin main page, asking for a password.
This is the one you set previously with adminmysql user.

Everything should be functional, you manage your database with phpmyadmin and you put your files to /var/www.
You can of course change the root document in /etc/apache2/httpd.conf

Thursday 28 September 2006, 15:20

Mounting a NTFS partition on Debian

  • open a root terminal
  • get the device id to mount, mine is hda1
  • edit /etc/fstab
  • add the following line:
/dev/hda1       /mnt/ntfs       ntfs    rw,users,umask=022 0    0

Monday 25 September 2006, 21:47

Pinnacle PCTV + remote control with LIRC

I write here the config cause I'm tired to spend more than 2 hours finding the good configuration on the net.

  • So install a TV player, i'm using TVTIME.
  • now install lirc: apt-get install lirc-x (some other packages are suggested, install them or no...)
  • the fucking and incomplete doc is there: /usr/share/doc/lirc-x/
  • now you need to find the right remote config in /usr/share/doc/lirc-x/remotes and then copy it to /etc/lirc/:
cp /usr/share/doc/lirc-x/remotes/pinnacle_systems/lircd.conf.pctv /etc/lirc/lircd.conf
  • I don't need lircdm.conf
  • edit /etc/lirc/hardware.conf and fill with the following content:
# /etc/lirc/hardware.conf
#
# Arguments which will be used when launching lircd
LIRCD_ARGS=""

#Don't start lircmd even if there seems to be a good config file
#START_LIRCMD=false

#Try to load appropriate kernel modules
LOAD_MODULES=true

# Run "lircd --driver=help" for a list of supported drivers.
DRIVER="pinsys"
# If DEVICE is set to /dev/lirc and devfs is in use /dev/lirc/0 will be
# automatically used instead
DEVICE="/dev/ttyS0"
MODULES=""
  • copy .lircrc in /root/ and /home/your_usr_name. This file contains all action attributed to your remote button
  • if you let the config like this you'll have to start lircd and irexec before every use of the remote. It seems that there a better solution. update-rc.d lirc defaults to load the deamon automaticaly at startup. Then go to Desktop>Preferences>Sessions>Startup Program add irexec to thelist of program to be launch at startup

Sunday 24 September 2006, 20:58

WMV sous Debian

Lire une vidéo WMV (Windows Media Audio and Video) sous Debian.
Installer pitfdll, un plugin qui permet d'utiliser des codecs au format natif Windows (.dll).

apt-get install gstreamer0.10-pitfdll

Ensuite, pour Totem, copier les codecs depuis mplayerhq.hu (choisir essential codec package) dans le répertoire ~/.gnome2/totem-addons.

Il s'agit d'une solution non-intrusive - les codecs non-libres sont copiés dans le répertoire de l'utilisateur.

Monday 21 August 2006, 11:36

Unpacking SIS files

Here is how to unsis a .sis file:

[view]

Monday 21 August 2006, 11:31

Modifying PyS60 application information

When making SIS file you might need to modify the application's information like the version number...

[view]

< 1 2 3 4 5 6 7 8 >