XSERVERにgitを入れる (https使えるように)

https使う場合は、curlがいるのです。

流れ

  • gettext のインストール
  • curl のインストール
  • git のインストール

gettext のインストール

wget http://ftp.gnu.org/pub/gnu/gettext/gettext-0.18.2.tar.gz
tar xf gettext-0.18.2.tar.gz
cd gettext-0.18.2
./configure --prefix=/home/[ユーザ名]/opt
make install

curl のインストール

ちょっと古いけど、勘弁。

wget http://curl.haxx.se/download/curl-7.37.0.tar.bz2
tar xf curl-7.37.0.tar.bz2
cd curl-7.37.0
./configure --enable-libcurl-option --prefix=/home/[ユーザ名]/opt
make

git のインストール

wget https://github.com/git/git/archive/master.zip
unzip master.zip
cd git-master
make configure
./configure --prefix=/home/[ユーザ名]/opt --with-curl=/home/[ユーザ名]/opt
make all
make install    

参考にしたもの

Program & Design Tips: XSERVERにSSH接続してgitをインストールする方法

How to install curl 7.37.0 with CentOS 6.5 - Qiita

GitでHTTPのpushができない | hatotaka's Blog