Tuesday, August 7, 2007

Fedora as Web Server Using Apache, PHP and MySQL

This how-to will help you to install and configure apache, php and mysql under fedora.

This how-to will only show you how to enable those 3 programs. Further settings (such as hostname, mysql database, etc) will not being covered here.

OS used : Fedora Core 6
Apache : Apache 2.2.4
PHP : PHP 5.1.6
MySQL : MySQL 5.0.27

All the above can be installed by yum, but i highly recommended to install it from rpm files available to be downloaded at :

Fedora 6 RPMS

Notes :
Download ALL RPM files with this text in front of file name :
- httpd.....
- php....
- mysql....

put all downloaded files in one folder.
to install it, just issue :

rpm -ivh httpd*
rpm -ivh php*
rpm -ivh mysql*

after you have install all, you need to configure php so that it will be able to connect to mysql.

do the following :

vi /etc/php.ini

add the following line to php.ini under "Dynamic Extension" Section:

extension=mysql.so
extension-mysqli.so

make sure the extension directory under "Paths and Directories" is as follow :

extension_dir = "/usr/lib/php/modules"

Save php.ini file and issue the following command :

vi /etc/httpd/conf/httpd.conf

locate "LoadModule" section and find the following line :

#LoadModule php5_module /usr/lib/php/modules/libphp5.so

clear the hash mark (#) so that it will be :

LoadModule php5_module /usr/lib/php/modules/libphp5.so


Now configure apache (httpd) and mysql to run at startup. Type the following :

chkconfig httpd on
chkconfig mysqld on

reboot your computer ...

Your web server is ready ...

Monday, July 23, 2007

Installing ALL MULTIMEDIA CODEC in Linux

At last ... now you can play most of multimedia format with no problem in Linux.

I'm using Fedora 7 (MoonShine) to do the steps below but you can apply it to any Linux Distro.
Note : YYYYMMDD = release date of the codecs for example : all-20061022.tar.bz2 was released October 22nd 2006. Change the YYYYMMDD in the command below with the date in file you downloaded.
  1. Download the codecs from here (approximately 13 MB)
  2. Launch your konsole > type su > enter > type your root password > enter
  3. Go to the directory where you have downloaded the codecs
  4. Un-tar the file by issuing tar -xzf all-YYYYMMDD.tar.bz2 command
  5. Go to all-YYYYMMDD directory by issuing cd /all-YYYYMMDD command
  6. Create two directory by issuing the following command
    • mkdir /usr/local/lib/codecs >
    • mkdir /usr/lib/win32
  7. Type cp * /usr/local/lib/codecs/
  8. Type chmod 755 /usr/local/lib/codecs/*
  9. Type cp /usr/local/lib/codecs/* /usr/lib/win32/
  10. Type reboot
You're done ... Enjoy Watching movie and listen to your favorite music.


Wednesday, July 18, 2007

How To Play MP3 and Multimedia files in Fedora

By default fedora series didn't include most of multimedia codec in the packages and this includes the famous MP3 format. This is quite annoying for most of Linux users.

To solve this, follow the steps below (using KDE):
  1. Configure your Fedora player
  • Go to K-Menu > Application > Add / Remove Software
  • If you're prompted for root password, enter your root password and press OK
  • In "Package Manager" window under "Browse" Tab choose "Application" at the left column and choose "Sound and Video" at the right column
  • Click the "Optional Package" button
  • Scroll down and mark the "xmms - [version number] - The X Multimedia System - A Media Player"
  • Click "Close" button
  • Click "Apply" button
  • On "Package Selection" window, click "Continue"
  • Click "Install Anyway" if there are any error messages
  • Click "OK" if the installation has been successfully completed.

2. Downloading and Installing Codec for MP3 Playback
  • Point your browser to CodecDownloads to download the mp3 codec. If you're using fedora core 6 and below, you can download the codec from GuruLabs (for core 5 and 6 user, use core 4 rpm, it will works)
  • Double click your just-downloaded file and enter your root password when asked then click OK
  • Click Apply
3. Setting XMMS as your default MP3 Player
  • Locate / browse one of your MP3 collection
  • Right Click the file > Click Properties
  • On the "File Properties" window, under "Open With" Tab, choose "Audio Player" or "XMMS"
  • If there is no "Audio Player" or "XMMS", click "Add" button and choose XMMS
  • Click "Close"
Voilaaa !!! now you can play your MP3 collection.


Please leave comment / your installation results / problem here.