金沙国际官网_金沙国际平台登录

因为这个金沙国际官网_金沙国际平台登录网站与很多的大型澳门赌场都有合作,金沙国际官网_金沙国际平台登录尽职尽责,高效执行,保持好奇心,不断学习,追求卓越,点击进入金沙国际官网_金沙国际平台登录马上体验吧,所以现在也正式地开始了营业。

您的位置:金沙国际官网 > 金沙国际平台登录 > Redis缓存数据库的安装与配置,安装博通

Redis缓存数据库的安装与配置,安装博通

发布时间:2019-12-04 05:32编辑:金沙国际平台登录浏览(96)

    目录

    1.安装

    默认的Centos6.5 glibc版本最高为2.12, 而在进行Nodejs开发时项目所依赖的包往往需要更高版本的glibc库支持, 因此在不升级系统的前提下, 需要主动更新系统glibc库. 一般遇到错误libc.so.6: version GLIBC_2.14 not found时表示需要对glibc进行升级了.

    • Ubuntu 18.04 安装博通(Broadcom)无线网卡驱动
    • Package gcc is not configured yet. 解决办法
    • history
      • history | grep dpkg

    tarxf redis-3.2.5.tar.gz

     

    Ubuntu 18.04 安装博通(Broadcom)无线网卡驱动

    首先从iso镜像文件中提取出驱动文件。

    ./pool/main/d/dkms/dkms_2.3-3ubuntu9.2_all.deb

    ./pool/restricted/b/bcmwl/bcmwl-kernel-source_6.30.223.271+bdcom-0ubuntu4_amd64.deb

    然后按顺序直接sudo dpkg -i 安装,装完重启即可生效。

    sudo dpkg -i dkms_2.2.0.3-2ubuntu11_all.deb
    sudo dpkg -i bcmwl-kernel-source_6.30.223.248+bdcom-0ubuntu8_amd64.deb
    

    如果安装过程中报 没有安装gcc 的错误,那么也是直接从镜像文件中提取相关文件dpkg -i 安装即可,缺什么deb包就直接在iso文件中找就行,期间大概安装了10多个deb包,然后才完成gcc和g++的安装。

    也可以参考 配置本地源安装。

    在本文的最后部分的history是我的整个安装过程的命令历史记录。

    接下来,继续安装dkms和bcmwl

    b4@pc:~$ sudo dpkg -i /media/b4/UBUNTU 18_0/pool/main/d/dkms/dkms_2.3-3ubuntu9.2_all.deb 
    (Reading database ... 128918 files and directories currently installed.)
    Preparing to unpack .../dkms_2.3-3ubuntu9.2_all.deb ...
    Unpacking dkms (2.3-3ubuntu9.2) over (2.3-3ubuntu9.2) ...
    dpkg: dependency problems prevent configuration of dkms:
     dkms depends on gcc; however:
      Package gcc is not configured yet.
    
    dpkg: error processing package dkms (--install):
     dependency problems - leaving unconfigured
    Processing triggers for man-db (2.8.3-2) ...
    Errors were encountered while processing:
     dkms
    b4@pc:~$ sudo dpkg --configure -a
    Setting up gcc (4:7.3.0-3ubuntu2) ...
    Setting up dkms (2.3-3ubuntu9.2) ...
    b4@pc:~$ sudo dpkg -i /media/b4/UBUNTU 18_0/pool/main/d/dkms/dkms_2.3-3ubuntu9.2_all.deb 
    (Reading database ... 128918 files and directories currently installed.)
    Preparing to unpack .../dkms_2.3-3ubuntu9.2_all.deb ...
    Unpacking dkms (2.3-3ubuntu9.2) over (2.3-3ubuntu9.2) ...
    Setting up dkms (2.3-3ubuntu9.2) ...
    Processing triggers for man-db (2.8.3-2) ...
    b4@pc:~$
    b4@pc:~$ find /media/b4/UBUNTU 18_0/ -name bcm*
    /media/b4/UBUNTU 18_0/pool/restricted/b/bcmwl
    /media/b4/UBUNTU 18_0/pool/restricted/b/bcmwl/bcmwl-kernel-source_6.30.223.271+bdcom-0ubuntu4_amd64.deb
    b4@pc:~$ sudo dpkg -i /media/b4/UBUNTU 18_0/pool/restricted/b/bcmwl/bcmwl-kernel-source_6.30.223.271+bdcom-0ubuntu4_amd64.deb 
    Selecting previously unselected package bcmwl-kernel-source.
    (Reading database ... 128918 files and directories currently installed.)
    Preparing to unpack .../bcmwl-kernel-source_6.30.223.271+bdcom-0ubuntu4_amd64.deb ...
    Unpacking bcmwl-kernel-source (6.30.223.271+bdcom-0ubuntu4) ...
    Setting up bcmwl-kernel-source (6.30.223.271+bdcom-0ubuntu4) ...
    Loading new bcmwl-6.30.223.271+bdcom DKMS files...
    Building for 4.15.0-29-generic
    Building for architecture x86_64
    Building initial module for 4.15.0-29-generic
    Generating a 2048 bit RSA private key
    ........+++
    ...............................................+++
    writing new private key to '/var/lib/shim-signed/mok/MOK.priv'
    -----
    Secure Boot not enabled on this system.
    Done.
    
    wl:
    Running module version sanity check.
     - Original module
       - No original module exists within this kernel
     - Installation
       - Installing to /lib/modules/4.15.0-29-generic/updates/dkms/
    
    depmod......
    
    DKMS: install completed.
    update-initramfs: deferring update (trigger activated)
    Processing triggers for initramfs-tools (0.130ubuntu3.1) ...
    update-initramfs: Generating /boot/initrd.img-4.15.0-29-generic
    b4@pc:~$ 
    

    successful ...

    cd redis-3.2.5

    解决方案可参照下面链接

    Package gcc is not configured yet. 解决办法

    安装完gcc后安装驱动deb包时,爆出这个错误。

    sudo dpkg --configure -a
    

    ok.

    make

     1  

    history

    这一部分是整个安装过程的命令历史记录,包括安装gcc和g++的过程,安装broadcom网卡驱动的过程。

       22  find . -name gcc*
       23  cd pool/main/g/gcc-defaults/
       24  ls
       25  sudo dpkg -i gcc_7.3.0-3ubuntu2_amd64.deb 
       26  cd ../../..
       27  cd ..
       28  find . -name gcc*
       29  cd pool/main/g/gcc-7/
       30  ls
       31  sudo dpkg -i gcc-7_7.3.0-16ubuntu3_amd64.deb 
       32  sudo dpkg -i libgcc-7-dev_7.3.0-16ubuntu3_amd64.deb 
       33  find /media/b4/UBUNTU 18_0/ -name libitm1*
       34  cd ../gcc-8/
       35  ls
       36  sudo dpkg -i libitm1_8-20180414-1ubuntu2_amd64.deb 
       37  sudo dpkg -i libatomic1_8-20180414-1ubuntu2_amd64.deb 
       38  sudo dpkg -i liblsan0_8-20180414-1ubuntu2_amd64.deb 
       39  cd ../gcc-7/
       40  ls
       41  sudo dpkg -i gcc-7_7.3.0-16ubuntu3_amd64.deb 
       42  sudo dpkg -i libgcc-7-dev_7.3.0-16ubuntu3_amd64.deb 
       43  find /media/b4/UBUNTU 18_0/ -name libasan*
       44  sudo dpkg -i libasan4_7.3.0-16ubuntu3_amd64.deb 
       45  sudo dpkg -i libgcc-7-dev_7.3.0-16ubuntu3_amd64.deb 
       46  ll
       47  find /media/b4/UBUNTU 18_0/ -name libtsan*
       48  sudo dpkg -i ../gcc-8/libtsan0_8-20180414-1ubuntu2_amd64.deb 
       49  sudo dpkg -i libgcc-7-dev_7.3.0-16ubuntu3_amd64.deb 
       50  ll
       51  sudo dpkg -i libubsan0_7.3.0-16ubuntu3_amd64.deb 
       52  sudo dpkg -i libgcc-7-dev_7.3.0-16ubuntu3_amd64.deb 
       53  sudo dpkg -i libcilkrts5_7.3.0-16ubuntu3_amd64.deb 
       54  sudo dpkg -i ../gcc-8/libmpx2_8-20180414-1ubuntu2_amd64.deb 
       55  sudo dpkg -i ../gcc-8/libquadmath0_8-20180414-1ubuntu2_amd64.deb 
       56  ls
       57  sudo dpkg -i gcc-7_7.3.0-16ubuntu3_amd64.deb 
       58  sudo dpkg -i libgcc-7-dev_7.3.0-16ubuntu3_amd64.deb 
       59  sudo dpkg -i gcc-7_7.3.0-16ubuntu3_amd64.deb 
       60  gcc -v
       61  clear
       62  ls
       63  cd ../../
       64  ls
       65  cd ..
       66  ls
       67  clear
       68  find / -name bcm
       69  clear
       70  ls
       71  find . -name dkms
       72  find . -name dkms*
       73  sudo dpkg -i pool/main/d/dkms/dkms_2.3-3ubuntu9.2_all.deb 
       74  gcc
       75  reboot 
       76  gcc -v
       77  clear
       78  ls
       79  ls /usr/bin/gcc*
       80  find /media/b4/UBUNTU 18_0/ -name bcm*
       81  find /media/b4/UBUNTU 18_0/ -name dkms*
       82  sudo dpkg -i /media/b4/UBUNTU 18_0/pool/main/d/dkms/dkms_2.3-3ubuntu9.2_all.deb 
       83  find /media/b4/UBUNTU 18_0/ -name dpkg-dev*
       84  sudo dpkg -i /media/b4/UBUNTU 18_0/pool/main/d/dpkg/dpkg-dev_1.19.0.5ubuntu2_all.deb 
       85  find /media/b4/UBUNTU 18_0/ -name make*
       86  sudo dpkg -i /media/b4/UBUNTU 18_0/pool/main/m/make-dfsg/make_4.1-9.1ubuntu1_amd64.deb 
       87  sudo dpkg -i /media/b4/UBUNTU 18_0/pool/main/d/dpkg/dpkg-dev_1.19.0.5ubuntu2_all.deb 
       88  sudo dpkg -i /media/b4/UBUNTU 18_0/pool/main/d/dkms/dkms_2.3-3ubuntu9.2_all.deb 
       89  find /media/b4/UBUNTU 18_0/ -name g++*
       90  sudo dpkg -i /media/b4/UBUNTU 18_0/pool/main/g/gcc-7/libgcc-7-
       91  find /media/b4/UBUNTU 18_0/ -name libstdc++*
       92  sudo dpkg -i /media/b4/UBUNTU 18_0/pool/main/g/gcc-7/libstdc++-7-dev_7.3.0-16ubuntu3_amd64.deb 
       93  find /media/b4/UBUNTU 18_0/ -name libc6*
       94  sudo dpkg -i /media/b4/UBUNTU 18_0/pool/main/g/glibc/libc6-dev_2.27-3ubuntu1_amd64.deb 
       95  sudo dpkg -i /media/b4/UBUNTU 18_0/pool/main/g/glibc/libc-dev-bin_2.27-3ubuntu1_amd64.deb 
       96  find /media/b4/UBUNTU 18_0/ -name linux-libc*
       97  sudo dpkg -i /media/b4/UBUNTU 18_0/pool/main/l/linux/linux-libc-dev_4.15.0-29.31_amd64.deb 
       98  sudo dpkg -i /media/b4/UBUNTU 18_0/pool/main/g/glibc/libc6-dev_2.27-3ubuntu1_amd64.deb 
       99  sudo dpkg -i /media/b4/UBUNTU 18_0/pool/main/g/gcc-7/libstdc++-7-dev_7.3.0-16ubuntu3_amd64.deb 
      100  sudo dpkg -i /media/b4/UBUNTU 18_0/pool/main/g/gcc-7/g++-7_7.3.0-16ubuntu3_amd64.deb 
      101  exit
      102  sudo dpkg -i /media/b4/UBUNTU 18_0/pool/main/d/dkms/dkms_2.3-3ubuntu9.2_all.deb 
      103  dpkg -l
      104  dpkg -l | grep gcc
      105  g++
      106  g++ -v
      107  gcc -v
      108  gcc
      109  g++
      110  ls /usr/bin/ g*
      111  ls /usr/bin/ g++*
      112  clear
      113  ls
      114  ls /usr/bin/ | grep g*
      115  ls /usr/bin/ | grep g++*
      116  ln -s /usr/bin/g++-7 /usr/bin/g++
      117  sudo ln -s /usr/bin/g++-7 /usr/bin/g++
      118  g++
      119  sudo dpkg -i /media/b4/UBUNTU 18_0/pool/main/d/dkms/dkms_2.3-3ubuntu9.2_all.deb 
      120  sudo dpkg --configure -a
      121  sudo dpkg -i /media/b4/UBUNTU 18_0/pool/main/d/dkms/dkms_2.3-3ubuntu9.2_all.deb 
      122  gedit e.txt
      123  find /media/b4/UBUNTU 18_0/ -name bcm
      124  find /media/b4/UBUNTU 18_0/ -name bcw
      125  find /media/b4/UBUNTU 18_0/ -name bcm*
      126  sudo dpkg -i /media/b4/UBUNTU 18_0/pool/restricted/b/bcmwl/bcmwl-kernel-source_6.30.223.271+bdcom-0ubuntu4_amd64.deb 
      127  gedit e.txt 
      128  reboot 
    

    mkdir -p /usr/local/redis/bin

     

    history | grep dpkg

    b4@pc:~$ history | grep dpkg
       25  sudo dpkg -i gcc_7.3.0-3ubuntu2_amd64.deb 
       31  sudo dpkg -i gcc-7_7.3.0-16ubuntu3_amd64.deb 
       32  sudo dpkg -i libgcc-7-dev_7.3.0-16ubuntu3_amd64.deb 
       36  sudo dpkg -i libitm1_8-20180414-1ubuntu2_amd64.deb 
       37  sudo dpkg -i libatomic1_8-20180414-1ubuntu2_amd64.deb 
       38  sudo dpkg -i liblsan0_8-20180414-1ubuntu2_amd64.deb 
       41  sudo dpkg -i gcc-7_7.3.0-16ubuntu3_amd64.deb 
       42  sudo dpkg -i libgcc-7-dev_7.3.0-16ubuntu3_amd64.deb 
       44  sudo dpkg -i libasan4_7.3.0-16ubuntu3_amd64.deb 
       45  sudo dpkg -i libgcc-7-dev_7.3.0-16ubuntu3_amd64.deb 
       48  sudo dpkg -i ../gcc-8/libtsan0_8-20180414-1ubuntu2_amd64.deb 
       49  sudo dpkg -i libgcc-7-dev_7.3.0-16ubuntu3_amd64.deb 
       51  sudo dpkg -i libubsan0_7.3.0-16ubuntu3_amd64.deb 
       52  sudo dpkg -i libgcc-7-dev_7.3.0-16ubuntu3_amd64.deb 
       53  sudo dpkg -i libcilkrts5_7.3.0-16ubuntu3_amd64.deb 
       54  sudo dpkg -i ../gcc-8/libmpx2_8-20180414-1ubuntu2_amd64.deb 
       55  sudo dpkg -i ../gcc-8/libquadmath0_8-20180414-1ubuntu2_amd64.deb 
       57  sudo dpkg -i gcc-7_7.3.0-16ubuntu3_amd64.deb 
       58  sudo dpkg -i libgcc-7-dev_7.3.0-16ubuntu3_amd64.deb 
       59  sudo dpkg -i gcc-7_7.3.0-16ubuntu3_amd64.deb 
       73  sudo dpkg -i pool/main/d/dkms/dkms_2.3-3ubuntu9.2_all.deb 
       82  sudo dpkg -i /media/b4/UBUNTU 18_0/pool/main/d/dkms/dkms_2.3-3ubuntu9.2_all.deb 
       83  find /media/b4/UBUNTU 18_0/ -name dpkg-dev*
       84  sudo dpkg -i /media/b4/UBUNTU 18_0/pool/main/d/dpkg/dpkg-dev_1.19.0.5ubuntu2_all.deb 
       86  sudo dpkg -i /media/b4/UBUNTU 18_0/pool/main/m/make-dfsg/make_4.1-9.1ubuntu1_amd64.deb 
       87  sudo dpkg -i /media/b4/UBUNTU 18_0/pool/main/d/dpkg/dpkg-dev_1.19.0.5ubuntu2_all.deb 
       88  sudo dpkg -i /media/b4/UBUNTU 18_0/pool/main/d/dkms/dkms_2.3-3ubuntu9.2_all.deb 
       90  sudo dpkg -i /media/b4/UBUNTU 18_0/pool/main/g/gcc-7/libgcc-7-
       92  sudo dpkg -i /media/b4/UBUNTU 18_0/pool/main/g/gcc-7/libstdc++-7-dev_7.3.0-16ubuntu3_amd64.deb 
       94  sudo dpkg -i /media/b4/UBUNTU 18_0/pool/main/g/glibc/libc6-dev_2.27-3ubuntu1_amd64.deb 
       95  sudo dpkg -i /media/b4/UBUNTU 18_0/pool/main/g/glibc/libc-dev-bin_2.27-3ubuntu1_amd64.deb 
       97  sudo dpkg -i /media/b4/UBUNTU 18_0/pool/main/l/linux/linux-libc-dev_4.15.0-29.31_amd64.deb 
       98  sudo dpkg -i /media/b4/UBUNTU 18_0/pool/main/g/glibc/libc6-dev_2.27-3ubuntu1_amd64.deb 
       99  sudo dpkg -i /media/b4/UBUNTU 18_0/pool/main/g/gcc-7/libstdc++-7-dev_7.3.0-16ubuntu3_amd64.deb 
      100  sudo dpkg -i /media/b4/UBUNTU 18_0/pool/main/g/gcc-7/g++-7_7.3.0-16ubuntu3_amd64.deb 
      102  sudo dpkg -i /media/b4/UBUNTU 18_0/pool/main/d/dkms/dkms_2.3-3ubuntu9.2_all.deb 
      103  dpkg -l
      104  dpkg -l | grep gcc
      119  sudo dpkg -i /media/b4/UBUNTU 18_0/pool/main/d/dkms/dkms_2.3-3ubuntu9.2_all.deb 
      120  sudo dpkg --configure -a
      121  sudo dpkg -i /media/b4/UBUNTU 18_0/pool/main/d/dkms/dkms_2.3-3ubuntu9.2_all.deb 
      126  sudo dpkg -i /media/b4/UBUNTU 18_0/pool/restricted/b/bcmwl/bcmwl-kernel-source_6.30.223.271+bdcom-0ubuntu4_amd64.deb 
      136  dpkg -l
      137  dpkg -l | grep g*
      138  dpkg -l | grep gcc*
      139  history | grep dpkg
    

    src目录下这些文件作用如下

    场景需求

    默认的Centos6.5 glibc版本最高为2.12, 而在进行Nodejs开发时项目所依赖的包往往需要更高版本的glibc库支持, 因此在不升级系统的前提下, 需要主动更新系统glibc库. 一般遇到错误libc.so.6: version GLIBC_2.14 not found时表示需要对glibc进行升级了.

        redis-server:Redis服务器的daemon启动程序

    glibc版本

    查看系统glibc库版本可使用如下命令:

    $ strings /lib64/libc.so.6 |grep GLIBC_
    

    Centos6.5输出如下glibc版本列表, 从此图可以看出系统最高支持glibc的2.12版本: 图片 1 另外, 执行$ ll /lib64/libc**可以看到此时的libc.so.6是libc-2.12.so的别名, 如下图所示: 图片 2

        redis-cli:Redis命令行操作工具.你也可以用telnet根据其纯文本协议来操作

    glibc安装

    首先, 点击此处下载glibc点击下载, 得到glibc-2.14.tar.gz使用如下命令解压glibc-2.14.tar.gz:

    $ tar -xzvf glibc-2.14.tar.gz
    

    当前目录下得到目录glibc-2.14, 执行$cd glibc-2.14命令进入目录, 依次执行如下命令编译安装glibc-2.14:

    $ mkdir build // 在glibc-2.14目录下建立build文件夹
    $ cd build  // 进入build目录
    $ ../configure --prefix=/opt/glibc-2.14 // 配置glibc并设置当前glibc-2.14安装目录
    $ make && make install  // 编译安装glibc-2.14库
    

        redis-benchmark:Redis性能测试工具,测试Redis在你的系统及你的配置下的读写性能.

    glibc软链

    安装完成后, 建立软链指向glibc-2.14, 执行如下命令:

    $ rm -rf /lib64/libc.so.6    // 先删除先前的libc.so.6软链
    $ ln -s /opt/glibc-2.14/lib/libc-2.14.so /lib64/libc.so.6
    

    注意

    删除libc.so.6之后可能导致系统命令不可用的情况, 可使用如下方法解决:

    $ LD_PRELOAD=/opt/glibc-2.14/lib/libc-2.14.so  ln -s /opt/glibc-2.14/lib/libc-2.14.so /lib64/libc.so.6
    

    如果上述更新失败可使用如下命令还原:

    $ LD_PRELOAD=/lib64/libc-2.12.so ln -s /lib64/libc-2.12.so /lib64/libc.so.6    // libc-2.12.so 此项是系统升级前的版本
    

    感谢丁文翔 <d_9062@qq.com>指出本文遗漏事项!

    此时查看系统glibc版本如下图所示: 图片 3 可以看到当前glibc最高版本为2.14, libc.so.6软链指向如下图所示: 图片 4

    cp   redis-benchmark  redis-check-aof     redis-cli    redis-server  /usr/local/redis/bin/

    **mkdir -p /usr/local/redis/conf**

    **cp redis.conf   /usr/local/redis/conf**

    vim /usr/local/redis/etc/redis.conf

    修改配置文件

    daemonize no  改为daemonize yes  //是否把redis-server启动在后台,默认是“否”。若改成yes,会生成一个pid文件

    bind 127.0.0.1        改为bind 0.0.0.0   //任意主机都可访问

    本文由金沙国际官网发布于金沙国际平台登录,转载请注明出处:Redis缓存数据库的安装与配置,安装博通

    关键词: