-
-
Save daskelly/ab655251a956ef740d5326d630b655fb to your computer and use it in GitHub Desktop.
Install mosh server without root permission
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# works on a machine running CentOS 7.7 | |
# no error checking and this requires manual intervention. This script just gives | |
# an overview of the process. | |
# | |
# https://github.com/rust-lang/cargo/issues/713 was helpful... | |
mkdir -p apps/mosh | |
cd apps/mosh | |
# download protobuf and mosh | |
# untar and ungzip | |
# cd into protobuf directory | |
./configure --prefix=$HOME/local --disable-shared "CFLAGS=-fPIC" "CXXFLAGS=-fPIC" | |
make install | |
export PROTOC=$HOME/local/bin/protoc | |
export protobuf_CFLAGS=-I$HOME/local/include | |
export protobuf_LIBS=$HOME/local/lib/libprotobuf.a | |
# cd into mosh directory | |
./configure --prefix=$HOME/local "CFLAGS=-fPIC" "CXXFLAGS=-fPIC" | |
make install | |
# mosh is in apps/mosh/latest/scripts | |
# mosh-server is in apps/mosh/latest/src/frontend | |
### Above doesn't work. Need tinfo or ncurses installed ... | |
# Instead of doing all of this, install mosh using yum | |
# Following https://stackoverflow.com/questions/36651091/how-to-install-packages-in-linux-centos-without-root-user-with-automatic-depen | |
mkdir -p ~/rpm | |
yum search mosh | |
yumdownloader --destdir ~/rpm --resolve mosh | |
mkdir -p ~/redhat | |
cd ~/redhat && rpm2cpio ~/rpm/*.rpm | cpio -id | |
# Put the below in ~/.bashrc | |
#export PATH="$HOME/redhat/usr/sbin:$HOME/redhat/usr/bin:$HOME/redhat/bin:$PATH" | |
#L='/lib:/lib64:/usr/lib:/usr/lib64' | |
#export LD_LIBRARY_PATH="$L:$HOME/redhat/usr/lib:$HOME/redhat/usr/lib64" | |
### Instead of doing ALL of the above, just do: | |
conda install -c conda-forge mosh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment