1 / 10

Solaris に OpenSSH のインストール

Solaris に OpenSSH のインストール. 2006 年 3 月 14 日 村下 純也. OpenSSH のインストール. 次の順にインストール OpenSSL(openssl-0.9.8a) zlib(zlib-1.2.3) Tcp Wrapper(tcp-wrapper7.6) OpenSSH(openssh-4.3p2). openssl-0.9.8a のインストール手順. 牧之内研の Web ページを参考. openssl-0.9.8a.tar.gz をダウンロード

holleb
Télécharger la présentation

Solaris に OpenSSH のインストール

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. SolarisにOpenSSHのインストール 2006年3月14日 村下 純也

  2. OpenSSHのインストール • 次の順にインストール • OpenSSL(openssl-0.9.8a) • zlib(zlib-1.2.3) • Tcp Wrapper(tcp-wrapper7.6) • OpenSSH(openssh-4.3p2)

  3. openssl-0.9.8aのインストール手順 牧之内研のWebページを参考 openssl-0.9.8a.tar.gz をダウンロード # gzip -d < openssh-0.9.8a.tar.gz | tar -xvof – # setenv CC gcc # cd openssh-0.9.8 # ./Configure solaris-sparcv9-gcc # make clean # make # make test # rm -f /usr/local/ssl/lib/lib* # rm -f /usr/local/lib/libcrypto* # rm -f /usr/local/lib/libssl* # make install

  4. zlib-1.2.3のインストール手順 牧之内研のWebページを参考 zlib-1.2.3.tar.gzをダウンロード # gzip -d < zlib-1.2.3.tar.gz | tar -xvof - # cd zlib-1.2.3 # unsetenv CC # ./configure –shared # make clean # make # make install

  5. tcp_wrapper7.6のインストール手順 牧之内研のWebページを参考 tcp_wrapper7.6.tar.gz をダウンロード # gzip -d < tcp_wrapper7.6.tar.gz | tar -xvof – # setenv CC gcc # cd tcp_wrapper7.6 # CC=gcc REAL_DAEMON_DIR=/usr/sbin make sunos5 # mkdir /usr/local/sbin # mkdir /usr/local/man/man3 # mkdir /usr/local/man/man5 # mkdir /usr/local/man/man8 # cp tcpd tcpdchk tcpdmatch try-from safe_finger /usr/local/sbin # cp tcpd.8 tcpdchk.8 tcpdmatch.8 /usr/local/man/man8 # cp hosts_access.5 hosts_options.5 /usr/local/man/man5 # cp hosts_access.3 /usr/local/man/man3 # cp tcpd.h /usr/local/include # cp libwrap.a /usr/local/lib

  6. openssh-4.3p2のインストール 牧之内研のWebページを参考 makeを行う前に/etc/passwdファイルの最後の行に以下の1行を追加する sshd:x:22:22::: openssh-4.3p2をダウンロード # gzip -d < openssh-4.3p2.tar.gz | tar -xvof - # setenv CC gcc # setenv CFLAGS "-I/usr/local/ssl/include“ # setenv LDFLAGS "-L/usr/local/ssl/lib -L/usr/local/lib“ # cd openssh-4.3p2 # ./configure --prefix=/usr/local --with-tcp-wrappers=/usr/local/lib --sysconfdir=/etc/openssh --localstatedir=/etc/openssh --x-includes=/usr/openwin/include --x-libraries=/usr/openwin/lib --with-ssl-dir=/usr/local/ssl --without-pam --with-ipv4-default # make clean # make ここまで実行するとエラーメッセージを示して停止する

  7. openssh-4.3p2のmake • make実行時に下記のようなエラーがでる 未定義の 最初に参照しているシンボル ファイルdlsym /usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o) (シンボルは暗黙の依存性 /usr/lib/libdl.so.1 に属しています)dlopen /usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o) (シンボルは暗黙の依存性 /usr/lib/libdl.so.1 に属しています)dlclose /usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o) (シンボルは暗黙の依存性 /usr/lib/libdl.so.1 に属しています)dlerror /usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o) (シンボルは暗黙の依存性 /usr/lib/libdl.so.1 に属しています)ld: 重大なエラー: シンボル参照エラー。ssh に書き込まれる出力はありません。collect2: ld returned 1 exit statusmake: *** [ssh] Error 1

  8. openssh-4.3p2 エラー解決法 • ./configure を実行する前に以下の設定を行う # setenv LIBS -ldlconfigure スクリプトには実行結果をキャッシュする機能があるので、make distclean してからやり直す ちなみにデフォルトのopenssh-4.3p2/MakefileのLIBSの記述は LIBS=-lresolve -lcrypto -lrt -lz -lsocket -lnsl -ldl

  9. openssh-4.3p2のインストール(続き) • makeが成功したら以下の手順を行う # echo stop ssh daemon # sh /etc/rc2.d/S86sshd stop # /usr/bin/pkill -x -u 0 sshd # /usr/bin/pkill -x -u 0 sshd2 # echo remove old configuration files # rm -rf /etc/openssh # mkdir /etc/openssh # rm -f /etc/ssh* # rm -rf /etc/ssh # rm -rf /etc/ssh2 # rm -f /etc/rc2.d/S96sshd* # rm -f /etc/init.d/ssh # rm -f /etc/rc2.d/S80ssh # rm -f /etc/rc0.d/k40ssh # echo remove old binaries # rm -f /usr/local/bin/ssh* # rm -f /usr/local/sbin/ssh* # echo install # rm -rf /etc/ssh # ln -s /etc/openssh /etc/ssh # cd /tmp/openssh-4.2p1 # cp /tmp/openssh-4.2p1/ssh_prng_cmds /etc/openssh/ssh_prng_cmds # cp /tmp/openssh-4.2p1/ssh_config /etc/openssh/ssh_config # cp /tmp/openssh-4.2p1/sshd_config /etc/openssh/sshd_config # make -k install

  10. openssh-4.3p2のインストール(続き) # echo edit sshd_config automatically # cp /etc/openssh/sshd_config /tmp # cat /tmp/sshd_config | sed 's/\/etc\/ssh/\/etc\/openssh/g' | sed 's/\/usr\/libexec/\/usr\/local\/libexec/g' > /etc/openssh/sshd_config ここで、/etc/rc2.d/S86sshd を作成(研究室のWebからダウンロード)して # mv /etc/rc3.d/S89sshd /etc/rc3.d/a_S89sshd # mv /etc/init.d/sshd /etc/init.d/a_sshd Sunのsshが/usr/bin/sshにデフォルトである OpenSSHは/usr/local/bin/sshにインストールされた

More Related