Create a gist now

Instantly share code, notes, and snippets.

install script ( GNU Core Utilities, Git, Vim 7.4 + Lua, Tig, tmux ) for 'さくらのレンタルサーバ スタンダード'
#!/usr/local/bin/bash
#======================================
# sakura-setup.bash
#
# Date: 2015-09-07
# Author: Kikyou Akino <bellflower@web4u.jp>
#======================================
export LD_LIBRARY_PATH=$HOME/local/lib:/usr/local/lib:/usr/lib:$LD_LIBRARY_PATH
export CPATH=$CPATH:/usr/include:/usr/local/include:$HOME/local/include
mkdir -p ~/local/src
#======================================
# GNU Core Utilities
cd ~/local/src
curl -LO http://ftp.gnu.org/gnu/coreutils/coreutils-8.24.tar.xz
tar Jxf coreutils-8.24.tar.xz
cd coreutils-8.24
./configure --prefix=$HOME/local
gmake && gmake install
#======================================
# Git
cd ~/local/src
curl -LO https://www.kernel.org/pub/software/scm/git/git-2.5.1.tar.xz
tar Jxf git-2.5.1.tar.xz
cd git-2.5.1
gmake prefix=$HOME/local CC=gcc all
gmake prefix=$HOME/local CC=gcc install
#======================================
# Lua
cd ~/local/src
curl -LO http://www.lua.org/ftp/lua-5.3.1.tar.gz
tar xzf lua-5.3.1.tar.gz
cd lua-5.3.1
gmake freebsd install INSTALL_TOP=$HOME/local
#======================================
# Vim
cd ~/local/src
git clone https://github.com/vim/vim.git
cd vim
./configure \
--prefix=$HOME/local \
--with-local-dir=$HOME/local \
--with-features=huge \
--enable-multibyte \
--enable-perlinterp=yes \
--enable-luainterp=yes \
--with-lua-prefix=$HOME/local \
--enable-pythoninterp=yes \
--with-python-config-dir=/usr/local/lib/python2.7/config \
--enable-rubyinterp=yes \
--with-ruby-command=/usr/local/bin/ruby
gmake && gmake install
#======================================
# GNU Readline library
cd ~/local/src
curl -LO ftp://ftp.cwru.edu/pub/bash/readline-6.3.tar.gz
tar xzf readline-6.3.tar.gz
cd readline-6.3
./configure --prefix=$HOME/local --enable-multibyte
gmake && gmake install
#======================================
# Tig
cd ~/local/src
curl -LO http://jonas.nitro.dk/tig/releases/tig-2.1.1.tar.gz
tar xzf tig-2.1.1.tar.gz
cd tig-2.1.1
LIBS=-lncursesw ./configure \
--prefix=$HOME/local \
--with-ncurses \
--with-readline=$HOME/local \
--with-libiconv=/usr/local
gmake && gmake install install-doc-man
#======================================
# libevent API
cd ~/local/src
curl -LO https://sourceforge.net/projects/levent/files/libevent/libevent-2.0/libevent-2.0.22-stable.tar.gz
tar xzf libevent-2.0.22-stable.tar.gz
cd libevent-2.0.22-stable
./configure --prefix=$HOME/local --with-gnu-ld --with-pic
gmake && gmake install
#======================================
# tmux
cd ~/local/src
curl -LO https://github.com/tmux/tmux/releases/download/2.0/tmux-2.0.tar.gz
tar xzf tmux-2.0.tar.gz
cd tmux-2.0
PKG_CONFIG_PATH=$HOME/local/lib/pkgconfig ./configure --prefix=$HOME/local
make && make install
#======================================
cd ~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment