ubuntu环境初始化

 0. 在Ubuntu系统中永久修改主机名也比较简单。主机名存放在/etc/hostname文件中,修改主机名时,编辑hostname文件,在文件中输入新的主机名并保存该文件即可

1.打开terminial

2.开启ssh

sudo apt-get update

sudo apt-get install openssh-server

sudo vi /etc/ssh/sshd_config"-->回车-->把配置文件中的"PermitRootLogin without-password"加一个"#"号,把它注释掉-->再增加一句"PermitRootLogin yes"-->保存,修改成功。

首先查找 /Permit  >然后yy p >然后用delete键删除without-password > 然后ZZ保存退出

3.http://cn.archive.ubuntu.com/ 阿里云开源镜像站

/etc/apt/source-list

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 main

#######这里没有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

 

posted @ 2017-02-17 14:42  yitongtianxia  阅读(273)  评论(0编辑  收藏  举报