Skip to content

Instantly share code, notes, and snippets.

@pjxiao
Last active October 6, 2015 19:58
Show Gist options
  • Save pjxiao/3045729 to your computer and use it in GitHub Desktop.
Save pjxiao/3045729 to your computer and use it in GitHub Desktop.
Install Git 1.7 on older Linux (RedHatLinux) / 古い環境に Git 1.7 をインストールする。

ビルド前に

Git をビルドするのにバージョンが古くてだめだったもの(環境による)

  • curl
  • autoconf
  • perl

さらにこれらの最新版をビルドするのに既存のものではバージョンが古くてだめだったもの

  • openssl (curl)
  • m4 (autoconf)

ということで、 openssl -> curl ->m4 -> autoconf -> perl -> Git の順番でビルドを行った。 これでも、Git のビルド時には NO_NSEC=YesPlease が必要だた(環境による)。

ユーザのホームディレクトリ下にインストールした。

Refered Url

Command log

cd ~/
cd tmp/
ll
mkdir git17
cd git17/
mkdir git
mkdir openssl
cd openssl
wget http://www.openssl.org/source/openssl-1.0.1c.tar.gz
tar zxvf openssl-1.0.1c.tar.gz 
cd openssl-1.0.1c
./config --prefix=$HOME/usr
make
make install
cd ../../
mkdir curl
cd curl/
wget http://curl.haxx.se/download/curl-7.26.0.tar.gz
tar zxvf curl-7.26.0.tar.gz 
cd curl-7.26.0
./configure -prefix=$HOME --with-ssl=$HOME/usr/bin/openssl
make
make install
cd ../../
mkdir m4
cd m4/
wget http://ftp.gnu.org/gnu/m4/m4-1.4.16.tar.gz
tar zxvf m4-1.4.16.tar.gz 
cd m4-1.4.16
./configure --prefix=$HOME/usr
make
make install
cd ../../
mkdir autoconf
wget http://ftp.gnu.org/gnu/autoconf/autoconf-latest.tar.gz
mv autoconf-latest.tar.gz autoconf
cd autoconf/
tar zxvf autoconf-latest.tar.gz 
cd autoconf-2.69/
export M4=$HOME/usr/bin/m4
./configure --prefix=$HOME/usr
make
make install
cd ../../
mkdir perl
cd perl/
wget http://www.cpan.org/src/5.0/perl-5.16.0.tar.gz
tar zxvf perl-5.16.0.tar.gz 
cd perl-5.16.0
./Configure -de -Dprefix=$HOME/usr
make
make test
make install
cd ../../git/
tar zxvf v1.7.11.tar.gz 
cd git-git-8fc9727/
~/usr/bin/autoconf 
./configure --prefix=$HOME/usr --with-openssl=$HOME/usr/bin/openssl --with-curl=$HOME/bin/curl --with-perl=$HOME/usr/bin/perl
make NO_NSEC="YesPlease"
make install NO_NSEC="YesPlease"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment