kvm虚拟化管理平台WebVirtMgr部署

1、配置yum源
cd /etc/yum.repos.d/
\cp CentOS-Base.repo CentOS-Base.repo.$(date +%F)
wget http://mirrors.163.com/.help/CentOS6-Base-163.repo

2、安装相关软件
yum -y install git python-pip libvirt-python libxml2-python python-websockify supervisor nginx

3、安装数据库
yum -y install ncurses-devel libtool openssl-devel

wget http://cmake.org/files/v3.2/cmake-3.2.3.tar.gz  
tar zxvf cmake-3.2.3.tar.gz  
cd cmake-3.2.3  
./bootstrap  
make  
make install  
cd ..  

wget http://mirrors.sohu.com/mysql/MySQL-5.6/mysql-5.6.33.tar.gz
useradd mysql -s /sbin/nologin -M
mkdir -pv /usr/local/mysql/data  
tar zxvf mysql-5.6.26.tar.gz  
cd mysql-5.6.26  
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_DATADIR=/usr/local/mysql/data/ -DMYSQL_UNIX_ADDR=/usr/local/mysql/mysql.sock -DWITH_INNOBASE_STORAGE_ENGINE=1 -DEXTRA_CHARSETS=all -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DWITH_ARCHIVE_STORAGE_ENGINE=1 -DWITH_BLACKHOLE_STORAGE_ENGINE=1 -DMYSQL_TCP_PORT=3306 -DSYSCONFDIR=/etc -DENABLE_DOWNLOADS=1  
make  
make install  
\cp support-files/my-default.cnf /etc/my.cnf  
cp support-files/mysql.server /etc/init.d/mysqld  
chmod 755 /etc/init.d/mysqld  
chown -R mysql.mysql /usr/local/mysql/ 
chmod +x scripts/mysql_install_db  
scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql/ --datadir=/usr/local/mysql/data/    
ln -s /usr/local/mysql/bin/* /usr/bin/  
ln -s /usr/local/mysql/lib/* /usr/lib/  
ln -s /usr/local/mysql/lib/* /usr/lib64/  
ln -s /usr/local/mysql/man/man1/*  /usr/share/man/man1  
ln -s /usr/local/mysql/man/man8/*  /usr/share/man/man8  
ln -s /usr/local/mysql/libexec/*  /usr/local/libexec  

service mysqld start
chkconfig mysqld on

netstat -tulnp | grep 3306  
mysql 

mysql_secure_installation

mysqladmin -u root password "123456"

mkdir /application
cd /application/
git clone git://github.com/retspen/webvirtmgr.git

你可能感兴趣的:(Python)