iptables -I INPUT -p tcp –dport 80 -i eth0 -m state –state NEW -m recent –update –seconds 60 –hitcount 5 -j DROP
This will allow only 5 connection simultanously from per IP.
This can also be to stop ddos attack on webserver.
iptables -I INPUT -p tcp –dport 80 -i eth0 -m state –state NEW -m recent –update –seconds 60 –hitcount 5 -j DROP
This will allow only 5 connection simultanously from per IP.
This can also be to stop ddos attack on webserver.
Looking to increase the /tmp on the linux server?
or getting frequent Mysql error due to /tmp running out of steps ?
below are the steps to increased /tmp partition,
##Stop Mysql in server##
/etc/init.d/mysql stop
###Find and kill the tailwatchd process###
pstree -p | grep tailwatchd
kill -9 < process ID>
#### Copy the /tmp to backup###
cp -prf /tmp /tmp.bak
###Set the /tmp to 2GB now###
dd if=/dev/zero of=/usr/tmpDSK bs=1024k count=2048
###Now find the size of tmp partition###
du -sch /usr/tmpDSK
### unmount /tmp partition
umount /tmp
###Format the /tmp partition###
mkfs -t ext3 /usr/tmpDSK
###Remount in secure environment###
/scripts/securetmp
###Now check size it should be 2GB###
df -h
Few modules or rpm are only available in EPEL repository
To get it via yum and install you need to first enable EPEL in your system
Below are the steps to enabled it
wget http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
Now you can run and install the required modules using yum
Did this like this post /help you in any ways ?
We also offer cheap managed vps solutions at Hillock Hosting.
http://hillockhosting.com
checking for type of socket size… size_t
“checking for SSL headers… configure: error: Cannot find ssl headers”
Getting above error on installing nrpe plugin on centos ?
Use below libraries to fix it
[root@nagios nrpe-2.12]# yum install openssl-devel
Once this is installed you can go ahead and configure NRPE plugin for nagios
Use below command to fix the issue of “/usr/bin/ld: cannot find -lglut”
yum install glut-devel
once done you can carry ahead the compilation
if you get error “vzquota : (error) quota file is corrupted”
Use below commands,
[root@server9 lock]# vzquota off 5000
vzquota : (error) quota file is corrupted
[root@server9 lock]# vzquota drop 5000
[root@server9 lock]# vzctl start 5000
Starting container …
Initializing quota …
Now wait for quota to get recreated
if you get error “vzquota : (error) can’t lock quota file, some quota operations are performing for id”
vzquota : (error) can’t lock quota file, some quota operations are performing for id 5000
vzquota on failed [7]
use below commands to check the process which has locked it
[root@server9 lock]# ps ax | grep vzctl
10400 pts/0 T 0:00 vzctl start 5000
# kill -9 10400
Now restart VPS using vzctl restart 5000 where 5000 is the VEID
Getting error “/usr/bin/rebuild-security-providers is needed” while using yum to install tomcat ?
run the below command to fix it
rpm -Uvh http://plone.lucidsolutions.co.nz/linux/centos/images/jpackage-utils-compat-el5-0.0.1-1.noarch.rpm
Now continue with your installation
“Alert: A vps with the id 110 already exists on the system. This either means this was created outside of hyperVM or else it got orphaned because hyperVM was interrupted forcibly in the midst of a migration”
If you get above error ,it means a vps or orphaned vps already exists
Below are the steps you need to resolve this issue
SSH to server —-> vzctl destroy 110
Now try to create vps from Hypervm panel