openvz install and configure

2010-03-07  来源:本站原创  分类:OS  人气:331 

System environment: ubuntu server 9.04

1, openvz Introduction
OpenVZ is operating system based on Linux kernel and operating system-level virtualization technology. OpenVZ allows a physical server to run multiple operating systems, is called virtual private servers (VPS, Virtual Private Server) or virtual environment (VE, Virtual Environment).
This virtual machine with VMware and Xen virtualization technology that half compared, OpenVZ of the host OS and guest OS are necessary to be Linux (although different virtual environment can be different Linux distributions). However, OpenVZ claims do have a performance advantage. According to the statement OpenVZ website, use OpenVZ as compared with the use of stand-alone server, the performance will only be 1-3% loss.
OpenVZ, SWsoft, Inc. Virtuozzo proprietary software developed by the foundation. OpenVZ authorization for the GPLv2.

2, the installation preparation <br /> remove apparmor (apparmor is a security software, but with not very good with the openvz kernel)

sudo /etc/init.d/apparmor stop
sudo update-rc.d -f apparmor remove
sudo apt-get remove apparmor apparmor-utils

Update the source list sources.list, find a linux-openvz source. Can use the command to see if there are linux-openvz:

sudo apt-get update
sudo apt-cache search openvz

3, installation and basic configuration openvz
linux-openvz: the linux kernel with openvz patch
vztcl: openvz management tools
vzquota: openvz quota management tool

sudo apt-get install linux-openvz vzctl vzquota

Kernel parameter adjustment:

sudo vi /etc/sysctl.conf
# Confirm that the following items
net.ipv4.conf.all.rp_filter=1
net.ipv4.icmp_echo_ignore_broadcasts=1
net.ipv4.conf.default.forwarding=1
net.ipv4.conf.default.proxy_arp = 0
net.ipv4.ip_forward=1
kernel.sysrq = 1
net.ipv4.conf.default.send_redirects = 1
net.ipv4.conf.all.send_redirects = 0
net.ipv4.conf.eth0.proxy_arp=1
# Save Exit
sudo sysctl -p

Modify openvz global configuration file / etc / vz / vz.conf. Options NEIGHBOUR_DEVS use the definition of VE network card.

sudo vi /etc/vz/vz.conf
NEIGHBOUR_DEVS=all

Modify vps.basic profile, the default OpenVz create VE when copy / etc / vz / conf / ve-vps.basic.conf-sample the contents of the configuration file for the new VE. Modify this file to avoid repeated changes each time to create VE configuration file. Most quota adjustments, adjusted according to actual situation. Add a line here at the end open part of the function.

sudo vi /etc/vz/conf/ve-vps.basic.conf-sample
# By adding the following
CAPABILITY="CHOWN:on DAC_READ_SEARCH:on SETGID:on SETUID:on NET_BIND_SERVICE:on NET_ADMIN:on SYS_CHROOT:on SYS_NICE:on"

Modify the boot file, the default boot into the openvz kernel. Then restart, use the uname-a to see if access to openvz kernel.

sudo vi /boot/grub/menu.lst
# Modify  default

4, openvz basic operation
openvz ve created a very simple, just download the official templates into / var / lib / vz / template / cache, the use vzctl tool can be created, slightly modified.
Template Download: http://download.openvz.org/template/precreated/

wget http://download.openvz.org/template/precreated/old/ubuntu-8.04-i386-minimal.tar.gz
sudo mv ubuntu-8.04-i386-minimal.tar.gz /var/lib/vz/template/cache/
sudo vzctl create 101 --ostemplate ubuntu-8.04-i386-minimal

After running vzctl creat command will generate 101 (VE's ID, referred to as VEID, must be set to 100 or more) VE configuration file / etc/vz/conf/101.conf. 101VE the root directory by default into / var/lib/vz/private/101.
5, VE management and the use vzctl <br /> common commands:

# Start  VE
sudo vzctl start 101
# Shut down  VE
sudo vzctl stop 101
# Enter the VE and exit  VE
sudo vzctl enter 101
exit
# Delete  VE
sudo vzctl destroy 101
# Sets the host name
sudo vzctl set 101 --hostname test --save
# Executes the command in the VE
sudo vzctl exec 101 ps -aux

More about the configuration of vzctl command can refer to the official openvvz document .

6, other
Restrictions on resource use of VE in VE can run the command view: more / proc / user_beancounters
One held a number of resources being used, maxheld is the number of big use of resources. failcnt more than limit the number of resources. Adjusted according to failcnt and maxheld VE resource constraints (UBC).

VE has a backup tool vzdump can backup and recovery VE.

相关文章
  • openvz install and configure 2010-03-07

    System environment: ubuntu server 9.04 1, openvz Introduction OpenVZ is operating system based on Linux kernel and operating system-level virtualization technology. OpenVZ allows a physical server to run multiple operating systems, is called virtual

  • In the CentOS install and configure Xen 2010-04-04

    In the CentOS install and configure Xen July 23, 2009 PM 58:11 | author: vpsee Laboratories are now equipped with a Masters and a notebook PC, but only with a platform Honours PC, 1 machine to do the project very easy to develop multi-system often us

  • install and configure cacti 2010-03-24

    mysql, php, apache to see the installation of lamp article Second, rrdtool installation 1. To http://oss.oetiker.ch/rrdtool/download.en.html Download rrdtool 2. Talk to the new packages rrdtool depends on yum-y install cairo-devel libxml2-devel pango

  • Install and configure MySQL 5 with MacPorts 2010-03-16

    Install and configure MySQL 5 with MacPorts I decided to move my MySQL server installation from the server I installed from MySQL.com to macports. Why? I believe MacPorts will simplify future upgrades. I'd also like to keep my LAMP installs in the sa

  • MacPorts: Install and configure MySQL 5 2010-04-01

    macport equivalent under linux yum or aptget other package management software, can easily install the software. The following look at his basic commands Basic commands: Mac Port command Transfer from: http://www.joycodes.com/index.php/mac-port-updat

  • Install and configure the OpenSolaris on Xen 2010-04-04

    Install and configure the OpenSolaris on Xen October 29, 2009 AM 10:25 | On: vpsee OpenSolaris is a killer application ZFS, ZFS and also for many people "have" to use OpenSolaris / Solaris, although now there are ZFS on FreeBSD transplant, but n

  • In Ubuntu, install and configure Xen 2010-04-04

    In Ubuntu, install and configure Xen October 16, 2009 AM 51:50 | On: vpsee Server hard drive has been upgraded, and still waiting for memory, memory and hard drive are provided with the goods do not know how not to, finally found the test results the

  • [Change] CentOS5.4 install and configure vsftpd 2010-05-09

    centOS5.4 install and configure vsftpd 1. See if there is to install vsftpd: rpm-qa | grep vsftpd 2.yum install vsftpd: yum install vsftpd 3.rpm install vsftpd: Can be obtained from the following two parts of the RPM package vsftpd latest https: / /

  • MSSQL 2005 can not be com + directory to install and configure an assembly error: -2146233087 2010-06-09

    Com + directory can not install and configure assemblies c: \ program files \ Microsoft SQL Server \ 90 \ DTS \ tasks \ microsoft.sqlserver.MSMQTASK.DLL. Error: -2146233087 sql server installation "in the COM + catalog can not install and configure t

  • Ubuntu install and configure the JDK 2010-07-26

    To install and configure the JDK 5 as an example 1. Download JDK: jdk-1_5_0_22-linux-i586.bin (not to download rpm's) https: / / cds.sun.com / is-bin / INTERSHOP.enfinity / WFS / CDS-CDS_Developer-Site / en_US /-/ USD / ViewFilteredProducts-SingleVar

  • How to install and configure your tomcat5 binding domain 2010-08-31

    How to install and configure your domain name 2007-01-15 11:35 tomcat5 and bound first installation of JDK, download attachments assumed to c: \ jdk Installed and then install tomcat5.0 assume c: \ tomcat Set the following environment variables: Clic

  • install and configure VNC on fedora8 2010-10-08

    install and configure VNC on fedora8 1. Check whether the machine is installed VNC > Rpm-q vnc vnc-server [Root @ cd5. Vnc] # rpm-q vnc vnc-server package vnc is not installed package vnc-server is not installed 2.install vnc > Yum-y install vnc-ser

  • ubuntu install and configure wine 2010-11-19

    ubuntu install and configure wine My ubuntu version is 10.10 of the desktop. Check the version of the installation: > Wine - version root @ carl-VirtualBox: ~ # wine - version wine-1.0.1 Install a compatible program apt-get update apt-get install win

  • Centos install and configure mrtg 2010-12-18

    First, the installed base package To install the MRTG package must first install gcc, perl, gd, libpng, zlib, freetype package and test servers to less loaded three. Compression bag are placed in the ftp. The server can use the command: rpm-qa | grep

  • centos install and configure LAMP extension, ssh, svn, service management 2010-12-29

    Recommended sites http://blog.chinaunix.net/u1/36577/showart_602182.html is very thorough and professional http://mirror.steadfast.net/centos/5.5/isos/i386/CentOS-5.5-i386-bin-DVD.iso Modify the IP ----------------- I. The default system startup conf

  • Linux ubuntu lamp install and configure the environment phpmyadmin 2010-12-30

    Indicate Reprinted: http://farlee.info/archives/linux-ubuntu-lamp-apache-mysql-php-phpmyadmin-install-configuration.html of FarLee PHP development and server operating environment of choice LAMP combination, that Linux + Apache + Mysql + Php / Perl /

  • COM + catalog can not install and configure assemblies microsoft.sqlserver.notificationservices.dll 2011-04-19

    When installing SQL Server 2005, error, error dialog box contents are not recorded, but Summary.txt (Summary.txt located in the% ProgramFiles% \ Program Files \ Microsoft SQL Server \ 90 \ Setup Bootstrap \ LOG \ Hotfix) file the following informatio

  • [Transfer] CentOS5 install and configure the IP Messenger (Ipmsg) perfect finale 2011-05-27

    CentOS5 install and configure the IP Messenger (Ipmsg) perfect finale First, the installation Note: The necessary steps are marked out in green. This blog is a smaller version, if you want to see the original, or you do not have the problem appears b

  • Install and configure Linux, getting started with mysql 2011-06-01

    Install and configure Linux, getting started with mysql

  • centos LAMP install and configure extensions, ssh, svn, service management 2010-12-29

    Recommended Sites http://blog.chinaunix.net/u1/36577/showart_602182.html very comprehensive, very professional http://mirror.steadfast.net/centos/5.5/isos/i386/CentOS-5.5-i386-bin-DVD.iso ----------------- Modify the IP I. Configure the system boot t