Monday, 4 March 2013

Starting nginx: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)


Error while starting nginx


]# /etc/init.d/nginx restart
Stopping nginx:                                            [FAILED]
Starting nginx: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] still could not bind()


Solution:
# fuser -k 80/tcp

# /etc/init.d/nginx restart
Stopping nginx:                                            [  OK  ]
Starting nginx:                                            [  OK  ]


Thats it !!

How to install eAccelerator on CentOS

Download  eAccelerator :
# wget http://downloads.sourceforge.net/project/eaccelerator/eaccelerator/eAccelerator%200.9.6.1/eaccelerator-0.9.6.1.zip

# unzip eaccelerator-0.9.6.1.zip

# cd eaccelerator-0.9.6.1


# /usr/local/bin/phpize
or
# phpize

If you are getting below error while using the command "phpize" , then you need to install the missing package.

-bash: phpize: command not found

On php 5.2
# yum install php-devel

On php 5.3
# yum install php53-devel


# ./configure --enable-eaccelerator=shared --with-php-config=/usr/local/bin/php-config
or
# ./configure


# make
# make install

Grep the php.ini file
# php -i | grep php.ini
Configuration File (php.ini) Path => /usr/local/etc/php5/cgi
Loaded Configuration File => /usr/local/etc/php5/cgi/php.ini

Open php.ini file
# vi /usr/local/etc/php5/cgi/php.ini

Add the below line at the end of  the php.ini file.
extension="eaccelerator.so"

Restart the Apache 
# /etc/init.d/httpd restart

Check whether eAcceleartor has installed or not
# php -v

PHP 5.3.22 (cli) (built: Feb 23 2013 23:45:01)

Copyright (c) 1997-2013 The PHP Group

Zend Engine v2.3.0, Copyright (c) 1998-2013 Zend Technologies

    with eAccelerator v0.9.6.1, Copyright (c) 2004-2010 eAccelerator, by eAccelerator


Thats it !!

Thursday, 28 February 2013

Install Fantastico De Luxe WHM Admin on cPanel Server


#  cd /usr/local/cpanel/whostmgr/docroot/cgi
#  wget -N http://files.betaservant.com/files/free/fantastico_whm_admin.tgz
#  tar -xzpf fantastico_whm_admin.tgz 
#  rm -rf fantastico_whm_admin.tgz



NOTE: if you have problems contacting this server, please try this alternate location:
wget -N http://netenberg.com/files/free/fantastico_whm_admin.tgz


Go to WHM, login as root and click on Tweak Settings, then you should ensure  the Ioncube loader is selected for the backend copy of PHP. Save changes.

Now Go to cPanel/WHM >> Plugins >> Fantastico De Luxe WHM Admin  >> Install.







How to Install/Remove WHMXtra on cPanel Server

Install WHMXtra on cPanel Server via SSH:

# wget http://whmxtra.com/pro/pro.sh
# sh pro.sh

Remove WHMXtra on cPanel Server via SSH:

# wget http://whmxtra.com/pro/remitall.sh
# sh remitall.sh


Tuesday, 26 February 2013

directive requires additional arguments


You may get the below error while starting the httpd on Kloxo 

Starting httpd: Syntax error on line 2 of /home/apache/conf/defaults/_default.conf:
<VirtualHost> directive requires additional arguments
[FAILED]


Solution:  

# sh /script/fixweb

Thats fixed my issue.


Saturday, 23 February 2013

How to enable mod_cache, mod_disk_cache, mod_mem_cache, mod_file_cache on DirectAdmin

First you need to compile Apache to enable the below modules on DirectAdmin control panel

mod_cache
mod_disk_cache
mod_mem_cache
mod_file_cache

 Edit the configure.apache file and add the needed modules

# cd /usr/local/directadmin/custombuild/configure/ap2
# vi configure.apache

Add the below modules at the bottom of the file.

        "--enable-cache" \
        "--enable-mem-cache" \
        "--enable-disk-cache" \
        "--enable-file-cache"



Example of  configure.apache file :

# vi configure.apache

#!/bin/sh
"./configure" \
        "--prefix=/etc/httpd" \
        "--exec-prefix=/etc/httpd" \
        "--bindir=/usr/bin" \
        ........................................
         ..........................................
             .........................................
                .........................................

        "--with-ssl=/usr" \
        "--enable-headers"\
        "--enable-cache" \
        "--enable-mem-cache" \
        "--enable-disk-cache" \
        "--enable-file-cache"

Save and Exit.

Now, compile the Apache as below,

#  cd /usr/local/directadmin/custombuild
#  ./build apache

Command to check :
# httpd -l | grep mod_cache
  mod_cache.c

# httpd -l | grep mod_disk_cache
  mod_disk_cache.c


Thats worked for me !!


Thursday, 21 February 2013

Warning in CSF : Check csf SYSLOG_CHECK option (This option helps prevent brute force attacks on your server services)

Warning in CSF : Check csf SYSLOG_CHECK option (This option helps prevent brute force attacks on your server services)

Solution:
# vi /etc/csf/csf.conf

search for "SYSLOG_CHECK" and change the value something like 600.
save and exit the configuration file.

Restart the CSF firewall
#csf -r
:)