情況說明:
(1)本文採用OEL6.3x64作業系統,需要有KVM安裝環境。
(2)convirt2.1.1採用源碼方式安裝,convirt環境分別兩部分,一部分是cms,用於管理kvm/xen虛擬機器主機上的虛擬機器,一部分做為用戶端安裝到kvm/xen虛擬機器主機上。
(3)convirt2.1.1是開源的管理xen/kvm虛擬化管理工具,是眾多開源工具中的一種。
1.安裝convirt環境(1)安裝KVM環境
kvm虛擬化學習筆記(一)之kvm虛擬化環境安裝:http://koumm.blog.51cto.com/703525/1288795
(2)準備convirt安裝源
# cd /etc/yum.repos.d# wget --no-cache http://www.convirture.com/repos/definitions/rhel/6.x/convirt.repo
650) this.width=650;" style="border-bottom:0px;border-left:0px;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://www.bkjia.com/uploads/allimg/131227/1951151Y0-0.png" height="111" />
(3)下載convirt與cms安裝包
# cd /root/# wget --no-cache http://www.convirture.com/downloads/convirt/2.1.1/convirt-2.1.1.tar.gz# wget --no-cache http://www.convirture.com/downloads/convirt/2.1.1/convirt-install-2.1.1.tar.gz
(4)安裝convirt安裝包
# tar -xzvf convirt-install-2.1.1.tar.gz# cd convirt-install/install/cms/scripts/ && ./install_dependencies
…初始化 MySQL 資料庫: Installing MySQL system tables...OKFilling help tables...OKTo start mysqld at boot time you have to copysupport-files/mysql.server to the right place for your systemPLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !To do so, start the server, then issue the following commands:/usr/bin/mysqladmin -u root password 'new-password'/usr/bin/mysqladmin -u root -h vmnode1 password 'new-password'Alternatively you can run:/usr/bin/mysql_secure_installationwhich will also give you the option of removing the testdatabases and anonymous user created by default. This isstrongly recommended for production servers.See the manual for more instructions.You can start the MySQL daemon with:cd /usr ; /usr/bin/mysqld_safe &You can test the MySQL daemon with mysql-test-run.plcd /usr/mysql-test ; perl mysql-test-run.plPlease report any problems with the /usr/bin/mysqlbug script![確定]正在啟動 mysqld: [確定]Running mysql_secure_installation.Current root password for fresh installation is blank. So simple press enter.NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQLSERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!In order to log into MySQL to secure it, we'll need the currentpassword for the root user. If you've just installed MySQL, andyou haven't set the root password yet, the password will be blank,so you should just press enter here.Enter current password for root (enter for none):OK, successfully used password, moving on...Setting the root password ensures that nobody can log into the MySQLroot user without the proper authorisation.Set root password? [Y/n] yNew password:Re-enter new password:Password updated successfully!Reloading privilege tables..... Success!By default, a MySQL installation has an anonymous user, allowing anyoneto log into MySQL without having to have a user account created forthem. This is intended only for testing, and to make the installationgo a bit smoother. You should remove them before moving into aproduction environment.Remove anonymous users? [Y/n] y... Success!Normally, root should only be allowed to connect from 'localhost'. Thisensures that someone cannot guess at the root password from the network.Disallow root login remotely? [Y/n] y... Success!By default, MySQL comes with a database named 'test' that anyone canaccess. This is also intended only for testing, and should be removedbefore moving into a production environment.Remove test database and access to it? [Y/n] y- Dropping test database...... Success!- Removing privileges on test database...... Success!Reloading the privilege tables will ensure that all changes made so farwill take effect immediately.Reload privilege tables now? [Y/n] y... Success!Cleaning up...All done! If you've completed all of the above steps, your MySQLinstallation should now be secure.Thanks for using MySQL!mysqld (pid 2691) 正在運行...MySQL service is already running.Prerequsite for ConVirt Management Server (CMS) installed.
說明:安裝過程會安裝mysql資料庫,並輸入mysql資料庫root帳號密碼。
650) this.width=650;" title="abc.jpg" src="http://www.bkjia.com/uploads/allimg/131227/195115G19-1.jpg" alt="230837805.jpg" />
(5)修改mysql資料庫設定檔
650) this.width=650;" style="border-bottom:0px;border-left:0px;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://www.bkjia.com/uploads/allimg/131227/195115C20-2.png" height="199" />
650) this.width=650;" style="border-bottom:0px;border-left:0px;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://www.bkjia.com/uploads/allimg/131227/1951151927-3.png" height="91" />
(6)解壓CMS軟體包並安裝
# cd /root/# cd convirt-install/install/cms/scripts/ && source install_config# cd /root && tar -xzf convirt-2.1.1.tar.gz -C $CONVIRT_BASE# ./setup_tg2# ./setup_convirt
650) this.width=650;" style="border-bottom:0px;border-left:0px;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://www.bkjia.com/uploads/allimg/131227/1951152L9-4.png" height="115" />
650) this.width=650;" style="border-bottom:0px;border-left:0px;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://www.bkjia.com/uploads/allimg/131227/1951152S6-5.png" height="153" />
安裝過程略…
650) this.width=650;" style="border-bottom:0px;border-left:0px;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://www.bkjia.com/uploads/allimg/131227/1951154R6-6.png" height="553" />
(7)啟動與關閉convirtCMS
啟動convirt
650) this.width=650;" style="border-bottom:0px;border-left:0px;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://www.bkjia.com/uploads/allimg/131227/19511561N-7.png" height="223" />
關閉convirt
# /root/convirt/convirt-ctl stop
(8)開啟convirt2.1.1
http://192.168.233.170:8081
輸入admin/admin
650) this.width=650;" style="border-bottom:0px;border-left:0px;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://www.bkjia.com/uploads/allimg/131227/1951155152-8.png" height="455" />
還需要在kvm虛擬機器主機上安裝convirt-tools工具之後才能添加。
2.在KVM虛擬機器主機上安裝convirt-tools工具
註:在kvm虛擬機器主機上安裝convirt-tools工具。
# wget http://www.convirture.com/downloads/convirture-tools/2.1.1/convirture-tools-2.1.1.tar.gz# tar zxvf convirture-tools-2.1.1.tar.gz# cd convirture-tools/install/managed_server/scripts# ./convirt-tool install_dependencies# ./convirt-tool setup
650) this.width=650;" style="border-bottom:0px;border-left:0px;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://www.bkjia.com/uploads/allimg/131227/19511563I-9.png" height="144" />
650) this.width=650;" style="border-bottom:0px;border-left:0px;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://www.bkjia.com/uploads/allimg/131227/195115DB-10.png" height="308" />
3.在convirtcms上添加KVM虛擬機器主機
添加KVM虛擬機器主機。
650) this.width=650;" style="border-bottom:0px;border-left:0px;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://www.bkjia.com/uploads/allimg/131227/1951154T7-11.png" height="479" />
650) this.width=650;" style="border-bottom:0px;border-left:0px;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://www.bkjia.com/uploads/allimg/131227/195115I52-12.png" height="163" />
650) this.width=650;" style="border-bottom:0px;border-left:0px;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://www.bkjia.com/uploads/allimg/131227/1951153920-13.png" height="342" />
650) this.width=650;" style="border-bottom:0px;border-left:0px;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://www.bkjia.com/uploads/allimg/131227/1951154T9-14.png" height="94" />
650) this.width=650;" style="border-bottom:0px;border-left:0px;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://www.bkjia.com/uploads/allimg/131227/1951151562-15.png" height="492" />
本文只是一個convirt管理工具開端,也希望能夠用好,需要說明的是之前在安裝convirt2.0.1管理RHEL/Centosxen虛擬化的時候真是花了不少時間,發現convirt管理kvm還是問題少一些。
本文安裝參考http://linuxblind.blog.51cto.com/7616603/1275440
本文出自 “koumm的linux技術部落格” 部落格,請務必保留此出處http://koumm.blog.51cto.com/703525/1305553