Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating installtion doc #1029

Merged
merged 7 commits into from
Mar 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
175 changes: 21 additions & 154 deletions docs/installing.md
Original file line number Diff line number Diff line change
@@ -1,73 +1,32 @@
Install Cloud Storage FUSE and its dependencies using prebuilt Linux binaries.

gcsfuse has been tested successfully with the following operating systems:
If you are running Linux on a 64-bit x86 machine and want to install pre-built binaries (i.e. you don't want to build from source), you must have [FUSE](https://github.com/libfuse/libfuse) installed. You can then download and install the latest release package. The instructions vary by distribution

* Linux (minimum kernel version 3.10)
* macOS (minimum version 10.10.2)
## Install on Ubuntu or Debian
Tulsishah marked this conversation as resolved.
Show resolved Hide resolved

It may or may not work correctly with other operating systems and older versions.
To install Cloud Storage FUSE for Ubuntu or Debian, follow the instructions below:

If you are running on [Google Compute Engine][], it is recommended that you use
one of the following images with which it has been tested (preferring the
latest version when possible):
1. Add the Cloud Storage FUSE distribution URL as a package source and import its public key, or download the package directly from [GitHub](https://github.com/GoogleCloudPlatform/gcsfuse/releases):

* `ubuntu-2204-lts`, `ubuntu-2004-lts`, `ubuntu-1804-lts`, `ubuntu-1604-lts`, and `ubuntu-1404-lts`
* `debian-10`, `debian-8`, `debian-7`
* `centos-8`, `centos-7`
* `rhel-7`
* `sles-12`

[Google Compute Engine]: https://cloud.google.com/compute/


# Linux

If you are running Linux on a 64-bit x86 machine and are happy to install
pre-built binaries (i.e. you don't want to build from source), you need only
ensure fuse is installed, then download and install the latest release package.
The instructions vary by distribution.


## Ubuntu and Debian (latest releases)

The following instructions set up `apt-get` to see updates to gcsfuse, and are
supported for the **focal**, **bionic**, **artful**, **zesty**, **yakkety**, **xenial**,
and **trusty** [releases][ubuntu-releases] of Ubuntu, and the **jessie** and **stretch**
[releases][debian-releases] of Debian. (Run `lsb_release -c` to find your
release codename.) Users of older releases should follow the instructions for
[other distributions](#other-distributions) below.

1. Add the gcsfuse distribution URL as a package source and import its public
key:

export GCSFUSE_REPO=gcsfuse-`lsb_release -c -s`
echo "deb https://packages.cloud.google.com/apt $GCSFUSE_REPO main" | sudo tee /etc/apt/sources.list.d/gcsfuse.list
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -

2. Update the list of packages available and install gcsfuse.
2. Update the list of packages available and install Cloud Storage FUSE:

sudo apt-get update
sudo apt-get install gcsfuse

3. (**Ubuntu before wily only**) Add yourself to the `fuse` group, then log
out and back in:

sudo usermod -a -G fuse $USER
exit
3. Cloud Storage FUSE updates can be installed by:

Future updates to gcsfuse can be installed in the usual
way: `sudo apt-get update && sudo apt-get upgrade`.
sudo apt-get update && sudo apt-get install –only-upgrade gcsfus

[ubuntu-releases]: https://wiki.ubuntu.com/Releases
[debian-releases]: https://www.debian.org/releases/
## Install on CentOS or Red Hat

To install Cloud Storage FUSE for CentOS or Red Hat, follow the instructions below.

## CentOS and Red Hat (latest releases)

The following instructions set up `yum` to see updates to gcsfuse, and work
for CentOS 7 and 8 and RHEL 7. Users of older releases should follow the instructions
for [other distributions](#other-distributions) below.

1. Configure the gcsfuse repo:
1. Configure the Cloud Storage FUSE repository and its associated public key:

sudo tee /etc/yum.repos.d/gcsfuse.repo > /dev/null <<EOF
[gcsfuse]
Expand All @@ -80,113 +39,21 @@ for [other distributions](#other-distributions) below.
https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
EOF

2. Install gcsfuse:
2. Install Cloud Storage FUSE using the YUM Linux package manager:

sudo yum install gcsfuse

Be sure to answer "yes" to any questions about adding the GPG signing key.

Future updates to gcsfuse will automatically show up when updating with `yum`.


## SUSE

Ensure that dependencies are present:

sudo zypper install curl fuse

Download and install the latest release package:

curl -L -O https://github.com/GoogleCloudPlatform/gcsfuse/releases/download/v0.42.3/gcsfuse-0.42.3-1.x86_64.rpm
sudo rpm --install -p gcsfuse-0.42.3-1.x86_64.rpm

<a name="other-distributions"></a>

## Arch Linux

Available from [AUR](https://aur.archlinux.org/packages/gcsfuse/) and can be installed with any AUR helper.

pacaur -S gcsfuse

## Older releases and other distributions

Ensure that dependencies are present:

* Install [fuse](http://fuse.sourceforge.net/).
* Install [curl](http://curl.haxx.se/) (or use a different program for
downloading below).

If you are on a distribution that uses `.rpm` files for package management:

curl -L -O https://github.com/GoogleCloudPlatform/gcsfuse/releases#:~:text=gcsfuse%2D0.42.3%2D1.x86_64.rpm
sudo rpm --install -p gcsfuse-0.42.3-1.x86_64.rpm

Or one that uses `.deb` files:

curl -L -O https://github.com/GoogleCloudPlatform/gcsfuse/releases/download/v0.42.3/gcsfuse_0.42.3_amd64.deb
sudo dpkg --install gcsfuse_0.42.3_amd64.deb

On some systems it may be necessary to add the your user account to the `fuse`
group in order to have permission to run `fusermount` (don't forget to log out
and back in afterward for the group membership change to take effect):

sudo usermod -a -G fuse $USER
exit

Old versions of Debian contain a [bug][debian-bug] that causes `/dev/fuse` to
repeatedly lose its permission settings. If you find that you receive
permissions errors when mounting, even after running the `usermod` instruction
above and logging out and back in, you may need to fix the permissions:

sudo chmod g+rw /dev/fuse
sudo chgrp fuse /dev/fuse

[fstab compatibility]: mounting.md#mount8-and-fstab-compatibility
[debian-bug]: http://superuser.com/a/800016/429161


# macOS

The following describes how to install gcsfuse from homebrew. However, due to
the dependency on FUSE, homebrew is [deprecating
gcsfuse](https://github.com/Homebrew/homebrew-core/pull/64491) as a formulae.
Building from source will be preferred in the future.

First, handle prerequisites:

* Install the [homebrew](http://brew.sh/) package manager.

Afterward, gcsfuse can be installed with `brew`:

brew install --cask osxfuse
brew install gcsfuse
sudo ln -s /usr/local/sbin/mount_gcsfuse /sbin # For mount(8) support

The symlink command is only necessary if you want to use gcsfuse with the
`mount` command or in your `/etc/fstab` file, as opposed to calling `gcsfuse`
directly.

In the future gcsfuse can be updated in the usual way for homebrew packages:

brew update && brew upgrade

# Building from source

Prerequisites:
Be sure to answer "yes" to any questions about adding the GPG signing key.

* A working [Go][go] installation at least as new as [version
1.13][go-version]. See [Installing Go from source][go-setup].
* Fuse. See the instructions for the binary release above.
* Git. This is probably available as `git` in your package manager.
# Install by building the binaries from source

To install or update gcsfuse, run:
To install Cloud Storage FUSE by building the binaries from source, follow the instructions below:

GO111MODULE=auto go get -u github.com/googlecloudplatform/gcsfuse
1. Make sure you have a working Go installation, the newest version specified in [go.mod](https://github.com/GoogleCloudPlatform/gcsfuse/blob/master/go.mod). See Installing Go from source.
2. [Fuse](https://github.com/libfuse/libfuse). See the instructions for the binary release above.
3. Make sure you have the Git command-line tool installed. This is probably available as ```git``` in your package manager.
4. To install or update Cloud Storage FUSE, run the following command

This will fetch the gcsfuse sources to
`$GOPATH/src/github.com/googlecloudplatform/gcsfuse`, build them, and install a
binary named `gcsfuse` to `$GOPATH/bin`.
GO111MODULE=auto go get -u github.com/googlecloudplatform/gcsfuse

[go]: http://tip.golang.org/doc/install/source
[go-version]: https://github.com/golang/go/releases/tag/go1.13
[go-setup]: http://golang.org/doc/code.html
This will fetch the latest Cloud Storage FUSE sources to ```$GOPATH/src/github.com/googlecloudplatform/gcsfuse```, build the sources, and then install a binary named gcsfuse to ```$GOPATH/bin```.