vi /etc/resolv.conf
创建DNS解析服务器
# Generated by NetworkManager
nameserver114.114.114.114-------------------------------------------------------------------------------------------------------------------
nameserver8.8.8.8----------------------------------------------------------------------------------------------------------------------


http://mirrors.163.com/.help/fedora.html-----------------------------------------------------------------------
百度搜索   yum 源

163 yum源
http://mirrors.163.com/.help/fedora-163.repo------------------------------------------------------------------------------

[root@localhost /]# cd /etc/yum
yum/         yum.repos.d/
[root@localhost /]# cd/etc/yum.repos.d/---------------------------------------------------------------------------------------------
[root@localhost yum.repos.d]# ls
fedora.repo  fedora-updates.repo  fedora-updates-testing.repo
[root@localhost yum.repos.d]# wget http://mirrors.163.com/.help/fedora-163.repo
--2017-09-20 22:52:43--  http://mirrors.163.com/.help/fedora-163.repo
Resolving mirrors.163.com (mirrors.163.com)... failed: Name or service not known.
wget: unable to resolve host address ‘mirrors.163.com’
[root@localhost yum.repos.d]#
[root@localhost yum.repos.d]# ping www.baidu.com
ping: unknown host www.baidu.com
[root@localhost yum.repos.d]# ping 192.168.27.5
PING 192.168.27.5 (192.168.27.5) 56(84) bytes of data.
64 bytes from 192.168.27.5: icmp_seq=1 ttl=64 time=0.519 ms
64 bytes from 192.168.27.5: icmp_seq=2 ttl=64 time=0.259 ms
^C
--- 192.168.27.5 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1000ms
rtt min/avg/max/mdev = 0.259/0.389/0.519/0.130 ms
[root@localhost yum.repos.d]# vi /etc/r
rc0.d/            rc2.d/            rc4.d/            rc6.d/            reader.conf.d/    request-key.conf  rmt               rpc               rsyncd.conf       rsyslog.d/        rwtab.d/          
rc1.d/           rc3.d/            rc5.d/            rc.d/             redhat-release   request-key.d/    rolekit/          rpm/              rsyslog.conf     rwtab             
[root@localhost yum.repos.d]# vi /etc/re
reader.conf.d/    redhat-release    request-key.conf  request-key.d/    
[root@localhost yum.repos.d]# vi /etc/re
reader.conf.d/    redhat-release    request-key.conf  request-key.d/    
[root@localhost yum.repos.d]# vi /etc/resolv.cnf
[root@localhost yum.repos.d]# ping 192.168.27.5
PING 192.168.27.5 (192.168.27.5) 56(84) bytes of data.
64 bytes from 192.168.27.5: icmp_seq=1 ttl=64 time=0.445 ms
^C
--- 192.168.27.5 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.445/0.445/0.445/0.000 ms
[root@localhost yum.repos.d]# route add default gw 192.168.27.1----------------------------------------------------添加路由
[root@localhost yum.repos.d]# ping www.baidu.com
ping: unknown host www.baidu.com--------------------------------------------------------------------------------DNS解析有问题
[root@localhost yum.repos.d]# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.27.1    0.0.0.0         UG    0      0        0 enp1s0
default         192.168.27.1    0.0.0.0         UG    1024   0        0 enp1s0
192.168.27.0    0.0.0.0         255.255.255.0   U     0      0        0 enp1s0
[root@localhost yum.repos.d]# ping 192.168.27.5
PING 192.168.27.5 (192.168.27.5) 56(84) bytes of data.
64 bytes from 192.168.27.5: icmp_seq=1 ttl=64 time=0.293 ms
64 bytes from 192.168.27.5: icmp_seq=2 ttl=64 time=0.253 ms
^C
--- 192.168.27.5 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.253/0.273/0.293/0.020 ms
[root@localhost yum.repos.d]# vi/etc/resolv.conf-------------------------------------------------------------------------------------------------------
[root@localhost yum.repos.d]# pingwww.163.com---------------------------------------------------------------------------------------------------
PING 1stcncloud163.xdwscache.ourwebpic.com (101.227.175.217) 56(84) bytes of data.
64 bytes from 101.227.175.217: icmp_seq=1 ttl=54 time=29.3 ms
64 bytes from 101.227.175.217: icmp_seq=2 ttl=54 time=29.9 ms
^C
--- 1stcncloud163.xdwscache.ourwebpic.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 29.338/29.653/29.968/0.315 ms
[root@localhost yum.repos.d]#
[root@localhost yum.repos.d]#
[root@localhost yum.repos.d]# wgethttp://mirrors.163.com/.help/fedora-163.repo----------------------------------------------------------------
--2017-09-20 22:57:41--  http://mirrors.163.com/.help/fedora-163.repo
Resolving mirrors.163.com (mirrors.163.com)... 123.58.190.234, 123.58.190.235, 123.58.190.236, ...
Connecting to mirrors.163.com (mirrors.163.com)|123.58.190.234|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1108 (1.1K) [application/octet-stream]
Saving to: ‘fedora-163.repo’

100%[======================================================================================================================================================================================>] 1,108       --.-K/s   in 0s      

2017-09-20 22:57:41 (11.4 MB/s) - ‘fedora-163.repo’ saved [1108/1108]

[root@localhost yum.repos.d]#
[root@localhost yum.repos.d]#
[root@localhost yum.repos.d]# ls
fedora-163.repo  fedora.repo  fedora-updates.repo  fedora-updates-testing.repo
[root@localhost yum.repos.d]# yum cleanall-------------------------------------------------------------------------------------------
Loaded plugins: langpacks
Repository fedora is listed more than once in the configuration
Repository fedora-debuginfo is listed more than once in the configuration
Repository fedora-source is listed more than once in the configuration
Cleaning repos: fedora updates
Cleaning up everything
[root@localhost yum.repos.d]# yummakecache------------------------------------------------------------------- ---------------------
Loaded plugins: langpacks
Repository fedora is listed more than once in the configuration
Repository fedora-debuginfo is listed more than once in the configuration
Repository fedora-source is listed more than once in the configuration
fedora/21/x86_64/metalink                                                                                                                                                                                | 3.0 kB  00:00:00     
http://mirrors.163.com/fedora/releases/21/Everything/x86_64/os/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
Trying other mirror.
fedora                                                                                                                                                                                                   | 3.8 kB  00:00:00     
updates/21/x86_64/metalink                                                                                                                                                                               | 3.1 kB  00:00:00     
updates                                                                                                                                                                                                  | 4.7 kB  00:00:00     
(1/10):fedora/21/x86_64/group_gz                                                                                                                                                                        | 232 kB  00:00:00     
(2/10):updates/21/x86_64/group_gz                                                                                                                                                                       | 230 kB  00:00:00     
(3/10):updates/21/x86_64/updateinfo                                                                                                                                                                     | 1.1 MB  00:00:07     
(4/10):updates/21/x86_64/prestodelta                                                                                                                                                                    | 2.1 MB  00:01:04     
(5/10):fedora/21/x86_64/other_db                                                                                                                                                                        | 7.7 MB  00:01:47     
(6/10):updates/21/x86_64/other_db                                                                                                                                                                       | 3.1 MB  00:00:41     
(7/10):updates/21/x86_64/primary_db                                                                                                                                                                     | 8.4 MB  00:02:21     
(8/10):updates/21/x86_64/filelists_db                                                                                                                                                                   |  12 MB  00:10:07     
(9/10):fedora/21/x86_64/primary_db                                                                                                                                                                      |  17 MB  00:13:19     
(10/10):fedora/21/x86_64/filelists_db                                                                                                                                                                   |  25 MB  00:17:53     
Metadata Cache Created
[root@localhost yum.repos.d]#
[root@localhost yum.repos.d]#
[root@localhost yum.repos.d]#
[root@localhost yum.repos.d]#
[root@localhost yum.repos.d]# cd ..
[root@localhost etc]# ls
abrt                   cifs-utils               dnsmasq.d       groff        issue.net      mailcap                   oddjob          popt.d           rolekit        sos.conf            udisks2
adjtime               cockpit                  dracut.conf     group        jwhois.conf    mail.rc                   oddjobd.conf    ppp              rpc            ssh                 updatedb.conf
aliases                cron.d                   dracut.conf.d   group-       kdump.conf     makedumpfile.conf.sample  oddjobd.conf.d  prelink.conf.d   rpm            ssl                 usb_modeswitch.conf
alternatives           cron.daily               dumpdates       grub2.cfg    kernel         man_db.conf               openldap        printcap         rsyncd.conf    ssmtp               usb_modeswitch.d
anacrontab             cron.deny                e2fsck.conf     grub.d       krb5.conf      mcelog                    openlmi         profile          rsyslog.conf   sssd                vconsole.conf
at.deny                cron.hourly              environment     gshadow      ld.so.cache    mime.types                opt             profile.d        rsyslog.d      statetab            virc
audisp                cron.monthly             ethertypes      gshadow-     ld.so.conf     mke2fs.conf               os-release      protocols        rwtab          statetab.d          wgetrc
audit                 crontab                  exports         gss          ld.so.conf.d   modprobe.d                PackageKit      rc0.d            rwtab.d        stunnel             X11
autofs.conf           cron.weekly              exports.d       gssproxy     lftp.conf      modules-load.d            pam.d           rc1.d            samba          sudoers             xattr.conf
autofs_ldap_auth.conf crypto-policies          favicon.png     host.conf    libaudit.conf  motd                      pam_pkcs11      rc2.d            sasl2          sudoers.d           xdg
auto.master           crypttab                 fedora-release  hostname     libnl          mtab                      passwd          rc3.d            security       sysconfig           xinetd.d
auto.master.d         csh.cshrc                filesystems     hosts        libreport      multipath                 passwd-         rc4.d            selinux        sysctl.conf         yum
auto.misc             csh.login                firewalld       hosts.allow  libuser.conf   nanorc                    passwdqc.conf   rc5.d            services       sysctl.d            yum.conf
auto.net              dbus-1                   fonts           hosts.deny   locale.conf    netconfig                 pcmcia          rc6.d            sestatus.conf  systemd             yum.repos.d
auto.smb               default                  fprintd.conf    idmapd.conf  localtime      NetworkManager            Pegasus         rc.d             setuptool.d    system-release
avahi                 depmod.d                 fstab           init.d       login.defs     networks                  pinforc         reader.conf.d    shadow         system-release-cpe
bash_completion.d     dhcp                     gcrypt          inittab      logrotate.conf nfsmount.conf             pkcs11          redhat-release   shadow-        tcsd.conf
bashrc                DIR_COLORS               gdbinit         inputrc      logrotate.d    nsswitch.conf             pki             request-key.conf shells         terminfo
binfmt.d              DIR_COLORS.256color      gdbinit.d       ipa          lvm            nsswitch.conf.bak         plymouth        request-key.d    skel           tmpfiles.d
certmonger            DIR_COLORS.lightbgcolor  gnupg           iproute2     machine-id     ntp                       pm              resolv.conf      slp.conf       trusted-key.key
chkconfig.d           dnsmasq.conf             GREP_COLORS     issue        magic          ntp.conf                  polkit-1        rmt              smartmontools  udev
[root@localhost etc]# cd yum.repos.d/
[root@localhost yum.repos.d]#
[root@localhost yum.repos.d]#
[root@localhost yum.repos.d]#

安装GCC以及KVM环境所需lib库
[root@localhost yum.repos.d]#
[root@localhost yum.repos.d]# yum -y install gcc

安装 autoconf automake
yum -y install gcc gcc-c++ autoconf automake  单独整
yum -y install autoconf automake
yum -y install subversion
yum –y install  libglib2.0-dev
编译QEMU时需要
yum install glib 不用加-y Loaded plugins: langpacks
yum install glib2-devel
重新安装libxml2和libxml2-devel包
yum install libxml2
yum install libxml2-devel -y
yum install ant
yum install pixman-devel.x86_64
yum install perl-ExtUtils-CBuilder perl-ExtUtils-MakeMaker
yum -y install samba
yum install openssl-devel
yum install glibc-static
yum install -y mysql-server mysql
yum install -y mysql-devel        ---------------还要加上cp /lib64/mysql/libmysqlclient.* /usr/lib64
yum install -y popt-devel
yum install -y libvirt-devel
yum install -y libuuid-devel
yum install -y uuid-devel
yum install libtool
install libsysfs-dev

include  lib  bin  3.18.24  


编译失败问题,缺少lib库:
/usr/bin/ld: cannot find -lzmq
/usr/bin/ld: cannot find -lRockeyARM
02-01 15:18