Tag archive for ‘centos’

services that are not necessary on a web server

These are some services I would normally turn off on web servers. NOTE: usage may vary. gpm — mouse mdmonitor — monitor raid devices netfs — nfs, samba etc… autofs — automount, nfs, cd etc… kudzu — detect new hardware restorecond — monitor selinux file context mcstrans — mandatory access control selinux translation There may [...]

How do I solve vzquota error: “vzquota : (error) Quota on syscall for 101: Device or resource busy”?

Resolution Please make sure there are no open files inside a container root and/or private area (and your current working directory is not inside a container root/private area) by running the following command on the hardware node (assuming there is a problem with the container #101): # lsof 2> /dev/null | egrep ‘/vz/root/101|/vz/private/101′ If there [...]

Linux Find Out If PCI Hardware Supported or Not In The Current Running Kernel

A typical question from my mailbag: How do I find out if a given PCI hardware is supported of by the current CentOS / Debian / RHEL / Fedora Linux kernel? You can easily find out find out if a given piece of PCI hardware such as RAID, network, sound, graphics card is supported or [...]

Mapping subdomains to parametered web pages in Apache

Mapping john.webserver.com to http://www.webserver.com/user.php?name=john is just by changing a few parameters in http.conf file In httpd.conf file, <VirtualHost se.rv.er.ip.ad.re.ss> ServerAdmin info@servername.com DocumentRoot /var/www ErrorLog /var/log/apache/apache-error.log TransferLog /var/log/apache/apache.log ServerName www.servername.com ServerAlias *.servername.com RewriteEngine on RewriteCond %{HTTP_HOST} !^www.* [NC] RewriteCond %{HTTP_HOST} ^([^\.]+)\.servername\.com RewriteRule ^/$ http://www.servername.com/user.php?user=%1 </VirtualHost> The lines for this feature, RewriteEngine on activating rewrite option RewriteCond [...]

XEN Virtualization Set The MTU For xenbr0 Interface

I’ve already written about setting the MTU (Maximum Transmission Unit) under Linux including Jumbo frames (FreeBSD specific MTU information is here). With this quick tip you can increase MTU size to get a better networking performance. How do I setup MTU under XEN xenbr0 interface? You can easily set MTU under XEN (xenbr0) using ifconfig [...]

Howto: Linux convert an image between different formats from command prompt

Q. How do I convert images from a shell prompt? For example convert an image in the JPEG format to PNG or vise versa? A. You need to use the convert command which is a member of the ImageMagick suite of tools. Use it to convert between image formats as well as => Resize an [...]

URL File-Access is Disabled in the Server Configuration

Warning: include() [function.include]: URL file-access is disabled in the server configuration is an error obtained by using the include command. Lucky for webmasters, this error is easily fixed via several different methods. Why This Error Occurs If you’re seeing this error, we are willing to bet that you are using the include statement as seen [...]

MySQL skip duplicate replication errors

MySQL replication will stop if an error occurs when running a query on the slave. The reason is so you can resolve the problem, thus keeping the data consistent with the master. You can skip those errors if you know those queries and why they are failing. Skip one query mysql>SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; START SLAVE; [...]

Changing Timezones

# rm /etc/localtime # ln -s /usr/share/zoneinfo/Asian/SaiGon /etc/localtime # hwclock –systohc Incoming search terms:change lighttpd timezone (1)lighttpd timezone (1)

[HOW] Apache Security – Local attack prevent

First of all , login to root account : Open the file “php.ini” by nano editor nano /usr/local/lib/php.ini Find the word “safe_mode” [ Ctrl + W and type "safe_mode" ] Change Off to On [ "safe_mode = Off" to "safe_mode = On" ] Find “disabled_functions” [ Ctrl + W and type "disabled_functions" ] and add [...]