Skip to content

Instantly share code, notes, and snippets.

@donglixp
Forked from lazywei/install_mosh_locally.sh
Last active June 19, 2016 11:06
Show Gist options
  • Select an option

  • Save donglixp/21c5f1581fb01ee9f6b47adf294f3956 to your computer and use it in GitHub Desktop.

Select an option

Save donglixp/21c5f1581fb01ee9f6b47adf294f3956 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, zmil...@cs.wisc.edu
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.5.tar.gz
tar zxvf protobuf-2.6.1.tar.gz
tar zxvf mosh-1.2.5.tar.gz
echo "================="
echo "building protobuf"
echo "================="
# before compiling protobuf.
export CXXFLAGS="$CXXFLAGS -fPIC"
cd $ROOT/build/protobuf-2.6.1
./configure --prefix=$HOME/usr --disable-shared
make install
echo "============="
echo "building mosh"
echo "============="
cd $ROOT/build/mosh-1.2.5
export PROTOC=$HOME/usr/bin/protoc
export protobuf_CFLAGS=-I$HOME/usr/include
export protobuf_LIBS=$HOME/usr/lib/libprotobuf.so
./configure --prefix=$HOME/usr
make install
echo "==="
echo "if all was successful, binaries are now in $ROOT/install/mosh/bin"
echo "==="
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment