Command to check mod_pagespeed

December 21st, 2012 Comments off

Command to check mod_pagespeed is installed in server.

curl -D http://127.0.0.1

You will get below output.

 

Date: Fri, 07 Sep 2012 21:51:06 GMT
Server: Apache/2.2.3 (CentOS)
X-Mod-Pagespeed: 0.10.22.4-1633

 

Categories: Apache, CPanel / WHM, Installation Tags:

How to: Install mod_pagespeed in cpanel

December 21st, 2012 Comments off

How to: Install mod_pagespeed in cpanel

Login to the server via SSH

Go to below folder

cd /usr/local/src

create directory

mkdir mod_pagespeed

Download pagespeed rpm

wget https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-beta_current_i386.rpm

Extract the rpm

rpm2cpio mod-pagespeed-beta_current_i386.rpm | cpio -idmv

Copy the modules to apache modules folder

cp /usr/local/src/mod-pagespeed/usr/lib/httpd/modules/mod_pagespeed.so /usr/local/apache/modules/

cp /usr/local/src/mod-pagespeed/etc/httpd/conf.d/pagespeed.conf /usr/local/apache/conf/

Provide execute permission

chmod 755 /usr/local/apache/modules/mod_pagespeed.so

Create below folders

mkdir /var/mod_pagespeed/{cache,files} -p

Provide correct ownership

chown nobody:nobody /var/mod_pagespeed/*

mod_pagespeed has a dependency that you’ll want to enable: mod_deflate (the httpd source directory (2.2.16) may vary depending on your install):

/usr/local/apache/bin/apxs -c -i /home/cpeasyapache/src/httpd-2.2.16/modules/filters/mod_deflate.c

We have to edit mod_pagespeed configuration file located at /usr/local/apache/conf/pagespeed.conf to reflect the correct paths, the LoadModule directives should fetch the modules in “modules/module_name.so”

LoadModule pagespeed_module modules/mod_pagespeed.so
LoadModule deflate_module modules/mod_deflate.so
ModPagespeedFileCachePath "/var/mod_pagespeed/cache/"
ModPagespeedGeneratedFilePrefix "/var/mod_pagespeed/files/"

After that, we’ll need to include the mod_pagespeed configuration in Apache’s configuration file (/usr/local/apache/conf/httpd.conf):

Include conf/pagespeed.conf

In order to keep the changes permanant run the command below.

/usr/local/cpanel/bin/apache_conf_distiller –update

Now restart apache service.

 

 

Categories: Apache, CPanel / WHM, Installation Tags:

Unknown License File Version in cpanel : Failed to get a new license, or part of the update process failed

December 15th, 2012 Comments off

Sometime while accessing WHM, some links are giving below error.

===============================================
Unknown License File Version (has = 23, needed = 22, length=1554). This means that the system failed to get a new license, or part of the update process failed. If you are the server admin,
===============================================

 

To resolve this issue follow the below steps

/usr/local/cpanel/cpkeyclt

If above commands work then it’s ok but if it is still show above error then follow the below steps

run the below command to stop cpsrvd service

/usr/local/cpanel/etc/init/stopcpsrvd

then sync the files from cpanel server using below command this will fix your issue.

/usr/local/cpanel/scripts/upcp –sync

Categories: CPanel / WHM Tags:

How To: Find Symlink under UNIX / Linux

December 15th, 2012 Comments off

How To: Find Symlink under UNIX / Linux

Now, a days sym/root hacking is famous and hacker can create a sym/root folder by using script.
How do I find symlink(s) under UNIX and Linux operating systems?

Use the below command to find symlink directory

find /path/to/dir -lname /path/to/file

OR

If you want to search sym/root folder under users account on server then run the below command in /home

cd /home

find -lname /root

The above command will find sym/root folder under all the users but it will take time. There is another method which is described below.

Install mlocate on server using yum.

yum install mlocate -y

Once it is installed then run below command to update locate database.

updatedb

then run below command to search the server

locate sym/root

Above command will locate all the folder which is having symlink of root.

 

mysql is disabled by sys admin while restarting mysql service

December 15th, 2012 Comments off

Sometimes it may happen that while restarting mysql service on server you are getting below error.

mysql is disabled by sys admin

Try running below script to bring mysql up again

/scripts/mysqlup

If it’s Up then ok, but sometime it will give below error

Updates for mysql /etc/mysql disabled

If it is not working then go to /etc folder

cd /etc

Run the below command there

root@testserver [/etc]#ls -ld mysql*

It will give below output

-rw-r–r– 1 root root 0 Aug 16 21:19 mysqldisable

Move that file using below command

root@testserver[/etc]# mv mysqldisable mysqldisable-bak

Then restart mysql will fix your issue.

root@testserver[/etc]# /scripts/mysqlup

 

Categories: CPanel / WHM, MySql Tags:
%d bloggers like this: