Skip to content

Instantly share code, notes, and snippets.

@lazywei
Forked from xiaom/install_mosh_locally.sh
Created January 25, 2015 05:30
Show Gist options
  • Save lazywei/12bc1669dc7739dccef1 to your computer and use it in GitHub Desktop.
Save lazywei/12bc1669dc7739dccef1 to your computer and use it in GitHub Desktop.
Install mosh server without root permission
#!/bin/sh
# this script does absolutely ZERO error checking. however, it worked
# for me on a RHEL 6.3 machine on 2012-08-08. clearly, the version numbers
# and/or URLs should be made variables. cheers, [email protected]
mkdir mosh
cd mosh
ROOT=`pwd`
echo "==================================="
echo "about to set up everything in $ROOT"
echo "==================================="
mkdir build
mkdir install
cd build
curl -O https://github.com/google/protobuf/releases/download/v2.6.1/protobuf-2.6.1.tar.gz
curl -O https://mosh.mit.edu/mosh-1.2.4.tar.gz
tar zxvf protobuf-2.6.1.tar.gz
tar zxvf mosh-1.2.4.tar.gz
echo "================="
echo "building protobuf"
echo "================="
cd $ROOT/build/protobuf-2.6.1
./configure --prefix=$HOME/local --disable-shared
make install
echo "============="
echo "building mosh"
echo "============="
cd $ROOT/build/mosh-1.2.4
export PROTOC=$HOME/local/bin/protoc
export protobuf_CFLAGS=-I$HOME/local/include
export protobuf_LIBS=$HOME/local/lib/libprotobuf.a
./configure --prefix=$HOME/local
make install
echo "==="
echo "if all was successful, binaries are now in $ROOT/install/mosh/bin"
echo "==="
@StealthBadger747
Copy link

How do I keep the mosh-server running?

@faderani
Copy link

faderani commented Jan 7, 2021

curl no more works for getting releases from github. use with -L or wget instead.

@xonq
Copy link

xonq commented Jan 13, 2022

instead of this outdated, error-prone guide, use the precompiled mosh-server binary referenced here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment