How to open ports in windows server.

May 27, 2008 on 5:06 pm | In Windows | No Comments

Just perform the following operations.

Start > Control Panel > Windows Firewall > move to Exceptions tab > Add port/

Thats all

Isn’t it so easy? :)

Install php 5.2 in Ubuntu

May 21, 2008 on 3:36 am | In PHP | No Comments

Installing PHP 5.2

Adding the Dotdeb repository

We’re going to add the Dotdeb repository, which will provide the latest versions of PHP for Debian. We need to modify the sources.list file by running the following command

vi /etc/apt/sources.list

Once you have sources.list file open, add the two following lines

deb http://packages.dotdeb.org stable all
deb-src http://packages.dotdeb.org stable all

Now let’s update the packet database to add those of Dotdeb. The version of Dotdeb packets being always superior to those of Debian, the Dotdeb versions will be automatically selected during the installation of PHP

Installing PHP 5

After having added the Dotdeb repository, we can move on to installing PHP:

apt-get install php5-mysql
apache2ctl restart

Test PHP by checking the phpinfo page

MySql >= 4.1 Client does not support authentication protocol…

May 17, 2008 on 5:13 am | In Mysql | No Comments

If you upgrade your MySql server to >= 4.1 you might get the following error:

Client does not support authentication protocol requested by server; consider upgrading MySQL client

This happens because the latest versions of MySql uses a new format for the password (it’s a longer hash). In order for old clients to continue to use the newer server, you have to set the passwords on the server to their old format or upgrade your client. Because upgrading the client can sometimes be a pain, it’s often easier to just update the passwords to the old format on the server.

Run mysql and login as root:
mysql -u root -p

Then, paste the following command, editing as necessary, to change the password of the user to the old format.

UPDATE mysql.user
SET password=OLD_PASSWORD(’somepassword’)
WHERE user=’someuser’
AND host=’somehost’;

After you have set the passwords to the old format, flush the tables.

flush privileges;

Then exit the mysql client with “quit” and you are set.

For windows.

In my.ini file in the mySQL directory (C:\Program Files\MySQL\MySQL Server 4.1\my.ini),
add the following line after [mysqld]

old_passwords

top: error while loading shared libraries: libncurses.so.4: cannot open shared object file: Error 40

May 14, 2008 on 3:44 am | In Centos, Linux | 1 Comment

This error is received when top command is executed.

top
top: error while loading shared libraries: libncurses.so.4: cannot open shared object file: Error 40

Fix.

locate libncurses.so.5

lib/libncurses.so.5
/usr/lib/libncurses.so.5
/usr/lib/libncurses.so.5.5

create symblinks
ln -s /lib/libncurses.so.5 /lib/libncurses.so.4
ln -s /usr/lib/libncurses.so.5 /usr/lib/libncurses.so.4

the location may be different. Just create symblink from libncurses.so.4 to libncurses.so.5

load the configuration
ldconfig

Uninstall APF

May 14, 2008 on 2:11 am | In APF | No Comments

rm -rf /etc/apf
rm -f /etc/cron.daily/fw
rm -f /etc/init.d/apf
rm -f /usr/local/sbin/apf

change site’s IP address in Plesk

May 9, 2008 on 3:25 am | In Plesk | No Comments

In order to change the IP.

Plesk > click Domain.com > setup > IP address dropdown box.

However, if you have only one IP, dropdown will not be shown.

If you are the admin and you see only one IP and no drop down under IP in setup.
First you need to add the IP in the pool of client.

Let me explain it more clearly.

eg: client >>> john is having domains>> abc.com , xyz.com

If you need to change the IP of abc.com

clients > John > abc.com > setup > IP

Here is you see only one IP, then that means only one IP is in the pool of John. so first add the required IP in the pool of John

clients > John > IP pool > Add new IP address.

Now this added IP will in the dropdown at

clients > John > abc.com > setup > IP

Mysql History Commands typed

May 7, 2008 on 9:35 am | In Mysql | No Comments

Check your Mysql history file

======================
vi /root/.mysql_history
======================

If you don’t find the file under /root, find out the file using

======================
locate .mysql_history
======================

VPS Commands

May 6, 2008 on 2:50 pm | In OpenVZ | No Comments

1) vzlist -a : Shows list of all the VPS’s hosted on the Node.

====================
(This
is the ID)
CTID NPROC STATUS IP_ADDR HOSTNAME
1 96 running 67.xx.xx.xxx
358 77 running 67.xx.xx.xxx
454 124 running 67.xx.xx.xxx
525 79 running 74.xx.xx.xxx
527 92 running 67.xx.xx.xxx
568 73 running 74.xx.xx.xxx
570 86 running 67.xx.xx.xxx
574 11 running 75.xx.xx.xxx
579 13 running 75.xx.xx.xxx
583 79 running 67.xx.xx.xxx

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

2) vzctl start ID: To start the VPS.

====================
[root@virtuozzo06 ~]# vzctl start 111
Starting Container …
Container is mounted
Setup slm memory limit
Setup slm subgroup (default)
Setting devperms 20002 dev 0×7d00
Adding port redirection to Container(1): 8443 4643
Adding IP address(es) to pool:
Adding IP address(es):
arpsend: 4 is detected on another computer : 00:1a:30:38:90:00
vz-net_add WARNING: arpsend -c 1 -w 1 -D -e 67.228.31.50 -e 67.228.43.67 -e 67.228.43.78 -e 75.126.196.183 -e 10.10.16.154 eth1 FAILED
Hostname for Container set:
File resolv.conf was modified
Container start in progress…
[root@virtuozzo06 ~]#
====================

3) vzctl stop ID : To stop (Shut Down) the VPS

====================
[root@virtuozzo06 ~]# vzctl stop 111
Stopping Container …
Container was stopped
Container is unmounted
====================

4) vzctl status ID : To view the status of the particular VPS

[root@virtuozzo06 ~]# vzctl status 111
VEID 111 exist mounted running

5) vzctl stop ID –fast : to stop the VPS quickly and forcefully
====================

[root@virtuozzo06 ~]# vzctl status 111
VEID 111 exist mounted running
[root@virtuozzo06 ~]# vzctl stop 111 –fast
Stopping Container …
Container was stopped
Container is unmounted

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

6) vzctl enter VPS_ID : To enter in a particular VPS
====================
[root@virtuozzo06 ~]# vzctl enter 111
entered into Container 111
-bash-3.00#
====================

Configuration Commands

1) vzctl set ID –hostname vps.domain.com –save : To set the Hostname of a VPS.
2) vzctl set ID –ipadd 1.2.3.4 –save : To add a new IP to the hosting VPS.
3) vzctl set ID –ipdel 1.2.3.4 –save : To delete the IP from VPS.
4) vzctl set ID –userpasswd root:new_password –save : to reset root password of a VPS.
5) vzctl set ID –nameserver 1.2.3.4 –save : To add the nameserver IP’s to the VPS.
6) vzctl exec ID command : To run any command on a VPS from Node.
7) vzyum ID install package_name : To install any package/Software on a VPS from Node.

About Partition Image

May 1, 2008 on 8:36 am | In Linux | No Comments

Partition Image is a Linux/UNIX utility which saves partitions in the EXT2, Reiserfs, NTFS, HPFS, FAT16, and FAT32 file system formats to an image file.

The image file can be compressed with gzip or bzip2 in order to save disk space, and it can be split in order to fit onto a series of floppy disks. This program is mainly used for backup purposes.

A boot disk is also provided, allowing you to run Partition Image without Linux installed on the hard disk.

More About Partition Image :

http://www.partimage.org/Main_Page

Manual of Partition image :

http://www.partimage.org/Partimage-manual_Usage