What do you need to install packages?
# yum install -y qemu-kvm qemu-img \
virt-manager libvirt libvirt-python \
libvirt-client virt-install virt-viewer
Reference: http://www.itzgeek.com/how-tos/linux/centos-how-to...
公告版位
- Jan 05 Tue 2016 23:33
How to use Yum Install KVM (QEMU) on CentOS 7
- Dec 31 Thu 2015 13:50
How to change apt-get source.list from CD-ROM to Mirror-Site for Debian 8.2 Jessie
-------------------------------------------------------------------------
deb cdrom:[Debian GNU/Linux 8.2.0 _Jessie_ - Official amd64 DVD Binary-1 20150906-11:13]/ jessie contrib main
# deb http://security.debian.org/ jessie/updates main contrib
# deb-src http://security.debian.org/ jessie/updates main contrib
# jessie-updates, previously known as 'volatile'
# A network mirror was not selected during install. The following entries
# are provided as examples, but you should amend them as appropriate
# for your mirror of choice.
#
# deb http://ftp.debian.org/debian/ jessie-updates main contrib
# deb-src http://ftp.debian.org/debian/ jessie-updates main contrib
-------------------------------------------------------------------------
- Dec 29 Tue 2015 18:53
Scan Class C IP for Shell Script
${subnet}#!/bin/bash
subnet="192.168.100"
`rm -rf ${subnet}_Up.log`
`rm -rf ${subnet}_Down.log`
for i in $(seq 1 254)
do
ping -c 1 -w 1 ${subnet}.$i && result=0 || result=1
if [ "$result" -eq 0 ]; then
echo "${subnet}.$i is Up" >> ${subnet}_Up.log
else
echo "${subnet}.$i is Down" >> ${subnet}_Down.log
fi
done
- Dec 28 Mon 2015 09:43
How to get the DHCP server information for offering IP on CentOS.
# vim /var/lib/dhcpd/dhcpd.leases
- Dec 24 Thu 2015 15:19
How to Enable LLDP and SNMP for HP 1920-24G and HP 1920-48G.
- Dec 23 Wed 2015 14:49
How to get physical mac address on CentOS.
How to get physical mac address, when other pepole rename your mac address on CentOS.
# cat /var/log/dmesg | grep eth
- Dec 22 Tue 2015 19:13
How to Enable Full Command Line Access for HP 1920-24G or 1920-48G.
******************************************************************************
* Copyright (c) 2010-2015 Hewlett-Packard Development Company, L.P. *
* Without the owner's prior written consent, *
* no decompiling or reverse-engineering shall be allowed. *
******************************************************************************
Login authentication
Username: admin
Password:
<HP 1920G Switch> _cmdline-mode on
All commands can be displayed and executed. Continue? [Y/N] Y
↓↓↓↓↓↓↓↓ Default password is below, ↓↓↓↓↓↓↓↓
Please input password: Jinhua1920unauthorized
y wrong use, please carefully use it with our engineer's direction.
- Dec 21 Mon 2015 18:33
awk如何取最後一個欄位(How to use awk to get last column)
1. Get last column
# df -h | awk '{print $NF}'
- Dec 16 Wed 2015 14:36
How to install KVM, libvirt, and Virtual Machine Manager on CentOS 6.6
1) Install packages
# yum install -y kvm libvirt qemu-kvm virt-manager
2)
# chkconfig libvirtd on
# service libvirtd restart
- Nov 24 Tue 2015 16:08
How to create single config for single user on CentOS 7 for vsftpd.
Environment: All users are Read-Only on vsFTPd
[root@localhost ~]# vim /etc/vsftpd/vsftpd.conf
-----------------------------------------------------------
......
# Uncomment this to enable any form of FTP write command.
write_enable=NO
......
-----------------------------------------------------------
We have create an account "CloudUser", and CloudUser must Read-Write on vsFTPd of user home directory.
- Nov 23 Mon 2015 14:43
如何還原Juniper SRX設定錯誤的config (假如沒有commit)
root> configure
Entering configuration mode
The configuration has been changed but not committed
- Oct 05 Mon 2015 15:46
The command can continue to be executed, when linux user was logout.
(1) We use a example "ping" in the background, and the command (Using "nohup") is below,
# nohup ping www.google.com &
or
# nohup ping www.google.com >> output.log &
- Sep 17 Thu 2015 12:06
How to create a new user account and use sudo for ubuntu.
1. Create a new account "Cloud-user"
# adduser Cloud-user
2. Add "Cloud-user" into sudo(sudoers) list.
# usermod -a -G sudo Cloud-user
- Sep 10 Thu 2015 02:02
如何設定Ubuntu的Daemon(Service)開機時自動啟動(如同CentOS的chkconfig)
今天假設我們先安裝SSH的Daemon:
# sudo apt-get install openssh-server
安裝sysv-rc-conf package, 用來設定Daemon開機與關機時, Service的啟動與閉關:
# sudo apt-get install sysv-rc-conf
設定在所有Run Level開機時皆自動開啟SSH Daemon:
# sudo update-rc.d -f ssh defaults
設定在所有Run Level開機時皆不開啟SSH Daemon:
# sudo update-rc.d -f ssh remove
設定只在Run Level 2~5自動啟動SSH Daemon, 而開機啟動順位為80 (數值愈大愈晚啟動):
# sudo update-rc.d ssh start 80 2 3 4 5
設定在Run Level 0, 1, 6時自動關閉SSH Daemon, 而關閉順位為20 (數值愈小愈早關閉):
# sudo update-rc.d ssh stop 20 0 1 6
- Sep 07 Mon 2015 17:57
How to use SSH and sFTP to connect OpenStack and AWS platform on Windows for using Key pair.
1. We are going to get a key pair (ex: OpenStack.pem).
(You can get Mirantis OpenStack key pair on Fuel's /root/.ssh/id_rsa)
The key pair is below,
2. Download PuTTYgen. (http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html)
3. Open PuTTYgen, type "Conversions" --> type "Import key" --> import your key pair (ex: OpenStack.pem)