Skip to content

Instantly share code, notes, and snippets.

@while0pass
Forked from shime/_readme.md
Last active August 29, 2015 14:06
Show Gist options
  • Save while0pass/cebf850379d54ad32e63 to your computer and use it in GitHub Desktop.
Save while0pass/cebf850379d54ad32e63 to your computer and use it in GitHub Desktop.

Revisions

  1. @shime shime revised this gist Apr 4, 2014. 2 changed files with 18 additions and 15 deletions.
    6 changes: 5 additions & 1 deletion _readme.md
    Original file line number Diff line number Diff line change
    @@ -10,10 +10,14 @@ Save yourself some time and run this little fellow!

    ### Installs

    * tmux - 1.8 (latest stable)
    * tmux - 1.9a (latest stable)
    * libevent - 2.0.21 (latest stable)
    * ncurses - 5.9 (latest stable)

    ### How to install

    First of all, you should give me super user permissions, because this will install tmux to `/usr/local/lib` by default. Trust me, I'm a random guy from the internet.

    Hit

    curl -fsSL https://gist.github.com/shime/5706655/raw/install.sh | sudo bash -e
    27 changes: 13 additions & 14 deletions install.sh
    Original file line number Diff line number Diff line change
    @@ -8,11 +8,14 @@

    # define versions

    tmux_version="1.8"
    tmux_version="1.9"
    tmux_patch_version="a" # leave empty for stable releases

    libevent_version="2.0.21"
    ncurses_version="5.9"

    tmux_name="tmux-$tmux_version"
    tmux_relative_url="$tmux_name/$tmux_name$tmux_patch_version"
    libevent_name="libevent-$libevent_version-stable"
    ncurses_name="ncurses-$ncurses_version"

    @@ -25,7 +28,7 @@ target_dir="/usr/local"

    cd /tmp

    wget -O $tmux_name.tar.gz http://sourceforge.net/projects/tmux/files/tmux/$tmux_name/$tmux_name.tar.gz/download
    wget -O $tmux_name.tar.gz http://sourceforge.net/projects/tmux/files/tmux/$tmux_relative_url.tar.gz/download
    wget -O $libevent_name.tar.gz https://github.com/downloads/libevent/libevent/$libevent_name.tar.gz
    wget -O $ncurses_name.tar.gz ftp://ftp.gnu.org/gnu/ncurses/$ncurses_name.tar.gz

    @@ -48,20 +51,16 @@ make install
    cd -

    # tmux installation
    tar xvzf $tmux_name.tar.gz
    cd $tmux_name
    tar xvzf ${tmux_name}*.tar.gz
    cd ${tmux_name}*/
    ./configure CFLAGS="-I$target_dir/include -I$target_dir/include/ncurses" LDFLAGS="-L$target_dir/lib -L$target_dir/include/ncurses -L$target_dir/include"
    CPPFLAGS="-I$target_dir/include -I$target_dir/include/ncurses" LDFLAGS="-static -L$target_dir/include -L$target_dir/include/ncurses -L$target_dir/lib" make
    cp tmux $target_dir/bin
    cd -


    echo
    echo "//////////////////////////////////////////////////////////"
    echo "Post installation message:"
    echo "----------------------------------------------------------"
    echo "Installed tmux v$tmux_version with success! \o/"
    echo
    echo "Hit 'tmux -V' to make sure you're using the right version."
    echo "//////////////////////////////////////////////////////////"
    echo
    version=`tmux -V | cut -d ' ' -f 2`
    if [ -z "$version" ]; then
    echo
    echo "[error] failed to install tmux - check for errors in the above output"
    exit 1
    fi
  2. @shime shime revised this gist Jun 4, 2013. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions install.sh
    Original file line number Diff line number Diff line change
    @@ -23,12 +23,12 @@ target_dir="/usr/local"
    # download source files for tmux, libevent, and ncurses
    # save them in /tmp

    wget -O /tmp/$tmux_name.tar.gz http://sourceforge.net/projects/tmux/files/tmux/$tmux_name/$tmux_name.tar.gz/download
    wget -O /tmp/$libevent_name.tar.gz https://github.com/downloads/libevent/libevent/$libevent_name.tar.gz
    wget -O /tmp/$ncurses_name.tar.gz ftp://ftp.gnu.org/gnu/ncurses/$ncurses_name.tar.gz

    cd /tmp

    wget -O $tmux_name.tar.gz http://sourceforge.net/projects/tmux/files/tmux/$tmux_name/$tmux_name.tar.gz/download
    wget -O $libevent_name.tar.gz https://github.com/downloads/libevent/libevent/$libevent_name.tar.gz
    wget -O $ncurses_name.tar.gz ftp://ftp.gnu.org/gnu/ncurses/$ncurses_name.tar.gz

    # extract files, configure, and compile

    # libevent installation
  3. @shime shime revised this gist Jun 4, 2013. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions install.sh
    Original file line number Diff line number Diff line change
    @@ -23,9 +23,9 @@ target_dir="/usr/local"
    # download source files for tmux, libevent, and ncurses
    # save them in /tmp

    wget -P /tmp -O $tmux_name.tar.gz http://sourceforge.net/projects/tmux/files/tmux/$tmux_name/$tmux_name.tar.gz/download
    wget -P /tmp -O $libevent_name.tar.gz https://github.com/downloads/libevent/libevent/$libevent_name.tar.gz
    wget -P /tmp -O $ncurses_name.tar.gz ftp://ftp.gnu.org/gnu/ncurses/$ncurses_name.tar.gz
    wget -O /tmp/$tmux_name.tar.gz http://sourceforge.net/projects/tmux/files/tmux/$tmux_name/$tmux_name.tar.gz/download
    wget -O /tmp/$libevent_name.tar.gz https://github.com/downloads/libevent/libevent/$libevent_name.tar.gz
    wget -O /tmp/$ncurses_name.tar.gz ftp://ftp.gnu.org/gnu/ncurses/$ncurses_name.tar.gz

    cd /tmp

  4. @shime shime renamed this gist Jun 4, 2013. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  5. @shime shime revised this gist Jun 4, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion readme.md
    Original file line number Diff line number Diff line change
    @@ -16,4 +16,4 @@ Save yourself some time and run this little fellow!

    ### How to install

    sudo curl -fsSL https://gist.github.com/shime/5706655/raw/install.sh | bash -e
    curl -fsSL https://gist.github.com/shime/5706655/raw/install.sh | sudo bash -e
  6. @shime shime revised this gist Jun 4, 2013. 1 changed file with 29 additions and 1 deletion.
    30 changes: 29 additions & 1 deletion install.sh
    Original file line number Diff line number Diff line change
    @@ -20,10 +20,38 @@ ncurses_name="ncurses-$ncurses_version"

    target_dir="/usr/local"

    # download source files for tmux, libevent, and ncurses
    # save them in /tmp

    wget -P /tmp -O $tmux_name.tar.gz http://sourceforge.net/projects/tmux/files/tmux/$tmux_name/$tmux_name.tar.gz/download
    wget -P /tmp -O $libevent_name.tar.gz https://github.com/downloads/libevent/libevent/$libevent_name.tar.gz
    wget -P /tmp -O $ncurses_name.tar.gz ftp://ftp.gnu.org/gnu/ncurses/$ncurses_name.tar.gz

    cd /tmp

    # extract files, configure, and compile

    # libevent installation
    tar xvzf $libevent_name.tar.gz
    cd $libevent_name
    ./configure --prefix=$target_dir --disable-shared
    make
    make install
    cd -

    # ncurses installation
    tar xvzf $ncurses_name.tar.gz
    cd $ncurses_name
    ./configure --prefix=$target_dir
    make
    make install
    cd -

    # tmux installation
    tar xvzf $tmux_name.tar.gz
    cd $tmux_name
    ./configure CFLAGS="-I$target_dir/include -I$target_dir/include/ncurses" LDFLAGS="-L$target_dir/lib -L$target_dir/include/ncurses -L$target_dir/include"
    CPPFLAGS="-I$target_dir/include -I$target_dir/include/ncurses" LDFLAGS="-static -L$target_dir/include -L$target_dir/include/ncurses -L$target_dir/lib" make
    cp tmux $target_dir/bin
    cd -

    @@ -36,4 +64,4 @@ echo "Installed tmux v$tmux_version with success! \o/"
    echo
    echo "Hit 'tmux -V' to make sure you're using the right version."
    echo "//////////////////////////////////////////////////////////"
    echo
    echo
  7. @shime shime revised this gist Jun 4, 2013. 1 changed file with 1 addition and 4 deletions.
    5 changes: 1 addition & 4 deletions install.sh
    Original file line number Diff line number Diff line change
    @@ -20,13 +20,10 @@ ncurses_name="ncurses-$ncurses_version"

    target_dir="/usr/local"


    cd /tmp

    # tmux installation
    tar xvzf $tmux_name.tar.gz
    cd $tmux_name
    ./configure CFLAGS="-I$target_dir/include -I$target_dir/include/ncurses" LDFLAGS="-L$target_dir/lib -L$target_dir/include/ncurses -L$target_dir/include"
    CPPFLAGS="-I$target_dir/include -I$target_dir/include/ncurses" LDFLAGS="-static -L$target_dir/include -L$target_dir/include/ncurses -L$target_dir/lib" make
    cp tmux $target_dir/bin
    cd -

  8. @shime shime revised this gist Jun 4, 2013. 1 changed file with 0 additions and 25 deletions.
    25 changes: 0 additions & 25 deletions install.sh
    Original file line number Diff line number Diff line change
    @@ -20,32 +20,7 @@ ncurses_name="ncurses-$ncurses_version"

    target_dir="/usr/local"

    # download source files for tmux, libevent, and ncurses
    # save them in /tmp

    wget -P /tmp -O $tmux_name.tar.gz http://sourceforge.net/projects/tmux/files/tmux/$tmux_name/$tmux_name.tar.gz/download
    wget -P /tmp -O $libevent_name.tar.gz https://github.com/downloads/libevent/libevent/$libevent_name.tar.gz
    wget -P /tmp -O $ncurses_name.tar.gz ftp://ftp.gnu.org/gnu/ncurses/$ncurses_name.tar.gz

    cd /tmp

    # extract files, configure, and compile

    # libevent installation
    tar xvzf $libevent_name.tar.gz
    cd $libevent_name
    ./configure --prefix=$target_dir --disable-shared
    make
    make install
    cd -

    # ncurses installation
    tar xvzf $ncurses_name.tar.gz
    cd $ncurses_name
    ./configure --prefix=$target_dir
    make
    make install
    cd -

    # tmux installation
    tar xvzf $tmux_name.tar.gz
  9. @shime shime renamed this gist Jun 4, 2013. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  10. @shime shime revised this gist Jun 4, 2013. 2 changed files with 73 additions and 41 deletions.
    19 changes: 19 additions & 0 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,19 @@
    Having trouble installing the latest stable version of [tmux](http://tmux.sourceforge.net/)?

    Save yourself some time and run this little fellow!


    ### Prerequisities

    * gcc
    * wget

    ### Installs

    * tmux - 1.8 (latest stable)
    * libevent - 2.0.21 (latest stable)
    * ncurses - 5.9 (latest stable)

    ### How to install

    sudo curl -fsSL https://gist.github.com/shime/5706655/raw/install.sh | bash -e
    95 changes: 54 additions & 41 deletions tmux_local_install.sh
    Original file line number Diff line number Diff line change
    @@ -1,54 +1,67 @@
    #!/bin/bash

    # Script for installing tmux on systems where you don't have root access.
    # tmux will be installed in $HOME/local/bin.
    # It's assumed that wget and a C/C++ compiler are installed.
    # Script for installing tmux and dependencies.
    # tmux will be installed in /usr/local/lib by default.

    # exit on error
    set -e
    # Prerequisites: - gcc
    # - wget

    # create our directories
    mkdir -p $HOME/local $HOME/tmux_tmp
    cd $HOME/tmux_tmp
    # define versions

    tmux_version="1.8"
    libevent_version="2.0.21"
    ncurses_version="5.9"

    tmux_name="tmux-$tmux_version"
    libevent_name="libevent-$libevent_version-stable"
    ncurses_name="ncurses-$ncurses_version"

    # set the installation directory

    target_dir="/usr/local"

    # download source files for tmux, libevent, and ncurses
    wget -O tmux-1.6.tar.gz http://sourceforge.net/projects/tmux/files/tmux/tmux-1.6/tmux-1.6.tar.gz/download
    wget https://github.com/downloads/libevent/libevent/libevent-2.0.19-stable.tar.gz
    wget ftp://ftp.gnu.org/gnu/ncurses/ncurses-5.9.tar.gz
    # save them in /tmp

    wget -P /tmp -O $tmux_name.tar.gz http://sourceforge.net/projects/tmux/files/tmux/$tmux_name/$tmux_name.tar.gz/download
    wget -P /tmp -O $libevent_name.tar.gz https://github.com/downloads/libevent/libevent/$libevent_name.tar.gz
    wget -P /tmp -O $ncurses_name.tar.gz ftp://ftp.gnu.org/gnu/ncurses/$ncurses_name.tar.gz

    cd /tmp

    # extract files, configure, and compile

    ############
    # libevent #
    ############
    tar xvzf libevent-2.0.19-stable.tar.gz
    cd libevent-2.0.19-stable
    ./configure --prefix=$HOME/local --disable-shared
    # libevent installation
    tar xvzf $libevent_name.tar.gz
    cd $libevent_name
    ./configure --prefix=$target_dir --disable-shared
    make
    make install
    cd ..

    ############
    # ncurses #
    ############
    tar xvzf ncurses-5.9.tar.gz
    cd ncurses-5.9
    ./configure --prefix=$HOME/local
    cd -

    # ncurses installation
    tar xvzf $ncurses_name.tar.gz
    cd $ncurses_name
    ./configure --prefix=$target_dir
    make
    make install
    cd ..

    ############
    # tmux #
    ############
    tar xvzf tmux-1.6.tar.gz
    cd tmux-1.6
    ./configure CFLAGS="-I$HOME/local/include -I$HOME/local/include/ncurses" LDFLAGS="-L$HOME/local/lib -L$HOME/local/include/ncurses -L$HOME/local/include"
    CPPFLAGS="-I$HOME/local/include -I$HOME/local/include/ncurses" LDFLAGS="-static -L$HOME/local/include -L$HOME/local/include/ncurses -L$HOME/local/lib" make
    cp tmux $HOME/local/bin
    cd ..

    # cleanup
    rm -rf $HOME/tmux_tmp

    echo "$HOME/local/bin/tmux is now available. You can optionally add $HOME/local/bin to your PATH."
    cd -

    # tmux installation
    tar xvzf $tmux_name.tar.gz
    cd $tmux_name
    ./configure CFLAGS="-I$target_dir/include -I$target_dir/include/ncurses" LDFLAGS="-L$target_dir/lib -L$target_dir/include/ncurses -L$target_dir/include"
    CPPFLAGS="-I$target_dir/include -I$target_dir/include/ncurses" LDFLAGS="-static -L$target_dir/include -L$target_dir/include/ncurses -L$target_dir/lib" make
    cp tmux $target_dir/bin
    cd -


    echo
    echo "//////////////////////////////////////////////////////////"
    echo "Post installation message:"
    echo "----------------------------------------------------------"
    echo "Installed tmux v$tmux_version with success! \o/"
    echo
    echo "Hit 'tmux -V' to make sure you're using the right version."
    echo "//////////////////////////////////////////////////////////"
    echo
  11. @ryin ryin created this gist Jul 13, 2012.
    54 changes: 54 additions & 0 deletions tmux_local_install.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,54 @@
    #!/bin/bash

    # Script for installing tmux on systems where you don't have root access.
    # tmux will be installed in $HOME/local/bin.
    # It's assumed that wget and a C/C++ compiler are installed.

    # exit on error
    set -e

    # create our directories
    mkdir -p $HOME/local $HOME/tmux_tmp
    cd $HOME/tmux_tmp

    # download source files for tmux, libevent, and ncurses
    wget -O tmux-1.6.tar.gz http://sourceforge.net/projects/tmux/files/tmux/tmux-1.6/tmux-1.6.tar.gz/download
    wget https://github.com/downloads/libevent/libevent/libevent-2.0.19-stable.tar.gz
    wget ftp://ftp.gnu.org/gnu/ncurses/ncurses-5.9.tar.gz

    # extract files, configure, and compile

    ############
    # libevent #
    ############
    tar xvzf libevent-2.0.19-stable.tar.gz
    cd libevent-2.0.19-stable
    ./configure --prefix=$HOME/local --disable-shared
    make
    make install
    cd ..

    ############
    # ncurses #
    ############
    tar xvzf ncurses-5.9.tar.gz
    cd ncurses-5.9
    ./configure --prefix=$HOME/local
    make
    make install
    cd ..

    ############
    # tmux #
    ############
    tar xvzf tmux-1.6.tar.gz
    cd tmux-1.6
    ./configure CFLAGS="-I$HOME/local/include -I$HOME/local/include/ncurses" LDFLAGS="-L$HOME/local/lib -L$HOME/local/include/ncurses -L$HOME/local/include"
    CPPFLAGS="-I$HOME/local/include -I$HOME/local/include/ncurses" LDFLAGS="-static -L$HOME/local/include -L$HOME/local/include/ncurses -L$HOME/local/lib" make
    cp tmux $HOME/local/bin
    cd ..

    # cleanup
    rm -rf $HOME/tmux_tmp

    echo "$HOME/local/bin/tmux is now available. You can optionally add $HOME/local/bin to your PATH."