Articles Under Construction

Here we put the articles we are working on until they're ready for publishing.

please don't edit this page, use the Parent feature to attaches pages to it.

All about Postfix

  1. Install Postfix
  2. Configure
  3. Test

Arabic file names under KDE and GNOME

Ok, This article needs to be cleaned and to be tested/verified.

احب ان اوضح فى البداية اننى لن اتطرق فى هذا المقال الى كيفية تثبيت الخطوط العربية على نظام اللينوكس كما لن اتطرق الى كيفية تمكين كل من GNOME و KDE من عرض المحتوى العربى كل الخطوات التالية تتطلب ان تكون مستخدم جذرى "root" لقد قمت بتجربة هذه الخطوات على نظام Mandrake 9.0 و باستخدام خط Tahoma من نسخة ويندوز 2000 الاصلية الخاصة بى

ينبغى اولا تعريف النظام باننا نريد التعامل مع اسماء الملفات الموجوده على اجزاء القرص الصلب الخاص بنظام تشغيل الويندوز باستخدام اليونيكود

نقوم بفتح الملف /etc/fstab

علينا فقط تعديل السطور الخاصة باقسام ويندوز فمثلا الملف الحاص بى كالتالى

/dev/hda12 / ext3 defaults 1 1
/dev/hda9 /boot ext3 defaults 1 2
none /dev/pts devpts mode=0620 0 0
/dev/hda10 /home ext3 defaults 1 2
/dev/cdrom /mnt/cdrom auto users,ro,noauto,exec 0 0
/dev/sr0 /mnt/cdrom2 auto users,noauto,ro,exec 0 0
/dev/fd0 /mnt/floppy vfat umask=0,sync,nosuid,noauto,user,nodev,unhide 0 0
/dev/hda1 /mnt/win_c vfat defaults 0 0
/dev/hda5 /mnt/win_d vfat defaults 0 0
/dev/hda6 /mnt/win_e vfat defaults 0 0
/dev/hda7 /mnt/win_f vfat defaults 0 0
/dev/hda8 /mnt/win_g vfat defaults 0 0
none /proc proc defaults 0 0
/dev/hda11 swap swap defaults 0 0

بالتاكيد سيختلف الملف الخاص بك هن هذا

سنقوم بالتعديل فى السطور اللتى تحتوى على vfat فى الخانة الثالثة

سنقوم باضافة iocharset=utf8 الى الخانة الرابعة فى هذه الاسطر لتصبح كالتالى

dev/hda12 / ext3 defaults 1 1
/dev/hda9 /boot ext3 defaults 1 2
none /dev/pts devpts mode=0620 0 0
/dev/hda10 /home ext3 defaults 1 2
/dev/cdrom /mnt/cdrom auto users,ro,noauto,exec 0 0
/dev/sr0 /mnt/cdrom2 auto users,noauto,ro,exec 0 0
/dev/fd0 /mnt/floppy vfat umask=0,sync,nosuid,noauto,user,nodev,unhide 0 0
/dev/hda1 /mnt/win_c vfat defaults,iocharset=utf8 0 0
/dev/hda5 /mnt/win_d vfat defaults,iocharset=utf8 0 0
/dev/hda6 /mnt/win_e vfat defaults,iocharset=utf8 0 0
/dev/hda7 /mnt/win_f vfat defaults,iocharset=utf8 0 0
/dev/hda8 /mnt/win_g vfat defaults,iocharset=utf8 0 0
none /proc proc defaults 0 0
/dev/hda11 swap swap defaults 0 0

الان يتبقى خطوتين

اولا: اعداد GNOME2

قم بفتح الملف /etc/profile و اضافة السطر التالى اليه:

export CHARSET=ISO_8859-6
export G_BROKEN_FILENAMES=1

اذا كنت من مستخدمى نظام RedHat 8.0 فيمكنك اغفال باقى الخطوات

ثانيا: اعداد KDE3

اذا كنت تستخدم نظام Mandrake قم بتثبيت حزمة RPM المسماه locales-ar عن طريق الامر التالى:

urpmi locales-ar

فم باضافة السطر التالى الى الملف /etc/profile

export LC_ALL=en_US.UTF-8

الان قم باعادى تشغيل اللينوكس

مبروك عليك الاسماء العربية :-)

فى الواقع الطريقة الاصح هى عمل ملف فى /etc/profile.d نسمية مثلا ar.sh ونقوم باعطائه التراخيص 755 و نضع فية السطرين كالتالى:

touch /etc/profile.d/ar.sh
echo "export G_BROKEN_FILENAMES=1" >> /etc/profile.d/ar.sh
echo "export CHARSET=ISO_8859-6" >> /etc/profile.d/ar.sh
echo "export LC_ALL=en_US.UTF-8" >> /etc/profile.d/ar.sh
chmod 755 /etc/profile.d/ar.sh

arabic plural forms for gettext

when translating software using gettext one has to pay attention to plurals, languages differ in how they treat singular and plural forms, gettext tries to be as accomodating as possible by allowing arbitirary rules for each language.

I suppose the rules of plural in arabic are well known enough and it is time we came up with a standard gettext expression to put as a header in all our po files.

different classes of numbers in arabic

  1. 0
  2. 1
  3. 2
  4. 3-10 + (100^n) : n >= 0
  5. 11-99 + (100^n) : n >= 0 or 1,2 + (100^n) : n >= 1
  6. 100^n : n >= 1

so how to express this lovely pattern in the C like expression needed for PO files?


nplurals = 6;
plural = n == 0 ? 0 :
         n == 1 ? 1 :

         n == 2 ? 2 :
         (n % 100 >= 3 && n % 100 <= 10) ? 3 :
         (n % 100 >= 11 && n % 100 <= 99) || (n % 100 == 1) || (n % 100 ==2) ? 4 :
         5;

pretty isn't it? time to review the whole language me thinks, anyways.

if you're using kbabel

  • go to settings -> configure kbabel
  • and make Number of singluar/plural forms equal 5
  • then in the GNU plural form header add the expression above

if you're not using kbabel you can edit the header manualy, open the po file in a text editor, find the plural form line and change it to look like this


"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : (n % 100 >=3 && n % 100 <=10) ? 3 : (n % 100 >=11 && n % 100 <=99) || (n % 100==1) || (n % 100==2) ? 4 : 5;\n"

example

  • 0 -> لا تعليقات
  • 1 -> تعليق واحد
  • 2 -> تعليقان
  • 3 -> تعليقات
  • 4 -> تعليقا
  • 5 -> ???

The cases are actually five, as zero and three-to-nine use the same form of plural, but since لا تعليقات has more meaning in Arabic than صفر تعليقات, I thought they could be separated.

Asterisk A Closer Look

Asterisk A Closer Look By DarKnesS_WolF AKA Sherif Nagy And Others " Hope "

This Article Licensed Under GFDL

Okay i'll try to make this mini-howto as simple as possible, It will be like a kick start for anyone interested in Asterisk

We will start by downloading and compiling asterisk:-

Downloading:

You can get asterisk binaries from your GNU/Linux distribution repository or from Asterisk Official website

  • we will need Asterisk-X.X.XX the main asterisk package
  • we will need Asterisk-Addon-X.X.XXwhich has some adds on for asterisk
  • we will need Asterisk-sounds-X.X.XXwhich has some asterisk sounds we can use
  • we will need Zaptel-X.X.XX which has the zap card drivers and modules which we will use for the analog interface and for the timing in asterisk
  • we will need libpri-X.X.XX which also good to be in hand for supporting T1/E1/J1 interfaces (optional)


Compiling:

Before we start we need to install some requirements I always install the headers and the development packages for mysql , postgresql and openssl in case I wanted to use any of this features with asterisk later on also asterisk require the kernel source, kernel headers, bison and libnewt then we will start by extracting and compiling:

libpri-X.X.XX

tar zxvf libpri-X.X.XX.tar.gz
cd libpri-X.X.XX
make
su -
make install

zaptel-X.X.XX

tar zxvf zaptel-X.X.XX
cd zaptel-X.X.XX
make
su -
make install

asterisk package

tar zxvf asterisk-x.x.xx.tar.gz
cd asterisk-x.x.xx
make
su -
make install
make samples 

asterisk-addon package

tar zxvf asterisk-addon-X.X.XX.tar.gz
cd asterisk-addon-X.X.XX
make
su -
make install

asterisk sounds

tar zxvf asterisk-sound-X.X.XX.tar.gz
cd asterisk-sound-X.X.XX
su -
make install
and You are done with asterisk compiling..
now let us talk about some basics
  1. asterisk configurations exists at /etc/asterisk/
  2. asterisk sounds exists at /var/lib/asterisk/sounds
  3. asterisk music on hold files at /var/lib/asterisk/mohmp3/
  4. asterisk voicemail files and others at /var/spool/asterisk/
  5. asterisk applications, codecs and channels at /usr/lib/asterisk/modules/

important files:-

  1. sip.conf it contain the sip server options , sip registrar and the sip users
  2. iax.conf it contain the iax server options , iax registrar and the iax users
  3. extensions.conf it contain the dialplain which we call asterisk heart
  4. modules.conf it contain which module not to be loaded or loaded
  5. voicmail.conf it contain the voicemail options
  6. logger.conf it contain the logger options
okay now let start with a very basic scenario .. you want to have 2 sip clients can reach each others so we need to have 2 sip accounts and a very basic dialplan. so we can move the sip.conf that already created from make samples and we keep it as a reference and we start or simple one from scratch

[general]              ; here we will define the general options 

bindaddr = 0.0.0.0     ; so the SIP server will be listing on all the interfaces
bindport = 5060        ; default SIP port

and now we will need to create 2 SIP account for our softphones
[1001]                             ; the peer/user
username=1001			   ; the username for authentication
secret=123			   ; the password 
type=friend			   ; what kind of user is he ? peer,user,friend
context=test			   ; context is one of the key words it's where the incoming and outgoing calls from this user should go
host=dynamic 			   ; if the user don't have static IP address or he moving alot with his softphone
nat=yes 			   ; if user behind the NAT or no
canreinvite=no 			   ; this is important it define if the media path for the call should be directed between the end points or it should go via the asterisk server 
callerid=sherif nagy <1001> 	   ; this will override the caller ID that is sent out from the softphone
and almost the same configurations will be for the 2nd user
[1002]
username=1002
secret=123 
type=friend
context=test
host=dynamic
nat=yes
canreinvite=no
callerid=DarKnesS_WolF <1002>
now the heart of this call the dialplan in extensions.conf

[general]

[test]                          ; the test context

exten => 1001,1,Dial(SIP/1001) 	; when someone dial 1001 should dial 1001 using SIP protocol
exten => 1002,2,Dial(SIP/1002) 	; when someone dial 1002 should dial 1002 using SIP protocol 
now the easy part the softphone ... there is lots of softphones for both GNU/Linux and windows you can use xlite and adjust the username / authentication for each users the domain / sip server is the asterisk IP server and the password is the user password

Directory Search

Directory it's a very useful asterisk application, most of time when you call a company and don't know the extension number for the person you are looking for you have to wait and get help from the operator to reach this person. but if this company has a company directory in there asterisk PBX this will make your life much more easy ..

In more simple words, the directory is a extension numbers searching tool. so you press like * and you go the directory and then you will have to enter the 1st 3 letters of the first or last name of the person you are looking for, and this application will take care of looking UP the extension number for you

Okay so let us get technical a little bit more, how the directory application works. it gets all the information needed from the last place you will ever think about ! the voicemail.conf . Ok how does the voicemail.conf look like ?

NOTE This is only for the directory sittings you can have more options like attache your voice message to email and so on


[general]			;where the general configurations belongs

[context]			;context name
extension number => password,user name
where
  • extension number ; user phone number
  • password ; the voicemail password
  • username ; the user real email
so in our example the voicemail.conf will look like this:-

[general]

[test]
1001 => 0007,sherif nagy
then how the directory command look like ?

Directory(vm-context[|dial-context[|options]])
where
  • directory ; the directory command
  • vm-context ; the voicemail context we want to search into
  • dial-context ; " i never used it " the extension context " dialplan" the command will search into after the user search
  • options ; the "f" option it force the directory to look for the person FIRST name, by default the command search but the person last name
and we will add a directory extension in the dialplan "extensions.conf file"
exten => *,1,Directory(test|f)		; * the number/key to reach the directory , test is the voicemail context , and it'll use looking by first name

so now someone will be calling want to get to me but he don't know my extension number so he will dial * then he will get a message saying Something like this : " welcome to the directory please enter the 1st three letters of the person first name.

  • the caller will enter "s-h-e" from phone keypad. and now there is 2 alternatives:-
    • the caller will listen to s-h-e-r-i-f-space-n-a-g-y every letter in the name is separated , this will be with the asterisk default voice system.
    • any asterisk user can record his name , busy , unavailable message using the asterisk voicemailmain application and in this case the caller will listen to sherif nagy with my voice that i record.
  • then after this asterisk will say something like " is that the person you are looking for ? if yes press 1 if no press * to find the next search results "

how dose the search work ?

each number in the phone keypad contain 3 letters so for example if your are looking for sherif you will type the 1st 3 letters which are "s-h-e" so you will click on 743 which can be any combination of PQES as 1st letter , GHI as 2nd letter and DEF as 3rd letter, so the directory will start to look using this input you may find P-H-F which a person you don't want so you click * , and so on until you find the person you are looking for.

i think that pretty much all about directory searching ..and we are done ;-) later on i hope this howto become more advanced but this is just a start

References

book page at opencd

The Cathedral and the Bazaar

This seminal text by Eric S. Raymond is a explains the fundamental dynamics of the open source approach. He used the story of the development process of the FetchMail e-mail program to illustrate the advantages of open source development (Bazaar model). Special emphasis is given to Linux and its originator Linus Torvalds.

Free as in Freedom

This well-crafted book by Sam Williams is a biography of Richard M. Stallman, founder of the GNU project and programmer of legendary abilities. It makes clear the idealogical differences between the original Free Software movement and the more recent concept of Open Source.

Open Source Essays

A collection of 20 essays on the history of Free and Open Source software by various authors, including Larry Wall, Bruce Perens, Tim O'Reilly, Linus Torvalds, and Richard Stallman.


Ubuntu page @ opencd

Ubuntu Linux


Ubuntu Linux is a complete open source desktop operating system. The base system and all included software is available for free. Support is available from the community or by professional support providers. "Ubuntu" is an ancient African word, meaning "humanity to others". Ubuntu also means "I am what I am because of who we all are". The Ubuntu Linux distribution brings the spirit of Ubuntu to the software world.

TheOpenCD and Ubuntu have teamed up to support each other's development and distribution. The recently released LiveCD version of Ubuntu contains a slimmed down version of TheOpenCD prepared by our team. With the LiveCD you can run Ubuntu directly from your CD drive without installing anything on your system. If you are ready to leave the frustrations and worries of Windows behind, we recommend the Ubuntu LiveCD as the next step on your journey to software freedom.

A brief tour


The standard user interface is based around the Gnome desktop environment. When you start the system for the first time you are greeted by a desktop that is unusually clean and tidy. No desktop icons by default! Even the recycling bin has been moved down to the taskbar. The default theme Human is designed to be easy on the eye. But Linux is inherently flexible; you can customise the look and behaviour of the desktop in a range of ways, from simply changing the default theme to selecting a different desktop environment altogether, such as KDE.

The Applications menu gives you access to a selection of useful programs, while the Computer menu contains system settings. Ubuntu includes more than 1,000 supported pieces of software, starting with the Linux kernel version 2.6 and Gnome 2.8, and covering every standard desktop application from word processing and spreadsheet applications to internet access applications, web server software, email software, programming languages and tools and of course several games. If you should require more software, simply use the Synaptic package management tool to download and install programs from the freely available software repository. The Universe repository features a further 10 000 applications from the venerable Debian project.

Changing the background of lilo boot loader

This article for Mandrake users.



when you boot your linux you see the following screen


So How do i change this boot screen?
There is many ways
You can install/make bootloader themes
but the easiest way it to just replace the current image with the one you want

open /usr/share/bootsplash/themes/Mandrakelinux/images/ folder

now u can see a collection of images
bootsplash-Sceen resolution.jpg
vt-Sceen resolution.jpg
silent-Sceen resolution.jpg

the default resolution for the bootloader screen is 800x600
so will will replace the 3 800x600 images

choose the image you want to use as your boot loader background
lets take this one http://wallpapers.neo5k.de/content/images/wallpapers/linux/linux-117-1024x768.jpg0
use gimp to resize this image (make it 800x600)
now name it "bootsplash-800x600.jpg"
put this image in /usr/share/bootsplash/themes/Mandrakelinux/images/ (you must be root)
you will be asked to replace the existing one, yes replace it

now goto start-->system-->configuration-->configure your computer
goto boot section --> select the graphical theme of the system while boot
you should be able to see your picture on the right panel
click on Ok button and then reboot your system
can u see your nice picture during the booting???????


Enjoy

Note: I didn't complete this article yet because I don't have enough experiance to complete it, If u can add more information please do

ChewingTeeth (2): Courier MTA

I had to install a mail server, to provide virtual hosting, pop and smtp with webmail.

Why did I choose courier ? Sure to let all of you follow my steps and chew your brains.

Courier is hell, That's why you'll end up chewing your brain, perhaps your whole body and other people bodies too!

I'm talking about Debian stable aka woody.

1st, Don't apt-get install the binary debs.

apt-get source courier-mta

Because there is a unique feature in courier, It force you to use one of the freedoms enforced by the GPL, which is: The freedom to modify the source code!

courier authentication authdaemon and userdb.

courier mta, smtp, pop, imap.

squirrelmail

permit users to change their passwords.

ChewingTeeth (3): CVS

Outline:

  • Introduction:CVS is a version control system. It is used to record the history of your source files.Bugs can creep in when software is modified, and may not be detected until a long time after the modification is made. With CVS, you can retrieve old versions to find which change caused the bug.CVS can also help when a project is being worked on by multiple people, where overwriting each others changes is easy to do. CVS solves this problem by having each developer work in his/her own directory and then instructing CVS to merge the work when each developer is done.
  • CVS server setup
  • Creating a new repository.
  • overview of the CVS authentication stuff.
  • All users are mapped to 1 user.
  • pserver
  • over ssh
  • readers/writers
  • permissions on the directories.
  • permissions on the CVSROOT directory
  • co
  • commit
  • add
  • binary files
  • tags
  • update
  • remove
  • multiple users, restricting each to a directory
  • what's missing ?
  • References
  1. CVS Home
  2. Win CVS

Create Custom Form with Drupal

While i am searching in Drupal Forums about creating a Recruitment Module to add it to a site i found this discussion, i found it very usefull, you can create any type of forums using flexinode. Have a nice Drupal.

Cron Job

Cron is a tool that lets you specify jobs (could be command or scripts or whatever you like) in the file /etc/crontab these commands will then be executed according to a particular schedule (for instance every Wednesday at 3:00 do a fsck, or every day at 8:00 play alarm.au, or even every 1st of Jan say happy new year).

usually your crontab file will look like this:-
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/
  1. run-parts 01 * * * * root run-parts /etc/cron.hourly 02 4 * * * root run-parts /etc/cron.daily 22 4 * * 0 root run-parts /etc/cron.weekly 42 4 1 * * root run-parts /etc/cron.monthly

the first few lines are environment variables and explain themselves the run-parts is the important one its obvious here that my system has four separate tables for hourly, daily, weekly and monthly jobs

Now let us see what is the run-parts

  • The numbers in the beginning stand for :-
  • minute
  • hour
  • dayofmonth
  • month
  • dayofweek
  • then comes the user that will be used to run these jobs.
  • Then the last field is the job (run-parts is a small tool that runs scripts by guessing which interpreter to use, so run-parts foo is basically equivalent to bash foo, or python foo or whatever).

lets us notice :-

  • The hourly jobs are executed on the first minute of every hour in every day in every month (could be fetchmail or sendmail etc.)
  • The daily jobs are executed on the second minute of the fourth hour of every day in every month (a fortune maybe or a some check on your logs)
  • The monthly jobs are executed on the 22ND minute of the 4Th hour of anyday in anymonth that is a Sunday(thats what the last 0 stands for, and this could be a fsck or a cleanup of your tmp dirs)
  • The monthly jobs are executed on the 42ND minute of the 4Th hour of the first day of any month (a backup to your /etc maybe)

The happy new year setting will look like this:-
01 0 1 1 * alaa echo 'happy new year'
02 0 1 1 * alaa mail -s 'happy new year' friends &lt; greetings.txt

Thats Will Do Two Things:-

  1. on the first minute at midnight on the first of Jan write happy new year on the console.
  2. on the 2ND minute of the same date send an email to all friends with

the subject 'happy new year' and have the content of greetings.txt as the message body.

however cron is of limited use to your usual home user since it assumes your pc is on all the time so if I don't open my pc on 1st of Jan until the morning (which is probably what will happen) my friends will not get a message from me and my computer will not greet me thus ruining the whole year from day one.

a tool that would be more useful is anacron, it doesn't assume your computer will be on all the time but rather you have to describe a frequency for this particular job (like I want this done once a month and that done once a year). however anacron is a totally different story.

both cron and anacron are useful if you like your command/script to run only once (not periodically) in this case you use the tool at

read the cron and crontab man pages:-

  • man cron
  • man crontab
  • man 5 crontab

you may want to check the man pages for anacron and at too your GNU/Linux system comes with a whole lot of docs and manuals try to read as many of them as you can.

DNS for LAN

i've had this in mind for a very long time and finally i could do it yesterday
in the windows world (where i used to live before) you could easily with a couple of mouse clicks get a DNS and a DHCP servers running on your lan up and running.
why would you do that? because you would like to have workstations resolving each other's IPs without using the stupid netbios over tcpip and in linux you would need that defenitley to be able to resolve names without doing it by hand in the /etc/hosts file.
let's start . . .
first here is the setup i have
i have a server SERVER (192.168.0.2) workstations STATION1-3 (192.168.0.1-3) the DSLrouter (192.168.0.1)
i want the stations to get dynamic ips from the server through DHCPD and update their records in the DNS server
to do this you'll need to :

  • install BIND9.x (named) DHCPD3.x
  • configure DHCPD (/etc/dhcpd.conf)
  • configure NAMED (/etc/named.conf)
  • create zone files
  • start the services and monitor /var/log/messages for any errors and fix them

dhcpd.conf


# /etc/dhcpd.conf
#
# Global Settings
#

# Turn on Dynamic DNS:
ddns-update-style interim;
ddns-updates on;

# Don't allow clients to update DNS, make the server do it
# based on the hostname passed by the DHCP client:
deny client-updates;
allow unknown-clients;

#
# 192.168.0.0/255.255.255.0 Scope Settings
#
subnet 192.168.0.0 netmask 255.255.255.0 {

        # Range of DHCP assigned addresses for this scope
        range                           192.168.0.3 192.168.0.6;
        # 1 day
        default-lease-time              86400;
        # 2 days
        max-lease-time                  172800;

        # Configure the client's default Gateway:
        option subnet-mask              255.255.255.0;
        option broadcast-address        192.168.0.255;
        option routers                  192.168.0.2;

        # Configure the client's DNS settings:
        option domain-name              "lab.local";
        option domain-name-servers      192.168.0.2;

        # If you want the client to be configured to also use
        # a WINS server:
        option netbios-name-servers     192.168.0.2;
        option netbios-node-type        8;

}

named.conf


## /etc/named.conf
options {

        directory "/var/named";
};

controls {
        inet 127.0.0.1 allow { localhost; } keys { rndckey; };

};
zone "." IN {
        type hint;
        file "named.ca";
};

zone "localhost" IN {

        type master;
        file "localhost.zone";
        allow-update { none; };
};

zone "0.0.127.in-addr.arpa" IN {
        type master;
        file "named.local";
        allow-update { none; };
};

zone "lab.local" IN {
        type master;
        file "lab.local";
        allow-update { localhost; };
};

zone "0.168.192.in-addr.arpa" IN {
        type master;
        file "192.168.0.rev";
        allow-update { localhost; };
};

include "/etc/rndc.key";


i won't go into details of creating the zone files cause that's the most easy part or maybe someone would update the article and add it.
now it should be working
note : FC3 users or any other SELINUX enabled distro users must modify the selinux security policy to allow named to overwrite the zone files (in FC3 is done using the security-level tool)
hope it was helpful to any of you
references http://voidmain.kicks-ass.net/redhat/redhat_9_dhcp_dynamic_dns.html .. http://www.csd.uwo.ca/staff/magi/doc/bind9/Bv9ARM.html

Drupal vs JBoss Portal

When i saw the JBoss Portal 2.0 i thought about Drupal. why i use Drupal instead of Jboss portal, i can see the difference between portal and CMS but i found many features in JBoss Portal similer to Drupal. i found this discussion about the difference between JBoss Portal and drupal:

  • A client -- or potential client - asked me the difference between Java and PHP which was not very hard to explain even to someone who is not technical. No problem there. The next question was a bit harder and I'm not sure I answered it well. read more..
  • Editing /etc/fstab

    Hello , Its Me Again

    The original author was thinking to write how-to mount windows partition but the idea gets more fat to get more than windows to be generally FSTAB

    On Mandrake and some other Distributions, The System mounts Windows Partitions Automatically,

    By Other Means, When You cd To /mnt/windows ... You'll Find Your Files there ...

    But on Fedora Core and some other Distributions, You Must mount your Windows Partitions each Time you Boot into your System ... Now, The Question is : How To Make it mounted Automaticlly each time your System Boots UP ?!

    Before Getting Into Details .. You'll Have to Know That ...

    When you Boot Your System .. The Kernel Looks for a File called /etc/fstab Which Describes all the File Systems that Should Be mounted and Then mounts Them All.

    This File not Only Includes Your root and swap Partitions but Also Includes any Extra Partitions you Want to mount .. Plus all Logical/Virtual File Systems like the /proc File System.

    Note: fstab Stands For "File System Table"

    Now, Inorder to Make The Partitions mounted Automaticlly Every Time Your System Boots UP What You Need is to Add Entries in Your /etc/fstab

    Here is The Format of The Entry ..

    device_name|mount_point|fstype|option|another_option|kaman_option|etc|dump_frequency|fsck_priority
    • device_name: It is the Name Of The Physical Device you Want To Mount ,It could be a network share ,NFS (Network File System ) *nix share or SMB (Server Message Block ) Window$ share ( Network resource ) ..
    • Ex. /dev/hda1 for physical devices and it is also local
    • Ex. files.eglug.org:/share/path NFS resource
    • Ex. //ms.Misr-soft/share-name SMB resource
    • mount_point: It is the Mount Point Where The File System(Partition) will be Mounted .. Ex. mnt/win_c
    • fstype: It is the Type Of the File System of the Partition that Will Be Mounted .. Ex. vfat, ext3 , nfs , smbfs , ntfs and swap

    Now, The Common Options Are:

    • user: It Makes the Partition Mountable by any user, but then only that user can unmount it. (For Sure CDROM Drives must have this Option)
    • users: It Makes the Partition Mountable by any user, and any user can unmount it.
    • noexec: No Executable Files Allowed (You Should Use this with Windows Partitions or Else All the Files Will be Considered Executables)
    • ro: Read Only
    • rw: Read/Write
    • noauto: Don't mount this at Boot Time (You May be Wondering What its doing in fstab if it is Not Going to Be mounted at Boot Time, this is Used to Simplify mounting Removable Media like CDROMS and FLOPPIES)
    • uid: Sets Default User id (All Files on your Partition Will be Owned by this User)
    • gid: Sets Default Groups id (All Files will be Owned by this Group)
    • sync: Always Sync File System (Don't Cache Content .. Use this with Floppies)
    • dump_frequency: Is Used to Automatically Backup Files (Only Useful For ext File System)
    • fsck_priority: Is Used to Determine The Order of Checking File Systems when Doing a System Wide fsck at Boot Time, a Value of Zero will Tell the Kernel Never to Check This File System (This is How it Should be For Most Windows Partitions). The two digits allow for parallel checks when you have two different drives, thus speeding up boottime checks.

    Note: fsck Stands For File System Check and it is used to Check and Repair a Linux File System

    Now Lets Take a Look at My /etc/fstab

    /dev/hda2	/		ext3	defaults				0	1
    /dev/hda6	/home		ext3	defaults				0	2
    /dev/cdrom	/mnt/cdrom	iso9660	noauto,user,noexec,ro,uid=501,gid=22	0	0
    /dev/cdrom1	/mnt/cdrw	iso9660	noauto,user,noexec,ro,uid=501,gid=28	0 	0
    /dev/fd0	/mnt/floppy 	vfat 	user,sync,noauto			0 	0
    /dev/hda1	/mnt/win_c	vfat	noexec,rw,uid=501,gid=6			0 	0
    /dev/hda5	/mnt/win_d	vfat	noexec,rw,uid=501,gid=6			0 	0
    none 		/proc 		proc 	defaults 				0 	0
    /dev/hda3 	swap 		swap 	defaults 				0 	0
    /dev/hdb2       /mnt/edge       reiser4 defaults                                1       1
    

    OK, So What we Have Here Is :

    • A root Partition on /dev/hda2 .. Its File System is ext3 ( second partition on the primary master drive ) .. Options are Set to defaults and it Should be the First Partition to be Checked by fsck.
    • A reiser4 partition /dev/hdb2 ( second partiton on the primary slave drive ) will be checked at the same time as the previous partition (parallel).
    • Then on /dev/hda6 Lies my /home Partition, Same as the root Partition but Should be Checked by fsck after the root Partition.
    • The /dev/cdrom Has my CDROM Drive, Its mounted to /mnt/cdrom, File Type is iso9660 (DON'T use auto in fstab) .. And the Options Are :
    • noauto: Don't mount at Boot Time since the Drive May be Empty and Media may Change.
    • user: File System is User mountable (This is Important Since its Not mounted on Boot Time, and Users have to be Able to mount their CDROMS).
    • noexec: No Executables Allowed.
    • ro: Read Only File System
    • uid=501: Default User is the User with id 501 (Thats Me)
    • gid=22: Default Group is the Group with id 22 (Thats the CDROM) And no Backups or File Checking is Needed.

    The Entry for the CDRW Drive is Exactly the Same As for the CDROM, You Don't Need to Make it read/write Since Writing to the CDR Media is Done While the Media is unmounted.

    The Benefit of having a CDROM Entry in Your fstab will be Revealed Now :

    Instead of Running :

    mount -t iso9660 /dev/cdrom /mnt/cdrom -o noauto,user,noexec,ro,uid=501,gid=22
    

    Simply, You Can Just Run :

    mount /mnt/cdrom
    

    OR You Can Use :

    mount /dev/cdrom
    
    • The Windows Partitions /dev/hda1 and /dev/hda5 are mounted at Boot Time to /mnt/win_c and /mnt/win_d .. They are vfat File Systems (Thats FAT32, FAT16 is simply called FAT), Their Options are:
    • noexcutable, read/write File System and a Certain user/group Own the Files on those Partitions.
    • The proc File System Being a Virtual file System has a Device none, It is mounted to /proc and the File System Type is proc.
    • Finlay the swap Partition is on /dev/hda3, mount Point for swap Partitions is swap (Notice NOT /swap) and the File System Type is of Course swap.it is not accessible by anyuser except the kernel .

    As you Can See you Don't Really Need to Tweak All Options .. A Line that Says

    /dev/hda5	/mnt/win_d	vfat
    

    Is Enough to mount your Windows Partition.

    some distributions like red-hat/fedora could not mount NTFS file system automatically like the vfat due to patent promise or ,license conflicts so the decide to remove the NTFS.

    but you still need your ntfs file system .so open source people generously found the NTFS-Linux so you need to install the rpm which is provided to your kernel . then change the vfat in file system to ntfs .

    Network Resource Mounting

    As FSTAB file describes all the File Systems that Should Be mounted locally .it may be also mount network resource on boot .

    • NFS (Network File System) *nix share
      hostname:/path/to/share  /mount/point     nfs  defaults   0   0
      

      the defaults may be changed with many other option as i remember some of them

      • ro: read only
      • rw: read write
      • __intr_ : allow to kill the process of request if the server is not accessible
      • nointr: killing the process or interrupt is not allowed it the server is not reachable
      • soft : if the process fails it will give a error message
      • hard : if the process fails it will block that tries to access an unreachable resource
      • rsize : rsize=8192
      • wsize : wsize=8192 this will enhance the mounting and the process of transactions,speed up NFS throughput . so the entry in fstab could be
        192.168.0.10:/home/conceptor/exports /mnt/mounted nfs defaults,ro,rsize=8192,wsize=8192,soft
        
        • SMB (Server Message Block )

        the most linux boxes could mount the M$ share resources automatically without any problems

        the entry will looks like

        //192.168.0.1/myshare-name   /mount/point  defaults 0 0
        

        the options is diffrent from nfs the could be

        • __username=x : the MS share is based on usernames and password but nfs is based on hosts -hostnames or IPs- so you should type them
        • password=xx : actully many many people are doing the administrator password blank in M$ ,and linux accept the blank in this case.
        • uid = provid your id or gid

        so the entry will be something like

        //hostname/files   /mount/point   defaults,username=diaa,password=eglug,uid=514 0 0 
        

        This Article is Originally Written by Alaa and re-organized by CVirus,and many contributers

    Emacs tips

    • Emacs Wiki: http://www.emacswiki.org
    • examples of Major modes (C++ mode, erc, gnus, etc.).
    • examples of minor modes (spell checking mode).
    • CTRL c (written as C-c) for commands related to the mode u r in.
    • a very important command is CTRL g (C-g), to cancel any command u started writing in the emacs command line.
    • Emacs supports completion of other words in the buffer, using M-/ TAB
    • for changing the default color of emacs, download the color-theme package from the emacs wiki, gunzip it under the elisp/ directory (create it first), then open it using M-x color-theme-select and select a nicer theme.
    • if u want to change the emacs defaults, u have to edit the .emacs file (create it first), and then u have to know some lisp syntax to be able to write ur own preferences.
    • also u can customize emacs through options ---> customize emacs.

    Emacs Command:

    ALT x (written as M-x) opens the emacs command.

    • ALT x then press TAB, to view all possible commands/functions (tab completion).
    • u type the command to enable/disable functions.
    • M-x eshell ---> opens emacs shell.
    • M-x term ---> opens bash.
    • u can press ESC then press x, instead of typing M-x.

    Editor related commands:

    CTRL x (written as C-x) for commands related to the editor.

    • C-x C-f ---> open file.
    • C-x C-s ---> save file.
    • C-x C-c ---> quit emacs.
    • C-x d ---> opens dired mode.

    Help Commands:

    CTRL h (written as C-h) for help commands, also u can access it through F1

    • C-h C-h ---> about help.
    • C-h b ---> key bindings.
    • C-h t ---> interactive tutorial.

    Text-editing Commands:

    • C-SPACE ---> set a mark.
      • type C-x C-x to switch between the set mark and the cursor (after C-SPACE).
    • C-w ---> cut.
    • M-w ---> copy.
    • C-y ---> yank/paste.
      • type M-y to browse through the "kill ring" (all what u have copied, cut, killed, selected in the clipboard), after C-y
    • C-k ---> deletes from the point of the cursor to the end of the line.
      • if u press C-k many times quickly, u can kill many lines and when u paste emacs paste them all not only the last line.
    • C-_ ---> undo (when undos end, start redoing).

    Multi windows:

    • C-x 2 ---> splits the window in focus horizontally.
    • C-x 3 ---> splits the window in focus vertically.
    • C-x o ---> switches focus to the next window.
    • C-x 0 ---> closes the window in focus.

    Major Modes:

    • tramp: ssh through emacs.
    • gnus: news reader and mail client.
    • w3m: web browser, supports tables and images.
    • latex: with the latex-preview minor mode, u can c the generated output of latex while u r writing.
    • psgml: validator editor of sgml, xml, html.
    • erc: irc client.
      • supports nick completion.

    Explain When and Why the kernel will need to be recompiled

    Immediately after installtion, you may encounter situations in which you are required to upgrade the system . Although the Linux kernel has seen many advances, it may not fulfill the needs of your system. for this reason, the kernel which is available at www.kernel.org is updated often.

    You may have several reasons to update the kernel on your system, including the following:

    • Stability : Although a released stable kernel is usually of high quality, many issues can still arise. This is why additional kernel releases are often more stable than the previous release
    • Hardware support : You Probably need to upgrade to a version 2.4.* kernel or higher like 2.6 in order to achieve support for many of the new hardware devices that are available today.
    • Hardware platforms : The newest processors often benefit from having the kernel optimized for their use. by providing an updated kernel, the system will be able to use the CPU more efficiently.
    • Package support : Some software packages don't run well or don't even run at all on older kernel versions. and these packages are often required to use the linux system.

    - Regardless of the reasons for upgrading the kernel, the installers should be competent at performing this task.

    GNU/Linux security model

    Each file has an owner and belongs to a group.

    Each running process has an owner and belongs to a group.

    Users may belong to multiple groups.

    at any session a user has an active group, and process she starts will inherit this active group.

    each user has a default active group.

    users may change the current active group using the commands newgrp and sg.

    this security model is sufficient for most needs because GNU/Linux tries to represent everything as a file.

    Each file has 3 sets of permissions that apply to different users, one set applies to the file owner, one applies to members of the file's group and the last set applies to anyone else.

    in case one needs more some kernel modules offer Access Control Lists which provide more fine grained control.

    Permission grid

    ReadWriteExecuteSetUIDSetGIDSticky
    fileCan readcan modifyCan executeexecuted as if ownerexecuted as if were in that groupno effect
    directorycan lscan make new files and delete filecan cd to directory and access its files and subdirectoriesno effectnew files get group & new dirs get setgidonly owners can delete files
    alphabetical chmod+r+w+xu+sg+so+t
    numerical chmod421400020001000

    GNU/Linux Vs. Microsoft

    Why Linux?

    1. Linux is based on a sharing concept, not based on selfishness.
    2. Linux respects your intelligence and encourages creativity.
    3. Linux adopts the concept of "Everyone can be a Leader" it has a good space for people's initiatives.
    4. Linux is one of the largest friendly communities, where programmers around the world that do not know each other can have a free speech common room.
    5. Linux creators do not suffer from human insecurity & lack of confidence, as it shows its real face & do not mind constructive criticize.
    6. Linux is like a close friend to you when you go to visit him you can act as if you are home; in your friend's house you can bring food, help in arranging the house, help him/her adding a new look to it etc... That is exactly what Linux allows you to do creating, developing, modifying, adding, rearranging, etc…
    7. Linux is proving a very important value; "Small melodies when gathered in harmony can create an outstanding piece of music".
    8. Linux has broken the misleading presumption of "To make sure you are not doing something wrong or destructive, u must be monitored by a higher authority".
    9. Linux is proving the widely approved concept in community development; "Community development based on grass root efforts is much more reliable than the services presented to the community by a big institution".
    10. Linux proves that there is always another alternative, there is always a way, there's hope worth the effort of creating a better tomorrow.

    Why Microsoft?

    Because Microsoft knows how to be a good politician:

    1. It knows how to have the highest number of votes even if doesn't have the highest recognition.
    2. It knows how to keep their market under control even if they have better competitors.
    3. It has the dare to pretend being the best and be very convincing while knowing their vices.
    4. It covers up on the flaws of its operating system.
    5. It presents misleading, inaccurate comparisons - claiming they're the best.

    Being the leader doesn't necessarily mean you're the best. I read a comment on the net about Microsoft that is very relevant to political life ;o)

    "Microsoft would rather be pirated than being free" …!!!

    greetz from planet haram "a graphical artist's guide to linux"

    the Graphical Artist Linux Guide

    "Greetz from Planet Haram" by Mohannad Faried and others yet to come

    Introduction "why am i doing this ?"

    ever since i started to tinker around with linux, it was very important for me to have a solid understanding about how do i go about doing the things i already do on windows, since my major is architecture, and a have this artistic streak "well i hope it is an artistic streak!", plus my freelance work as a graphical designer, with some occasional web designing, it was quite important to know the ropes on linux. right now i intend to share what i know with you! , you poor soul! :)

    structure of this document:

    • a quick intro to imaging
    • 1.Raster editing Applications.
    • -Applications
    • -icc profiles and color proofing "a primer"
    • 2.Vector editing Applications.
    • -SVG
    • -CAD Applications
    • 4.Animation
    • -applications
    • -plugin's
    • 3.3D modelling and rendering
    • -general mesh modelling
    • -specialized applications
    • -rendering engines
    • 4.DeskTop Publishing on linux
    • -DTP applications
    • -postscript
    • -Tex/Latex and friends.
    • -color managment "a bit more detail"
    • -printing on the desktop
    • -a bit more about printing
    • 5.web design (GFX point of view)
    • -gimp plugins
    • -web animation
    • 6.File formats

    How to disable annoying keys in X

    the idea is very simple, we find out what the keycode of the annoying key is, then we use xmodmap to remap it to a new harmless or useless meaning.

    you make a file called masalan ~/.xmodmap

    in ~/.xmodmap you need to make entries that look like this

    keycode 111 = XF86Excel
    

    on the left is the X specific keycode generated by this key, and on the right is the symbolic keyname X will assign to this keycode.

    you can find out the keycode by running xev

    xev catches any X events when its in focus and writes what happens on the terminal, put the focus on the xev window and press your key you'll see lines that look like

    1. xev
    KeyPress event, serial 28, synthetic NO, window 0x2a00001, root 0x71, subw 0x2a00002, time 74933419, (53,51), root:(57,68), state 0x0, keycode 111 (keysym 0xff61, Print), same_screen YES, XKeysymToKeycode returns keycode: 92 XLookupString gives 0 bytes: XmbLookupString gives 0 bytes: XFilterEvent returns: False KeyRelease event, serial 28, synthetic NO, window 0x2a00001, root 0x71, subw 0x2a00002, time 74933496, (53,51), root:(57,68), state 0x0, keycode 111 (keysym 0xff61, Print), same_screen YES, XKeysymToKeycode returns keycode: 92 XLookupString gives 0 bytes:

    the symbolic keynames are all mentioned in the file /usr/X11R6/lib/X11/XKeysymDB

    to completly disable a key use a keysym you're unlikely to ever need like the microsoft specific multimedia keys.

    you can use the same technique to modify your keyboard in anyway (disable annoying hindi numerals, stop caps lock etc).

    keycode 111 is the keycode of printscreen on my pc, the above line in ~/.xmodmap is enough to stop it

    when you're done editing ~/.xmodmap you need to run

    1. xmdomap ~/.xmodmap

    this loads the new keymap, if the behavior is right you want to configure your system so that it runs xmodmap everytime you run X (you figure out how).

    How to install Oracle 10g on Linux

    How to install Oracle 10g on Mandrake 10.1 Official

    1- Creating Oracle User Accounts

    To create the oracle account and groups, execute the following commands:

    su - root
    groupadd dba # group of users to be granted SYSDBA system privilege
    groupadd oinstall # group owner of Oracle files
    useradd -c "Oracle software owner" -g oinstall -G dba oracle

    2- Unzip the database by running this command:

    gunzip ship.db.lnx32.cpio.gz

    3- Uncompress the database by running this command:

    cpio -idmv < ship.db.lnx32.cpio

    In order to install oracle the system must have at least 512MB of RAM and 1GB of swap space or twice the size of RAM. And for systems with more than 2 GB of RAM, the swap space can be between one and two times the size of RAM.

    4- To check the size of physical memory, execute:

    grep MemTotal /proc/meminfo

    5- To check the size of swap space, execute:

    grep SwapTotal /proc/meminfo

    (OPTIONAL)

    You also can add temporary swap space to your system by creating a temporary swap file instead of using a raw device. Here is the procedure:

    su - root
    dd if=/dev/zero of=tmpswap bs=1k count=900000
    chmod 600 tmpswap
    mkswap tmpswap
    swapon tmpswap

    To disable the temporary swap space execute the following commands:

    su - root
    swapoff tmpswap
    rm tmpswap

    6- Check how much space is in the /tmp :

    According to Oracle's documentation, the Oracle Universal Installer (OUI) requires up to 400 MB of free space in the /tmp directory. But OUI checks if /tmp is only greater than 80 MB.

    To check the space in /tmp, run:

    df /tmp

    (OPTIONAL)

    If you do not have enough space in the /tmp filesystem, you can temporarily create a tmp directory in another filesystem. Here is how you can do this:

    su - root
    mkdir //tmp
    chown root.root //tmp
    chmod 1777 //tmp
    export TEMP=/ # used by Oracle
    export TMPDIR=/ # used by Linux programs like the linker "ld"

    When you are done with the Oracle installation, shutdown Oracle and remove the temporary /tmp directory:

    su - root
    rmdir //tmp
    unset TEMP
    unset TMPDIR

    7- Check for required RPMs

    rpm -q gcc make binutils setarch openmotif mandrakelinux-release

    This command queries the RPM database if these RPMs are installed or not (gcc, make, binutils, setarch, openmotif, mandrakelinux-release) If not so execute:

    urpmi gcc
    urpmi make
    urpmi binutils
    urpmi setarch
    urpmi openmotif
    urpmi mandrakelinux-release

    8- Make the OUI believe that its installing Oracle 10g on Redhat , because Mandrake is not supported by Oracle.

    You have to edit these 2 files ( /etc/redhat-release , /etc/mandrakelinux-release ) file on Mandrake to make Oracle10g believe it is running on RHELAS3. To change the /etc/redhat-release file, you can simply copy/paste the following commands:

    su - root
    cp /etc/redhat-release /etc/redhat-release.backup
    cat > /etc/redhat-release << EOF
    Red Hat Enterprise Linux AS release 3 (Taroon)
    EOF
    su - root
    cp /etc/mandrakelinux-release /etc/mandrakelinux-release.backup
    cat > /etc/mandrakelinux-release << EOF
    Red Hat Enterprise Linux AS release 3 (Taroon)
    EOF

    After you are done with the Oracle10g installation undo the changes you made to /etc/redhat-release:

    su - root
    cp /etc/redhat-release.backup /etc/redhat-release
    su - root
    cp /etc/mandrakelinux-release.backup /etc/mandrakelinux-release

    9- Check the kernel parameters

    To see all kernel parameters, execute:

    su - root
    sysctl -a

    For Oracle10g, the following kernel parameters have to be set to values greater than or equal to the recommended values which can be changed in the proc filesystem:

    shmmax  = 2147483648     (To verify, execute: cat /proc/sys/kernel/shmmax)
    shmmni = 4096 (To verify, execute: cat /proc/sys/kernel/shmmni)
    shmall = 2097152 (To verify, execute: cat /proc/sys/kernel/shmall)
    shmmin = 1 (To verify, execute: ipcs -lm |grep "min seg size")
    shmseg = 10 (It's hardcoded in the kernel - the default is much higher)
    semmsl = 250 (To verify, execute: cat /proc/sys/kernel/sem | awk '{print $1}')
    semmns = 32000 (To verify, execute: cat /proc/sys/kernel/sem | awk '{print $2}')
    semopm = 100 (To verify, execute: cat /proc/sys/kernel/sem | awk '{print $3}')
    semmni = 128 (To verify, execute: cat /proc/sys/kernel/sem | awk '{print $4}')
    file-max = 65536 (To verify, execute: cat /proc/sys/fs/file-max)
    ip_local_port_range = 1024 65000 (To verify, execute: cat /proc/sys/net/ipv4/ip_local_port_range)

    I added the following lines to the /etc/sysctl.conf file which is used during the boot process:

    kernel.shmmax=2147483648
    kernel.sem=250 32000 100 128
    fs.file-max=65536
    net.ipv4.ip_local_port_range=1024 65000

    Adding these lines to the /etc/sysctl.conf file will cause the system to change these kernel parameters after each boot using the /etc/rc.d/rc.sysinit script which is invoked by /etc/inittab. But in order that these new added lines or settings in /etc/sysctl.conf become effective immediately, execute the following command:

    su - root
    sysctl -p

    Explanation for Semaphores:

    Semaphores can best be described as counters which are used to provide synchronization between processes or between threads within a process for shared resources like shared memories. System V semaphores support semaphore sets where each one is a counting semaphore. So when an application requests semaphores, the kernel releases them in "sets". The number of semaphores per set can be defined through the kernel parameter SEMMSL.

    To see all semaphore settings, run:

    ipcs -ls

    The SEMMSL Parameter

    This parameter defines the maximum number of semaphores per semaphore set.

    Oracle recommends to set SEMMSL to the largest PROCESSES init.ora parameter of any database on the Linux system plus 10. Oracle also recommends to set SEMMSL to a minimum value of 100.

    The init.ora parameter PROCESSES specifies the maximum number of operating system processes that can be started by the Oracle instance. In a non MTS environment, Oracle spawns a system user process for each connection. This means that in such an environment the PROCESSES parameter defines the maximum number of simultaneous Oracle connections minus sum of all Oracle background processes. It can also be said that the PROCESSES value should never be greater than SEMMSL.

    The SEMMNI Parameter

    This parameter defines the maximum number of semaphore sets in the entire Linux system.

    Oracle recommends to set SEMMNI to a minimum value of 100.

    The SEMMNS Parameter

    This parameter defines the total number of semaphores (not semaphore set) in the entire Linux system. A semaphore set can have more than one semaphore, and according to the semget(2) man page, values greater than SEMMSL * SEMMNI makes it irrelevant.

    Setting it to a minimum value of 256 is for initial Oracle installation only. Oracle recommends to set SEMMNS to the sum of the PROCESSES parameter for each database on the system, adding the largest PROCESSES twice, and then adding 10 for each DB.

    The maximum number of semaphores that can be allocated on a Linux system will be the lesser of: SEMMNS or (SEMMSL * SEMMNI)

    Setting SEMMSL and SEMMNI to 100 makes sure that SEMMNS semaphores can be allocated as determined by the above calculation.

    The SEMOPM Parameter

    This parameter defines the maximum number of semaphore operations that can be performed per semop(2) system call.

    The semop(2) function provides the ability to do operations for multiple semaphores with one semop(2) system call. Since a semaphore set can have the maximum number of SEMMSL semaphores per semaphore set, it is often recommended to set SEMOPM equal to SEMMSL.

    Oracle recommends to set SEMOPM to a minimum value of 100.


    10- Setting semaphores

    First of all to avoid wasting your time if you want to undo the following settings take a backup for this file "sysctl.conf" by using this command:

    cp /etc/sysctl.conf /etc/sysctl.conf.backup

    Setting the Semaphore Kernel Parameters

    echo "kernel.sem=250 32000 100 128" >> /etc/sysctl.conf

    To make the change permanent, add or change the following line in the file /etc/sysctl.conf. This file is used during the boot process.

    Alternatively, you can use sysctl(8) to change it:

    sysctl -w kernel.sem="250 32000 100 128"

    To see the new updated semaphore settings, run:

    ipcs -ls

    11- Setting Shell Limits for the Oracle User (steps 12 & 13)

    If you just install a small test database, then you might be ok with the current settings (note that the limits very often vary). But for (larger) production databases, you should increase the following shell limits to the following values recommended by Oracle:

    nofile = 63536     (To verify, execute: ulimit -n)
    nproc = 16384 (To verify, execute: ulimit -u)

    The nofile option denotes the maximum number of open file descriptors, and nproc denotes the maximum number of processes available to a single user.

    To see all shell limits, execute:

    ulimit -a

    12- Setting the file handles

    The maximum number of file handles can be changed in the proc file system without reboot:

    su - root
    echo "63536" > /proc/sys/fs/file-max

    Alternatively, you can use sysctl(8) to change it:

    sysctl -w fs.file-max=63536

    To make the change permanent, add or change the following line in the file /etc/sysctl.conf. This file is used during the boot process.

    echo "fs.file-max=63536" >> /etc/sysctl.conf

    13- Setting the shell limits for the Oracle user

    Now login to the oracle account again since the changes will become effective for new login sessions only.

    $ su - oracle
    $ ulimit -n
    1024
    $

    To change this, you have to edit the file /etc/security/limits.conf as root and add the following lines, respectively:

    oracle           soft    nofile          4096
    oracle hard nofile 63536

    Now login to the oracle account again since the changes will become effective for new login sessions only.

    $ su - oracle
    $ ulimit -n
    4096
    $

    The default limit for oracle is now 4096 and the oracle user can increase the number of file handles up to 63536:

    $ su - oracle
    $ ulimit -n
    4096
    $ ulimit -n 63536
    $ ulimit -n
    63536
    $

    To make this change permanent, add "ulimit -n 63536" (for Bash) to the ~oracle/.bash_profile file which is the user startup file for the Bash shell on Mandrake Linux (to verify your shell run: echo $SHELL). To do this you could simply copy/paste the following commands for the oracle's Bash shell:

    su - oracle
    cat >> ~oracle/.bash_profile << EOF
    ulimit -n 63536
    EOF

    PAM modules are required for performing login

    This is the PAM module that will read the /etc/security/limits.conf file. You need to add the following entry to these files: (1) /etc/pam.d/system-auth (2) /etc/pam.d/sshd (3) /etc/pam.d/su (4) /etc/pam.d/login

    session     required      /lib/security/pam_limits.so

    14- Setting Limits for the Maximum Number of Processes for the Oracle User

    To see the current limit of the maximum number of processes for the oracle user, run:

    su - oracle
    ulimit -u

    Note that the ulimit options are different for other shells.

    To change the "soft" and "hard" limits for the maximum number of processes for the oracle user (as ROOT), add the following lines to the /etc/security/limits.conf file:

    oracle           soft    nproc          2047
    oracle hard nproc 16384

    To make this change permanent, add "ulimit -u 16384" (for Bash) to the ~oracle/.bash_profile file which is the user startup file for the Bash shell on Red Hat Linux (to verify your shell run: echo $SHELL). To do this you could simply copy/paste the following commands for the oracle's Bash shell:

    su - oracle
    cat >> ~oracle/.bash_profile << EOF
    ulimit -u 16384
    EOF

    15- Creating Oracle Directories

    For Oracle10g you only need to create the directory for $ORACLE_BASE:

    su - root
    mkdir -p /u01/app/oracle
    chown -R oracle.oinstall /u01

    16- Setting Oracle enviorments

    su - oracle
    export ORACLE_BASE=/u01/app/oracle
    export ORACLE_SID=orcl

    To have these environment variables set automatically each time you login as oracle, you can add these environment variables to the ~oracle/.bash_profile file which is the user startup file for the Bash shell on Red Hat Linux. To do this you could simply copy/paste the following commands to make these settings permanent for your oracle's Bash shell:

    su - oracle
    cat >> ~oracle/.bash_profile << EOF
    export ORACLE_BASE=/u01/app/oracle
    export ORACLE_SID=orcl
    EOF

    SID = "System Identifier" whicjh is the global databse name


    17- Before you execute runInstaller, make sure the Oracle environment variables are set. You can verify the settings by running the set command:

    su - oracle
    oracle$ set

    InstallFest Q and A

    Arabic version of the Q&A is located here

    InstallFest Q and A

    In order to have this event running smoothly we need as much information as we can get from the people involved and also to answer all questions that visitors my ask.

    What is an Installfest?

    Linux community common word for : "installation festival"; Linux user groups run this event to introduce foss and install gnu/linux on visitor's computers. Computer users are invited to bring their machines to have GNU/Linux installed on their machines. The idea is to ease migrating to Linux, which is initially installing and configuring it for the user's machine.

    What will happen in this Installfest?

    if you are visiting us alone (without your pc) you will find some people who use free software and they also have some experience in other OS,they will be pleased to explain it for you. But if you bring your pc and you need to install gnu/linux you're also welcome, just make one suitable partition with 5 GB free. or unallocated space. If you can not do this it's ok just defrag your harddisk or have at least one partition that has free space.

    I heard about the free thing! i think it will be mess? or it will be freak command line..

    The word free has nothing to do with the price .It means freedom. And about the freak command line, you will see some intresting window transparency and more cool applications, seems that you are outdated check.

    I have some knowledge can i help ?

    Sure! Add ur name on our volunteer list and you can go for the wiki to participate.

    Hey I had a Linux course but I feel Linux is not suitable for my desktop

    read the introductory pamphlets.

    I have GNU/Linux installed what to do ?

    We encourage everyone to bring a computer on which he can install Linux. Any distribution, any version. Several members often bring in CDs, so all you really need to do is bring in a computer. Some people bring spare monitors, keyboards, and mice as well as power cables and power strips, but we encourage everyone to bring their own, as sometimes there's still not enough to go around, even with the spares. The more experienced members are there to lend a hand with any questions which may arise.

    What to bring with me I am an M$ oriented class ?

    • defrag a partition at home, and maybe even resize it, to make room for another partition.
    • try to bring everything to make your computer work independently.
    • bring blank cds with you.
    • try to copy on your cds a gnu/linux distro.
    • wait for someone (installer to help you ).
    • After you have finished the installation, verify with the help of an installer, that the hardware in your machine has been configured properly: verify that you can listen to music, that the mouse functions, etc. The installer verifies that you have created at least one account in addition to "root".

    I need my old system can I use it for a while, I am a student and there are assignments that should be reported as .doc files?

    If you need only the other os for .doc file ,you can use Open Office. you can also use the old system through dual boot. Ask about this from the installer.

    If my GNU/Linux crashes for any reason ,who will help ? does the Linux system give some 'not responding' messages also or not?

    You are asking many questions. GNU/Linux is not related to any behavior of window$ . if there is any support needed just leave your message on the forum and you will find the reply. Anyone can ask anything without moderators verification . go for http://www.eglug.org

    Installing NetoDragon 56K modem (and other smartlink chipset modems)

    NetoDragon softmodems "56k voice modem" seems to be taking over the market from Motorola's SM56. Here is the installation guide:

    1. Go to http://www.smlink.com
    2. Download the latest Linux driver
    3. Assuming that you have downloaded the file to your Windows partiton do the following:
      cp /path/to/driver/tarball /wherever/you/want
      cd /wherever/you/wanted
      tar -zxvf slmodem-2.9.X.tar.gz
      cd slmodem-2.9.X
      make
      su
      make install
      modprobe slamr
      slmodemd -c=YOUR COUNTRY'S NAME &
      

      For the 2.6 kernels you must have the kernel source installed in /usr/src/linux If you are using mandrake do as root:

      urpmi kernel-source
      

      And Happy surfing

    Introduction to GNU/Linux for M$ Window$ users

    1 Introduction

    I will attempt to use a consistent layout for this document:

    NAMES OF PEOPLE AND PROGRAMS WILL BE IN NOUN STYLE LIKE THIS.

    'ARABISH1 WORDS WILL BE IN NOUN STYLE AND QUOTED LIKE THIS'

    file names and directories will be emphasized like this.

    Warning and Important notices will be emphasized and bold.

    commands entered by a normal user will be preceded by a dollar sign $.

    command entered by root will be preceded by a hash sign #.

    >any output the computer produces will be in typewriter style
    >preceded with arrows like this.

    any input or commands you should enter will be in typewriter style.

    ``quotes will look like this and will be followed by a reference pointer.''
    Most examples and commands are to be executed from the command prompt of the console or an X terminal, if your system automatically runs the X windows you have to open an X terminal2.

    You can skip the first section completely and jump to the practical problems and solutions, I intend to use heavy referencing to make it easier to jump from different locations in the document; a table of contents is inserted at the top of the document for your convenience.

    2 Conceptual Differences

    1 The Nature of LINUX

    You may have heard/read the names LINUX, GNU, GNU/LINUX, X WINDOWS, KDE, GNOME, RED HAT, MANDRAKE, distro and a lot of other names, in the beginning its not clear what they all mean.

    You probably already know that LINUX is free, but you know there are companies selling it, and then there is all this talk about the source, what does it all mean??.

    1.1 What is LINUX ?

    Strictly speaking LINUX is a an operating system kernel; a kernel is the part of the operating system that is responsible for the very basic operations of your system.

    ``The LINUX kernel acts as a mediator for your programs and your hardware. First, it does (or arranges for) the memory management for all of the running programs (processes), and makes sure that they all get a fair (or unfair, if you please) share of the processor's cycles. In addition, it provides a nice, fairly portable interface for programs to talk to your hardware.[1]''
    The LINUX kernel was first written by LINUS TORVALD when he was a student, it is now being developed by thousands of developers around the world.

    Mostly when people speak about LINUX they mean the GNU/LINUX operating system which is the OS that runs your computer. GNU stands for (GNU IS NOT UNIX) it is a free clone of the popular UNIX operating system.

    GNU was first written by RICHARD M STALLMAN the chairman of the Free Software Foundation http://www.fsf.org (FSF|), since the GNU system was still missing a kernel3, it was combined with the LINUX kernel to make the GNU/LINUX operating system.

    GNU are all the basic tools you use in maintaining your system, it also includes lots of applications, libraries and a compiler.

    1.2 What is a Distribution ?

    Distributions or distros are products made by companies to simplify the installation and configuration of a GNU/LINUX operating system, some of the most popular distro are RED HAT, MANDRAKE, SUSE and DEBIAN. They are all GNU/LINUX and so they're very much similar, most software you use under LINUX is being developed independently from these distributions so applications will look and feel the same no matter what distro you use. The distro however provides you with an easy install script and wizards to automate lots of the configuration tasks, it also provides lots of precompiled packages that you can use directly without having to configure and compile yourself. The companies that make these distros also provide technical support, manuals and other services for their customers.


    1.3 LINUX is Free ?!

    Yes LINUX is free, but its not necessarily free as in zero price 'MAGANY'4 it is free as in freedom '7OR' this means that you the user have certain freedoms that no one can take from you.

    ``* The freedom to run the program, for any purpose (freedom 0).
    * The freedom to study how the program works, and adapt it to your needs (freedom 1). Access to the source code is a precondition for this.
    * The freedom to redistribute copies so you can help your neighbor (freedom 2).
    * The freedom to improve the program, and release your improvements to the public, so that the whole community benefits. (freedom 3). Access to the source code is a precondition for this.[2]''
    This simply means that you have the right to make any number of copies of GNU/LINUX and distribute them in any way you like; even selling it. And it means that you have the right to change it in anyway you like and distribute your changes.

    This is not the way WINDOWS or any other commercial software is, with WINDOWS you have no legal right to make copies of it; you can't even install it on more than one computer even if its yours. And there is no way you can access the source code for WINDOWS or be able to modify it.

    If you manage to modify it you are not allowed to tell the world about it, even if your modification is an important bug fix or a new feature that MICROSOFT was never going to implement.

    1.4 LINUX is Open Sourced ?!

    As we mentioned in the previous section in order for GNU/LINUX to be free you the user must have access to the source code5. when the code of a piece of software is available to the public to study it is called open sourced.

    All free software is open sourced, but not all open sourced software is free, some programs may allow you access to the source code but you can't modify or distribute it as you please[3].

    1.5 LINUX is GPLed ?!

    The GPL[4] or the GNU GENERAL PUBLIC LICENSE is the most popular and strongest free software license, it is the GPL that ensures you have all the freedoms described in section 1.3, the GPL is a strong license because it is a copyleft license, copyleft (as opposed to copyright) means that if you distribute modified GPL software your modifications should be distributed under the GPL too, this ensures that no company can take a GPLed program and turn it into a secret closed one restricting its user's freedoms[5].

    MICROSOFT software is distributed under an END USER LEGAL AGREEMENT that is very restrictive, any breach of this agreement (like making a copy of WINDOWS for your friends) is considered a criminal act and puts you in the risk of heavy sentences.

    1.6 Who owns LINUX ?

    Free software has no owners, although the FSF holds the copyrights to the GNU system and LINUS holds the copyrights and trademarks to LINUX; this only means that no one can go and make another product and call it LINUX or GNU and that no one else can claim they were the first to write LINUX.

    Not even LINUS or the FSF can restrict your freedoms to use and modify the GNU/LINUX system.

    1.7 We've always copied WINDOWS any way!

    Or in other words, why do we need free software, if its safe to copy non free software?!

    You may think it is safe to copy non free software, this is more or less true if you are a home user, but large organizations such as companies and government agencies cannot afford to run illegally copied software anymore, with the pressure generated by extra-territorial laws and international agreements such as the GATT. If you are trying to set up a small business then most probably you cannot afford the price of commercial software licenses (think of what will happen to all these offices in 'BEIN EL SARAYAT' if they had to pay for the software they use).

    But free software isn't about the price only, when you buy non free software form a company like MICROSOFT, you have to rely on MICROSOFT for support and further development of the software, if you are a computer professional you have to rely on MICROSOFT for certification and training. This means more money to be paid for a foreign economy, but since LINUX is free, you can set up your own LINUX company that supports and further develops it; this way when someone buys your product or request your services the money will benefit your local economy.

    With free software it doesn't matter how underdeveloped the country is or how far ahead the rest are, when technology is free we can really own it. If technology isn't free then we have to choose between reinventing the wheel or relying on others to provide us with it.

    1.8 I'm not a programmer why do I need the code ?

    Even if you are not a programmer the openness of the code is very important to you, its because the code is open and free that GNU/LINUX is such a reliable OS, since thousands of programmers are working on developing and fixing it.
    If a anyone finds a bug they can look at the code and fix it, if you find a bug and can't fix it yourself you can report it and someone else will fix it. If there is a feature in a free software package that is missing you can hire someone to develop it for you, and if this feature is useful for many people you can probably find someone to implement it for free.

    The open sourced nature of GNU/LINUX protects you from security problems and trap doors, since the system is heavily peer reviewed by the world best programmers. With WINDOWS you cannot tell if it has trap doors or not, you cannot know if it sends data about you compromising your privacy.
    Actually MICROSOFT software is known to be full of secret undocumented features, for instance all office documents carry a special ID that is unique to your machine, thus compromising your privacy.

    WINDOWS is notorious for its security problems and its weakness towards viri, GNU/LINUX on the other hand is very secure and no known virus was ever able to harm it thanx to its open nature.

    Availability of the code also ensures that your favorite piece of software will not suddenly die because its author lost interest or got busy, since its free anyone can develop it and release new versions, you don't need to rely on one vendor.

    2 The UNIX Heritage

    As we told you before, GNU is a UNIX clone, so its natural that GNU/LINUX would share many common features with UNIX, it is this UNIX heritage that makes GNU/LINUX so different from M$ WINDOWS, in this section we'll explore the basic ideas behind a UNIX system.

    2.1 What is UNIX anyway?

    UNIX is the oldest living operating system, it was first written by KEN THOMPSON and DENNIS RITCHIE6 when they were working at AT&T, it could be considered as the grand daddy of all operating systems in use today.

    AT&T licensed UNIX to many companies and universities, who in turn developed their own versions of it, which resulted to many different UNICES, these UNICES fall into the two wide categories of BSD UNIX and AT&T UNIX.

    Efforts to standardize all these UNICES resulted in the POSIX standard, GNU/LINUX is very POSIX compliant.

    2.2 You still use the command line? Isn't that archaic?

    No not at all, most UNIX and LINUX users would tell you that the command line is much more powerful and versatile. This power of the command line is an integral part of the UNIX philosophy.

    So while WINDOWS is trying very hard to get rid of the command line, GNU/LINUX relies on it for all its functionality, to the point that most graphical tools and applications rely on command driven tools to do the real work. This of course give you the best of the two worlds, and most important of all it gives you choice.

    So if you prefer Graphical User Interfaces (GUI) go ahead, you'll find it as easy to use as WINDOWS and even more powerful.

    But if you want to release the power of your computer and your mind try to learn the command line, its not as scary as it seems.

    2.3 The UNIX philosophy

    I told you that UNIX is an operating system, but to think of it as a mere OS would be a gross understatement, it is much more than that, it is a complete philosophy specifying that small and simple is better. All UNICES are geared around the idea that writing small programs that do one job but do it perfectly thus becoming tools and not applications gives the user more power since he can combine these tools and use them together to get a result that is greater than the sum of these tools.

    But the efficient use of these tools depends on the creativity and intelligence of you the user.

    So unlike WINDOWS which assumes you have the IQ of a potato and tries to tell you how to do things, GNU/LINUX like all UNICES waits for you to harness it and tell it what you want done.

    2.4 Multi user & multi tasking

    Although the UNIX command line looks a bit like the old DOS command line which still lives in the heart of WINDOWS, don't be fooled by its appearance it is much more powerful than DOS.

    UNIX is from day one a multi tasking environment, which means you can run several task at the same time.

    try this:

    $ mpg321 somesong.mp3 &
    This will start playing the MP3 you specified and returns you to the command line, now you can run another command while the song is still playing.
    Its by adding & at the end of a command that you inform GNU/LINUX to run this command in the background thus leaving you free to continue your work.

    But thats not all GNU/LINUX is a multi user system too, since it was designed for a networking environment it allows several users to use the computer and run different programs at the same time.

    Try it your self press Ctrl-F2 and a new login screen will open, you can login with a different account, or even open a new session of the same account.

    You may think this is only useful for satisfying split identity disorders, but on the contrary as you get used to GNU/LINUX you'll find many uses for this feature.

    WINDOWS is not really a multiuser OS although it acts as if it is, this multi user nature of GNU/LINUX is one of the main reasons behind many confusions to new users, issues like ownership and permissions would make perfect sense when you understand the multi user nature of UNICES.

    2.5 Only one tree ! or a look at the file system.

    While WINDOWS is based around the idea of drives, where every partition and media has its own drive name (like C: D: E:) and each drive has its own directory tree that begins with a root directory for every drive (C:\, D:\, E:\). GNU/LINUX on the other hand follows the UNIX tradition of having only one tree. This tree has only on root directory (/) and all partition and media are connected to this tree through a process called mounting.

    So in WINDOWS if I want the second partition I have to go to D:, but in GNU/LINUX I'd go to the directory /mnt/win_d

    This is a bit confusing in the beginning but you'll get used to it quickly.

    The fact that GNU/LINUX has only one tree, meant that it could have a much more organized file structure, where files are grouped together by their type and function instead of letting each program handle its own files in any random way.

    2.5.0.0.1 The basic file structure of GNU/LINUX is discussed in section.

    2.6 Everything is a file

    This is one of the most confusing yet powerful aspects of GNU/LINUX.

    By everything we mean literally everything; directories are files, hard disks are files, partitions are files, Internet connections are files. EVERYTHING is a file in GNU/LINUX.

    But this makes us wonder what is a file exactly??

    In a very non formal way a file is just a stream of bytes, and you can usually read and write streams of bytes to the file.

    Files could either be:

    normal files
    this includes all the files you deal with everyday like text files, binary files, MP3S and HTML documents.
    directories
    directories are sometimes called folders.
    devices
    this includes all devices whether real or logical, like hardisks and their partitions, mice and network connections.
    named pipes
    these are special files used to link the output of a program with the input of another program.
    sockets
    are special files used for networking and communication between different processes.

    2.7 Funny Names :-)

    Yes UNIX tools and programs always had funny and interesting names, GNU took this to an extreme like the pager called LESS because it is a more powerful pager than the pager called MORE.

    These naming conventions reflect a whole culture; the Hackers' culture, which in itself reflects how fun and enjoyable computing could be.

    This is one of GNU/LINUX'S main advantages over WINDOWS, it is fun, it doesn't try to hide its weaknesses with obscure technical messages and yet it doesn't try to sound too stupid and dumb (ala my computer style).

    For an interesting look at Hackers' culture check The Jargon File http://www.tuxedo.org/ esr/jargon/html/index.html.

    3 The File System

    As mentioned in the previous section, the GNU/LINUX system follows the UNIX tradition by having one tree only, in this section we study with more details the organization and structure of this tree and of various file types.

    3.1 File System support

    One point where GNU/Linux excels is its wide support of file systems, your GNU/Linux file system could access nearly all file systems in use today7, This means that you don'thave to worry about what other OSes you or your friends use, for instance you could have all your media files stored in a windows partition so you can use them from both Linux and Windows.

    originaly the native file system for GNU/Linux was minix, but then Linux finaly had its own file system called ExtFS which stands for Extended File System.

    the FS most widely used today is EXT2FS.

    3.2 Linux doesn't know how to defrag?!

    yes can you believe it, they spent all this time and effort making it and no one thought of making a defrag utility!

    but slow down, the Linux native file systems don't need a defrag utility, yes thats right ExtFS is sooo good and stable it doesn't need to defrag at all!

    Windows as you are sure to know needs defraging once a month.

    3.3 What about scandisk, can I forget about that too

    not so fast, while Linux is much better than windows at handeling the file system, and since it is much more stable, data loss of the harddisk hardly happens without your help, but since nothing is perfect8 you still need a file system checking and repair tool, in GNU/Linux its called fsck.

    most distros will run a fsck every twenty or thirty reboots, and off course if you ever restart the computer without closing the system it will do a fsck.

    3.4 What if I use journaling

    some file system use a technology called journalling, journalling simply means that the FS keeps track of all changes made and changes that should be made in a special table called the journal, the journal is written to the harddisk frequently, so when harddisk crash or power outage happens, the file system can go back and finish what needs to be done or undo what needs to be undone.

    the native EXT3FS adds journaling to EXT2FS, thus making it more stable and giving you the benefit of nearly never running a fsck.

    another nice thing about EXT3 is that it uses the same structure as EXT2 this means that migrating from EXT2 to EXT3 or back takes seconds and there is no risk of data loss involved.

    3.5 Files and their properties.

    the fact that GNU/Linux uses a different file system from windows means that there are some differences in how it handels files and in the properties and attributes of these files, most of these attributes are necessary for a multiuser envirement.

    you should know about these properties in order to avoid problems and be able use GNU/Linux efficiently.

    3.5.1 Filenames are case sensitive

    unlike windows, file names in GNU/Linux are case sensitive, this means that files foo, Foo, FOO and fOo are different files. this could cause lots of confusion when you are looking for files or applications.

    very few excutables9 have capital letters but you should still be careful.

    3.5.2 Linux Does Not Need Filname Extensions?

    While Widows uses file extensions to determine the data type of files. GNU/Linux does not need filename extensions at all, you'll find thousands of files with no extension in your GNU/Linux system10, intead GNU/Linux uses a tool called file to determine the datatype of each file.

    however note that some GUI apps specially MIME enabled apps use extensions to guess the type of media files.

    you can run the file tool yourself to check the datatype of file like this

    $file fubar.pdf

    >fubar.pdf: Ogg-Vorbis compressed sound file

    as you can see file is too smart to be fooled by a wrong extension.
    $file foo

    >foo: Bourne-Again shell script text executable

    it can even guess what kind of text file you have
    $file hello_world.cc

    >hello_world.cc: ASCII C program text

    as you see, file isn't always accurate, it mistooke my C++ code for C code.

    3.5.3 File ownership

    because of the multi user nature of GNU/Linux systems, files have ownership, since you cannot let users read each others email and delete each others work.

    each file has an owner and belongs to a group. to see who owns certain files you do this

    $ls -l

    >-rwxrwxr- 1 foo mail 26624 Jan 27 06:02 foo

    >-rw-rw-r- 1 foo code 300 Feb 7 14:15 hello_world.cc

    >-rw-r-r- 1 root root 3932007 Feb 7 01:42 fubar.pdf

    ^^^^ ^^^^

    the third column is the file ownership, the fourth column is the group.

    these two values are sometimes reffered to as UID and GID (which stands for User ID and Group ID)11.

    as you can see from the listing, the owner of foo is user foo and it belongs to group mail, the owner of hello_world.cc is foo and it belongs to the group code and finaly the owner of fubar.pdf is root and it belongs to group root12.

    but what are groups??

    groups are a way to give multiple users access to the same files or resources, all users belonging to the group mail can send and recieve mail, all users belonging to the group audio can play music, etc.

    3.5.4 File Permissions

    permissions are file attributes that tell the system who has access rights to files and directories.

    to see file permission you need to run this command again

    $ls -l

    >-rwxrwxr-x 1 foo mail 26624 Jan 27 06:02 foo

    >-rw-rw-r- 1 foo code 300 Feb 7 14:15 hello_world.cc

    >-rw-r--- 1 root root 3932007 Feb 7 01:42 fubar.pdf

    ^^^^ ^^^^

    the first column has the filetype and permission information, the first character __ which happens to be - in the three files listed here __ is the file type, we will ignore it for now, its these strange rwxrwr runes that we are looking for now.

    the letters r, w, and x are used to represent different permissions.

    r
    stands for read permission, if you have read permission to a file you can read from it and see it content.
    w
    stands for write permission, if you have write permission to a file you can write to it and modify it.
    x
    excute permmision, if you have excute permission to a file you can run the file.
    Windows uses filename extensions to determine if a file is excutable or not, GNU/Linux uses permissions instead.

    but why does the listing have more than one r,w and x??

    this is because there are three sets of permissions:

    owner permissions13
    this is the set of permission for the owner of the file, only the owner can change a files permission.
    group permission
    this is the set of permission for all users who belong to the files's group.
    world permissions14
    this is the set of permissions for all users.
    each set of permissions is represented by three characters and there order is owner permissions, group permissions and world permissions, the first character is the read permission, the second character is the write permission and the third character is the execute permission. if a - is used instead of r,w or x this means no permissions.

    for instance in the previous listing the file foo is readable,writable and executable by its owner the user foo, and it is also readable, writable and executable by all members of the group mail. but other users only have read and execute permissions

    while the file hello_world.c is readable and writable by its owner foo and all members of the group code. other users are only allowed to read it.

    and finaly the file fubar.pdf is readable and writable by the its owner the user root, other members of the group root can only read it and the rest of the world has no access to it at all.

    3.5.5 Directory permissions

    since directories are files, they too have the same set of permissions, but their meaning is a bit different from files.

    for directories the read permission means you have the right to

    r
    if you have read permission to a directory you can list the directory contents.
    w
    if you have write permission to a directory you can modify the files contained in it or add new files.
    x
    if you have excute permission to a directory you can enter that directory.
    this means that the permission to delete a file is a write permission to the directory, if you have write permission to the directory /fubar and no write perimission to the file /fubar/fu you can still delete /fubar/fu

    an interesting situation occurs when you only have excute permission to a directory, in that case you have the right to enter the directory but you cannot list its content, you can however read any file in the directory if you have the permission to that file, but you cannot tell what the filenames are.

    if you have read permission only you can list the files inside the directory but you cannot access them at all.

    so to be able to modify a file you have to have all permissions to its parent directory.

    Remember the delete permission is a directory write permission

    3.6 Directory Organization

    Unlike WINDOWS programs, all GNU/LINUX Programs follow a standard way of organizing files based on the content and function of the files, similar files are grouped together and put in one directory.

    These directories don't have to belong to one partition, they could even belong to another computer on the network.

    Lets explore these directories.

    /bin15
    contains all programs neccesary for the correct operation of the system, they are not stored in /usr/bin because it is common to have /usr on a different location which may not be accessable for any number of reasons like a network failure.
    /boot
    contains all the kernel images used to boot your computer.
    /dev
    contains all your devices.
    /etc
    contains all system wide configuration files that apply to all users.
    /home
    contains the home directories of all the users, users store their personal data and configuration files there. It is common to have a seperate /home partition.
    /lib
    contains libraries needed to run the basic operations of the system.
    /mnt
    where most external media and extra partitions are mounted.
    /proc
    a virtual file system that contains special files which carry information about your system.
    /sbin
    basic system programs that can only be used by root, needed for correct operation of the system.
    /tmp
    contains temporary files.
    /usr
    all files accessible by users, contains all programs binaries, data files and documentations among other things.
    /var
    all variable data like log files, different caches and print and mail spools.

    Bibliography

    1
    The Linux Kernel HOWTO http://www.linuxdoc.org/HOWTO/Kernel-HOWTO-3.html
    2
    FSF: The Free Software Definition http://www.fsf.org/philosophy/free-sw.html
    3
    The Open Source Initiative: Open Source Definition http://www.opensource.org/docs/definition_plain.html
    4
    FSF: GNU General Public License http://www.fsf.org/licenses/gpl.html
    5
    FSF: What is Copyleft? http://www.fsf.org/licenses/licenses.html#WhatIsCopyleft

    About this document ...

    Main Differences Between GNU/LINUX and M$ WINDOWS

    This document was generated using the LaTeX2HTML translator Version 2002-2-1 (1.70)

    Copyright © 1993, 1994, 1995, 1996, Nikos Drakos, Computer Based Learning Unit, University of Leeds.
    Copyright © 1997, 1998, 1999, Ross Moore, Mathematics Department, Macquarie University, Sydney.

    The command line arguments were:
    latex2html -no_subdir -split 0 -show_section_numbers /tmp/lyx_tmpdir24679ybuTjF/lyx_tmpbuf0/linuxintro.tex

    The translation was initiated by alaa on 2004-08-05


    Footnotes

    ...'Arabish1
    Arabic words written in Latin letters 'KEDA YA3NI'
    ...terminal2
    The panels of KDE and GNOME usually comes with a button that looks like a black computer screen clicking on it will open a terminal.
    ... kernel3
    The GNU kernel HURD is now nearly complete and many developers are using it right now.
    ...magany'4
    Although it is most of the time.
    ... code5
    The source code is a detailed description of a program written in a programming language, LINUX and GNU are written in C.
    ... Ritchie6
    Who was the author of the C language
    ... today7
    This needs some special kernel configuration though, most distros will support the very popular file systems.
    ... perfect8
    specially the power supply
    ... excutables9
    files that run applications and programs
    ... system10
    file name extensions are usually three characters that follow the dot (.) like .ogg in foo.ogg
    ...11
    actualy UID and GID are usualy used to refer to a numerical ID that identifies users and groups. to see a listing of files with numerical UID and GID data instead run this
    $ls -ln
    ... root12
    the root user's UID is always 0
    ... [owner permissions13
    sometimes refered to as user permission
    ... [world permissions14
    sometimes refered to as others permissions
    .../bin15
    bin stands for binaries, directories called bin contain excutable files and programs.

    Introductory to CFEngine session slides

    Slides originally written by Bernhard Glomm, who gave us an introductory to CFEngine session.

    CFEngine 1

    1. Introduction
    2. Short look at FAI (Fully Automated Installation)
    3. CFEngine
      1. Why to use
      2. How it works
    4. An Example
    5. CFEngine and networks

    CFEngine 2

    Task : maintain a network

    • install machines
    • configuration machines
    • change configuration
    • reinstall machines
    • document configuration

    Solution well defined method & values

    • Instatllation via FAI
    • configuration via CFEngine
    • maintain config value via :
      • text file
      • X.500 (ldap)

    CFEngine 3 (fai Example 1)

    Server

    1. Install fai.
    2. FAI setup :
      1. debootstrap nfs root
      2. base.tgz
      3. additional software
      4. add user fai
    3. Configure fai
    • package group :
      • base
      • server
      • X11
      • KDE
      • Router
    • disc config : server -> wks1 router -> wks2
    • profiles :
      • server : base,server
      • wks : base,X11,KDE
    • resolve profiles :
      • srv_.* --> Server.
      • wks1_.* --> wks1.
      • router_.* --> Router.

    4. DHCP

    • MAC1 = srv_myserver
    • MAC2...n = wks_1 ....wks1_n
    • MACx... = rtr_myrouter

    CFEngine 4 (fai Example 2)

    Client

    • booting
    • mounting nfs root
    • resolve valid profiles
    • partition disks
    • untar base.tgz
    • install software
    • configure mahine
    • reboot

    • installation 10-20 minutes .
    • parallel installation .
    • full automatic.
    • well defined values.
    • create installation.

    CFEngine 5 (Advantages)

    • different hardware.
    • different os.
    • diffrerent distributions.
    • different configurations.

    maintained by one set of rules and values.

    • easy to maintain
    • easy to document.

    CFEngine 6

    CFEngine runs local.

    Actions :

    • Files
    • editfiles
    • copy
    • shellcommands

    Classes:

    • Any
    • Build in
    • Set defined
      • by modules
      • inside cfengine

    modules :

    • self written
    • can defined
      • classes
      • variable

    CFEngine 7

    Example :

    • /etc/cfengine/cfagent.conf

    generate configuration .

    • /etc/cfengine/cf.cairo

    code to push values to target files

    • /etc/cfcairo/cairomodules.pl

    module to export our values for cfengine

    • /etc/cfcairo/cairovar

    our values for configuration.

    CFEngine 8

    1. cfservd.con
    • which server to trust
    • which network is allowed to connect
    • how to handle keys
    1. update.conf

    perform actions before regular cfagent run

    like : copy new value files. copy new cf code.

    1. cfrun host_1 host_2 host_3
    • check key
    • call cfagent on each host

    Learn How to use GNU/Linux

    Learn How To Use GNU/Linux: Lesson One

    hi everyone and welcome i'll talk about the installition of mandrake linux 10 operating system

    first of all i want to say that you can setup two operating system on your machine,what i mean is that you can install linux and windows-MS together in the same machine but i want to say that you don't need windows in anything coz linux comes with many programmes and features that provide you with everything you will need when i say everything i mean