September 22, 2009 | Posted by
admin | Category: VPS Management
If you wish to add additional RAM on a Xen based VPS, you need to follow the below steps:
#Search the VM name:
xm list
#Edit the VM’s configuration file. Update the required value and save the file:
vi /home/xen/vmname/vmname.cfg
#To stop and start the VPS, follow the below steps:
xm destroy vmname
xm create /home/xen/vmname/vmname.cfg
#Once the VM is rebooted, login to the console of the VPS and check the allotted RAM:
xm console vmname.vm
free -m
Hope this helps.
Comments Off on additional RAM on Xen VPS
September 22, 2009 | Posted by
admin | Category: Linux Administration
If your rpm database gets corrupt, you receive the following message on working on packages using rpm:
rpmdb: unable to join the environment
rpmdb: write: 0xbf91a7d0, 8192: Invalid argument
error: db4 error(22) from dbenv->open: Invalid argument
error: cannot open Packages index
You can try out any of the following two solutions:
1.
rm -f /var/lib/rpm/__db*
rpm –rebuilddb
OR
2. you need to add the following ‘export’ line in /etc/profile file and rebuild the database.
export LD_ASSUME_KERNEL=2.2.5 (2.2.5 is the base kernel)
rpm –rebuilddb
With the second solution, the changes will take effect on the next session.
Comments Off on rpmdb: unable to join the environment
September 22, 2009 | Posted by
admin | Category: Plesk Management
If you receive “virtual.db: No such file or directory” error message while adding a domain in Plesk control panel, you need to create the virtual.db file and place it in the proper location. The complete error message looks like:
Failed domain creation: Unable to update domain data: mailmng failed: Fatal error: plesk::mail::postfix::PostfixConfigurationError(postmap:fatal:open database /var/spool/postfix/plesk/virtual.db: No such file or directory)
You need to manually fix the problem:
#Create the virtual.db file
postmap /etc/postfix/virtual
#Copy the .db file to the location you see in the error message:
cp /etc/postfix/virtual.db /var/spool/postfix/plesk/virtual.db
This will allow you to add domains on your server.
Comments Off on Failed domain creation: mailmng failed
September 21, 2009 | Posted by
admin | Category: VPS Management
If you receive the following error on restating iptables on a VPS:
error message: from firewall software ~ iptables: Unknown error 4294967295
you need to make sure the required iptable modules are loaded in the host server kernel. You have to use modprobe to load the following modules in the kernel:
modprobe ipt_MASQUERADE
modprobe ipt_helper
modprobe ipt_REDIRECT
modprobe ipt_state
modprobe ipt_TCPMSS
modprobe ipt_LOG
modprobe ipt_TOS
modprobe tun
modprobe iptable_nat
modprobe ipt_length
modprobe ipt_tcpmss
modprobe iptable_mangle
modprobe ipt_limit
modprobe ipt_tos
modprobe iptable_filter
modprobe ipt_helper
modprobe ipt_tos
modprobe ipt_ttl
modprobe ipt_REJECT
Once the modules are loaded, add the modules to your VPS using the vzctl command. You will have to stop the VPS first
vzctl stop VEID
and then add the modules to a VPS
vzctl set VEID –iptables ipt_REJECT –iptables ipt_tos –iptables ipt_TOS –iptables ipt_LOG –iptables ip_conntrack –iptables ipt_limit –iptables ipt_multiport –iptables iptable_filter –iptables iptable_mangle –iptables ipt_TCPMSS –iptables ipt_tcpmss –iptables ipt_ttl –iptables ipt_length –iptables ipt_state –iptables iptable_nat –iptables ip_nat_ftp –save
Once the above command is executed, start the VPS
vzctl start VEID
Now you are set to use iptables on your VPS.
September 21, 2009 | Posted by
admin | Category: cPanel Management
Sometimes Apache stops responding and the error logs states the following
“[error] server reached MaxClients setting, consider raising the MaxClients setting”
this indicates that the maximum number of clients that are allowed to connect Apache webserver has reached and you should consider raising the MaxClients and ServerLimit values.
The changes made in the Apache configuration file directly won’t work as cPanel look the new values in the file /var/cpanel/conf/apache/local. However, you can still make the changes directly in the Apache configuration and run the distiller to save the changes.
# pico /usr/local/apache/conf/httpd.conf
Set the new values i.e.
ServerLimit xxx
MaxClients xxx
and save the file. In order to make the changes permanent and make sure the changes don’t get overwritten on the next cPanel update, execute:
# /usr/local/cpanel/bin/apache_conf_distiller –update –main
# /usr/local/cpanel/bin/build_apache_conf
# /scripts/restartsrv httpd
Sometimes, you may receive the following warning message on restarting the Apache web service, for example:
WARNING: MaxClients of 500 exceeds ServerLimit value of 256 servers, lowering MaxClients to 256. To increase, please see the ServerLimit directive.
In such a case, make sure ServerLimit value should be equal to OR greater than MaxClients.
Comments Off on server reached MaxClients setting, consider raising the MaxClients setting