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.
NoteYou 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) | |
Ubuntu 20.04 (x64) | |
Ubuntu 18.04 (x64) | |
Ubuntu 16.04 (x64) | |
Ubuntu 14.04 (x64) | |
CentOS 8.0 (x64) | |
CentOS 7.0 (x64) | |
Anolis8/Alibaba Cloud Linux 3 | |
Anolis7/Alibaba Cloud Linux 2 |
Procedures of installation
Install ossfs.
ImportantWhen 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
ImportantTo download other dependencies, replace FUSE with the name of the required package.
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
Run the
ossfs --version
command to view the version information of ossfs. The following output indicates that ossfs is installed.
Use the source code for installation
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
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
Run the
ossfs --version
command to view the version information of ossfs. The following output indicates that ossfs is installed.
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.