Archive

Archive for the ‘vps’ Category

Creating Container Manually

February 15th, 2010 No comments

Creating Container

After the Container ID and the installed OS EZ template have been chosen, you can create the Container private area with the vzctl create command. The private area is the directory containing the VZFS symlinks, copy-on-write area, and private files of the given Container. The private area is mounted to the /vz/root/CT_ID directory on the Hardware Node and provides Container users with a complete Linux file system tree.

The vzctl create command requires only the Container ID and the name of the OS template as arguments; however, in order to avoid setting all the Container resource control parameters after creating the private area, you can specify a sample configuration to be used for your new Container. The sample configuration files are residing in the /etc/vz/conf directory and have names with the following mask: ve-<configname>.conf-sample. The most commonly used sample is the ve-basic.conf-sample file; this sample file has resource control parameters suitable for most Containers.

Thus, for example, you can create a new Container by typing the following string:

# vzctl create 101 –ostemplate redhat-el5-x86 -–config basic

Creating Container private area (redhat-el5-x86)

Container is mounted

Postcreate action done

Container is unmounted

Container private area was created

Delete port redirection

Adding port redirection to Container(1): 4643 8443

In this case, the Virtuozzo Containers software will create a Container with ID 101, the private area based on the redhat-el5-x86 OS EZ template, and configuration parameters taken from the ve-basic.conf-sample sample configuration file.

If you specify neither an OS template nor a sample configuration, vzctl will try to take the corresponding values from the global Virtuozzo configuration file (/etc/vz/vz.conf). So you can set the default values in this file using your favorite text file editor, for example:

DEF_OSTEMPLATE=”.redhat-el5-x86″

CONFIGFILE=”basic”

and do without specifying these parameters each time you create a new Container. Please keep in mind that the . symbol before the template name in the DEF_OSTEMPLATE parameter is used to indicate that the Container being created is to be based on an OS EZ template; otherwise, it will denote an OS standard template Now you can create a Container with ID 101 with the following command:

# vzctl create 101

Creating Container private area (redhat-el5-x86)

Container is mounted

Postcreate action done

Container is unmounted

Container private area was created

Delete port redirection

Adding port redirection to Container(1): 4643 8443

Source : parallels

Categories: Articles Tags:

LITE SPEED COMPARED TO APACHE WEB SERVER

September 17th, 2009 No comments

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

Advantages of using lite speed compared to apache:
===========================

1. Lite speed is 6 times faster than Apache.
2. When it comes to dynamic content, LiteSpeed is more than 50% faster in PHP content delivery than Apache with mod_php

3. Increases PHP performance and security while doubling server capacity.

4. Efficient CGI daemon

5. High performance Perl daemon

6. SECURE

* Strictest HTTP request validation
* Deny any buffer-overrun attempts
* Anti-DDoS: Throttling & Connection Accounting
* System overloading prevention
* Chroot web server process
* CGI/FCGI/LSAPI/PHP suEXEC
7.RELIABLE

* Watch Dog monitoring
* Recover from service failure instantly
* Zero down time graceful restart
8.SCALABLE

* Small memory footprint
* Thousands of concurrent connections
* Increase scalability of external web applications

9.LiteSpeed support a wide set of server API and scripting languages.

* CGI/1.1
* FastCGI
* LSAPI (LiteSpeed SAPI)
* JSP/Servlet via AJP 1.3
* Transparent Reverse Proxy (interface to any web server, application server support HTTP)
* PHP with 3rd party PHP Accelerators compatibilities (APC, eAccelerator, XCache).
* Perl/Python (CGI, FastCGI)
* Ruby/Roby on Rails
* C/C++ (CGI, FastCGI, LSAPI)
So, for shared hosting environment better to go for lite speed web server.

Categories: Articles Tags:

PIM Resource Parameters Description

August 18th, 2009 No comments

Resource Parameters Description

The CPU-related resource management is based on the following parameters:

Parameter

Description

cpuunits

This is a positive integer number that determines the minimal guaranteed share of the CPU time your Container will receive.

cpulimit

This is a positive number indicating the CPU time in percent the corresponding Container is not allowed to exceed.

Linux burst_cpulimit

The CPU power limit, in percent, the Container cannot exceed. The limitations set in this parameter are applied to the Container when it exceeds the limit specified in the burst_cpu_avg_usage parameter.

Linux burst_cpu_avg_usage

The CPU usage limit, in percent, set for the Container. This limit is calculated as the ratio of the current Container CPU usage to the CPU limit (i.e to the value of the CPULIMIT parameter) set for the Container. If the limit is not specified, the full CPU power of the Hardware Node is considered as the CPU limit. Upon exceeding the burst_cpu_avg_usage limit, the burst_cpulimit limit is applied to the Container.

Windows cpuguarantee

This is a positive integer number indicating the CPU time, in percent, the corresponding Container is guaranteed to receive. If both the cpuguarantee and cpuunits parameters are set, the cpuguarantee parameter is first taken into account when distributing processor(s) time among the Containers existing on the Node; the remaining CPU time, if any, is given to the Containers in accordance with the value of the cpuunits parameter.

cpus

The number of CPUs set to handle all the processes inside the given Container. By default, any Container is allowed to consume the CPU time of all processors on the Node.

The disk-related resource management is based on the following parameters:

Parameter

Description

diskspace

Total size of disk space consumed by the Container.

Linux When the space used by the Container hits the soft limit, the Container can allocate additional disk space up to the hard limit during the grace period indicated by the quotatime parameter value.

Linux diskinodes

Total number of disk inodes (files, directories, and symbolic links) allocated by the Container. When the number of inodes used by the Container hits the soft limit, the Container can create additional inodes up to the hard limit during the grace period indicated by the quotatime parameter value.

Linux quotaugidlimit

Number of user/group IDs allowed for the Container internal disk quota. If set to 0, UID/GID quota will not be enabled.

Linux quotatime

The grace period for the disk quota overusage defined in seconds. The Container is allowed to temporarily exceed its quota soft limits for no more than the QUOTATIME period.

Linux ioprio

The Container priority for disk I/O operations. The allowed range of values is 0-7. The greater the priority, the more time the Container has for writing to and reading from the disk. The default Container priority is 4.

The memory-related resource management parameters are divided into 4 groups: memory parameters, primary system parameters, secondary system parameters, and auxiliary system parameters.

Windows Windows-based Containers use only the primary system parameters.

Linux For Linux-based Containers, this screen displays the memory-based, or the system-based, or both memory- and system-based Container resources data, depending on your settings:

* If the memory management mode is enabled for the Container, it can be allocated memory in much the same way as a certain amount of physical memory is installed on a physical computer. This is the recommended mode for managing Containers for most administrators.
* If the system management mode is enabled, the Container’s performance depends on the values of quite a number of fine-grained parameters. The primary parameters are the starting point for defining the relative power of a Container. The secondary parameters are dependent on the primary ones and are calculated from them according to a set of constraints. The auxiliary parameters help improve fault isolation among applications in a Container and the way applications handle errors and consume resources.
* If both resource management modes are used, the more restrictive value is taken into account each time the system makes the decision whether to allocate this or that resource to the Container.

Linux Memory parameters

Parameter

Description

slmmemorylimit

An approximation of the size of the physical memory allocated to the Container. In other words, the Container performance is similar to the performance of a physical computer with as much physical memory installed as is indicated in this parameter.

Primary system parameters

Parameter

Description

numproc

The maximal number of processes the Container may create.

Windows numsessions

The number of simultaneous terminal sessions that can be opened to the Container.

Windows vprvmem

The size of private (or potentially private) memory allocated by the Container. The memory that is always shared among different applications is not included in this resource parameter.

Linux numtcpsock

The number of TCP sockets (PF_INET family, SOCK_STREAM type). This parameter limits the number of TCP connections and, thus, the number of clients the server application can handle in parallel.

Linux numothersock

The number of sockets other than TCP ones. Local (UNIX-domain) sockets are used for communications inside the system. UDP sockets are used, for example, for Domain Name Service (DNS) queries. UDP and other sockets may also be used in some very specialized applications (SNMP agents and others).

Linux vmguarpages

The memory allocation guarantee, in pages. Container applications are guaranteed to be able to allocate additional memory so long as the amount of memory accounted as privvmpages (see the auxiliary parameters) does not exceed the configured barrier of the vmguarpages parameter. Above the barrier, additional memory allocation is not guaranteed and may fail in case of overall memory shortage.

Linux avnumproc

The average number of processes and threads.

Linux Secondary system parameters

Parameter

Description

kmemsize

The size of unswappable kernel memory allocated for the internal kernel structures for the processes of a particular Container.

Note: For the Virtuozzo Containers 64-bit version for IA-64 processors, it takes 4 (four) times more the size of the kernel memory than that for the Virtuozzo Containers 32-bit version to handle one and the same process.

tcpsndbuf

The total size of send buffers for TCP sockets, i.e. the amount of kernel memory allocated for the data sent from an application to a TCP socket, but not acknowledged by the remote side yet.

tcprcvbuf

The total size of receive buffers for TCP sockets, i.e. the amount of kernel memory allocated for the data received from the remote side, but not read by the local application yet.

othersockbuf

The total size of UNIX-domain socket buffers, UDP, and other datagram protocol send buffers.

dgramrcvbuf

The total size of receive buffers of UDP and other datagram protocols.

oomguarpages

The out-of-memory guarantee, in pages. Any Container process will not be killed even in case of heavy memory shortage if the current memory consumption (including both physical memory and swap) does not reach the oomguarpages barrier.

privvmpages

The size of private (or potentially private) memory allocated by an application. The memory that is always shared among different applications is not included in this resource parameter.

Linux Auxiliary system parameters

Parameter

Description

lockedpages

The memory not allowed to be swapped out (locked with the mlock() system call), in pages.

shmpages

The total size of shared memory (including IPC, shared anonymous mappings and tmpfs objects) allocated by the processes of a particular Container, in pages.

numfile

The number of files opened by all Container processes.

numflock

The number of file locks created by all Container processes.

numpty

The number of pseudo-terminals, such as an ssh session, screen or xterm applications, etc.

numsiginfo

The number of siginfo structures (essentially, this parameter limits the size of the signal delivery queue).

dcachesize

The total size of dentry and inode structures locked in the memory.

numiptent

The number of IP packet filtering entries.

Source : PIM DOCS

Categories: Articles Tags:

vps command line usage

February 24th, 2009 No comments

Hi,

Some vps command line usage commands:
Add a domain from the command line

/script/add –class=domain –name=testdomain4.com v-docroot=testdomain.com/curent/public –v-password=xyz –v-dnstemplate_name=default.dnst

Delete a client who has no domains:

/script/update –class=client –name=testclient –action=delete

Vps that uses the maximum traffic by using this:

/script/filter/vps-sort-traffic | head -1

Vpses that have gone overquota re traffic.

/script/filter/vps-overquota-traffic

To add a simple cron job, that’s executed either  ‘every-hour’ every-day  with an  cron_day_hour  also specified.

/script/add –parent-class=client –parent-name=admin –class=cron –v-ttype=simple –v-simple_cron=every-day –v-cron_day_hour=6 –v-command=”ls -al”

Categories: Articles Tags:

Oracle 10g VE

December 31st, 2008 No comments

Create the container on the Host system

vzctl create 1001 --ostemplate centos-4-i386-default
vzctl set 1001 --userpasswd root:password --save
vzctl set 1001 --hostname ve-oracle.example.com --save
vzctl set 1001 --ipadd 192.168.0.62 --save

Reset resource limits

I decided to have max limits to avoid problems during installation. Once the installation is done and the system left running for some time, these limits should be adjusted.

Note: setting the UBC limits to “unlimited” value like below can only be done on a trusted single-container machine, and can create problems. For more info about UBC, see Resource shortage and UBC.

Warning: The above UBC values might not be consistent; see UBC consistency check.

vzctl set 1001 --kmemsize unlimited --save
vzctl set 1001 --lockedpages unlimited --save
vzctl set 1001 --privvmpages unlimited --save
vzctl set 1001 --shmpages unlimited --save
vzctl set 1001 --numproc unlimited --save
vzctl set 1001 --numtcpsock unlimited --save
vzctl set 1001 --numflock unlimited --save
vzctl set 1001 --numpty unlimited --save
vzctl set 1001 --numsiginfo unlimited --save
vzctl set 1001 --tcpsndbuf unlimited --save
vzctl set 1001 --tcprcvbuf unlimited --save
vzctl set 1001 --othersockbuf unlimited --save
vzctl set 1001 --dgramrcvbuf unlimited --save
vzctl set 1001 --numothersock unlimited --save
vzctl set 1001 --dcachesize unlimited --save
vzctl set 1001 --numfile unlimited --save
vzctl set 1001 --numiptent unlimited --save

Or you can set these limits in your /etc/vz/conf/1001.conf file:

Note : The above UBC values might not be consistent; see UBC consistency check.

# Primary parameters
AVNUMPROC="unlimited"
NUMPROC="unlimited"
NUMTCPSOCK="unlimited"
NUMOTHERSOCK="unlimited"
VMGUARPAGES="unlimited"

# Secondary parameters
KMEMSIZE="unlimited"
TCPSNDBUF="unlimited"
TCPRCVBUF="unlimited"
OTHERSOCKBUF="unlimited"
DGRAMRCVBUF="unlimited"
OOMGUARPAGES="unlimited"

# Auxiliary parameters
LOCKEDPAGES="unlimited"
SHMPAGES="unlimited"
PRIVVMPAGES="unlimited"
NUMFILE="unlimited"
NUMFLOCK="unlimited"
NUMPTY="unlimited"
NUMSIGINFO="unlimited"
DCACHESIZE="unlimited"

PHYSPAGES="unlimited"
NUMIPTENT="unlimited"

Start the container

vzctl start 1001

Update /etc/resolv.conf on the container

Put the following into your container’s /etc/resolv.conf:

search example.com
nameserver <ip address of your name server>

Install Required Packages

vzyum 1001 install binutils compat-db gcc gcc-c++ glibc \
 glibc-common libstdc++ libstdc++-devel gnome-libs make \
 pdksh sysstat libaio xscreensaver openmotif21 xorg-x11-xfs \
 usbutils urw-fonts shared-mime-info perl-libwww-perl \
 perl-XML-Parser perl-URI perl-HTML-Tagset perl-HTML-Parser \
 patch lvm2 intltool libIDL libart_lgpl libbonobo xterm \
 libcap libcroco libgnomecanvas libexif libgnomecups \
 libgnomeprint22 libsoup libwnck libxklavier

Check the following rpms are installed on the container

vzctl exec 1001 rpm -q binutils gcc gcc-c++ glibc gnome-libs \
 libstdc++ libstdc++-devel make pdksh sysstat xscreensaver libaio

Add Oracle User/Group

vzctl exec 1001 /usr/sbin/groupadd oinstall
vzctl exec 1001 /usr/sbin/groupadd dba
vzctl exec 1001 /usr/sbin/useradd -m -g oinstall -G dba oracle
vzctl exec 1001 id oracle

Set Password for the Oracle user

vzctl exec 1001 passwd oracle

Create Directories for Oracle Home/Data and the download directory

vzctl exec 1001 mkdir /home/oracle/10gR2_db
vzctl exec 1001 mkdir -p /u01/app/oracle/product/10.2.0/db_1
vzctl exec 1001 mkdir /u01/app/oracle/oradata
vzctl exec 1001 chown -R oracle:oinstall /u01/app/oracle /home/oracle/10gR2_db
vzctl exec 1001 chmod -R 775 /u01/app/oracle /home/oracle/10gR2_db
vzctl exec 1001 ln -s /usr/lib/libstdc++.so.6.0.3 /usr/lib/libstdc++.so.5

Put these values in /etc/sysctl.conf on the HN

Put these values in /etc/sysctl.conf on the HN:

kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default=262144
net.core.wmem_default=262144
net.core.rmem_max=262144
net.core.wmem_max=262144

Then execute on the HN the following command:

/sbin/sysctl -p

At this point the container is ready for Oracle installation. We take a backup of the container at this point in case we need to rebuild the system or do a clean Oracle install.

Shutdown the container and take a backup

vzctl stop 1001
cd /u01/backups
tar czpvf ve-1001-preOracle.tar.gz /vz/private/1001/ /etc/vz/conf/1001.conf

Start the container again

vzctl start 1001

Put oracle distro into the container

Copy the downloaded Oracle zip file to the container and change its ownership to “oracle” on the container.

cp /u01/software/10201_database_linux32.zip /vz/private/1001/home/oracle/10gR2_db/
vzctl exec 1001 chown oracle:oinstall /home/oracle/10gR2_db/10201_database_linux32.zip

Start installation

Now login as oracle on the ve-1001, and run the following commands:

cd /home/oracle/10gR2_db
unzip 10201_database_linux32.zip
cd database/
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
export DISPLAY=192.168.0.149:0

Make sure you can run xterm, then:

./runInstaller

When prompted to run scripts as root. Login as root and execute

export DISPLAY=192.168.0.149:0
/u01/app/oracle/oraInventory/orainstRoot.sh
/u01/app/oracle/product/10.2.0/db_1/root.sh

Update oracle’s profile with the following

cd
vi /home/oracle/.bashrc
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
export PATH=$ORACLE_HOME/bin:$PATH
export ORACLE_SID=orcl

Delete installation files (optional)

cd /home/oracle/10gR2_db
rm -rf database

Time to take another backup of the container on the hardware node.

This backup will allow you to restore the container to the point where no database has yet been created.

vzctl stop 1001
cd /u01/backups
tar czpvf ve-1001-postOracleSoftware.tar.gz \
  /vz/private/1001/ /etc/vz/conf/1001.conf

Start the container

vzctl start 1001

Login as oracle and create the database

export DISPLAY=192.168.0.149:0
dbca

Create listener

netca

Now take another backup on the HN node

vzctl stop 1001
cd /u01/backups
tar czpvf ve-1001-postOracleDatabase.tar.gz \
  /vz/private/1001/ /etc/vz/conf/1001.conf

Source : wiki.openvz.org.
Categories: Articles Tags:

firewall for vps

December 25th, 2008 No comments

You can protect your HyperVM node (Master or slave) by adding the ConfigServer Security and Firewall.

Here’s howto:

wget http://www.configserver.com/free/csf.tgz
tar -zxvf csf.tgz
cd csf
ls
./install.sh

Once it has been installed, you’ll need to configure it correctly before use, or you’ll have some really weird problems.

Ok, so the configuration file is /etc/csf/csf.conf, edit with your favourite editor:

Leave ETH_DEVICE blank, CSF will work this out on it’s own.

Modify the following lines as follows: (These can be customized as per your own requirements, the 777*, 888* and 5558 ports are required for HyperVM to work)

# Allow incoming TCP ports
TCP_IN = “25,53,110,953,993,995,22,7776,7777,7778,7779,8886,8887,8888,8889,5558″
# Allow outgoing TCP ports
TCP_OUT = “25,53,80,110,113,443,953,7776,7777,7778,7779,8886,8887,8888,8889,5558″

If you want to be able to ping your HyperVM node, set:

# Allow incoming PING
ICMP_IN = “1″

Save and exit /etc/csf/csf.conf

If you’re using openvz in your node, you’ll have to add the following into /etc/csf/csfpre.sh

iptables -A INPUT -i venet0 -j ACCEPT
iptables -A OUTPUT -o venet0 -j ACCEPT
iptables -A FORWARD -j ACCEPT -p all -s 0/0 -i venet0
iptables -A FORWARD -j ACCEPT -p all -s 0/0 -o venet0

Note 1: The /etc/csf/csfpre.sh will probably not exist, you’ll have to create it. csfpre.sh will be executed each time before csf starts.

Note 2: I’ve added (cd /usr/local/lxlabs/hypervm/httpdocs/ ; lphp.exe ../bin/misc/openvz-iptables-traffic.php) to the top of my csfpre.sh due to the traffic calculations, yet I think something else is wrong… I’ll update this once I figured it out.

You are now ready to begin testing… run from the command line:

service csf start

Once you are happy with the configuration and everything works as you wish, disable the testing mode:

# Testing flag - enables a CRON job that clears iptables incase of
# configuration problems when you start csf. This should be enabled until you
# are sure that the firewall works - i.e. incase you get locked out of your
# server! Then do remember to set it to 0 and restart csf when you’re sure
# everything is OK. Stopping csf will remove the line from /etc/crontab
TESTING = “0″

Productionize with:

service csf restart

You are done.

Additionally you can disable disable process tracking and user process tracking by setting (in the csf.conf):

PT_USERTIME = “0″
PT_LIMIT = “0″
PT_USERPROC = “0″

Source : lxwiki

Categories: Articles Tags:

Guaranteed memory and burstable memory.

December 17th, 2008 No comments

Guaranteed memory is defined as the usable memory out of the memory available in VPS. This is available for the user at all time. Very often this guaranteed memory can be changed to burstable memory by the VPS.

Burstable memory set a maximum limit for the memory available where as guaranteed memory is a minimum limit. That is, even if the guaranteed memory is exhausted, the users of VPS can use the memory up to the limit of burstable memory. The simplest example to understand the difference is: if the guaranteed memory of a VPS is 256mb and the burstable memory limit is 1024 mb, the users can use the remaining 768MB RAM once their guaranteed memory is completely used up. This is possible only if the host server has that much memory available with it.

It is always a procedure to keep certain part of the memory in host server as burstable. This can be used by the virtual servers when they are in need of extra memory. Also the guaranteed memory unused in any virtual server can be used by other virtual servers when they want burstable memory. It is known that guaranteed memory should be available for use for the virtual servers. So when they are in need of guaranteed RAM, they usually kill the processes that use their memory as burstable to get the memory released. So it is always better not to use the burstable memory unless it is so needed.

When trying to get a VPS server, it should be clearly understood that the memory availability that they demand is not burst memory. The guaranteed memory must be available in sufficient amount to get proper working in VPS. The memory burstable is not readily available always as it can be obtained only on a lapse of guaranteed memory by other virtual servers in the system.

Categories: Articles Tags:

Is a VPS Right For Me

December 17th, 2008 No comments

Virtual private server is the technique of splitting the physical server into many virtual servers to get multiple servers. This is mainly a cost effective technique. The physical servers are really very costly. So when these can be split to many logical servers, the cost remains the same of getting a physical server. But at the same time, there are many servers available. This is mainly useful in the hosting of web sites. So the users often come up with the doubt of whether VPS is a best choice for them. It is essential to understand the scenario to answer the question.

VPS is ideal for those web developers who are technically advanced. Those who require access to the root server for their administrative purposes can go for a VPS hosting service. They aim at getting total control over the system.

Those who want a control over the resources in the server can opt VPS. The control over space and the programs necessarily requires the system to be VPS. The users can allocate the resources as per the availability when he can carry out the administration of the environment.

If you want to start a hosting company aiming at making profit in your business, then VPS is a right choice for you.

Categories: Articles Tags:

Advantages of vps

December 17th, 2008 No comments

A virtual private server (VPS, also referred to as Virtual Dedicated Server or VDS) is a method of partitioning a physical server computer into multiple servers such that each has the appearance and capabilities of running on its own dedicated machine. Each virtual server can run its own full-fledged operating system, and each server can be independently rebooted.

VPS Advantages
==============

The main advantage of VPS is the ability of each server to execute independently. The servers run on their own OS and resources. Each server has no access to the resources or software running on any other server connected to the same physical server. So when there is any problem in the working of one of the servers, the total performance is never affected. Only the affected server needs to be halted and all others continue delivering their service.

One of the main advantages of using VPS is the reduced cost in obtaining multiple physical servers. The expense required to get multiple resources and network can be lessened as the physical server is virtually partitioned. Each server has all the functionalities of a real server but at the same time there is no need of getting the real server for use. This is mainly beneficial when the servers of architecture like mainframe are too costly to buy. There you can emulate the servers and reduce the over all expense.

Each server has its own share of CPU, memory and bandwidth. They need not compete for these resources. The end result is a high performance system capable of doing multiple tasks for any number of users. The virtual servers never get access to the resources of other virtual servers in the system, though they can access the physical server through proper access requests.

The users can install their own software in their virtual server. The update or integration of this software in no way will affect other servers in the system. Users can never look into the data existing in other servers of the system. No transparency is available to the data or resources of the servers from another server of the system. Thus privacy and security is ensured in the system.

The servers have their own operating system. This allows for their rebooting without affecting the physical or virtual servers in the system. The highly efficient control panel helps in the up gradation of software in the virtual servers.

The traffic at the physical server can be divided into the virtual servers. This helps to get rid of the issues related to the demand for resources and servers in the system. The traffic at one of the servers will never slow down the performance or execution time of another server as complete isolation is provided in the virtualized environment.

Because of these advantages of virtual private servers, they are in great demand in the business sectors. Those who are web hosting resellers use this technology to help their clients to get a server that has all the functions of the root server. This will help them to get more money at the expense of little cost from their pocket.

Categories: vps Tags:

Backup using hypervm

December 16th, 2008 No comments

STEPS TO TAKE BACKUP :
You will need to install the perl Lchown module on the backup server. So on the backup server run this:

perl -MCPAN -e “install Lchown”

To add a central backup server, first go to  admin home -> central backup servers  and add the servers by providing the parameters there. The parameters are:

Backup Server Name/Ip

Slave-ID Slave ID is needed if you want the browse backup feature, that allows the end user to browse and restore his own backup files individually. To enable browse-backup, you have to add the backup-server into the hyperVM cluster, and then provide the slave-id of the backup-server here.

SSH Port :
Backup Root Directory : This is the core root directory where the backup will be stored. For instance, /mnt/backup/hypervm/ . The backup of the vps will be stored inside this directory.
Number of Backups : This is the total number of backups to be taken. The default is 3, but you can set upto 7. This many backups will be permanently stored on the backup server.

You can add many backup-servers here.

After adding the backup-servers, go to server home -> central backup config and then set the central Backup Server for this particular slave. Many slaves can share one backup server. If you want the old setup, just add one backup-server, and then set this as the backup-server for all the slaves.

To enable backup for a vps, you will need to set the central backup feature, by going to vps home -> limit and checking the enable central backup

The steps required for backup:

a) You have to create a passwordless ssh channel from the master to each backup server. This is the only ssh access you will need to configure. This can be accomplished by running the scpid.sh script that comes with hypervm.

cd /usr/local/lxlabs/hypervm/httpdocs/
//foreach backupserver
sh ../bin/common/scpid.sh root@servername

The username has to be root, since you need to replicate entire userids on the backup server.

b) Setup Osimages on each backupserver.

cd /usr/local/lxlabs/hypervm/httpdocs/

//foreach backupserver
lphp.exe ../bin/backuposimage.php –backuplocation=root@servername:/full/path/to/backup/directory/ –sshport=$sshport

The above will automaticaly setup all the Osimages from the master in the backup server. The backuplocation is a composite string of the form user@server:/full/path, where ‘full/path’ is the location on the backupserver which is going to the root directory for the backups. Please note that you have to provide full paths, since otherwise the rsnapshot program will not work. The vps backups will be taken relative to the Osimage the vps is created from.

cd /usr/local/lxlabs/hypervm/httpdocs/

lphp.exe ../bin/vpsbackup.php –newarg=true

d) Schedule it everyday in cron. Or whatever period you want the backup to happen.

The central backup flag is managed via the resource plans and also in vps home -> limit . You can enable/disable central backup for VPSes by changing them either in the limits or in the resource plans.

The –newarg=true is to distinguish the current configuration from the old one. If you don’t provide the newarg=true , the backup script will fail and send a warning message to admin.

SOURCE : lxlabs.com

Categories: vps Tags: