Monday 31 October 2011

open a port in linux


--- Follow the command given below --- :-


**********-------------*********

How to open port 21 in iptables ::

-------------------------

root@fs8 [/home]# iptables -I INPUT -p tcp -i eth0 --dport 2222 -j ACCEPT

Tuesday 25 October 2011

Steps to setting up VPS quota


I do see what you are referring to, and I think this is going to have to do with the quota settings on the VPS. .

//**Ensure the following steps have been completed, and let me know if you have any other questions.>:-

After installing cPanel the following steps to be executed if less than 500 accounts users/groups are going to be hosted:
You should perform the following steps in Parallels Management Console :--

-- Please keep in mind we are not able to directly support the administration and setup of a VPS, and 
   therefore take no responsibility for the use of the following steps.

***************************

1). Open the Properties window of the needed Container by right-clicking
    the corresponding Container line in the right pane of the Parallels Management Console window.

2). Select the Resources tab in the Properties window of the selected Container.

3). In the left pane, select Disk Quota.

4). Double click on quotaugidlimit on the right panel.

5). Uncheck "2nd level quota off" if it is checked already.

6). Set the hard limit value of quotaugidlimit to 1000.

7). Click the OK button on all open Windows.

8). If you are promoted for rebooting the VE, accept it. Else manually reboot the VE.

    Once reboot is completed,login to cPanel and run the Initial Quota Setup. Now the quotas should be working fine.

Monday 24 October 2011

MySQL-Sock


/** Just follow the command given below **//:--

---------------------------------------

** First check if you have Spanned processes for mysql by the following command :--

netstat -apn or ps -aux 

Then.. 

service mysql stop 

Check for any mysql PID and give the following command with the Process ID 

kill -9 PID 

killall -e -9 mysqld 

Once the process is killed mysql is cleaned from the server. 

Check under /tmp partition if you the socket file created like ( mysql.sock --> /var/lib/mysql/mysql.sock ) If not then.. 

************************************************************

//**Do the following :--

touch /var/lib/mysql/mysql.sock 

chmod 0777 /var/lib/mysql/mysql.sock

Then under /tmp 

ln -s /var/lib/mysql/mysql.sock mysql.sock ( this command will create the socket linked to /var/lib/mysql/ ) 

Finally restart mysql server if the problem still persist try to increase the mysql connections from /etc/my.cnf

Saturday 15 October 2011

Mount hard drive


 ** follow the given instruction  :--

root@server [~]# fdisk -l

Disk /dev/hda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 14593 117218241 83 Linux

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 535 4192965 82 Linux swap / Solaris
/dev/sda3 536 19457 151990965 83 Linux


Once detected, /dev/hda1, just mount it using mount /dev/hda1 /backup assuming that the backup folder is already in place

root@server [/]# mount /dev/hda1 /backup/

root@server [/]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 141G 16G 118G 12% /
/dev/sda1 99M 11M 83M 12% /boot
tmpfs 1008M 0 1008M 0% /dev/shm
/usr/tmpDSK 485M 11M 449M 3% /tmp
/dev/hda1 111G 188M 105G 1% /backup


So the secondary drive has been mounted as /backup.

Now to make it permanent you will need to edit /etc/fstab.

/dev/hda1 /backup ext3 defaults 1 1

***********

Mounted and completed.


[Note] :--

Please keep this information in your KB for future reference