Linux FAQ Items

Hello Guys,

Sometimes it is necessary to add more swap space after installation. For example, you may upgrade the amount of RAM in your system from 64 MB to 128 MB, but there is only 128 MB of swap space. It might be advantageous to increase the amount of swap space to 256 MB if you perform memory-intense operations or run applications that require a large amount of memory.

You have two options: add a swap partition or add a swap file. The easiest way to achieve this it to through swap file.

To add a swap file:

Determine the size of the new swap file and multiple by 1024 to determine the block size. For example, the block size of a 64 MB swap file is 65536.

At a shell prompt as root, type the following command with count being equal to the desired block size:

dd if=/dev/zero of=/swapfile bs=1024 count=65536

then

mkswap /swapfile

To enable the swap file immediately but not automatically at boot time:

swapon /swapfile

To enable it at boot time, edit /etc/fstab to include:

/swapfile swap swap defaults 0 0

The next time the system boots, it will enable the new swap file.

After adding the new swap file and enabling it, make sure it is enabled by viewing the output of the command cat /proc/swaps or free.

bingo :slight_smile:

Let me know if you have any questions.

Prashant,
prashant ohol - System Administrator,

Hello,

Please use the following command to check system architecture.
Equivalent to uname -m.

$ arch
i686

$ uname -m
i686

bingo :slight_smile:

Prashant ohol - System Administrator

Hello,

First donwload the module-init-tools for kernel

cd /usr/src

wget http://www.kernel.org/pub/linux/kernel/people/rusty/modules/old/module-init-tools-3.0.tar.gz

cd module-init-tools-3.0.tar.gz

./configure --prefix=/usr

make

make install

Done!

then

Lets start with the kernel upgrade

cd /usr/src/

wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.15.4.tar.gz

tar -zxf linux-2.6.15.4.tar.gz

cd linux-2.6.15.4

cp /boot/config-2.6.9-22.ELsmp /usr/src/linux-2.6.15.4/.config

make clean

make mrproper

make oldconfig

(Note that oldconfig will only work within the same major version of the kernel. You cannot, for example, use a 2.4.x .config with the 2.6.x kernel)

keep hitting enter and take the defaults until you get to the CPU type. Select your CPU. Also in the SMP section select SMP if you have multiple CPUs. Oh, and select "(No Forced Preemption (server))" under that section. Everything else, just hit enter to take the defaults.

Then to compile and install:

make bzImage

make modules

make modules_install

make install

grub

savedefault --default=0 --once

quit

Reboot..... fingers crossed ...Good Luck

bingo :slight_smile:

Prashant ohol - System Administrator

$ yum groupinstall "KDE (K Desktop Environment)"

$ yum groupinstall 'X Window System' 'Sound and Video'

bingo :slight_smile:

Prashant ohol - System Administrator

Hello,

Please use the following command to change the date.

RedHat / CentOs

date -s "03/24/2006 14:0:10"

FreeBSD:

date 0604111425

06 - year
04 - month
11 - date
14 -- hours
25 -- mins

bingo :slight_smile:

Prashant ohol - System Administrator

Hello,

Protect your machine from SYN-FLOODING

-A INPUT -i eth0 -p tcp --syn -j syn-flood
-A syn-flood -m limit --limit 50/s --limit-burst 50 -j RETURN
-A syn-flood -j DROP

hey guys and Make sure NEW tcp connections are SYN packets

-A INPUT -i eth0 -p tcp ! --syn -m state --state NEW -j REJECT

bingo :slight_smile:

Prashant ohol - System Administrator

Hello,

What is shoutcast?

SHOUTcast is Nullsoft's Free Winamp-based distributed streaming audio system. Thousands of broadcasters around the world are waiting for you to tune in and listen.

How do we install shoutcast?

1.) Login to root

then download the shoutcast from nullsoft.

wget Shoutcast...-glibc6.tar.gz

tar -zxvf shoutcast-1-9-2-linux-glibc6.tar.gz

rm -rf shoutcast-1-9-2-linux-glibc6.tar.gz

mv shoutcast-1-9-2-linux-glibc6 shoutcast

cd shoutcast

How to configure shoutcast?

Edit the shoutcast configuration.

pico sc_serv.conf

or

vi sc_serv.conf

depending on what you have

Ok lets set some important configureation options. Change these settings in the file:

MaxUser

Password

PortBase

uncomment AdminPassword and set an admin password.

to save crtl+x

How do i start shoutcast?

./sc_serv sc_serv.conf

bingo :slight_smile:

Prashant 0hol - System Administrator

Hello,

Do you know what is the RPM?

RPM is the RPM Package Manager. It is an open packaging system available for anyone to use. It allows users to take source code for new software and package it into source and binary form such that binaries can be easily installed and tracked and source can be rebuilt easily. It also maintains a database of all packages and their files that can be used for verifying packages and querying for information about files and/or packages.

Red Hat, Inc. encourages other distribution vendors to take the time to look at RPM and use it for their own distributions. RPM is quite flexible and easy to use, though it provides the base for a very extensive system. It is also completely open and available, though we would appreciate bug reports and fixes. Permission is granted to use and distribute RPM royalty free under the GPL.

RPM is an open packaging system that is available for anyone to use. It works on all Linux as well as currently on various other UNIX flavours: IRIX, Solaris, SunOS, AIX, HP/UX, AmigaOS, and FreeBSD.

Installing Packages

RPM packages typically have file names rpm -i prashant-1.1-1.i386.rpm which includes :-

package name prashant

version 1.1

release 1

architecture i386

How to install RPM?

rpm -ivh prashant-1.1-1.i386.rpm

uninstalling packages

rpm -e prashant-1.1-1.i386.rpm

Upgrading Packages

rpm -Uvh prashant-2.0.i386.rpm

Verifying Packages

rpm -v prashant

bingo :slight_smile:

Prashant Ohol - System Administrator

Hi,

Rootkit scanner is scanning tool to ensure you for about 99.9%* you're clean of nasty tools. This tool scans for rootkits, backdoors and local exploits.

A root kit is a set of tools used by an intruder after cracking a computer system. These tools can help the attacker maintain his or her access to the system and use it for malicious purposes. Root kits exist for a variety of operating systems such as Linux, Solaris, and versions of Microsoft Windows.

A hacker security tool that captures passwords and message traffic to and from a computer. A collection of tools that allows a hacker to provide a backdoor into a system, collect information on other systems on the network, mask the fact that the system is compromised, and much more. Rootkit is a classic example of Trojan Horse software. Rootkit is available for a wide range of operating systems.

Download rootkit

wget http://downloads.rootkit.nl/rkhunter-1.2.8.tar.gz

tar xvzf rkhunter-1.2.8.tar.gz

cd rkhunter

./installer.sh

Installation done! :slight_smile:

Now lets start the scan

rkhunter -c

bingo :slight_smile:

Prashant Ohol - System Administrator

ImageMagick is a free software suite for the creation, modification and display of bitmap images. It can read, convert and write images in a large variety of formats. Images can be cropped, colors can be changed, various effects can be applied, images can be rotated and combined, and text, lines, polygons, ellipses and B�zier curves can be added to images and stretched and rotated

Downloading ImageMagick

wget ImageMagick - Browse Files at SourceForge.net

then:

tar -zxvf ImageMagick-6.1.8-0.tar.gz

cd ImageMagick-6.1.8-0

./configure
make
make install

To check this, run the command:

which imagemagick

bingo :slight_smile:

Prashant Ohol - System Administrator

I disagree.

RPM is good.
But. For each OS you must use OS's own packet manager.

for example:
pkg_add and ports in FreeBSD (rpm works only in linux-compatability mode)
pkgadd in Solaris
emegre in Gentoo
etc.

emerge, actually.