Let's Share Knowledge And Make A Difference

  • Monitor your network and systems like a hawk

    There are some perfact open souce solution for monitoing your Network devices and server system's health. Nagios, Cacti, WhatsUpGold and Smokeping are the leading monitoring tools among them...

    Read More
  • Email service and Security

    Now a days life without email service is unthinkable and E-mail service is quite expensive. As always linux gives us the answer with a strong mail service named postfix...

    Read More
  • Data Center Solution

    A data centre is a facility where companies can keep and operate most of the ICT infrastructure that supports their business. IT host the most critical systems that are vital to the continuity of daily operations...

    Read More

Thursday, January 16, 2014

How to install phpMyadmin from tar.gz

How to install phpMyadmin from tar.gz   

Install Dependency(php and mysql):
[root@nccsc ~]# yum install -y php* mysql-server
[root@nccsc ~]# wget ftp://mirror.switch.ch/pool/1/mirror/scientificlinux/6.4/x86_64/os/Packages/php-mbstring-5.3.3-22.el6.x86_64.rpm
[root@nccsc ~]# rpm -ivh php-mbstring-5.3.3-22.el6.x86_64.rpm

Install phpMyAdmin:
First download the latest tar from http://www.phpmyadmin.net/home_page/downloads.php.
[root@nccsc ~]# wget http://garr.dl.sourceforge.net/project/phpmyadmin/phpMyAdmin/4.1.4/phpMyAdmin-4.1.4-all-languages.tar.gz
[root@nccsc ~]# tar -zxvf phpMyAdmin-4.1.4-all-languages.tar.gz
[root@nccsc ~]# mv phpMyAdmin-4.1.4-all-languages /var/www/html/phpmyadmin
[root@nccsc ~]# chmod 755 -R /var/www/html/phpmyadmin/
[root@nccsc ~]# service httpd restart

Checking logs for error detection:
[root@nccsc ~]# tail -f /var/log/httpd/error_log

Lets check from a browser and login with your mysql database username and password.
http://your_ip_address/phpmyadmin

Troubleshooting:
PHP Fatal error:  Call to undefined function mb_detect_encoding() in /var/www/html/phpmyadmin/libraries/php-gettext/gettext.inc on line 177

Solution: you need the "php-mbstring" packages. Here my redhat php system is rhel6 5.3.3-22. thats why I have download the php-mbstring-5.3.3-22.el6.x86_64.rpm packages at first.

Thursday, November 21, 2013

How to re-install grub???

How to re-install grub???
---------------------------------------

1.  First find the partition which contains the /boot directory
grub> find  /boot/grub/stage1
  (hd0,4) 

or,
grub> find  /grub/stage1
  (hd0,4) 

2.  Execute the root command to find "/boot" partition
grub> root
  (hd0,4)

grub> root (hd0,4)
 Filesystem is type ext2fs, partition type 0x83

3.  Lets re-install Grub to a partition boot sector
grub> setup  (hd0,4)

4. Now restart the server-
grub> reboot

5. After restarting your server will get a grup menu but still it may not open. If it happens follow the below steps-
    - Press "e" from the grup menu where it says (hd0,1)
    - Now change to (hd0,4) and press "b" for boot.

6. It should start the OS. But to make this entry permanent edit the grub.conf as below-

[root@mahidul ~]# vim /etc/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,6)
#          kernel /vmlinuz-version ro root=/dev/sda9
#          initrd /initrd-[generic-]version.img
#boot=/dev/sda

default=0
timeout=5
splashimage=(hd0,4)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.32-220.el6.x86_64)
        root (hd0,4)
        kernel /vmlinuz-2.6.32-220.el6.x86_64 ro root=UUID=cd9be899-3467-4601-a6a7-b5a5774d7a55 rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD quiet SYSFONT=latarcyrheb-sun16 rhgb crashkernel=auto  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM
        initrd /initramfs-2.6.32-220.el6.x86_64.img
title Other
        rootnoverify (hd0,0)
        chainloader +1


Thats it. Restart the server. It should works properly now. shue !!! big relief. :D

Thursday, October 31, 2013

VNC (Remote Desktop) Basic Configuration

VNC (Remote Desktop) Basic Configuration

Intruduction:
--------------------

VNC is used for remote desktop login. It's not like team viewer software. Diffrence is Team viewer needs internet to connect with the workstation. But VNC is used within a same network. For example, In most cases, VNC is used for local network.

Concept:
-------------

VNC has two parts-
1. Server end (VNC-*.*.*): First, the computer you want to login remotely install VNC server on that machine. To activate it you should give the serial key. VNC give 5 days free trial key to check out.
Download link:
http://realvnc.com/download/binary/1320/

2. Client end (VNC viewer): Second, install VNC viewer into those workstations from where you want to login to the VNC server machine.
Download link:
32-bit: http://www.realvnc.com/download/binary/1339/
64-bit: http://www.realvnc.com/download/binary/1341/

Note: VNC has both Windows and Linux version.

Saturday, September 28, 2013

Passwordless ssh login in RedHat6

Passwordless ssh login in RedHat6

1.1. First install openssh to both machine:
[root@vpn ~]# yum install openssh*

1.2. Now create a pair of keys one is public (id_rsa.pub) and other is private key (id_rsa).
[root@vpn ~]# ssh-keygen -t dsa
[root@vpn ~]# ls -l /root/.ssh/
-rw-------. 1 root root 1675 Sep 27 23:49 id_rsa
-rw-r--r--. 1 root root  402 Sep 27 23:49 id_rsa.pub

1.3. Now keep the public key to the destination server where you want to login passwordlessly. To do so use the below command. here my remote server's ip address is 192.168.1.73
[root@vpn ~]# ssh-copy-id root@192.168.1.73
Now try logging into the machine, with "ssh 'root@192.168.1.73'", and check in:
  .ssh/authorized_keys

to make sure we haven't added extra keys that you weren't expecting.

1.4. Lets check its works or not:
[root@vpn ~]# ssh root@192.168.1.73

1.5. Troubleshooting: 
Sometime you may get the below error:
[root@vpn ~]# ssh-copy-id root@192.168.1.73
/usr/bin/ssh-copy-id: ERROR: No identities found

And this is how you should fix the problem:
[root@vpn ~]# ssh-agent $SHELL
[root@vpn ~]# ssh-add -L
[root@vpn ~]# ssh-add

Sometimes it may also gives an error like- "Could not open a connection to your authentication agent". To remove this error, use the following command.
[root@vpn ~]# eval `ssh-agent`

[root@vpn ~]# ssh-add -L
[root@vpn ~]# ssh-copy-id root@192.168.1.72
[root@vpn ~]# ssh root@192.168.1.72

Well all done. See, how easy was that !!! :D

Thursday, September 26, 2013

Your session has expired, but will be resumed after logging in again

Error: Sometimes we get an error at squirrel mail like below-
"Your session has expired, but will be resumed after logging in again."

Solution:
1. First check the mail log for details.
~# tail -f /var/log/mail.log

2. check the petition space of mail partition (default in /var). i.e: use the command-
~# df -h

Most of the times it happens because of low disk space. If your /var partition is  full then delete/move some files/folders to create some space about 5 GB. After the log-in through squirrel mail. You should be able to do it now. :D

Friday, September 20, 2013

How to install and configure torrent client in Redhat 6

How to install and configure torrent client in Redhat 6

First install dependencies:
[root@gw1 ~]# yum -y install openssl* make gcc gcc-c++ autoconf automake openssl-devel curl-devel libevent-devel wget libevent-1.4.so.2

If still libevent is missing then menually download and install it like this way:
[root@gw1 ~]# wget ftp://rpmfind.net/linux/centos/6.4/os/x86_64/Packages/libevent-1.4.13-4.el6.x86_64.rpm
[root@gw1 ~]# rpm -ivh libevent-1.4.13-4.el6.x86_64.rpm

Now we are going to download a torrent client named transmission:
[root@gw1 ~]# wget http://dl.dropboxusercontent.com/u/72284235/transmission.tar.gz

Lets unzip it and install the necessary packages:
[root@gw1 ~]# tar -zxvf transmission.tar.gz
[root@gw1 ~]# cd transmission

To use transmission client only from command line interface (CLI) follow below steps:
[root@gw1 ~]# rpm -ivh transmission-common-2.13-1.el6.x86_64.rpm
[root@gw1 ~]# rpm -ivh transmission-cli-2.13-1.el6.x86_64.rpm

To use transmission client from desktop envirnment follow below step:
[root@gw1 ~]# rpm -ivh *

OK then. Installation is complete now. Lets download a torrent file from magnet link:
[root@gw1 ~]# transmission-cli magnet:?xt=urn:btih:4d2220f8855996486033ff7b83f5e5d0ba863640&dn=New+Avengers+010+%282013%29+%28Digital%29+%28Zone-Empire%29&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80&tr=udp%3A%2F%2Ftracker.publicbt.com%3A80&tr=udp%3A%2F%2Ftracker.istole.it%3A6969&tr=udp%3A%2F%2Ftracker.ccc.de%3A80&tr=udp%3A%2F%2Fopen.demonii.com%3A1337

To stop the transmission software use the below command:
[root@gw1 ~]# pkill -9 transmission

Resume the download:
[root@gw1 ~]# transmission-cli /root/.config/transmission/torrents/New\ Avengers\ 010\ \(2013\)\ \(Digital\)\ \(Zone-Empire\).cbr.4d2220f885599648.torrent

Stop the download:
[root@gw1 ~]# pkill -9 transmission