ubuntu環境初始化

 0. 在Ubuntu系統中永久修改主機名也比較簡單。主機名存放在/etc/hostname文件中,修改主機名時,編輯hostname文件,在文件中輸入新的主機名並保存該文件便可ubuntu

1.打開terminialssh

2.開啓ssh工具

sudo apt-get updateui

sudo apt-get install openssh-server阿里雲

sudo vi /etc/ssh/sshd_config"-->回車-->把配置文件中的"PermitRootLogin without-password"加一個"#"號,把它註釋掉-->再增長一句"PermitRootLogin yes"-->保存,修改爲功。spa

首先查找 /Permit  >而後yy p >而後用delete鍵刪除without-password > 而後ZZ保存退出命令行

3.http://cn.archive.ubuntu.com/ 阿里雲開源鏡像站rest

/etc/apt/source-listorm

cat /etc/apt/sources.list | grep -v ^# | grep -v ^$
deb http://cn.archive.ubuntu.com/ubuntu/ trusty main restricted
deb-src http://cn.archive.ubuntu.com/ubuntu/ trusty main restricted
deb http://cn.archive.ubuntu.com/ubuntu/ trusty-updates main restricted
deb-src http://cn.archive.ubuntu.com/ubuntu/ trusty-updates main restricted
deb http://cn.archive.ubuntu.com/ubuntu/ trusty universe
deb-src http://cn.archive.ubuntu.com/ubuntu/ trusty universe
deb http://cn.archive.ubuntu.com/ubuntu/ trusty-updates universe
deb-src http://cn.archive.ubuntu.com/ubuntu/ trusty-updates universe
deb http://cn.archive.ubuntu.com/ubuntu/ trusty multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ trusty multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ trusty-updates multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ trusty-updates multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu trusty-security main restricted
deb-src http://security.ubuntu.com/ubuntu trusty-security main restricted
deb http://security.ubuntu.com/ubuntu trusty-security universe
deb-src http://security.ubuntu.com/ubuntu trusty-security universe
deb http://security.ubuntu.com/ubuntu trusty-security multiverse
deb-src http://security.ubuntu.com/ubuntu trusty-security multiverse
deb http://extras.ubuntu.com/ubuntu trusty main
deb-src http://extras.ubuntu.com/ubuntu trusty mainserver

#######這裏沒有trusty-backports ,這裏trusty開頭的總共有5項,trusty ,trusty-updates ,trusty-backports , trusty-security ,  trusty-backports

其中沒一項中又有 main restricted universe multiverse 4項內容

4.設置root用戶密碼  //由於裝機的時候直接建的是shyl帳號,因此沒有設置root用戶的密碼

sudo passwd root
[sudo] password for shyl:
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully

5.開始安裝kvm  ##若是出現依賴包不能自動安裝的時候,通常是/etc/apt/sources.list源出現了問題

5.1 apt-get install qemu-kvm 

5.1.1 echo $? 返回結果爲0,安裝成功

5.2 apt-get install qemu-system   //qemu-system-x86_64就是咱們經常使用的qemu-kvm的命令行工具

5.2.2 echo $? 返回結果爲0,安裝成功

5.3 apt-get install libvirt-bin  ///service libvirt-bin status

5.3.3 echo $? 返回結果爲0,安裝成功

5.4 apt-get install virt-manager

5.4.4  echo $? 返回結果爲0,安裝成功

5.5 

apt-get install bridge-utils
Reading package lists... Done
Building dependency tree
Reading state information... Done
bridge-utils is already the newest version.
bridge-utils set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 429 not upgraded.

5.6 apt-get install vlan

相關文章
相關標籤/搜索