How to fix the 500 error on roundcube
/usr/local/cpanel/bin/update-roundcube –force
How to fix the 500 error on roundcube
/usr/local/cpanel/bin/update-roundcube –force
How to install postfix on Ubuntu
sudo apt-get install postfix sudo dpkg-reconfigure postfix sudo postconf -e 'home_mailbox = Maildir/' sudo /etc/init.d/postfix restart sudo apt-get install dovecot-common sudo apt-get install dovecot-imapd
sudo apt-get install dovecot-pop3d
sudo useradd -d /home/testuser -m testuser sudo passwd testuser
How to increase the memory for PHPmyadmin in cPanel server
vi /usr/local/cpanel/3rdparty/etc/php.ini
and change
upload_max_filesize = 150M
post_max_size = 150M
then run in SSH
/usr/local/cpanel/bin/install_php_inis
service cpanel restart
Looking to increase the /tmp on the linux server?
or getting frequent Mysql error due to /tmp running out of steps ?
below are the steps to increased /tmp partition,
##Stop Mysql in server##
/etc/init.d/mysql stop
###Find and kill the tailwatchd process###
pstree -p | grep tailwatchd
kill -9 < process ID>
#### Copy the /tmp to backup###
cp -prf /tmp /tmp.bak
###Set the /tmp to 2GB now###
dd if=/dev/zero of=/usr/tmpDSK bs=1024k count=2048
###Now find the size of tmp partition###
du -sch /usr/tmpDSK
### unmount /tmp partition
umount /tmp
###Format the /tmp partition###
mkfs -t ext3 /usr/tmpDSK
###Remount in secure environment###
/scripts/securetmp
###Now check size it should be 2GB###
df -h
Upgrading openssl in cpanel is considered dangerous as it breaks the system
We tried in one of our system and came out in flying colors … yes we were able to upgrade susccessfully
We upgraded to openssl 1.0 version for cpanel
below are the steps
tar -xvzf openssl-1.0.0d.tar.gz
cd openssl-1.0.0d
./configure
make
make test
make install
cd include/openssl
cp -r * /usr/include
cp -r * /usr/local/ssl/include
cp -r * /usr/local/ssl/include/openssl
cp -r lib* /usr/local/ssl/lib/
cp -r lib* /usr/lib/
When this is complete enter command ldconfig
now you can open /etc/yum.conf and add in excluded list openssl*
Now run easyapache and all should work fine
If you want to reduce the memory and cpu consumption of Apache.
Add the below parameter,
RLimitNPROC 40
To prevent apach being overwritten run the below command,
/usr/local/cpanel/bin/apache_conf_distiller –update
Now you are done.
While installing if you get an error
“Failed to download pear/HTTP_OAuth within preferred state “stable”, latest release is version 0.1.18, stability “alpha”, use “channel://pear.php.net/HTTP_OAuth-0.1.18″ to install
install failed ”
Use the below command to install it successfully.
pear install HTTP_OAuth-alpha
You will get below results,
root@hillock [~]# pear install HTTP_OAuth-alpha
Did not download optional dependencies: pecl/pecl_http, use –alldeps to download automatically
pear/HTTP_OAuth can optionally use package “pecl/pecl_http” (version >= 1.6.0)
pear/HTTP_Request2 can optionally use PHP extension “fileinfo”
downloading HTTP_OAuth-0.1.18.tgz …
Starting to download HTTP_OAuth-0.1.18.tgz (51,237 bytes)
………….done: 51,237 bytes
downloading HTTP_Request2-0.5.2.tgz …
Starting to download HTTP_Request2-0.5.2.tgz (58,159 bytes)
…done: 58,159 bytes
downloading Net_URL2-0.3.1.tgz …
Starting to download Net_URL2-0.3.1.tgz (8,488 bytes)
…done: 8,488 bytes
install ok: channel://pear.php.net/Net_URL2-0.3.1
install ok: channel://pear.php.net/HTTP_Request2-0.5.2
install ok: channel://pear.php.net/HTTP_OAuth-0.1.18
PS domain.tld is your domain name.
Check the domain entry in below file ,
grep domain.tld /etc/named.conf
if present use /scripts/killdns domain.tld
grep domain.tld /etc/userdomains
grep domain.tld /usr/local/apache/conf/http.conf
grep domain.tld /etc/localdomains
grep domain.tld /etc/remotedomains
Once your remove the file entry run /scripts/updateuserdomains to sync it.
Done now you can add addon domain .
To stop apache from consuming more cpu you can enter the limitations on it,
use the below parameter on values you need,
RLimitCPU 50, 100
50,100 is softlimit and a hard limit in seconds
This would prevent the run away scripts from taking down the server.
You may well be tired of downtime and looking to optimize Apache and Mysql for your server.
Use the below steps,
Configure Apache to use mpm_prefork Module using easypache
vi /usr/local/apache/conf/httpd.conf
Search for <IfModule prefork.c>
In this add the below parameters,
ServerLimit 1000
KeepAlive On
KeepAliveTimeout 60
MaxClients 1500
MaxSpareServers 200
MinSpareServers 50
</ifmodule>
Run the below command to keep the cpanel from over writing the apache configuration.
/usr/local/cpanel/bin/apache_conf_distiller –update
service httpd restart
Well you are done with apache optimization
There maybe many more optimization but this is a general one.