Tag archive for ‘number’

Quick check for a ddos via number of connections

A quick and usefull command for checking if a server is under ddos is: netstat -anp |grep ‘tcp\|udp’ | awk ‘{print $5}’ | cut -d: -f1 | sort | uniq -c | sort -n That will list the IPs taking the most amount of connections to a server. It is important to remember that the [...]

When To Use Indexes In MySQL

This comes up in discussions almost every new project I work on, because it’s a very important thing to consider when designing a database. When deciding when and how to create an index in your MySQL database, it’s important to consider how the data is being used. Let’s say you have a database of employees. [...]

unneeded services

Step 1: Now we will remove all software groups, to get Centos to a minimum Step 1.1: Run grouplist to see what software groups that are installed: yum grouplist Step 1.2: Remove all groups that are installed EXCEPT “Yum Utilities” yum groupremove “GroupName” Step 2: Lets disable unneeded services: chkconfig anacron off chkconfig atd off [...]

How to Delete Files Older Than x Days on Linux

The find utility on linux allows you to pass in a bunch of interesting arguments, including one to execute another command on each file. We’ll use this in order to figure out what files are older than a certain number of days, and then use the rm command to delete them. Command Syntax find /path/to/files* -mtime [...]

Changing the SSH port on cPanel Servers

To change the SSH port number login as root, and edit /etc/ssh/sshd_config Find the line that says Port 22 and change 22 to any number between 1024->65535 (above 30000 is best) and save the file. Once done, run: /etc/init.d/sshd restart Now start a new SSH session (don’t close your existing one), to make sure that [...]

Plesk: Unable to create PHostingManager object:Unable to set current ip address

You may notice an error message “Unable to create PHostingManager object:Unable to set current ip address: IP address is missing” in Plesk when trying to manage a domain from Domains >> domainname.tld. The error appears when an IP assigned to a domain is not assigned to the ‘Owner’ of the domain. To fix the issue, [...]

Howto: deny/allow IP using iptables

How to block an IP using iptables? iptables -A INPUT -s xx.xx.xx.xx -j DROP How to block an IP for a specific port: iptables -A INPUT -p tcp -s xx.xx.xx.xx –dport PORT -j DROP How to allow access to an IP? iptables -A INPUT -s xx.xx.xx.xx -j ACCEPT How to allow access to an IP [...]

Choosing MaxClients

The MaxClients directive sets the limit on the number of simultaneous requests that can be supported. No more than this number of child server processes will be created. To configure more than 256 clients, you must edit the HARD_SERVER_LIMIT entry in httpd.h and recompile. In our case we want this variable to be as small [...]

Set HTTP Expires header

With Apache, one easy way to do this is to generate a link that contains a build/version number or date in the path, e.g: /css/{build-number-or-date}/file.css In Apache, in your configuration file (e.g. .htaccess if that is all you have access to) you can set the Expires header and rewrite your url to the real location. [...]

PureFtp + Not able to list more than 2000 files

Problem: Not able to list more than 2000 files in a directory using Ftp. Solution: The pure-ftp by default limit maximum number of # files to be displayed to 2000. So edit your pureftpd configuration file which is at /etc/pure-ftpd.conf and change the line LimitRecursion 2000 8 to LimitRecursion 5000 8 Save the file and [...]

Enter your email address:

Liên Kết Website

web design | Shared linux windows problems | Dedicated server | website chất lượng cao | hosting chất lượng cao | Tutorial video collection | Troubleshooting Tips and Tutorial