|
1 | | -# Install Pelican as a standalone binary on Linux |
| 1 | +# Install Pelican as unprivileged Linux user |
2 | 2 |
|
3 | | -This document explains how to install Pelican on a Linux operating system as a standalone binary. |
| 3 | +This document explains how to install Pelican on a Linux operating system as a standalone binary without any special administrator privileges. |
| 4 | + |
| 5 | +## Quickstart |
| 6 | + |
| 7 | +To download the latest version of Pelican and unpack it into the default location for user binaries on most Linux hosts, copy/paste |
| 8 | +the following into a terminal: |
| 9 | + |
| 10 | +```bash |
| 11 | +wget -O - "https://dl.pelicanplatform.org/latest/pelican_$(uname -s)_$(uname -m).tar.gz" | tar zx -C ~/.local/bin/ --strip-components=1 |
| 12 | +``` |
| 13 | + |
| 14 | +To test the binary, execute: |
| 15 | + |
| 16 | +```bash |
| 17 | +pelican --version |
| 18 | +``` |
| 19 | + |
| 20 | +If a version number did not print, then you may have a special platform or configuration on your host; follow the subsequent sections. Otherwise, you're done and may follow the [Next Steps](#next-steps). |
4 | 21 |
|
5 | 22 | ## Download Pelican Binary |
6 | 23 |
|
7 | | -1. Navigate to [Pelican download page](../install.mdx#download-pelican-binary) and select the Pelican standalone binary you want to install. |
| 24 | +1. Navigate to the [Pelican download page](../install.mdx#download-pelican-binary) to select the Pelican standalone binary you want to install. |
8 | 25 |
|
9 | | -2. In **Operating System** section, select **Linux**. In **Architectures** section, select **X86_64** or **AMR64** depending on the architecture of your machine. |
| 26 | +2. In **Operating System** section, select **Linux**. In **Architectures** section, select **X86_64** or **ARM64** depending on the architecture of your machine. |
10 | 27 |
|
11 | | -3. In the list of candidates, copy the link to `pelican_Linux_x86_64.tar.gz` if you select **X86_64**, or `pelican_Linux_arm64.tar.gz` if you select **ARM64**. |
| 28 | +3. In the list of candidates, copy the link to `pelican_Linux_x86_64.tar.gz` or `pelican_Linux_arm64.tar.gz`, as appropriate. |
12 | 29 |
|
13 | 30 | 4. Change the following command with the link to the binary you copied in the previous step and run the command |
14 | 31 |
|
15 | 32 | ```bash |
16 | 33 | wget <replace-with-the-link-you-copied> |
17 | | - tar -zxvf pelican_Linux_x86_64.tar.gz # x86_64 user |
| 34 | + mkdir -p ~/.local/bin |
| 35 | + tar -zxvf -C ~/.local/bin/ --strip-components=1 pelican_Linux_$(uname -m).tar.gz |
18 | 36 | ``` |
19 | 37 |
|
20 | | - > **Note**: You need to replace `pelican_Linux_x86_64.tar.gz` with `pelican_Linux_arm64.tar.gz` if you are running an `ARM64` machine. |
| 38 | + > **Note**: The shell should expand `$(uname -m)` with the machine's hardware platform. If it fails, you may need to replace the filename with `pelican_Linux_x86_64.tar.gz` with `pelican_Linux_arm64.tar.gz`, as appropriate. |
21 | 39 |
|
22 | 40 | Example to install Pelican standalone binary on an `X86_64` machine: |
23 | 41 |
|
24 | 42 | ```bash |
25 | | - wget https://github.com/PelicanPlatform/pelican/releases/download/v7.5.8/pelican_Linux_x86_64.tar.gz |
26 | | - tar -zxvf pelican_Linux_x86_64.tar.gz |
| 43 | + $ wget https://dl.pelicanplatform.org/latest/pelican_Linux_x86_64.tar.gz |
| 44 | + $ mkdir -p ~/.local/bin |
| 45 | + $ tar -zxvf -C ~/.local/bin/ --strip-components=1 pelican_Linux_x86_64.tar.gz |
27 | 46 | ``` |
28 | 47 |
|
29 | | -## Add Pelican Binary to `PATH` |
| 48 | +## Make Pelican Binary Available |
30 | 49 |
|
31 | | -The above command extracted the binary from the `tar` file. You may run the binary in the current folder, but it is recommended that you add Pelican binary to your `PATH` environment variable to allow `pelican` to be called directly from your command line. |
| 50 | +The above command extracted the binary from the `tar` file and placed it inside `.local/bin/` in your home directory. On most Linux distributions, this makes the binary automatically available. |
32 | 51 |
|
33 | | -> **Note**: You need to replace `pelican_Linux_x86_64` with `pelican_Linux_arm64` if you are running an `ARM64` machine and downloaded `pelican_Linux_arm64.tar.gz`. |
34 | | -
|
35 | | -### Run Pelican binary from the downloaded folder: |
| 52 | +You may test this by running: |
36 | 53 |
|
37 | 54 | ```bash |
38 | | -$ cd pelican_Linux_x86_64 # Go to the binary folder |
39 | | -$ ./pelican --version # Run Pelican binary |
| 55 | +command -v pelican |
| 56 | +``` |
40 | 57 |
|
41 | | -Version: 7.5.8 |
42 | | -Build Date: 2024-03-01T18:13:00Z |
43 | | -Build Commit: d260a07d3b057d19b7fdd36125f91a8768531258 |
44 | | -Built By: goreleaser |
| 58 | +If it outputs a path like this example: |
| 59 | + |
| 60 | +```bash |
| 61 | +$ command -v pelican |
| 62 | +/home/username/.local/bin/pelican |
45 | 63 | ``` |
46 | 64 |
|
| 65 | +then you may skip this section. If not, you need to alter the `PATH` environment variable that controls which directories are searched for binaries. |
| 66 | + |
47 | 67 | ### Add Pelican binary to your `PATH` for the current terminal |
48 | 68 |
|
| 69 | +To change the `PATH` variable for only the currently-running terminal session, execute the following line: |
| 70 | + |
49 | 71 | ```bash |
50 | | -$ cd pelican_Linux_x86_64 # Go to the binary folder |
51 | | -$ export PATH="$PWD:$PATH" # Add current folder to the PATH |
| 72 | +export PATH="$HOME/.local/bin/:$PATH" |
| 73 | +``` |
| 74 | + |
| 75 | +Example outputs: |
| 76 | + |
| 77 | +```bash |
| 78 | +$ export PATH="$HOME/.local/bin/:$PATH" # Add ~/.local/bin/ to the PATH |
52 | 79 | $ pelican --version # Run Pelican binary |
53 | 80 |
|
54 | | -Version: 7.5.8 |
55 | | -Build Date: 2024-03-01T18:13:00Z |
56 | | -Build Commit: d260a07d3b057d19b7fdd36125f91a8768531258 |
| 81 | +Version: 7.12.0 |
| 82 | +Build Date: 2025-01-14T21:33:23Z |
| 83 | +Build Commit: 57748c37af7574ec182e5a21db741c4c5a1e61a8 |
57 | 84 | Built By: goreleaser |
58 | 85 | ``` |
59 | 86 |
|
60 | 87 | ### Add Pelican binary to your `PATH` permanently |
61 | 88 |
|
| 89 | +To add the `~/.local/bin/` directory to your `PATH` variable permanently, execute the following line (assuming you are using the 'bash' shell): |
| 90 | + |
| 91 | +```bash |
| 92 | +echo "export PATH="\$HOME/.local/bin/:\$PATH" >> ~/.bashrc |
| 93 | +``` |
| 94 | +
|
| 95 | +Example outputs: |
| 96 | +
|
62 | 97 | ```bash |
63 | | -$ cd pelican_Linux_x86_64 # Go to the binary folder |
64 | | -$ echo "export PATH=$PWD:\$PATH" >> ~/.bashrc # Add the current folder to your .bashrc file |
| 98 | +$ echo "export PATH=\$HOME/.local/bin:\$PATH" >> ~/.bashrc # Add the .local/bin folder to your .bashrc file |
65 | 99 | $ source ~/.bashrc # Apply the change |
66 | 100 | $ pelican --version # Run Pelican binary |
67 | 101 |
|
68 | | -Version: 7.5.8 |
69 | | -Build Date: 2024-03-01T18:13:00Z |
70 | | -Build Commit: d260a07d3b057d19b7fdd36125f91a8768531258 |
| 102 | +Version: 7.12.0 |
| 103 | +Build Date: 2025-01-14T21:33:23Z |
| 104 | +Build Commit: 57748c37af7574ec182e5a21db741c4c5a1e61a8 |
71 | 105 | Built By: goreleaser |
72 | 106 | ``` |
73 | 107 |
|
|
0 commit comments