ABHIONLINUX
Site useful for linux administration and web hosting

2012/12/29

x264 installation

You can install latest x264 by the steps given below.

git clone git://git.videolan.org/x264.git
 ./configure  --enable-pic --enable-shared

make
make install

Git installation

You can follow the given steps to install git.

server # wget http://git-core.googlecode.com/files/git-1.7.8.4.tar.gz
server # ./configure
server # make
server # make install

Once this is completed without any errors, git will be working fine on your server.

Errors:
===================

GITGUI_VERSION = 0.14.0.13.g843d65
    * new locations or Tcl/Tk interpreter
    GEN git-gui
    INDEX lib/
    * tclsh failed; using unoptimized loading
    MSGFMT    po/de.msg make[1]: *** [po/de.msg] Error 127
======================

During make, you may get the above error.

Fix : You need to install gettext

server # yum install gettext 




Attracta installation in cpanel

Attracta provides free seo tools that will be useful for your client to improve your site seo performance.
Following are the steps to install latest attracta in cpanel.

===============================

wget -N www.attracta.com/static/download/Attracta-SEO-cPanel-Stable.sea
chmod +x Attracta-SEO-cPanel-Stable.sea
./Attracta-SEO-cPanel-Stable.sea
==============================

Try this and enjoy the magic of attracta.

2012/10/20

Compiling nagios-plugins-1.4.16 throws an error


While compiling nagios plugins, you can get an error given below.

==========================
 check_http.c:312:9: error: ‘ssl_version’ undeclared (first use in this function)
....
make[2]: *** [check_http.o] Error 1
make[2]: Leaving directory `/usr/local/src/nagios-plugins-1.4.16/plugins'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/nagios-plugins-1.4.16'
make: *** [all] Error 2
========================

Fix :
yum install libssl-dev
yum install openssl*

Once this is installed , you will be able to compile the plugins without any issue.

View linux plesk admin password

You can view linux plesk admin password using


[root@server ~]#  /usr/local/psa/bin/admin --show-password
PasSwoRd



2012/10/18

PCNTL installation in cpanel

PCNTL is php funtion that can be use the control and manage process. It is similar to process creation, execution , termination in unix.

Following are the steps to install PCNTL funtion in cpanel server.

1. Create a file all_php5 in the folder /var/cpanel/easy/apache/rawopts
2. Add  '--enable-pcntl' in the file all_php5.
3. Rebuild apache using /scripts/easyapache

You can verify it using  php -m | grep pcntl



2012/07/06

Unable to start init, probably incorrect template OpenVZ

If you are getting the error “Unable to start init, probably incorrect template” while starting a VPS. The “incorrect template” problem occurs when the “init” on the VPS goes missing. 
Init file should be there in  /sbin
You can check it using 


ls -la /vz/private/VID/sbin/init


If the file is missing or the file size is zero, your VPS won’t start. In order to resolve problem, you can either copy the ‘init’ from a different VPS using the same OS template i.e


cp /vz/root/VEID1/sbin/init /vz/private/VEID/sbin/


you can untar the OS template located under /vz/template/cache/ directory and copy the ‘init’ file there i.e.


tar -zxf /vz/template/cache/os_template.tar.gz
cp /vz/template/cache/sbin/init /vz/private/VID/sbin/



Then you can start your vps

vzctl start VID

2012/05/04

Virus scan in ftp uploaded files using pureftpd in cpanel



Following are the steps that needs to be followed to scan the ftp uploading files for virus in pureftpd

As a first step, you have to installed clamav in the server.
You can install it from whm
clicking on : Cpanel —> Manage Plugins —> on clamavconnector
Check the “Install and Keep Updated” and then save it

Once clamav has been installed, you need to modify the ftp conf at /etc/pure-ftpd.conf

Make the changes as given below.

CallUploadScript yes

Next step is to create a bash script to scan the uploading files using clamav


#!/bin/bash
#Maximum file size to scan in bytes that's set to 15MB
MAXSIZE=15485230
if [ "$UPLOAD_SIZE" -le "$MAXSIZE" ]; then
    /usr/bin/clamdscan  --remove --quiet --no-summary "$1"
fi

Make the file executable,
chmod 755 /etc/pure-ftpd/clamav_check.sh

Now you will have to start the pure-uploadscript to run our script every time when a file is uploaded. You can do this by the following command.

/usr/sbin/pure-uploadscript -B -r /etc/pure-ftpd/clamav_check.sh
 -B     Daemonize the process and fork it in background.
 -r  
              Tell what program/script to run. It has to be an absolute filename, the PATH environment variable is ignored.

Thats it. Now all the files uploaded using ftp will be scanned for virus. Now what we need is to start this script when the server is rebooted. ie you need to add the script in rc.local

echo "/usr/sbin/pure-uploadscript -B -r  /etc/pure-ftpd/clamav_check.sh" >> /etc/rc.d/rc.local

Now you can restarted ftp service.
service pure-ftpd restart

2012/03/23

GlobalSign-OneClickSSL cpanel plugin installation

You can install GlobalSign-OneClickSSL cpanel plugin using the following steps.

Download the latest plugins at https://www.globalsign.com/ssl/oneclickssl/cpanel/cpanel-download.html

wget http://www.globalsign.com/downloads/oneclickssl/cpanel/GlobalSign-OneClickSSL-cPanel-Plugin-2.81.sea
chmod 755 GlobalSign-OneClickSSL-cPanel-Plugin-2.81.sea
./GlobalSign-OneClickSSL-cPanel-Plugin-2.81.sea


For the working of oneclick ssl, you will need to install the following perl modules. This wont be installed by default. You can install it using cpanel scripts.



/scripts/perlinstaller File::Touch
/scripts/perlinstaller Config::Crontab
/scripts/perlinstaller Mozilla::CA
/scripts/perlinstaller YAML::Sick
/scripts/perlinstaller Date::Simple
/scripts/perlinstaller JSON
/scripts/perlinstaller WWW::FieldValidator
/scripts/perlinstaller Digest::MD5
/scripts/perlinstaller IO::Handle
/scripts/perlinstaller IPC::Open3
/scripts/perlinstaller SOAP::Lite
/scripts/perlinstaller Template









2012/02/19

Softaculous installation in cpanel server

Softaculous is an auto installer that contains lots of scripts. You can check the steps given below on how to install softaculous on a cpanel server.

Before installation you need to make sure that ioncube loader  is installed and are enabled. You should select "cpanel php loader" as ioncube in whm --> tweak settings.

Now loginto server as root
cd /usr/local/cpanel/whostmgr/docroot/cgi 
wget -N http://www.softaculous.com/ins/addon_softaculous.php
chmod 755 addon_softaculous.php

Now you can manage softaculous from whm
WHM > Plugins (Add-Ons on older versions than 11) > Softaculous - Instant Installs





How to install cloudlinux in cpanel server

Cloudlinux with cpanel enhances resource usage management , security and performance. Below is the steps on how to install cloudlinux on cpanel server.


Before insallation make sure that you are having apache 2.2/1.3 , suexec should be enabled, Apache MPM should be prefork, worker or event.
1. You have to download the cloudlinux autoinstaller 
wget http://repo.cloudlinux.com/cloudlinux/sources/cln/centos2cl

2. Install it using
sh centos2cl -k license-key

Licensekey should be replaced with the cloudlinux licesnse that you have got from cloudlinux.

3. You have to reboot your server into cloudlinux kernal and has to install cpanel cloudlinux modules and plugins.
yum install cpanel-lve   cpanel-lvemanager

Now you can manage cloudlinux for whm using  WHM -> Plugins -> LVE Manager




2012/01/12

Softaculous : Your license is not active or it has expired. If your license has expired, please renew it to continue using this Software.

If you want to synchronize your license after purchasing one, click on the Refresh License link in your Softaculous Admin Panel. That will syncronize your license information. To synchronize the Scripts / Software, go to the Software Tab in your Softaculous Admin Panel and click on "Update Settings". You will see a log of all scripts being updated.



Softaculous syncronizes with servers for files and License information when CRON is run. You can force CRON to run via some shell commands to imediately sychronize for the License Information or for Script Files. These commands vary from panel to panel so please run the commands as per your Panel.
For cPanel SSH to your server as root and enter following commands 



/usr/local/cpanel/3rdparty/bin/php /usr/local/cpanel/whostmgr/docroot/cgi/softaculous/cron.php