This topic describes how to install ossfs.
Prerequisites
The FUSE version on your Linux system is 2.8.4 or later.
Run the fusermount -V command to check your FUSE version. If the value of fusermount version in the output is 2.8.4 or later (for example, fusermount version: 2.9.2), your system meets the requirement. Otherwise, you must upgrade FUSE to 2.8.4 or later.
Install from a software package
Download links
The following table lists the software packages for common Linux distributions. If your Linux distribution is not listed, you need to install ossfs from source.
Linux distribution | Software package | URL |
Ubuntu 24.04 (x64) | https://gosspublic.alicdn.com/ossfs/ossfs_1.91.8_ubuntu24.04_amd64.deb | |
Ubuntu 22.04 (x64) | https://gosspublic.alicdn.com/ossfs/ossfs_1.91.8_ubuntu22.04_amd64.deb | |
Ubuntu 20.04 (x64) | https://gosspublic.alicdn.com/ossfs/ossfs_1.91.8_ubuntu20.04_amd64.deb | |
Ubuntu 18.04 (x64) | https://gosspublic.alicdn.com/ossfs/ossfs_1.91.8_ubuntu18.04_amd64.deb | |
Rocky Linux 9 (x64) | https://gosspublic.alicdn.com/ossfs/ossfs_1.91.8_rockylinux9_x86_64.rpm | |
CentOS 8.0 (x64) | https://gosspublic.alicdn.com/ossfs/ossfs_1.91.8_centos8.0_x86_64.rpm | |
CentOS 7.0 (x64) | https://gosspublic.alicdn.com/ossfs/ossfs_1.91.8_centos7.0_x86_64.rpm | |
Anolis 8/Alibaba Cloud Linux 3 | https://gosspublic.alicdn.com/ossfs/ossfs_1.91.8_alinux3_x86_64.rpm | |
Anolis 7/Alibaba Cloud Linux 2 | https://gosspublic.alicdn.com/ossfs/ossfs_1.91.8_alinux2_x86_64.rpm |
Installation procedure
Install ossfs.
Copy the package URL for your operating system and follow the corresponding installation instructions below.
Ubuntu
For example, on Ubuntu 22.04 (x64), run the following commands to install ossfs.
sudo wget https://gosspublic.alicdn.com/ossfs/ossfs_1.91.8_ubuntu22.04_amd64.deb sudo apt-get update sudo apt-get install gdebi-core sudo gdebi ossfs_1.91.8_ubuntu22.04_amd64.debCentOS, Anolis, or Alibaba Cloud Linux
For example, on CentOS 7.0 (x64), run the following commands to install ossfs.
sudo wget https://gosspublic.alicdn.com/ossfs/ossfs_1.91.8_centos7.0_x86_64.rpm sudo yum install ossfs_1.91.8_centos7.0_x86_64.rpmIf your client has network restrictions that prevent it from downloading dependencies, download them on a separate machine that has network access and runs the same operating system. Then, copy the packages to the client. For example, ossfs requires FUSE 2.8.4 or later. To download only the latest fuse package from the yum repository to the current directory, run the following command.
sudo yum install --downloadonly --downloaddir=./ fuseImportantIf you need to download other dependencies, replace fuse with the name of the required package.
Rocky Linux
For example, on Rocky Linux 9 (x64), run the following commands to install ossfs.
sudo wget https://gosspublic.alicdn.com/ossfs/ossfs_1.91.8_rockylinux9_x86_64.rpm sudo dnf install ossfs_1.91.8_rockylinux9_x86_64.rpmAdd a mime.types file. ossfs determines the `Content-Type` of an uploaded file based on the entries in /etc/mime.types. Adding this file ensures that the `Content-Type` header matches the file extension.
If you do not add the mime.types file, ossfs sets the `Content-Type` of all uploaded files to application/octet-stream by default.
To add the mime.types file, run the command for your operating system.
Ubuntu
Run the following command to add the mime.types file.
sudo apt-get install mime-supportCentOS, Anolis, or Alibaba Cloud Linux
Run the following command to add the mime.types file.
sudo yum install mailcapRocky Linux
Run the following command to add the mime.types file.
sudo dnf install mailcapRun the
ossfs --versioncommand to check the ossfs version. Output similar to the following indicates that ossfs is installed.
Install from source
Using ossfs on operating systems not listed below is not recommended, as it requires you to manually install dependencies such as fuse-devel.
Install the compilation dependencies.
Ubuntu
For example, on Ubuntu, run the following commands to install the required dependencies.
sudo apt-get update sudo apt-get install automake autotools-dev g++ git libcurl4-gnutls-dev libfuse-dev libssl-dev libxml2-dev make pkg-configCentOS, Anolis, or Alibaba Cloud Linux
For example, on CentOS, run the following commands to install the required dependencies.
sudo yum makecache sudo yum install automake gcc-c++ git libcurl-devel libxml2-devel fuse-devel make openssl-develCentOS Stream
Run the following commands to install the EPEL repository and enable the CRB repository.
sudo dnf install -y epel-release sudo dnf config-manager --set-enabled crbRun the following commands to install the required dependencies.
sudo dnf makecache sudo dnf install -y automake gcc-c++ git libcurl-devel libxml2-devel fuse-devel make openssl-devel
Rocky Linux
NoteApplicable to Rocky Linux 9.5 and later. For Rocky Linux 9.4 and earlier, installing from source is not recommended. The
libcurl-develpackage requires a version of OpenSSL that is incompatible with the default version. Upgrading the OpenSSL dependency may disrupt SSH connections to the machine.Run the following commands to install the required dependencies.
sudo dnf config-manager --set-enabled crb sudo dnf makecache sudo dnf install -y automake gcc-c++ git libcurl-devel libxml2-devel fuse-devel make openssl-develRun the following commands to download the source code from GitHub, and then compile and install ossfs.
git clone https://github.com/aliyun/ossfs.git cd ossfs ./autogen.sh ./configure make sudo make installRun the
ossfs --versioncommand to check the ossfs version. Output similar to the following indicates that ossfs is installed.
Next steps
After you install ossfs, you must configure it to mount OSS buckets. For more information, see Configure ossfs 1.0.