All Products
Search
Document Center

Object Storage Service:Installation

Last Updated:Nov 11, 2024

This topic describes how to install ossfs.

Prerequisites

  • ossfs is downloaded. For more information, see Download URL.

  • The version of FUSE in the Linux system is 2.8.4 or later.

    Note

    You can run the fusermount -V command in the CLI to check whether the version of FUSE meets the requirements.

    If the value of the fusermount version parameter in the response is 2.8.4 or later, such as fusermount version: 2.9.2, the version of FUSE meets the requirements. If the version of FUSE does not meet the requirements, upgrade FUSE to 2.8.4 or later.

Installation

Download links

The following table provides download links to ossfs installer packages for commonly used Linux distributions. If you want to use ossfs on a different distribution, source code compiling is required.

Linux distribution

Links

Ubuntu 22.04 (x64)

ossfs_1.91.4_ubuntu22.04_amd64.deb

Ubuntu 20.04 (x64)

ossfs_1.91.4_ubuntu20.04_amd64.deb

Ubuntu 18.04 (x64)

ossfs_1.91.4_ubuntu18.04_amd64.deb

Ubuntu 16.04 (x64)

ossfs_1.91.4_ubuntu16.04_amd64.deb

Ubuntu 14.04 (x64)

ossfs_1.91.4_ubuntu14.04_amd64.deb

CentOS 8.0 (x64)

ossfs_1.91.4_centos8.0_x86_64.rpm

CentOS 7.0 (x64)

ossfs_1.91.4_centos7.0_x86_64.rpm

Anolis8/Alibaba Cloud Linux 3

ossfs_1.91.4_alinux3_x86_64.rpm

Anolis7/Alibaba Cloud Linux 2

ossfs_1.91.4_alinux2_x86_64.rpm

Procedures of installation

  1. Install ossfs.

    Important

    When you download a software package by using a command, you must enter the URL of the software package in a specific format. The following code provides an example on the format of the URL to enter if you want to download the software package of CentOS 7.0 (x64).

    sudo wget https://gosspublic.alicdn.com/ossfs/ossfs_1.91.4_centos7.0_x86_64.rpm

    Ubuntu

    Run the following commands in sequence to install ossfs in Ubuntu 16.04 (x64):

    sudo wget https://gosspublic.alicdn.com/ossfs/ossfs_1.91.4_ubuntu16.04_amd64.deb
    sudo apt-get update
    sudo apt-get install gdebi-core
    sudo gdebi ossfs_1.91.4_ubuntu16.04_amd64.deb

    CentOS or Anolis

    Run the following command to install ossfs in CentOS 7.0 (x64):

    sudo wget https://gosspublic.alicdn.com/ossfs/ossfs_1.91.4_centos7.0_x86_64.rpm
    sudo yum install ossfs_1.91.4_centos7.0_x86_64.rpm

    If your client uses Yellowdog Updater, Modified (YUM) to install RPM packages, dependencies may fail to be downloaded by using YUM due to network environment factors on the client node. To resolve this issue, you can use YUM to download the dependencies over a normal network to a node that runs the same operating system version, and then copy the dependencies to the required node. For example, ossfs runs on FUSE 2.8.4 or later. Run the following command to download the latest version of FUSE from the YUM source to your local device:

    sudo yum install --downloadonly --downloaddir=./ fuse
    Important

    To download other dependencies, replace FUSE with the name of the required package.

  2. Add the mime.types file if you want the content type and file name extension of the uploaded object to match. ossfs queries the content in /etc/mime.types to configure the content type of the object.

    If you do not add the mime.types file, OSS sets the content type of the uploaded object to application/octet-stream by default.

    Run the following command to add the mime.types file:

    Ubuntu

    Run the following command to add the mime.types file:

    sudo apt-get install mime-support

    CentOS or Anolis

    Run the following command to add the mime.types file:

    sudo yum install mailcap
  3. Run the ossfs --versioncommand to view the version information of ossfs. The following output indicates that ossfs is installed.

    image

Use the source code for installation

  1. Run the following command to install the dependency library required for compilation.

    Ubuntu

    The following command provides an example on how to install the dependency library required for compilation in the Ubuntu operating system.

    sudo apt-get update
    sudo apt-get install automake autotools-dev g++ git libcurl4-gnutls-dev libfuse-dev libssl-dev libxml2-dev make pkg-config

    CentOS or Anolis

    The following command provides an example on how to install the dependency library required for compilation in the CentOS system.

    sudo yum makecache
    sudo yum install automake gcc-c++ git libcurl-devel libxml2-devel fuse-devel make openssl-devel
  2. Run the following command to download the source code from GitHub, and compile and install the source code.

    git clone https://github.com/aliyun/ossfs.git
    cd ossfs
    ./autogen.sh
    ./configure
    make
    sudo make install
  3. Run the ossfs --versioncommand to view the version information of ossfs. The following output indicates that ossfs is installed.

    image

What to do next

For more information about mounting OSS buckets to a local file system and configuring related parameters, see Configure ossfs and perform mount operations.