ajeetraina's blog

ajeetraina's picture

Linux Tutorial: Understanding Kernel Parameters on Linux !!!

How do I set advanced security options of the TCP/IP stack and virtual memory to improve security and performance of my system? How do I configure Linux kernel to prevent certain kinds of attacks using /etc/sysctl.conf? How do I set Linux kernel parameters?

sysctl is an interface that allows you to make changes to a running Linux kernel. With /etc/sysctl.conf you can configure various Linux networking and system settings such as:

1. Limit network-transmitted configuration for IPv4
2. Limit network-transmitted configuration for IPv6
3. Turn on execshild protection

ajeetraina's picture

RHCE Preparation: How to create a Linux Partition?

Imagine that we have a server running RHEL 4 and our supervisor comes over and wants a 10 GB partition created for the data processing department. This is in addition to what the server currently has allocated, so we can either create a partition out of unpartitioned space on the existing disk (experienced Linux system administrators will leave unpartitioned disk space for future expansion) if available, or we can add another drive.

ajeetraina's picture

Linux Interview: Difference between Hard Link and Soft Link?

There's an enormous difference, actually. There's really no such thing as a "hard link". If anything, there is an action that you can call "creating a hard link".

The thing is, a file can have several names. If you create a hard link (by running `ln' without `-s'), you simply create a new name which points to the exact same file as the original name. For example, if you run the following commands:

Code:

cd /tmp

echo test >file1

ln file1 file2

ajeetraina's picture

JAVA: Installing jdk on Linux

Follow the steps mentioned below to install java-1.6.

1.Download jdk-6u16-linux-x64.bin (From the URL mentioned in the prerequisites section) to /opt directory.

2.Change the permission of jdk-6u16-linux-x64.bin file to 755.

[root@bang opt]# chmod 755 jdk-6u16-linux-x64.bin

3.Execute the jdk-6u16-linux-x64.bin file to start installation.

[root@bang opt]# ./jdk-6u16-linux-x64.bin
Sun Microsystems, Inc. Binary Code License Agreement

for the JAVA 2 PLATFORM STANDARD EDITION DEVELOPMENT KIT 6.0

SUN MICROSYSTEMS, INC. ("SUN") IS WILLING TO LICENSE THE

ajeetraina's picture

Linux Interview: How to make script run as service?

Making a script run at boot time needs certain consideration and configuration.The Startup script are usually under /etc/init.d directory.
Some Admin think that by just putting the script under /etc/init.d will make it run as service.
No !! The Story is little different.

Say, I have a script called myscript which I want to run as service either:

/etc/init.d/myscript [restart|reload|start|stop]
or
service myscript start

But little more steps are usually needed.
I am talking about Red Hat Distribution but may run comfortably in other *nix too.

ajeetraina's picture

Ubuntu Tutorial: Howt o setup Voice chat with Google talk user using Empathy

Empathy consists of a rich set of reusable instant messaging widgets, and a GNOME client using those widgets. It uses Telepathy and Nokia’s Mission Control, and reuses Gossip’s UI. The main goal is to permit desktop integration by providing libempathy and libempathy-gtk libraries. libempathy-gtk is a set of powerful widgets that can be embeded into any GNOME application.This packet contains the empathy IM application and account manager.
Install Required packages

First you need to edit the /etc/apt/sources.list file using the following command:

sudo gedit /etc/apt/sources.list

ajeetraina's picture

Linux Tutorial: How to Recover MySQL Root Password?

You can recover MySQL database server password with following five easy steps.

Step # 1: Stop the MySQL server process.

Step # 2: Start the MySQL (mysqld) server/daemon process with the --skip-grant-tables option so that it will not prompt for password

Step # 3: Connect to mysql server as the root user

Step # 4: Setup new root password

Step # 5: Exit and restart MySQL server

Here are commands you need to type for each step (login as the root user):
Step # 1 : Stop mysql service

# /etc/init.d/mysql stop
Output:

Stopping MySQL database server: mysqld.

ajeetraina's picture

Linux Tutorial: How to test Multicast Packet Filtering?

Yesterday morning I started my day testing with Multicast Packet Filtering. I had Ubuntu 10.04 and CentOS 5.4 in my VM running over Vmware ESX 4.1 server.I decided to make CentOS as Client and Ubuntu as server for the setup.

First of all, I downloaded iperf as yum was not feeling well today(just kidding).
Its simple to install,download the package and install. Luckily, I dint get any dependency hell.

On Ubuntu Box:

SERVER MACHINE
=====================================

sudo iperf -s -u -B 224.0.65.68 -i 1
--------------------------------------

ajeetraina's picture

Linux Tutorials:Test Speed Connection Between Two Linux Machine

As a quick diagnostic tool, sometimes it’s nice to know exactly how fast two machines can (theoretically) be connected. I was having some slow downs on my NAS and using these command line tools, was able to determine that it was my NIC (and not my hard drives) that was causing the slow down.

I tried it on Ubuntu 10.04 and should work on other linux distros too.

Install nc and pv

$ sudo apt-get install pv

$ sudo aptitude install pv

Once you have nc and pv installed, it’s really simple. On one machine, run the following command:

$ nc -ulp 5000 > /dev/null

ajeetraina's picture

Linux Interview Tips: Know Your Hardware box details

Whenever you face an interview panel who are seeking for Linux System administrators and basic technical support categories,mostly they expect the confident and quick response related to Linux Hardware.I have collected few of the important stuffs I faced and would like to share with you all.

Questions:

1. Which command you should run on linux to know its architecture if uname package is absent?
2. How you gonna list RAM size?
3. What products have been used in motherboard?
4. How will you know what processor is running on your linux box?

and so on...

Response:

Syndicate content