虚拟机安装centos7后出现的问题

 虚拟机安装centos7后出现的问题

 1. 安装完后无法使用ifconifg,也无法使用yum

 解决方法:
 http://blog.csdn.net/qq_31382921/article/details/52174626

 vim /etc/sysconfig/network-scripts/ifcfg-enp0s3 中

 进入编辑模式,将 ONBOOT=no 改为 ONBOOT=yes,就OK

 保存后重启网卡: service network restart

 此时就可以上网了。(如果不知怎样判断能否上网,ping 一下网址就可以,就是这么简单,例如命令:ping www.baidu.com)

 这样yum,wget等等都可以用啦

 
 

 安装网络工具:yum install net-tools -y

 之后就可以用ifconfig了。

 
 

 2. g++ 11

 这个系统下直接执行

 yum install gcc -y

 yum install gcc-c++ -y

 就安装好了 gcc version 4.8.5 20150623 (Red Hat 4.8.5-11) (GCC)

 
 

 3. 安装 lrzsz

  yum install lrzsz

 
 

 4. 安装scons

 先下载scons的安装包,如 scons-2.2.0.tar.gz

 解压,进入执行:python setup.py install

 
 

 5. 安装protobuf

 git clone
  https://github.com/google/protobuf.git

 yum install autoconf automake libtool -y

 error: PB/reqinfo.pb.h:17:2: error: #error This file was generated by an older version of protoc which ......

 如果出现上面错误,则将相应的pb重新生成一遍就好了。

 
 

 6. 安装. svn

 yum install svn -y

 [root@localhost johnson-dev]# svn co svn://119.xx.xx.21/trunk

 Authentication realm: <svn://119.
 xx.xx.21:3690> /data/svn/repo

 Password for 'root': de...0

 Authentication realm: <svn://119.
 xx.xx.21:3690> /data/svn/repo

 Username: johnson

 Password for 'johnson': 123456M

 
 

 7. 安装zlib

 yum install zlib

 yum install zlib-devel (应该只要这一个就可以)

 
 

 
 

 8. 下载安装zeromq

 下载安装包,./configure make make install 经典安装方法

 
 

 9. 安装boost

 wget http://sourceforge.net/projects/boost/files/boost/1.53.0/boost_1_53_0.tar.gztar xvf boost_1_53_0.tar.gzcd boost_1_53_0./bootstrap.shsudo ./b2 install

 ----------------------------------------------------------------------

 之前用ubuntu都是apt-get install,centos没有这个工具,用yum装也差不多:

     yum install boost  
     yum install boost-devel  
     yum install boost-doc  


 
 

 10. 安装openssl

  sudo yum install openssl-devel

 
 

 11. 安装thrift

 yum install automake libtool flex bison pkgconfig gcc-c++ boost-devel libevent-devel zlib-devel python-devel ruby-devel openssl-devel

 下载thrift-0.9.3.tar.gz,以当前新的为准。

 sudo ./configure

 sudo make

 sudo make install

 注:collect2: error: ld returned 1 exit status 可以忽略掉

 
 

 12 安装bzip2

 yum install bzip2 -y

 
 

 13 安装redis

 http://www.2cto.com/database/201407/320271.html

 获取
 源码、解压、进入源码目录,编译

 $ wget http://download.redis.io/releases/redis-2.8.13.tar.gz

 $ tar xzf redis-2.8.13.tar.gz

 $ cd redis-2.8.13

 $ make

 测试、安装

 $ make-test

 $ sudo make install

 
 

 注意:解决 fatal error: hiredis/hiredis.h: No such file or directory 问题:

 git clone
  http://github.com/redis/hiredis

 make && sudo make install && sudo ldconfig
————————————————
版权声明:本文为CSDN博主「风吹过的时光」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/hzhsan/article/details/54863243

posted @ 2021-03-05 10:14  da0h1  阅读(354)  评论(0编辑  收藏  举报