25.10.09

Setting UP VNC

What is VNC?
VNC stands for Virtual Network Computing. It is remote control software which allows you to view and interact with one computer (the "server") using a simple program (the "viewer") on another computer anywhere on the Internet. The two computers don't even have to be the same type, so for example you can use VNC to view an office Linux machine on your Windows PC at home. VNC is freely and publicly available and is in widespread active use by millions throughout industry, academia and privately.
For more information, please visit http://www.realvnc.com/
Do I have it in my system?
Type following command to check if you have the client and server installed in your system.
[tchung@tchung101 tchung]$ rpm -q vnc vnc-server
vnc-4.0-0.beta4.3.2
vnc-server-4.0-0.beta4.3.2
[tchung@tchung101 tchung]$

Meaning of "> /dev/null 2>&1"

You need to understand the theory first and then its upto you how and where you want to apply that theory. I'll try to explain above to you.

The greater-than (>) in commands like these redirect the program’s output somewhere. In this case, something is being redirected into /dev/null, and something is being redirected into &1.

Standard in, out and error:

There are three standard sources of input and output for a program. Standard input usually comes from the keyboard if it’s an interactive program, or from another program if it’s processing the other program’s output. The program usually prints to standard output, and sometimes prints to standard error. These three file descriptors (you can think of them as “data pipes”) are often called STDIN, STDOUT, and STDERR.

Sometimes they’re not named, they’re numbered! The built-in numberings for them are 0, 1, and 2, in that order. By default, if you don’t name or number one explicitly, you’re talking about STDOUT.

That means file descriptor 0 or fd0 denotes STDIN or standard input and file descriptor 1 or fd1 denotes STDOUT or standard output and file descriptor 2 or fd2 denotes STDERR or standard error.

You can see the command above is redirecting standard output into /dev/null, which is a place you can dump anything you don’t want (often called the bit-bucket), then redirecting standard error into standard output (you have to put an & in front of the destination when you do this).

The short explanation, therefore, is “all output from this command should be shoved into a black hole.” That’s one good way to make a program be really quiet!

20.10.09

Manage Network Interfaces in Linux

Show info:
ifconfig
ifconfig -a or -v
ifconfig eth1
Disable/Enable interface:
ifconfig eth1 down or up
ifdown eth1
ifup eth1

19.10.09

YouTube Hidden features

YouTube hidden features

18.10.09

Setup VPN Server/Client in Windows 7

Following are the steps for configuring Incoming VPN Connection in Windows 7

  1. First go to Control Panel and open Network and Sharing Center.
  2. Click on Change adapter settings.
  3. Press Alt+F and select New Incoming connection
  4. Put a check on who you’d like to give access to this computer or you can configure a new account by clicking on Add someone,after that click on Next.
  5. Put a check mark on Through the Internet. Click on Next.
  6. Select the protocols you want to enable for this connection. Click on Allow access.
  7. Make a note of the Computer name as this will be used by the client to connect to this computer and after that Click on Close.

Following are the steps for configuring Outgoing VPN Connection in Windows 7

  1. First go to Control Panel and open Network and Sharing Center.
  2. Click on Set up a new connection or network.
  3. Select Connect to a workplace then click on Next.
  4. Select Use my internet connection (VPN).
  5. Type the IP address or computer name where you wish to connect and your connection name under the Destination name field.
  6. Enter a User name and password that has been granted access to the host computer.
  7. For getting connected through created VPN connection, you can either right-click on the Network icon in the system tray and select Network and Sharing Center or go to Control Panel and open Network and Sharing Center, and click on Connect to a network.
  8. Now connect VPN Connection windows will appears.

15.10.09

Intall not signed packeges with yum

yum --nogpgcheck install "examplePackage"

Same as:

1 rpm -ivh package.rpm

2 yum localinstall package.rpm

3 Edit /etc/yum.conf or repository.repo and change the value of gpgcheck from 1 to 0 (!dangerous)


7.10.09

Add an Additional Disk Drive to Your Linux Computer

First of all check if your Linux can see new device:
sudo fdisk -l
Command and Response Dialog of Adding a New IDE Drive:

As root perform the following: (as highlighted in bold)
[root]# fdisk /dev/hdb Command (m for help): m (Enter the letter "m" to get list of commands) Command action a toggle a bootable flag b edit bsd disklabel c toggle the dos compatibility flag d delete a partition l list known partition types m print this menu n add a new partition o create a new empty DOS partition table p print the partition table q quit without saving changes s create a new empty Sun disklabel t change a partition's system id u change display/entry units v verify the partition table w write table to disk and exit x extra functionality (experts only)

5.10.09

RPMforge Repository for CentOS

RPM packages for Red Hat, RHEL, CentOS and Fedora

Installation for CentOS 5:

i386
rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm


x86_64
rpm -Uhv http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS//rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm



Original at dag.wieers.com

Karan Repository for CentOS

Fedora Extras rebuild Repository
Download file : kbsingh-CentOS-Extras.repo and save it in /etc/yum.repos.d/

Misc Packages rebuild Repository

Download file : kbsingh-CentOS-Misc.repo and save it in /etc/yum.repos.d/

Apply GPG key
The GPG key used to sign packages in this repository can installed by running ( as root )
    rpm --import http://centos.karan.org/RPM-GPG-KEY-karan.org.txt

Original: centos.karan.org

If you can't execute commands without full pass to them :

E.g. shutdown, reboot, mtr:
Do next:
Edit your .bash_profile

$ vi .bash_profile


Change PATH line to this:

PATH=$PATH:$HOME/sbin:/usr/sbin:/usr/local/sbin:/sbin:.
 There should be export PATH in the end of file

To apply changes you have to do next thing:
. .bash_profile
Or try to logout and log back in.

.bash_profile file example:
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/sbin:/usr/sbin:/usr/local/sbin:/sbin:.

export PATH

mtr: unable to get raw sockets

Do next as root:

# chmod 4755 /usr/sbin/mtr