Showing posts with label Web Hosting. Show all posts

cPanel / WHM Explained

cPanel and WHM Details




                   *******Cpanel Explanation In Detail******* 

Cpanel Introduction
--------------------

Cpanel Important directories.

/usr/local/cpanel
/var/cpanel
/scripts

/usr/local/cpanel
---------------
cpsrvd
cpsrvd-ssl
cpkeyclt

/usr/local/cpanel/bin
-------------------

*Houses only scripts and binaries which provide installation
and configuration of many cPanel managed services

Notable Contents:
eximstats
checkperlmodules

/usr/local/cpanel/logs
--------------------

CPSRVD -------access_log, error_log
CPANELLOGD---stats_log
CPKEYCLT------license_lo

/usr/local/cpanel/base
--------------------

frontend-------x, x2,xmail,monsoon
webmail-------x, monsoon
neomail
horde
3rdparty-------squirrelmail, phpPgAdmin, phpMyAdmin

/usr/local/cpanel/etc
-------------------

init -----------start | stop cpsrvd AND start | stop AND start | stop cppop
exim----------cf, perl
ftptemplates ---proftpd
httptemplates --apache1--default, ssldefault
zonetemplates--simple, standard, standardvirtualftp

/usr/local/cpanel/3rdparty
-----------------------
bin------php, stunnel, analog, awstats, webalizer
etc------php.ini, ixed, ioncube

/var/cpanel
----------
Houses proprietary configuration data for cPanel, including:
● Primary cPanel configuration
● User configurations
● Reseller configurations
● Accounting, conversion, and update logs
● Bandwidth data
● Customized service templates

/var/cpanel
----------

cpanel.conf
resellers
accounting.log
features--packages--logs
updatelogs--bandwidth--zone templates
users---mainips

/var/cpanel/cpanel.config
-----------------------
● The primary cPanel configuration file
● Each variable within influences the way cPanel behaves
● Variables are line delimited, with variables separated by an equal sign
● If file does not exist, cpanel falls back to defaults

/var/cpanel/resellers
------------------

Lists each reseller with a comma-delimited list of WHM
resources that reseller has access to.

/var/cpanel/accounting.log
------------------------
Contains a list of accounting functions performed through
WHM, including account removal and creation.

/var/cpanel/bandwidth
--------------------
● Files contain a list of the bandwidth history for each account.
Each named after their respective user.
● History files are stored in human-readable format, while actual
bandwidth data are stored in round robin databases.

/var/cpanel/features
------------------

● File name is inherited from the feature list name
● Contains a line delimited list of feature variables and a zero or
one value
● Variables control what cPanel resources are available to users

/var/cpanel/packages
-------------------

● Contains a list of packages, named after the packages they represent
● If package belongs to reseller, file name is prefixed with reseller name
● Each of these values determines the values created in cPanel user file

/var/cpanel/users
----------------

● Contains a list of cPanel user configuration files, named after the user
they pertain to.
● Variables define account resources, themes, domains, etc.

Other notable /var/cpanel directories
--------------------------------

● LOGS
– This directory contains logs from account copies/transfers.
Training Seminar 2006
● UPDATELOGS
– Contains the output of each cPanel update executed on the server.
● MAINIPS
– Named after the respective reseller users they represent, each
contains only the IP address which should be used as that
resellersmain shared ip
● ZONETEMPLATES
– Contains customized DNS zone templates created inWHM

/scripts
-------

This directory houses a large number of scripts which serve
as building blocks for many cPanel/WHM features.
The scripts can be used to:
● Update cPanel, and many of the services of which it
manages
● Customize account creation routines
● Perform backups of cPanel accounts
● Install and update cPanel managed services

cPanel Services
-------------

Services
● CPSRVD
● CHKSERVD
● CPANELLOGD
● CPBACKUP
● EXIMSTATS

cpsrvd
------

● cpsrvd is the 'master' process for cPanel.
● Handles and dispatches all requests made through the cPanel,
WHM, and Webmail interfaces.
● Logs to access_log and error_log

cpsrvd and stunnel relationship
---------------------------

CPSRVD--2082-->cpanel<--2083<--stunnel
CPSRVD--2086-->WHM<--2087<--stunnel
CPSRVD--2095-->Webmail<--2096<--stunnel

SSL Certificates
-------------

● Default certificate and key are stored in /
usr/local/cpanel/etc/cpanel.pem
● User installed cert and cabundle are stored in:
– /usr/local/cpanel/etc/mycpanel.pem
– /usr/local/cpanel/etc/mycpanel.cabundle

cPanel Startup
------------

● The following services are controlled by the cPanel
init script
– cpsrvd, both plain and secure
– cPanel POP Services
– cPanel Log Services
– Eximstats
– Chat Services
– Mailman
– Interchange

● Verify if ports are in use
– netstat -lnp | egrep '20(8|9)'

Troubleshooting Startup Issues(SSL)
-------------------------------

● If SSL services are not available
– execute /usr/local/cpanel/startstunnel
– check /usr/local/cpanel/3rdparty/bin/stunnel.log
● If cpsrvd is not available
– execute it directly `/usr/local/cpanel/cpsrvd`
– check /usr/local/cpanel/logs/error_log

Licensing
--------

● License requests are handled by /usr/local/cpanel/cpkeyclt
● Requests are transmitted to auth.cpanel.net over port 2089
● License requests are logged to license_log
● License key is stored at /usr/local/cpanel/cpanel.lisc

A valid license request:
root@server [~]# /
usr/local/cpanel/cpkeyclt
Updating Internal cPanel
Information.....Done
root@server [~]#

Troubleshooting License Issues
---------------------------

CHECKLIST:
● Verify if license is active for main server IP at http://verify.cpanel.net
● Check if server can establish connection to auth.cpanel.net over port 2089
● If the previous steps fail, check license_log for notable errors.
● If license is active, but refused with no notable errors, lodge support request.

root@server [~]# telnet auth.cpanel.net 2089
Trying 198.66.78.9...
Connected to auth.cpanel.net (198.66.78.9).
Escape character is '^]'.
200 cPanel License Service Version 12.0
root@server [~]#

cPanel Requests
--------------

cPanel Requests
● Logins are authenticated against the system passwd and shadow files.
● Documents root is /usr/local/cpanel/base
● Theme is defined by RS variable in user's cPanel configuration file.
● Resources are limited by the feature list of assigned to the given user.

WHM Requests
-------------

WHM Requests
● Root password will authenticate any reseller user
● Document root is /usr/local/cpanel/whostmgr/docroot/
● Reseller resources are limited by Access Control List
– Defined in WHM > Resellers > Reseller Center > Edit
Privileges/Nameservers
– Privileges are stored in /var/cpanel/resellers

cPanel Services
--------------

Services
● CPSRVD
● CHKSERVD
● CPANELLOGD
● CPBACKUP
● EXIMSTATS

Service Monitoring
----------------
● Located at /usr/local/cpanel/libexec/chkservd
● chkservd is a scalable connection and process based service monitoring
tool
● Provides monitoring of CPU, Memory, and Disk usage
● chkservd scans services once every eight minutes
– Logs to /var/log/chkservd.log
● Alerts are dispatched to server contact defined in Basic cPanel/WHM
Setup

chkservd Configuration
--------------------

● Monitored services are determined by values stored in /
etc/chkserv.d/chkservd.conf.
– Syntax: servicename:0 for no monitoring, servicename:1 for
monitoring
● Actions, expected responses, and failure events are defined in
service configuration files stored in /etc/chkserv.d/{servicename}
● Status files are stored in /var/run/chkservd/{servicename}
– Plus (+) sign for active, Minus (-) sign for failed

cpanellogd
----------

● cpanellogd is responsible for parsing and updating bandwidth logs, and dispatching
statistics generators on each account, per their individual configurations.
● Configured through Statistics Software Configuration and Tweak Settings in WHM
● Statistics are compiled and stored for each account in /home/{username}/tmp, with
each respective statistics application being assigned it's own individual subdirectory.

/home/{username}/tmp ----webalizer, analog, awstats, urchin

● Optional server-wide statistics configurations are stored in /
etc/stats.conf, while user-specific configurations may reside in /home/
{username}/tmp.
● Notable Variables in /etc/stats.conf:
– BLACKHOURS: Comma separated list of numeric values, which
specify hours that logs may not be parsed.
– VALIDUSERS:Users which are allowed to supply their own
combination of statistics generators. By default users are
restricted to the generators defined by the administrator.

Calling cpanellogd
----------------

● cpanellogd is started with the cPanel service, but can be executed
directly with:
– No Argument: Daemonize, and wait for a suitable time to scan
logs
– One Argument (username): Execute an immediate statistics run
for the specified user, and exit once completed.
● Two scripts are available to provide these functions as well:
– /scripts/runlogsnow - Execute a full log run immediately
– /scripts/runweblogs {username} - Execute a log run for a single
user

Bandwidth Statistics
-----------------

● Bandwidth statistics are accumulated from a combination of the
following cPanel managed services:
– HTTP
– EXIM
– IMAP / POP
– FTP
● Bandwidth data is logged to /usr/local/apache/domlogs/*bytes_log
● Parsed bandwidth data is stored in /var/cpanel/bandwidth


COMMON ISSUES
● Bandwidth parsing is taking an exceedingly long time to complete
– First check the size of the logs being parsed. Excessively large
log files can and typically will take a long time to complete.
– Additionally, if RRDtool is not installed, bandwidth parsing
performance will drop signifigantly.
● RRDtool can be installed by executing `/scripts/rrdtoolinstall`

Log Processing
-------------

● Statistics are parsed for each child domain of the given account.
● Will be influenced by variables in /var/cpanel/cpanel.config
– Skip statistics generator
● skip{generator_name}
– Logs will be retained or deleted based on
● keeplogs – keep logs at the end of the month.
● dumplogs – dump logs after parsing

Common cpanellogd Issues
------------------------

● Statistics are stalling, or are taking unreasonable amounts of
time.
– Usually indiates that the server load average is consistently
exceeding the defined load limit.
● Limit is defined as 'extracpus' in /var/cpanel/cpanel.config
– Restrictive BLACKHOUR definitions in WHM > Statistics Software
Configuration.
– All other issues should be present in /
usr/local/cpanel/logs/stats_log

cPanel Backups
-------------

GENERAL INFORMATION
● Backup configuration is performed in WHM > Backup > Configure
Backup
● cPanel backups are performed by /scripts/cpbackup, which is
configured by default to execute at 1:00 AM in the root crontab.
● Backup archives are created using the /scripts/pkgacct utility, and
may be restored using /scripts/restorepkg respectfully.
● Uses CPU resource limits based upon extracpus definition in
cpanel.config

Backup Configuration
-------------------

BACKUP INTERVALS
● Backup script can be configured to operate in daily, weekly, and monthly intervals.
● Each interval is given it's own respective directory within the backup root.
● Backup intervals are executed when the current time minus the last modification time
of the interval directory is less than or equal to zero.

BACKUP METHODS
----------------
Three backup methods are available:
● Standard: This method entails archiving the accounts, and storing
them at the specified path/mount point. This is the default method
used by the backup script.
● Incremental: This method uses rsync to incrementally backup user
data. This option will only operate locally, storing the data at the
specified path/mount point.
● Remote: This method transmits account archives to a specified ftp
server. Remote backups are typically more time consuming, and
more error prone when transmitting large accounts.

Common Backup Issues
--------------------

● Backup intervals are not executed when expected.
– Modification times are incorrect or not functional
– System time is incorrect.
– Backups have not been defined to run on that day.
● Backups stall, or take an exceedingly long time to complete.
– Verify that the transmission rate to remote server is suitable
– Verify that server load average has not exceeded defined
resource limit.

● Can't call method "login" on an undefined value
This indicates the host or passive setting is not properly
defined for remote backups.
● Unable to login to remote FTP server.
This indicates that either the username and password
were not specified, or are incorrect in the backup configuration.
● Can't call method "prepare" on an undefined value
The password stored for the root mysql user in /root/.my.cnf is
incorrect. Reset or correct this password, and re-execute the backup
script.

eximstats
---------

● The eximstats daemon is responsible for harvesting bandwidth
information from exim transactions.
● Continually monitors the exim_mainlog, and stores information in the
eximstats database, including host and sender information, message
size, and transaction times.
● Is started with the cPanel service, but can be called directly at /
usr/local/cpanel/bin/eximstats

● Heavily mysql dependent
– data is stored in the 'eximstats' database.
● 'eximstats' mysql user password is stored in /var/cpanel/eximstatspass.
– password is generated by /usr/local/cpanel/bin/eximstatspass
● Database can be installed by running /
usr/local/cpanel/bin/updateeximstats

cPanel Maintenance
-----------------
● Update configuration
● Update scripts
● Applying updates

● By default, cPanel applies nightly updates at 2:13AM in the root crontab.
● /scripts/upcp dispatches these updates, using the following key
components:
– /scripts/updatenow - synchronize /scripts directory
– /scripts/sysup - updates cPanel managed rpms
– /scripts/rpmup - all other system updates
● Updates are logged to timestamped files in /var/cpanel/updatelogs
● Update configuration is stored in /etc/cpupdate.conf.

/etc/cpupdate.conf
-----------------

● The following variables are available in cpupdate.conf:
– CPANEL = [ manual- ] stable | release | current | edge
This variable controls which update branch is used for
cPanel updates, and controls whether the updates are applied
manually or automatically (Default value: release)
– SYSUP = never (all other values are assumed true)
– RPMUP = never (all other values are assumed true)

CPANEL=current
RPMUP=daily
SYSUP=daily

● cPanel updates can be called outside of the regularly scheduled cron
time simply by executing /scripts/upcp.
● If cPanel components are missing or corrupted that were not replaced
with the regular cPanel update, they can be replaced by executing /
scripts/upcp –force

Components of upcp
------------------

● /scripts/cpanelsync
● /scripts/updatenow
● /scripts/sysup
● /scripts/rpmup

/scripts/cpanelsync
-----------------
● /scripts/cpanelsync is called upon by /scripts/updatenow and /
scripts/upcp
● Provides md5sum based synchronization with update servers
● md5sum table is stored in /destination_directory/.cpanelsync
● Accepts three arguments host, remote path, local path :
/scripts/cpanelsync 'httpupdate.cpanel.net'
'/cpanelsync/RELEASE/scripts' '/scripts'

/scripts/updatenow
-----------------

Calls cpanelsync to update contents of scripts
directory, which then stores it's md5sum table
at /scripts/.cpanelsync
● Should only be run from upcp, but can be
executed from command line when '--fromupcp'
is passed.
● Is the first update script called upon from /scripts/upcp

UPCP-->updatenow-->FTPUP-->EXIMUP-->MYSQLUP-->BANDMINUP-->COURIERUP-->RPMUP

RPMUP
--------

● Calls the underlying package manager to apply system package
updates
● The package manager which is used is determined by the presence
of:
– /var/cpanel/useup2date (Redhat)
– /var/cpanel/useyum (CentOS,Fedora)
– /var/cpanel/useapt (Debian)
– /var/cpanel/useswup (Trustix)
– /var/cpanel/userug (SuSE)

cPanel Updates
----------------

● After updatenow, sysup, and rpmup complete, cpanelsync is used to
complete the cPanel updates based on md5sum table stored at /
usr/local/cpanel/.cpanelsync
● If any special configurations are required on server after updates,
they can be applied in /scripts/postupcp, which is executed if such a
file exists and is executable.
● Once updates complete, all cPanel services are restarted for changes
to take effect

cPanel Scripts
--------------

● Account Management
● Package Management
● Service Update and Configuration
– MySQL
– Exim
– Named
– Apache
● cPanel and System

Account Management Scripts
------------------------------

● /scripts/wwwacct (account creation)
Accounts can be created via the command line using the following
syntax: /scripts/wwwacct exampledomain.com username password 0
x n
● /scripts/killacct (account termination)
Takes a single argument of the user to terminate.
● /scripts/suspendacct (account suspension)
Will suspend an account from accessing all cPanel managed
services.
● /scripts/unsuspendacct
Will reinstate any account suspended via suspendacct

● /scripts/addpop (Create pop account)
Handles creation of virtual mail accounts. Accepts either no
arguments, or two arguments consisting of the e-mail address and
password.
● /scripts/updateuserdomains
Updates the user:owner and user:domain tables stored in:
– /etc/userdomains
– /etc/trueuserdomains
– /etc/trueuserowners
– These tables are used to enumerate and keep track of accounts
and their owners.

Package Management
----------------------

● /scripts/ensurerpm
Takes argument list of rpms, which are then passed to the
underlying package manager
● /scripts/ensurepkg
The equivalent of ensurerpm for FreeBSD. Updates specified
packages from ports.
● /scripts/realperlinstaller
Takes argument list of perl modules to install via CPAN
● Each of the aforementioned scripts can accept an argument of '--force'
to force package installations.

● /scripts/mysqlup
Can be called to apply MySQL updates independent of upcp
● /scripts/cleanupmysqlprivs
Will clean up the default MySQL privilege tables, by installing
a more restrictive privilege schema.
● /scripts/mysqlconnectioncheck
Will verify that mysql is accessible with password stored in /root/.my.cnf,
and force a reset with a random 16 character string if inaccessible.
● /scripts/restartsrv_mysql

● /scripts/eximup
Can be called to apply exim updates independent of upcp
● /scripts/buildeximconf
Will rebuild exim.conf, and merge local, distribution, and cPanel
configurations
● /scripts/restartsrv_exim

● /scripts/rebuildnamedconf
Rebuild named.conf based on existing zone files
● /scripts/restartsrv_bind

● /scripts/easyapache
Download, extract, and execute apache build script
● /scripts/rebuildhttpdconf
Rebuilds httpd.conf based on DNS entries found in each
cPanel user configuration
● /scripts/restartsrv_httpd

cPanel Scripts
--------------

Useful Scripts – cPanel and System
● /scripts/restartsrv_{servicename}
The majority of cPanel managed service can be scripts named
appropriately.
● /scripts/makecpphp
Will rebuild the PHP interpreter used internally by cpsrvd
● /usr/local/cpanel/bin/checkperlmodules
Will scan for and install any Perl modules required by cPanel.
● /scripts/fullhordereset
Updates horde and resets the horde mysql user password
● /scripts/fixquotas
Will attempt to rebuild quota database per information stored in /
etc/quota.conf
_________________________________________________________________


FEED



Share












SUPPORT US












VISIT COUNTER !!






The Virtuozzo CheatSheet

             


The Ultimate Virtuozzo Guide







  •  The Virtuozzo Ultimate Guide
           
1. Create a container with vid 101
————-
# vzctl create 101 –config vps.plesk7.fc2 –pkgset fedora-core-2
# vzpkgadd 101 psa-fc2
#############################################
2. How do I validate configuration of VPSes on the hardware node?
There is a set of utilities which can help you with a resources management.
1. vzcfgvalidate: checks the resource’s cross-dependencies for a single VPS
2. vzcheckovr: checks if the hardware node is overcommitted
3. vzcpucheck: check the CPU utilization on the hardware node
4. vzmemcheck: shows the current memory utilization
5. vztopvzstat: utilities which can be used for VPS monitoring
#############################################
3. How do I install APF firewall into the VPS?
Product versions this article applies to:
* Virtuozzo for Linux
The latest update: Feb,04 2006
Access: public Article ID #875
The installation of APF requires some additional steps to be done on the hardware node.
1. First of all you should define which iptables modules are available for VPSes.
Edit /etc/sysconfig/iptables-config:
IPTABLES_MODULES=”ipt_REJECT ipt_tos ipt_TOS ipt_LOG ip_conntrack ipt_limit ipt_multiport iptable_filter iptable_mangle ipt_TCPMSS ipt_tcpmss ipt_ttl ipt_length ipt_REDIRECT ipt_state iptable_nat ip_nat_ftp”
Edit /etc/sysconfig/vz:
IPTABLES=”ipt_REJECT
ipt_tos ipt_TOS ipt_LOG ip_conntrack ipt_limit ipt_multiport
iptable_filter iptable_mangle ipt_TCPMSS ipt_tcpmss ipt_ttl ipt_length
ipt_REDIRECT ipt_state iptable_nat ip_nat_ftp”
Restart Virtuozzo. All VPSs will be restarted.
# service vz restart
2. Increase numiptent parameter for a VPS you need to install APF into. This parameter limits the amount of iptables rules available for a VPS. Default APF configuration requires ~200 rules. Let’s set it to 400:
# vzctl set 101 –numiptent 400 –save
3. Install APF inside a VPS. Edit /etc/apf/conf.apf, set the following parameters:
IFACE_IN=”venet0″
IFACE_OUT=”venet0″
SET_MONOKERN=”1″
4. Start APF inside a VPS:
# /etc/init.d/apf start
#############################################
4. How do I check / install Virtuozzo license?
Product versions this article applies to:
* Virtuozzo for Linux
The latest update: Dec,26 2005
Access: public Article ID #1014
Virtuozzo license is stored in /etc/hspc/licenses/vzlicense. Virtuozzo Control Center and Power Panel license is stored in /etc/hspc/licenses/vzcplicense.
5. To check which licenses are currently installed, use
# vzlicview
6. You can also view the properties of license stored in arbitrary file, e.g.
# vzlicview -f /etc/hspc/licenses/vzlicense
7. To install new Virtuozzo license, issue the following command:
# vzlicload
Virtuozzo Control Center and Power Panel licenses can be installed via Control Center web-interface (https://SERVICE_VPS:4643), as well as Virtuozzo license.
Virtuozzo license depends on the following parameters:
1. Unique Hardware ID of the server which is calculated according to motherboard and network card unique identifiers;
2. Maximum number of VPSs allowed to be started simultaneously;
3. Start date and end date;
4. CPU power
#############################################
8. How do I change vzagent0 username or create a new user with the same permissions inside Service VPS?
Create a new user inside service VPS, add that user into vzagent0 group and set shell to /usr/sbin/vzacon. After that add this user to /etc/vzagent.passwd file inside Service VPS.
/etc/vzagent.passwd contains a separate list of users allowed to manage the hardware node using Virtuozzo Management Console and Virtuozzo Control Center. For each user in the list the range of VPSes which can be managed by the user is defined (VPS #0 means the hardware node).
#############################################
9. How do I automate backup operations in Virtuozzo?
VPS backups can be created using vzbackup utility. It should be run on the backup node. You can restore any backup using vzrestore utility.
To configure vzbackup you should do the following:
1. Check global vzbackup configuration file /etc/vzbackup.conf file on the backup node for backup parameters (pay attention to $BACKUP_DIR parameter).
If you are going to make backups using cronjob, set the following parameters:
# Backup directory – where the backups will be stored, e.g
BACKUP_DIR=”/vz/backups”
# backup type. Supported types are “full”, “initial incremental” and
# “incremental”. Default is incremental. If it is impossible to do
# “incremental” then “initial incremental” will be done.
BACKUP_TYPE=”i”
# Backup cron mode
CRON_BACKUP=”yes”
# List of nodes to backup.
BACKUP_NODES=”"
# e-mails to send notifications on backup
BACKUP_NOTIFY_EMAIL=”root@myserver.com”
2. Create directory
# mkdir /vz/backups
3. Add the following command to the crontab on the backup node:
# vzbackup -i -p -a
4. Make sure root user of the backup node is able to access all hardware nodes without a password (propagate DSA public keys).
#############################################
10. How do I create VPS with guaranteed amount of RAM (256M, 512M, etc.)?
Virtuozzo is shipped with sample configuration files which allow to allocate 256, 512, 1024, or 2048 MB of memory for a VPS. These samples can be found in /etc/sysconfig/vz-scripts/ directory on the hardware node (ve-vps.256MB.conf-sample, ve-vps.512MB.conf-sample, ve-vps.1024MB.conf-sample, ve-vps.2048MB.conf-sample).
To create VPS #101 using one of these configuration files, use
# vzctl create 101 –config vps.512MB –pkgset fedora-core-2
To apply some configuration sample to already created VPS, use –applyconfig option of vzctl utility.
The same operation can be done using Virtuozzo Management Console or Virtuozzo Control Center.
#############################################
11, How do I change system time or timezone in a VPS?
You cannot change system time in a VPS because all VPSes on the hardware node have the same system time. However, it is possible to change the default system timezone inside a VPS, for example, by replacing /etc/localtime with the file from /usr/share/zoneinfo which contains a description of your timezone.
#############################################
12, How do I compile some application from sources inside a VPS? It does not seem to have gcc installed.
# vzpkgadd 101 devel-fc2
#############################################
13, How do I add or remove an IP address to a VPS?
# vzctl set 101 –ipadd 192.168.0.1 –save
#############################################
14, How do I perform some action for all VPSes on the hardware node?
vzlist -o veid -H
# for vps in `vzlist -o veid -H` do
vzctl exec $vps ps ax
done
#############################################
15, How do I determine which VPS the process runs on?
# vzpid 10031
Pid VEID Name
10031 113 httpsd
#############################################
16, How do I move a VPS from one server to another?
# vzmigrate -r no 192.168.0.1 101
#############################################
17, How do I upgrade my VPS to the latest version of the OS template?
Product versions this article applies to:
* Virtuozzo for Linux
The latest update: Dec,23 2005
Access: public Article ID #1010
To upgrade VPS 101 to the latest version of fedora-core-2 OS template, just run the following command:
# vzpkgadd 101 fedora-core-2
If VPS 101 was created on some earlier version of fedora-core-2 template, it will be upgraded to the latest version. Application templates can be upgraded in the same way.
The other approach is to upgrade VPS using standard Redhat utilities such as yum and up2date and use vzcache utility to move common files to the template area after upgrading.
#############################################
18, What does OFFLINE_MANAGEMENT (‘Enable Offline Management’) option mean?To simplify the usage of Virtuozzo Power Panel by a VPS owner, VZPP web interface can be accessible on the VPS IP address. By default, port 4643 is used. If the VPS has an IP address 192.168.0.1 assigned the VZPP management interface is accessible by https://192.168.0.1:4643 even if the VPS is stopped. VZPP accessibility on VPS IP address is controlled by OFFLINE_MANAGEMENT per-VPS configuration parameter. By default, it is set to “yes”. To enable/disable it for VPS #101 use the following
commands:
# vzctl set 101 –offline_management=yes –save
# vzctl set 101 –offline_management=no –save
#############################################
19, My VPS is changing its state to Mounted. How do I fix that?
Mounted’ means that VPS filesystem was mounted into the root filesystem of the hardware node, but a VPS is stopped.
If your VPS is going into Mounted state, please check the following:
1. Virtuozzo license. If you exceeded maximum amount of running VPSs defined in the license, VPSs over that amount will be stopped in 5 minutes. Please check the following article for more information about Virtuozzo licenses.
2. Shutdown inside a VPS. If a VPS was shut down by its owner (i.e. using /sbin/halt, /sbin/shutdown -h, etc.), its state will be Mounted. Just start a VPS using
# vzctl start 101
or using Virtuozzo Control Center / Power Panel.
3. A VPS could be created with a wrong license class (class 1, so-called ‘Light VPS’). This class is obsoleted. You should recreate a VPS using license class 2. To check which license class is assigned to VPS 101, use
# grep CLASSID /etc/sysconfig/vz-scripts/101.conf
#############################################
20, My VPS does not start. What should I check?
1. VPS starts, but then just shuts down in a few minutes.
You don’t have valid Virtuozzo license installed. Please check the output of vzlicview command, the status of the license should be ACTIVE. Check /var/log/messages. More information about Virtuozzo licenses can be found in this article.
2. VPS cannot be started because it is locked.
Please follow the instructions from this article.
3. VPS starts but displays an error “/bin/bash: no such file” or similar.
The owner of the VPS could remove some important package such as bash or glibc. The VPS can also be compromised, see below.
4. The VPS starts but Segmentation fault occures very soon after starting.
The VPS can be compromised, please check the corresponding article.
#############################################
21, How do I determine that my VPS is hacked / compromised?
Product versions this article applies to:
* Virtuozzo for Linux
The latest update: Dec,23 2005
Access: public Article ID #1013
VPS can be compromised if its owner uses insecure or out-of-date software. To detect if VPS #101 has any rootkits installed, one can use chkrootkit utility either inside a VPS or (better) on a hardware node, using -r /vz/root/101 parameter. There is also a way to determine which packages were modified on a VPS:
# /usr/share/vzpkgtools/vzrpm/bin/rpm –root=/vz/root/101 –veid 101 -Va | egrep ‘^..5|missing’
This command shows files which were modified or removed.
Follow the instructions from the corresponding article to repair hacked VPS.
#############################################
22, My VPS is hacked / compromised. How do I repair or reinstall it?
Product versions this article applies to:
* Virtuozzo for Linux
The latest update: Dec,23 2005
Access: public Article ID #1012
There are two ways of restoring a VPS which is hacked or cannot be started for some other reasons. Please make sure that you have created full backup of a VPS before applying any of the following solutions.
Solution #1:
# vzctl recover 101
This command will reinstall OS template and all application templates which were previously installed on a VPS. This action will make it possible to start broken VPS but it does not give any guarantee that all rootkits are removed, if any.
Solution #2:
# vzctl reinstall 101
This command will create brand new VPS on the same OS template as broken one, install the same application templates into it, and restore users’ credentials. The contents of the old VPS will be copied into /old directory.
#############################################
23, What does [FAIL] warning in vzstat output mean?
Product versions this article applies to:
* Virtuozzo for Linux
The latest update: Jan,10 2006
Access: public Article ID #691
Configuration file /etc/vzstat.conf on the hardware node contains thresholds for the following parameters: CPU latency, memory latency, amount of free swapspace, diskspace, etc. You can define your own warning and error levels for any parameter. For example, for swap size:
# Swap free, % limit
# if swap space is heavily used, i.e. swap free < SWAP_FREE_X than
# it’s highlighted with yellow (WARN level) or red (ERR level)
SWAP_FREE_WARN=75
SWAP_FREE_ERR=50
#############################################
24, How do I solve vzquota error: “vzquota : (error) Quota on syscall for 101: Device or resource busy”?
Product versions this article applies to:
* Virtuozzo for Linux
The latest update: Jan,10 2006
Access: public Article ID #671
Please make sure there are no open files inside VPS root and/or private area (and your current working directory is not inside VPS root/private area) by running the following command on the hardware node:
# lsof 2> /dev/null | egrep ‘/vz/root/101|/vz/private/101′
If there are any processes which hold a directory inside VPS root/private area – kill them.
#############################################
25, How do I solve the problem with vzpkgcache: ‘Cannot create /var/run/vzpkgcache.pid lockfile’?
Product versions this article applies to:
* Virtuozzo for Linux
The latest update: Jan,05 2006
Access: public Article ID #658
Virtuozzo needs /usr/bin/lockfile to exist for vzpkgcache to work, which is a part of procmail. Please install the procmail package to make vzpkgcache work.
# rpm -qp –requires vzpkgtools-*.swsoft.i386.rpm | grep lockfile /usr/bin/lockfile
# rpm -qf /usr/bin/lockfile
procmail-3.22-5
#############################################
26, Any operation on a VPS gives me “Cannot lock VE”. How do I solve it?
Product versions this article applies to:
* Virtuozzo for Linux
The latest update: Jan,05 2006
Access: public Article ID #655
VPS is locked when some operation (backup, migration, start / stop, etc.) with this VPS is in progress. You can determine which process is holding VPS #101 using the following command on the hardware node:
# cat /vz/lock/101.lck
You can kill that process if needed. Make sure that the process is really killed. If there is no process with that PID on the node, just remove the lockfile.
#############################################
Resouce calculation.
—————
vzcalc veid
vzcalc -v deatiled
vzmemcheck -v
vzcpucheck
[root@test /root]# vzcpucheck
Current CPU utilization: 112681
Power of the node: 112721
[root@test /root]# vzcpucheck -v
veid units
———————–
0 5681
100 1000
1001 4000
1003 4000
1004 4000

Current CPU utilization: 113681
**************************************
SOURCE - virtuozzo.com and swsoft.com and etc…
******************************************



FEED



Share












SUPPORT












VISIT COUNTER !!