Tuesday, May 17, 2005

Optimizing Linux Desktop

To keep the system from accessing the swap drive, kernel aspect swappiness is utilized. It's run-time tunable available through anyone needing to adapt kernel behavior to his or her own requirements. The idea is to let background processes use the swap drive and RAM for browsing the Internet, writing email, etc.

The following command reduce the tendency for the kernel to use the swap file.
>> sudo cat /proc/sys/vm/swappiness
The default setting is set at 60 and can be lowered such as
>> sudo sysctl -w vm.swappiness=10
and run the cat command again and it registered 10
vm.swappiness=10 to /etc/sysctl.conf

**Freeing More RAM

By default Linux configuration provide six text-mode virtual consoles. They can be accessed by pressing CTRL+ALT+F1 through CTRL+ALT+F6, CTRL+ALT+F7 switches to the GUI. Edit /etc/inittab to disable some of these virtual consoles.

#Run gettys in standard runlevels

1:2345:respawn:/sbin/mingetty tty1

2:2345:respawn:/sbin/mingetty tty2

#3:2345:respawan:/sbin/mingetty tty3



Monday, March 21, 2005

Removing old kernel

The best way to remove all files and directories associated with a kernel that is no longer needed is the following:

  1. rm /boot/vmlinuz-2.6.
  2. rm /boot/config-2.6.
  3. rm /boot/initrd-2.6
  4. rm -Rf /lib/modules/2.6.5
  5. run grub or edit /boot/grub/grub.conf

Tuesday, March 15, 2005

NTFS support (mounting Windows partition)

Open the terminal

  • Type: su
  • Hit enter
  • Type your root password
  • Hit enter
  • Type: uname -r -p

(This will output your kernel version and processor type)
Open Firefox. Go to
http://linux-ntfs.sourceforge.net/rpm/fedora3.html and download (save to disk) the appropriate NTFS RPM for your kernel version and processor type

  • With the root terminal still open
  • type: rpm -ivh *.rpm
  • Hit enter
  • Wait for the installation to complete
  • Type: rm *.rpm
  • Hit enter
  • Type "y" and hit enter
  • Type: su -Hit enter
  • Type: mkdir /mnt/windows
  • Hit enter
  • Type: /sbin/fdisk -l
  • Hit enter

This will output your HPFS/NTFS partition identifier

  • Type: gedit /etc/fstab
  • Type the following in gedit: /dev/hda1 /mnt/windows ntfs ro,defaults,umask=0222 0 0
  • If your partition identifier is not "/dev/hda1" substitute the correct characters. (For example it might be "/dev/sda1" if you have a SATA drive.)
  • Click the "save" icon in gedit and exit gedit.
  • Close the terminal
  • Reboot

Your Windows partition should now be available in the file browser under "/mnt/windows".

Monday, March 14, 2005

Maintain groups of machines with "Yum"

Shout outs to "madadmin"

Yum is an automatic updater and package management tool for rpm based systems. Yum automatically computes dependencies and figures out what steps need to occur in order to install packages. Yum can not only be used to keep packages already installed on your system updated, but can also be used to install packages directly.

Configuring Yum
  1. Edit "/etc/yum.repos.d/fedora.repo" and replace the "baseurl" with the address of the repository closest to you (baseurl=ftp://fedora.bu.edu/fedora/core/$releasever/$basearch/os/).
  2. Edit "/etc/yum.repos.d/fedora-updates.repo" and replace the "baseurl" with the address of the repository closest to you (baseurl=ftp://fedora.bu.edu/fedora/core/$releasever/$basearch/os/).
  3. Edit "/etc/sysconfig/rhn/sources" the mirror site you have chosen . yum fedora-core-3 ftp://fedora.bu.edu/fedora/core/3/i386/os
    yum updates-released-fc3 ftp://fedora.bu.edu/fedora/core/updates/3/i386
Using Yum

#yum check-update
Yum will download the complete set of current headers from the repository server you specified in your yum.conf file.

#yum update
Check
the packages currently installed on your system are up to date with the latest version.

#yum update
Yum will proceed to compare all packages currently installed on your system with those currently available on the repository server, once complete, it will present you with an information screen listing details of what it intends to do and ask you for confirmation.

#yum update nmap
To update a specific package.

#yum install xchat
To install a package you don't have currently.

#yum search nmap gui
You have nmap installed already, and you'd like a gui interface to it, but you have no idea what the package might be called.

#yum provides libc6.1-1.so.2
Need a certain library which is not a standalone package.

#yum remove nmap
To remove a package.

#yum clean all
Deletes any old cached packages from your system as well as removing any old rpm headers that are no longer needed.

#yum info xchat
Just info no installation.





Saturday, March 12, 2005

Partitioning, Installing, and Setting up

This is my personal guide for configuring Fedora Core 3.

- I did Workstation Install of FC3
- Partitioning 3 partitions: a 6GB / main partition, a 12GB /homepartition and a 2GB partition.
- Boot Loader: My boot loader is Grub which is installed on the MBR (might not be a good solution, but I like
challenges).
- Package Selection:

  • Remove "rhgb" from "X Windows System". This removes the Redhat Graphical Bootloader from installing.
  • Select both "Gnome Desktop Environment and KDE Desktop Environment".
  • Remove "openoffice.org_i18n" from "Office/Productivity" since I don't need international support and wish to save approx. 600MB of disk.
  • Add grip, k3b, kdemultimedia, totem, and xmms in "Sound and Video".
  • Select "X Software Development". This is required to compile new software that that uses the X-Windows system.
  • Select "Gnome Software Development". This is required to compile new software that uses the Gnome environment.
  • Select "KDE Software Development". This is required to compile new software that uses the KDE environment.
  • Select "Legacy Software Development". This is required to use some older software and compile some older software.
  • Select "Administration Tools".
  • Select "System Tools".


- Firewall: Select this and it can be easily be disabled later.
- Security Enhanced Linux: Warn SELinux
- Monitor Configuration Screen: Chose IBM 9514-B-TFT Panel (for IBM ThinkPad T42)
- Setup:

  • Edit /etc/sysconfig/desktop to swtich it to "kde". Commented out a line in /etc/inittab and added a line:
    #x:5:respawn:/etc/X11/prefdm -nodaemon
    x:5:respawn:/usr/bin/kdm -nodaemon
  • Edit /boot/grub/grub.conf (Revise the "hiddenmenu" and "kernel" lines to selinux=0)
  • Edit /etc/hosts
    Add hostname at the end of localhost
  • Edit /etc/modprobe.conf
    Add the following lines to the bottom of the file:
    alias net-pf-10 off
    alias ipv6 off
  • Install GPG key using the following command:
    rpm --import /usr/share/rhn/RPM-GPG-KEY-fedora
    yum check-update
    yum update kde*
    yum update
  • Edit /etc/yum.repos.d/fedora.repos
    [dries]
    name=Extra Fedora rpms dries - $releasever - $basearch
    baseurl=http://apt.sw.be/dries/fedora/linux/$releasever/
    $basearch/dries/RPMS/

    [core]
    name=Fedora Linux $releasever - $basearch - core
    baseurl=http://ayo.freshrpms.net/fedora/linux/$releasever/
    $basearch/core
    gpgcheck=1

    [updates]
    name=Fedora Linux $releasever - $basearch - updates
    baseurl=http://ayo.freshrpms.net/fedora/linux/$releasever/
    $basearch/updates
    gpgcheck=1

    [freshrpms]
    name=Fedora Linux $releasever - $basearch - freshrpms
    baseurl=http://ayo.freshrpms.net/fedora/linux/$releasever/
    $basearch/freshrpms
    gpgcheck=1