Baidu AI Cloud
中国站

百度智能云

Object Storage

Installation

The user needs to make sure that the FUSE kernel module is installed on the target system before installing bosfs, and can determine if it is installed by the command ls/dev/fuse or modprobe fuse. If it is not installed, execute the following steps:

  • Use root permission to execute yum or apt-get and other package management software for installation;
  • Download the above-mentioned libfuse source code package, and compile on your own (./configure && make); use root permission to make install, and then load the kernel module automatically.
  • As the Linux system of lower version has a low kernel version, the bosfs progress is prone to disconnection or encounters other problems. Therefore, the user is recommended to upgrade the operating system to CentOS 7.0 or Ubuntu 14.04 and above.

Installation of Ubuntu System

  1. Install the dependencies required by bosfs

    Download the libfuse source code package (the link has been provided above, if the fuse version is lower than 2.9.4, please use the above installation package) 
    tar -xzvf fuse-2.9.4.tar.gz 
    cd fuse-2.9.4 
    ./configure 
    sudo make && sudo make install 
    sudo apt-get install autoconf 
    sudo apt-get install uuid-dev 
    sudo apt-get install libssl-dev 
    sudo apt-get install libcurl4-openssl-dev 

    Note: if your libstdc++ version is low, an error is reported after the installation of bosfs after the successful installation:

    bosfs: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by bosfs)
    bosfs: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by bosfs)

    Recommend to upgrade relevant libstdc++ manually

  2. Download bosfs-1.0.0.10.tar.gz source code package.
  3. Compilation

    tar -xzvf bosfs-1.0.0.10.tar.gz 
    cd bosfs-1.0.0.10 
    sudo sh build.sh 

    Note: If 'rpl_malloc' was not declared in this scope is display during the compilation, it is because your system malloc conflicts with bosfs, and the solution is to comment out the AC_FUNC_MALLOC of the file configure.ac under the compilation directory.

  4. Upon completion of the installation, you can use the command bosfs -v to view the version

    Note: If your fuse version is much too low, you are recommended to use the libfuse provided by the official website.
    Display libfuse.so.2 during mounting: can not open Shared object file: No such file or directory
    The reason is that the generation path of libfuse.so is not in the dynamic link path, and the solution is:

    1. Add/usr/local/lib into/etc/ld.so.conf to add/usr/local/lib into the dynamic link path
    2. ldconfig

Install Centos System

As the BOS FS depends on the environment, so the dependencies are installed before the source code package is installed. Take Baidu AI Cloud Virtual Machine CentOS 6.5 as an example:

  1. Install the dependencies

    Download the libfuse source code package (the link has been provided above,  if the fuse version is lower than 2.9.4, please use the above installation package) 
    tar -xzvf fuse-2.9.4.tar.gz 
    cd fuse-2.9.4 
    ./configure 
    sudo make && sudo make install 
    sudo yum install gcc-c++ 
    sudo yum install autoconf 
    sudo yum install automake 
    sudo yum install libuuid-devel 
    sudo yum install openssl-devel 
    sudo yum install libcurl-devel 

    Note: if your libstdc++ version is low, an error is reported after the installation of bosfs after the successful installation:

    bosfs: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by bosfs)
    bosfs: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by bosfs)

    Recommend to upgrade relevant libstdc++ manually

  2. Extract and compile

    (1). Unzip BOS FS source code package
    (2). Compile the source code:

    • If the default compilation is selected: Execute build.sh directly;
    • If the customized compilation is selected: First, go to cppsdk directory, execute configure,make and make install according to customized parameters; then, go to bosfs directory, and execute configure, make and make install according to customized parameters.
      Finally, access the binary executable file bosfs.

    (3). If 'rpl_malloc' was not declared in this scope is display during the compilation, it is because your system malloc conflicts with bosfs, and the solution is to comment out the AC_FUNC_MALLOC of the file configure.ac under the compilation directory.

Note: If your fuse version is much too low, you are recommended to use the libfuse provided by the official website.
Display libfuse.so.2 during mounting: can not open Shared object file: No such file or directory
The reason is that the generation path of libfuse.so is not in the dynamic link path, and the solution is:

  1. Add /usr/local/lib into/etc/ld.so.conf to add/usr/local/lib into the dynamic link path
  2. ldconfig
Previous
Overview
Next
Configuration