radj307 / ARRCON

Lightweight Source RCON client that works on Windows, macOS, & Linux.
GNU General Public License v3.0
190 stars 10 forks source link

Ubuntu 22.04 installation step [DOC] #17

Open fhazal opened 10 months ago

fhazal commented 10 months ago

# Documentation Request

radj307 commented 10 months ago

There isn't any real installation process to speak of; just extract the executable somewhere and run it.

I'll write some documentation on the exact setup process later today.

muhubi commented 10 months ago

Greetings, I am also having issues when trying to extract and install the file. My steps are as follows

  1. Download the "ARRCON-3.3.7-Linux.zip" file under the Releases section (https://github.com/radj307/ARRCON/releases/download/3.3.7/ARRCON-3.3.7-Linux.zip). I download it using my Windows PC.
  2. Extract the file "ARRCON" using WinRAR in Windows, then SFTP into my Ubuntu 22.04 LTS Server and copy the folder with the "ARRCON" file to my user directory [~/ARRCON-3.3.7-Linux/]
  3. cd into the folder
  4. type the file name

image

I keep getting the error in the image above "ARRCON: command not found". I have even tried appending the file extension .sh to the file and still no luck. I have tried running in SUDO and editing the file permissions using chmod A+x. I forgot to include it in the screenshot but I also try ./ARRCON and ./ARRCON.sh and get the same error.

radj307 commented 10 months ago

@muhubi You have to type the path to the file when it isn't on your PATH. In your case, that would be . (current directory), so ./ARRCON should work.

The file also needs execution perms for the current user, if you need to fix that you can use chmod 0755 ./ARRCON.

muhubi commented 10 months ago

Thank you, I did not use the ./ in my command execution. ./ARRCON worked.

image

@fhazal

radj307 commented 10 months ago

@muhubi

Here's a shell script you can use to upgrade versions in the future without having to download & extract it on a separate system:

#!/bin/sh
set -e
if [ $# = 0 ]; then
        echo -n "Version number to upgrade to: "
        read version
else
        version=$1
fi

wget "https://github.com/radj307/ARRCON/releases/download/$version/ARRCON-$version-Linux.zip"
unzip -o ARRCON-$version-Linux.zip
rm ARRCON-$version-Linux.zip

echo "ARRCON was upgraded to v$version"

It requires wget & unzip, which can be installed with the following oneliner on debian-based distros like ubuntu:

sudo apt-get update && sudo apt-get install -y wget unzip

If you name it upgrade-arrcon.sh, give it execute perms with chmod 0755 upgrade-arrcon.sh (or your preferred permissions), then call it like: ./upgrade-arrcon.sh <VERSION>

You can also run it without specifying the version number & it'll prompt you for it.

BitwiseThought commented 10 months ago

@radj307 expansion upon your script:

Here's an install/update script for whatever the latest version currently released to github, (rather than prompting):

#!/bin/bash

# Prerequisites
sudo apt-get -yqq install wget unzip curl

if [ $# = 0 ]; then
    # Get latest version # from github url redirect
    releases="https://github.com/radj307/ARRCON/releases/"
    tag_link=$(curl -Ls -o /dev/null -w %{url_effective} $releases/latest)
    latest_tag=${tag_link#"$releases"}
    version=${latest_tag#"tag/"}
else
    version=$1
fi

# Download version
wget -q "$releases/download/$version/ARRCON-$version-Linux.zip"
unzip -oqq ARRCON-$version-Linux.zip
rm ARRCON-$version-Linux.zip

echo "ARRCON was upgraded to $version"

Toss it in a cron job, and it should keep the system updated to the latest ARRCON. 👍