It is currently Thu May 02, 2024 8:55 am

News News of Server Side Actions

Site map of Server Side Actions » Forum : Server Side Actions

Here you can find tutorials and notes for server-side maintenance/configuration
Forum rules
All information is given AS IS

Recompile cPanel internal PHP with Curl/CurlSSL support

To recompile internal cPanel PHP with Curl/CurlSSL support which may be required for additional cPanel plugins/addons one should adjust internal PHP profile first.
Let`s check current settings set in the profile:
Code: Select all
# grep -i curl /var/cpanel/easy/apache/profile/makecpphp.profile.yaml
Cpanel::Easy::PHP4::Curl: 0
Cpanel::Easy::PHP4::CurlSSL: 1
Cpanel::Easy::PHP5::Curl: 0
Cpanel::Easy::PHP5::CurlSSL: 1
Cpanel::Easy::PHP5::Curlwrappers: 0

Modify profile for your needs (in this particular case enable Curl/CurlSSL):

perl -i -pe 's/Cpanel::Easy::PHP4::Curl: 0/Cpanel::Easy::PHP4::Curl: 1/g' /var/cpanel/easy/apache/profile/makecpphp.profile.yaml
perl -i -pe 's/Cpanel::Easy::PHP4::CurlSSL: 0/Cpanel::Easy::PHP4::CurlSSL: 1/g' /var/cpanel/easy/apache/profile/makecpphp.profile.yaml
perl ...
Read more : Recompile cPanel internal PHP with Curl/CurlSSL support | Views : 4205 | Replies : 0


cPanel install script "latest" inside

As you may already know, cPanel uses makeself (Make self-extractable archives on Unix) to generate their initial install shell script called "latest".
It`s quite easy to determine it:
Code: Select all
wget -N http://httpupdate.cpanel.net/latest
head latest

#!/bin/sh
# This script was generated using Makeself 2.1.3
...
label="Cpanel & WHM Installer"
...

So, "latest" cPanel installer is just self-extractable tar.gz archive from a directory. Let`s view built-in makeself metadata/info:
# sh latest --help

Makeself version 2.1.3
1) Getting help ...
Read more : cPanel install script "latest" inside | Views : 3530 | Replies : 0


Plain text <-> hexdump (TODO) Plain text <-> hexdump (TODO)

Code: Select all
$ echo -n SomeStringToBlock| xxd -ps
536f6d65537472696e67546f426c6f636b

Code: Select all
$ echo -n 536f6d65537472696e67546f426c6f636b | xxd -ps -r
SomeStringToBlock
Read more : Plain text <-> hexdump (TODO) | Views : 2556 | Replies : 0


Disable clamav/clamd on cPanel server Disable clamav/clamd on cPanel server

To completely remove ClamAV from your cPanel-based server please use WHM interface, feature
Code: Select all
WHM -> Plugins -> Manage Plugins

Uncheck 'clamavconnector' box and hit 'Uninstall clamavconnector'.

Tips for those who prefer to remove ClamAV via CLI interface.
Code: Select all
cd /usr/local/cpanel/modules-install/clamavconnector-Linux-x86_64/
./uninstall
sed -i '/clamavconnector/d' /var/cpanel/addonmodules

You can find more details inside 'uninstall' bash script.

Disable and remove clamd from the cpanel check service daemon configuration file:
Code: Select all
sed -i '/clamd/d' /etc/chkserv.d/chkservd.conf

Also remove clamd check description:
rm ...
Read more : Disable clamav/clamd on cPanel server | Views : 5265 | Replies : 0


View cPanel version

One can find out the version of installed cPanel with the help of the following command:
/usr/local/cpanel/cpanel -V

Starting from 11.30.x.x cPanel & WHM versioning system and release process has changed CpanelProductVersions.
For comparison, earlier versions:
Code: Select all
11.26.20-STABLE_49708

and "current" versioning system :
Code: Select all
11.30.0 (build 32)

Code: Select all
http://docs.cpanel.net/twiki/bin/view/AllDocumentation/WHMDocs/CpUpdateConf
Read more : View cPanel version | Views : 2515 | Replies : 0


Configuring PHP and suEXEC from the Command Line

Official documentation: WHMDocs/RebuildPhpconf

The rebuild_phpconf script on your server allows you to udpate your server's php.conf file (located at /usr/local/cpanel/bin/rebuild_phpconf). By doing this, you can change Apache’s PHP handler configuration, change the default version of PHP used by your server, and enable or disable the suEXEC feature.

To see a list of all options and arguments for this script, type the following from the command line:
Code: Select all
/usr/local/cpanel/bin/rebuild_phpconf --help

Usage: /usr/local/cpanel/bin/rebuild_phpconf [--dryrun] [--no-restart] [--no-htaccess] [--current|--available] <Default ...
Read more : Configuring PHP and suEXEC from the Command Line | Views : 2848 | Replies : 0


How to restart SSHd with the default config via WHM

Code: Select all
https://10.10.10.10:2087/scripts2/doautofixer?autofix=safesshrestart
Read more : How to restart SSHd with the default config via WHM | Views : 2572 | Replies : 0


Secure bash history


[------------------------------------------------------]


By: ithilgore - ithilgore.ryu.L@gmail.com
sock-raw.org / sock-raw.homeunix.org
July 2008

--------------------------

i. Preface
ii. Hardening bash_history
iii. Attacking the logging mechanism
iv. Hacking bash - interfacing with syslog
v. Conclusion
vi. References




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

Bash is probably the most widely used shell in the *nix world and one of it's
features is the history mechanism. The history ...
Read more : Secure bash history | Views : 5989 | Replies : 1


exim: ** [435 Unable to authenticate at present != 2]

You may receive the following warning/alert email from cPanel chkservd which states that imap or exim services failed:
Code: Select all
imap on srv1.likg.org.ua failed

imap failed @ Tue Mar 22 05:33:43 2011. A restart was attempted
automagically.
Service Check Method: [check command]

Cmd Service Check Raw Output: dovecot is not running

If you check /var/log/chkservd.log log, the following reason can be provided:
Service Check Started
Loading services .....cpanellogd....cpsrvd....exim....exim-26....ftpd....httpd....imap....ipaliases....lfd....mysql....named....queueprocd....spamd....sshd....syslogd..Done
[2011-03-22 16:40:54 -0800] Service check ....syslogd [[check command:+][tcp connect:N/A]]...sshd ...
Read more : exim: ** [435 Unable to authenticate at present != 2] | Views : 5691 | Replies : 0


Install/reinstall Clamav on cPanel server

Sometimes, clamd is not installed correctly on the cPanel server via WHM plugins manager (some test phases are not passed). To install it manually one should go into sources directory and execute:
For 64bit:
Code: Select all
cd /usr/local/cpanel/modules-install/clamavconnector-Linux-x86_64/

For 32bit:
Code: Select all
cd /usr/local/cpanel/modules-install/clamavconnector-Linux-i686/

and install it:
Code: Select all
./install
Read more : Install/reinstall Clamav on cPanel server | Views : 2773 | Replies : 0


 

Login


Statistics

Total posts 505 • Total topics 442 • Total members 22