QNAP TS410 QTS4.0.1 で ruby を入れる手順~
QTS 4.0.1 は ruby 1.9.1 までだし redmine 2.3 は ruby 1.9.1 サポートしてないし しょうがないな~とか思いながら ruby-1.9.3-p448 突っ込んだ時のメモです間違ってたらごめ~ん ちなみに ruby-2.0.0-p247 はビルド中 segfault 食らうので ICE かも
Optware 系優先に変更
App Center -> Optware IPKG 有効化
QNAP へ ssh でログイン /opt/Optware.sh の PATH を決めているところを書き換え
[ $? -ne 0 ] && /bin/echo "export PATH=/opt/bin:/opt/sbin:\$PATH" >> /etc/profile
再起動後 QNAP へ ssh でログイン
ipkg 物もろもろインストール
こんなにはいらないですが… ipkg install ほげ な感じで以下のパッケージをインストール
man man-pages
less bash grep which sed gawk perl
procps coreutils util-linux-ng
zip bzip2 zlib
diffutils patchutils
make binutils gcc gdb libtool
glib openssl-dev pcre-dev ncursesw-dev
net-tools wget-ssl
imagemagick tcl
ライブラリとかインストール
各々 /opt/src あたりで次のような感じで入れていきます
libyaml をインストール
wget http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz
tar xvfz yaml-0.1.4.tar.gz
cd yaml-0.1.4
./configure --prefix=/opt/yaml-0.1.4
make
make check
make install
libffi をインストール
wget ftp://sourceware.org/pub/libffi/libffi-3.0.13.tar.gz
tar xvfz libffi-3.0.13.tar.gz
cd libffi-3.0.13
./configure --prefix=/opt/libffi-3.0.13
make
make check
make install
ruby をインストール
私は ruby 知らないんでドキュメントなしでインスト~ル
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p448.tar.bz2
tar xvfj ruby-1.9.3-p448.tar.bz2
cd ruby-1.9.3-p448
./configure --prefix=/opt/ruby-1.9.3-p448 \
--with-opt-dir=/opt:/opt/yaml-0.1.4:/opt/libffi-3.0.13 \
--disable-install-doc --disable-install-rdoc --disable-install-capi
make
make check
make install
日常使いのものをシンボリックリンクとして /opt/bin へ置いちゃったりして
ln -s /opt/ruby-1.9.3-p448 /opt/ruby
ln -s /opt/ruby/bin/ruby /opt/bin/
ln -s /opt/ruby/bin/gem /opt/bin/
ln -s /opt/ruby/bin/rake /opt/bin/