情况说明:
(1)本文采用CentOSx86_64操作系统,需要有KVM安装环境。
(2)convirt2.1.1采用源码方式安装,convirt环境分别两部分,一部分是cms,用于管理kvm/xen虚拟主机上的虚拟机,一部分做为客户端安装到kvm/xen虚拟主机上。
(3)convirt2.1.1是开源的管理xen/kvm虚拟化管理工具,是众多开源工具中的一种。
1.安装convirt环境
(1)安装KVM环境
2)准备convirt安装源
#cd/etc/yum.repos.d #wget--no-cachehttp://www.convirture.com/repos/definitions/rhel/6.x/convirt.repo
(3)下载convirt与cms安装包
#cd/root/ #wget--no-cachehttp://www.convirture.com/downloads/convirt/2.1.1/convirt-2.1.1.tar.gz #wget--no-cachehttp://www.convirture.com/downloads/convirt/2.1.1/convirt-install-2.1.1.tar.g
(4)安装convirt安装包
#tar-xzvfconvirt-install-2.1.1.tar.gz #cdconvirt-install/install/cms/scripts/&&./install_dependencies
… chmod755blib/arch/auto/HTML/Parser/Parser.so cpParser.bsblib/arch/auto/HTML/Parser/Parser.bs chmod644blib/arch/auto/HTML/Parser/Parser.bs Manifyingblib/man3/HTML::PullParser.3pm Manifyingblib/man3/HTML::Entities.3pm Manifyingblib/man3/HTML::Parser.3pm Manifyingblib/man3/HTML::TokeParser.3pm Manifyingblib/man3/HTML::LinkExtor.3pm Manifyingblib/man3/HTML::Filter.3pm Manifyingblib/man3/HTML::HeadParser.3pm Filesfoundinblib/arch:installingfilesinblib/libintoarchitecturedependentlibrarytree Installing/usr/local/lib64/perl5/auto/HTML/Parser/Parser.bs Installing/usr/local/lib64/perl5/auto/HTML/Parser/Parser.so Installing/usr/local/lib64/perl5/HTML/HeadParser.pm Installing/usr/local/lib64/perl5/HTML/PullParser.pm Installing/usr/local/lib64/perl5/HTML/LinkExtor.pm Installing/usr/local/lib64/perl5/HTML/Filter.pm Installing/usr/local/lib64/perl5/HTML/Entities.pm Installing/usr/local/lib64/perl5/HTML/Parser.pm Installing/usr/local/lib64/perl5/HTML/TokeParser.pm Installing/usr/local/share/man/man3/HTML::Entities.3pm Installing/usr/local/share/man/man3/HTML::TokeParser.3pm Installing/usr/local/share/man/man3/HTML::PullParser.3pm Installing/usr/local/share/man/man3/HTML::Parser.3pm Installing/usr/local/share/man/man3/HTML::LinkExtor.3pm Installing/usr/local/share/man/man3/HTML::Filter.3pm Installing/usr/local/share/man/man3/HTML::HeadParser.3pm Appendinginstallationinfoto/usr/lib64/perl5/perllocal.pod SUDOis StartingMysqLd:[OK] RunningMysqL_secure_installation. Currentrootpasswordforfreshinstallationisblank.Sosimplepressenter. NOTE:RUNNINGALLPARTSOFTHISSCRIPTISRECOMMENDEDFORALLMysqL SERVERSINPRODUCTIONUSE!PLEASEREADEACHSTEPCAREFULLY! InordertologintoMysqLtosecureit,we'llneedthecurrent passwordfortherootuser.Ifyou'vejustinstalledMysqL,and youhaven'tsettherootpasswordyet,thepasswordwillbeblank,soyoushouldjustpressenterhere. Entercurrentpasswordforroot(enterfornone): ERROR1045(28000):Accessdeniedforuser'root'@'localhost'(usingpassword:YES) Entercurrentpasswordforroot(enterfornone): OK,successfullyusedpassword,movingon... SettingtherootpasswordensuresthatnobodycanlogintotheMysqL rootuserwithouttheproperauthorisation. Setrootpassword?[Y/n]y Newpassword: Re-enternewpassword: Passwordupdatedsuccessfully! Reloadingprivilegetables.. ...Success! Bydefault,aMysqLinstallationhasananonymoususer,allowinganyone tologintoMysqLwithouthavingtohaveauseraccountcreatedfor them.Thisisintendedonlyfortesting,andtomaketheinstallation goabitsmoother.Youshouldremovethembeforemovingintoa productionenvironment. Removeanonymoususers?[Y/n]y ...Success! Normally,rootshouldonlybeallowedtoconnectfrom'localhost'.This ensuresthatsomeonecannotguessattherootpasswordfromthenetwork. Disallowrootloginremotely?[Y/n]y ...Success! Bydefault,MysqLcomeswithadatabasenamed'test'thatanyonecan access.Thisisalsointendedonlyfortesting,andshouldberemoved beforemovingintoaproductionenvironment. Removetestdatabaseandaccesstoit?[Y/n]y -Droppingtestdatabase... ...Success! -Removingprivilegesontestdatabase... ...Success! Reloadingtheprivilegetableswillensurethatallchangesmadesofar willtakeeffectimmediately. Reloadprivilegetablesnow?[Y/n]y ...Success! Cleaningup... Alldone!Ifyou'vecompletedalloftheabovesteps,yourMysqL installationshouldnowbesecure. ThanksforusingMysqL! MysqLd(pid1627)isrunning... MysqLserviceisalreadyrunning. PrerequsiteforConVirtManagementServer(CMS)installed.
说明:安装过程会安装MysqL数据库,并输入MysqL数据库root帐号密码。
(5)修改MysqL数据库配置文件
[root@localhostscripts]#vim/etc/my.cnf [root@localhostscripts]#cat/etc/my.cnf [MysqLd] datadir=/var/lib/MysqL socket=/var/lib/MysqL/MysqL.sock user=MysqL #Disablingsymbolic-linksisrecommendedtopreventassortedsecurityrisks symbolic-links=0 innodb_buffer_pool_size=1G innodb_additional_mem_pool_size=20 [MysqLd_safe] log-error=/var/log/MysqLd.log pid-file=/var/run/MysqLd/MysqLd.pid [root@localhostscripts]# [root@localhostscripts]#/etc/init.d/MysqLdrestart StoppingMysqLd:[OK] StartingMysqLd:[OK] [root@localhostscripts]#
(6)解压CMS软件包并安装
#cd/root/ #cdconvirt-install/install/cms/scripts/&&sourceinstall_config #cd/root&&tar-xzfconvirt-2.1.1.tar.gz-C$CONVIRT_BASE #cd- #./setup_tg2#建议升级python版本为2.7 #./setup_convirt
(7)启动与关闭convirtCMS
启动convirt
#/root/convirt/convirt-ctlstart
关闭convirt
#/root/convirt/convirt-ctlstop
(8)打开convirt2.1.1
输入admin/admin
还需要在kvm虚拟主机上安装convirt-tools工具之后才能添加。
2.在KVM虚拟主机上安装convirt-tools工具
注:在kvm虚拟主机上安装convirt-tools工具。
#wgethttp://www.convirture.com/downloads/convirture-tools/2.1.1/convirture-tools-2.1.1.tar.gz #tarzxvfconvirture-tools-2.1.1.tar.gz #cdconvirture-tools/install/managed_server/scripts #./convirt-toolinstall_dependencies #./convirt-toolsetup
3.在convirtcms上添加KVM虚拟主机
添加KVM虚拟主机。