Friday, May 27, 2011

WHMCS Site URL

If you are changing your WHMCS files to some other location you need to change your Site URL link too on your WHMCS database.

Suppose you have installed your WHMCS on tuxunited.com and now you want to change this software to another subdomain location called tuxunited.com/clients


You can easily change this using PHPMyadmin.
1. First you need to transfer all files and folders for WHMCS to /clients directory
2. Login to PHPMyadmin
3. Select the database which will be get from your configuration.php
4. Select tblconfiguration
5. SystemURL change http://www.tuxunited.com to http://www.tuxunited.com/clients

That is all page will be loaded same as before.

Thursday, May 26, 2011

klipper installation

Kilpper is a cut and paste history(clip board) utility in linux. Which reduced a lot of time for copying and pasting.

# yum install kdebase-workspace*

++++++++++++++++++++++++
Installing:
kdebase-workspace x86_64 4.6.3-5.fc14 /kdebase-workspace-4.6.3-5.fc14.x86_64 30 M
Installing for dependencies:

Transaction Summary
===============================================================
Install 13 Package(s)

Total size: 35 M
Total download size: 5.0 M
Installed size: 43 M

++++++++++++++++++++++++++

SSH login for LDAP users

Login for Ldap users we need to set some small settings on sshd configuration file

1. open your sshd configuration file
vi /etc/ssh/sshd_config file

2. PAMAuthenticationViaKbdInt yes

3. after that restart ssh service
service sshd restart

/usr/sbin/lfd: FAILED

Message:-

The following list of files have FAILED the md5sum comparison test. This means that the file has been changed in some way. This could be a result of an OS update or application upgrade. If the change is unexpected it should be investigated:

/usr/sbin/lfd: FAILED

Executable:

/usr/bin/php


Command Line (often faked in exploits):

/usr/bin/php /home/tuxunited/public_html/page.php

00400000-0087b000 r-xp 00000000 08:03 328849 /usr/bin/php
00a7a000-00ad7000 rw-p 0047a000 08:03 328849 /usr/bin/php
00ad7000-00e6f000 rw-p 00000000 00:00 0 [heap]
360c800000-360c802000 r-xp 00000000 08:03 196871 /usr/lib64/libXau.so.6.0.0
360c802000-360ca01000 ---p 00002000 08:03 196871 /usr/lib64/libXau.so.6.0.0
360ca01000-360ca02000 rw-p 00001000 08:03 196871 /usr/lib64/libXau.so.6.0.0
360cc00000-360cd05000 r-xp 00000000 08:03 196875 /usr/lib64/libX11.so.6.2.0
360cd05000-360cf05000 ---p 00105000 08:03 196875 /usr/lib64/libX11.so.6.2.0
360cf05000-360cf0c000 rw-p 00105000 08:03 196875 /usr/lib64/libX11.so.6.2.0
360d800000-360d810000 r-xp 00000000 08:03 197687 /usr/lib64/libXpm.so.4.11.0

==================================
This is because of your firewall(LFD) software has been updated automatically. If you are sure about the particular file and this was uploaded by you on your account and also you are no more interested to getting this mail anymore please do the following steps

go into WHM, and click on Configserver Firewall at the bottom of the left menu, then scroll down and add the following line to the "ignore list":

cmd:/usr/bin/php /home/tuxunited/public_html/page.php

Google Chrome - installing

Google Chrome - installing from Source

1. First we need to download the source file from
http://www.google.com/chrome/eula.html
2.so you will get a rpm file named google-chrome-stable_current_x86_64.rpm
3. execute the following command

yum install google-chrome-stable_current_x86_64.rpm --nogpgcheck

==============================================================================================
[root@localhost yum.repos.d]# file /usr/bin/passwd
/usr/bin/passwd: setuid ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, stripped

[root@localhost yum.repos.d]# cat google-chrome.repo
[google-chrome]
name=google-chrome
baseurl=http://dl.google.com/linux/chrome/rpm/stable/i386
enabled=1
gpgcheck=1


[root@localhost yum.repos.d]# yum install google-chrome-stable
Loaded plugins: langpacks, presto, refresh-packagekit
google-chrome | 951 B 00:00
rpmfusion-free-updates | 3.3 kB 00:00
skype | 1.2 kB 00:00
updates/metalink | 6.0 kB 00:00
Setting up Install Process
Resolving Dependencies
--> Running transaction check
.
.
.
Total size: 54 M
Total download size: 37 M
Is this ok [y/N]: y
Downloading Packages:


==============================================================================================

thats all you have now installed Google Chrome on your Linux(fedora,centos) machine.

Monday, May 2, 2011

VPS to VPS migration

* If we want to migrate a vps from one hardware node to another hardware node.

For example:-
In Hardware Node 1 VPS :- 999 3 running 10.10.1.10 www.ajeesh.com

I want to transfer this VPS to Hardware Node 2[10.10.6.5]

1. For vzmigrate first make a password less ssh login from HN1 to HN2. Using the ssh key method we can achieve this.

-bash-3.2# ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
57:31:fb:ac:5f:6f:36:0f:62:f5:88:09:76:73:47:1a root@Hardwarenode1.com

/]# cat id_rsa.pub
ssh-rsa Adfgdfgdfgdfgdfgdfgdfgdfgdf8P9XlxUtlgdfgdfE4hEduw5ir7oxsnDW9EM0/pm6w5iDpVcU0adoJypzcsNCrsFn/3hwJ2RsWJJzEUy+vYOXS2WdfgdfgdfgdfgdfgSywtHShkIU4jUF4MHNjWmx45StqrAr36IzjwniK9larIs9jCASDFDSFDFS/0ZXjnJgyRSQiju1rSGdYSDFSDFSDFSDFSDFSD== root@Hardwarenode1.com

Next SSH into Hardware Node 2and paste this key to /root/.ssh/authorized_keys

Next:- in screen here 10.10.6.5 is the IP address of HardwareNode2
-bash-3.2# vzmigrate --online -v 10.10.6.5 999
OPT:--online
OPT:-v
OPT:10.10.6.5
Starting online migration of CT 999 to 10.10.6.5
OpenVZ is running...
Loading /etc/vz/vz.conf and /etc/vz/conf/999.conf files
Check IPs on destination node: 10.10.1.10 192.168.0.10
Preparing remote node
Copying config file
999.conf 100% 1709 1.7KB/s 00:00
Saved parameters for CT 999
Creating remote container root dir
Creating remote container private dir
Initializing remote quota
Quota init
Turning remote quota on
Syncing private
Live migrating container...
Suspending container
Setting up checkpoint...
suspend...
get context...
Checkpointing completed succesfully
Dumping container
Setting up checkpoint...
join context..
dump...
Checkpointing completed succesfully
Copying dumpfile
dump.999 100% 514KB 513.6KB/s 00:00
Syncing private (2nd pass)
Syncing 2nd level quota
Dumping 2nd level quota
Copying 2nd level quota
quotadump.999 100% 21 0.0KB/s 00:00
Load 2nd level quota
Undumping container
Restoring container ...
Starting container ...
vzquota : (warning) Quota is running for id 999 already
Container is mounted
undump...
Adding IP address(es): 10.10.1.10 192.168.0.10
Setting CPU units: 1000
get context...
Container start in progress...
Restoring completed succesfully
Resuming container
Resuming...
Times:
Suspend + Dump: 0.53982
Copy dump file: 0.483621
Second rsync: 1.58368
2nd level quota: 0.631729
Undump + Resume: 0.685746
Total time: 3.92459
Cleanup
Killing container
Killing...
Container is unmounted
Removing dumpfiles
Destroying container
Destroying container private area: /home/vz/private/999
Container private area was destroyed

If you don't want to destroy the source vps please execute the following command

# vzmigrate -r no --online -v 10.10.6.5[HN2] 999[VEID of your VPS]

==========================================================
But this migration is only good for same Datacentre(on their LAN). Different Data centre and public transfer it is not a right choice.

rsync -vare ssh HN1:/* /vz/private// --progress --numeric-ids --exclude="/proc/*" --exclude="/dev/*"

HN to HN
rsync -vare ssh HN1(old serverIP):/vz/private//* /vz/private// --progress --numeric-ids
=============================================================