UJP - 技術情報

Life is fun and easy!

不正IP報告数

Okan Sensor
 
メイン
ログイン
ブログ カテゴリ一覧

     

xntpdインストール


xntpdインストール


0.改定履歴

  • 1998.10.10 初版
  • 2000.05.14 会社名を消したのと,NTのNTP関係とリンク

1.はじめに

 このドキュメントは,Solaris2.5.1でNTP(Network Time Protocol)を利用して時間合わせを行なうデーモン,xntpdのインストール手順を示す.

 なお,この手順では富士通Cコンパイラを用いているが,使用する際にはそれぞれの環境に会わせて設定すればよいと思われる.

2.手順

  • アーカイブを入手する.
  • アーカイブを展開する.

root@duo: compress -d xvf ntp3-5.87.tar .Z
root@duo: tar xvf ntp3-5.87.tar 
x xntp3-5.87, 0 bytes, 0 tape blocks
x xntp3-5.87/Makefile.in, 8618 bytes, 17 テープブロック
x xntp3-5.87/adjtimed, 0 bytes, 0 tape blocks
x xntp3-5.87/adjtimed/Makefile.in, 5860 bytes, 12 テープブロック
x xntp3-5.87/adjtimed/README, 1031 bytes, 3 テープブロック
x xntp3-5.87/adjtimed/Makefile.am, 198 bytes, 1 テープブロック
x xntp3-5.87/adjtimed/adjtimed.c, 11759 bytes, 23 テープブロック
x xntp3-5.87/adjtimed/Makefile, 5912 bytes, 12 テープブロック
x xntp3-5.87/authstuff, 0 bytes, 0 tape blocks

  • 環境変数ac_cv_prog_CCにコンパイラを設定し,展開したディレクトリに移動する.
    • この時使用したコンパイラは,富士通のCコンパイラで,/opt/FSUNf90/bin/fccがパスとなっている.

root@duo: setenv ac_cv_prog_CC /opt/FSUNf90/bin/fcc
root@duo: cd xntp3-5.87

  • configureコマンドを実行する.
    • この時,引数--prefixで設定するのは,インストールするディレクトリである.
    • 今回は/export/homeディレクトリになっているので,作成されたバイナリは,/export/home/binにインストールされる.
    • デフォルトでは,/usr/local/になっており,その結果,/usr/local/binにインストールされることになる.

root@duo: ./configure --prefix=/export/home
loading cache ./config.cache
checking host system type... sparc-sun-solaris2.5.1
checking target system type... sparc-sun-solaris2.5.1
checking build system type... sparc-sun-solaris2.5.1
checking for gcc... (cached) /opt/FSUNf90/bin/fcc
checking whether the C compiler (/opt/FSUNf90/bin/fcc  ) works... yes

  • コンパイラが正しく稼動している事を確認する.
    • C Compiler 〜 works...yesと表示されればよい.
    • コンパイラが見つからない時,あるいはコンパイラのライセンスエラーが派生したときには,ここでエラーになる.

Cコンパイラが稼動しなかった例
checking whether the C compiler (fcc  ) works... no
configure: error: installation or configuration problem: C compiler cannot
 create executables.

  • オブジェクトファイルなどを消去する.

root@duo: make clean
test -z "" || rm -f
test -z "" || rm -f
for subdir in include  libntp    libparse        authstuff       ntpdate
 ntpq    ntptrace        parseutil       xntpd   xntpdc  adjtimed        
clockstuff      kernel  util; do               \
  target=`echo clean-recursive | sed s/-recursive//`; \
  echo making $target in $subdir;       \
  (cd $subdir && make $target)  \
   || case "" in *k*) fail=yes;; *) exit 1;; esac; \
done && test -z "$fail"
making clean in include

  • コンパイルする.

root@duo: make

make all-recursive
for subdir in include  libntp    libparse        authstuff
ntpdate         ntpq    ntptrace        parseutil       xntpd
   xntpdc  adjtimed        clockstuff      kernel  util; 
do               \
  target=`echo all-recursive | sed s/-recursive//`; \
  echo making $target in $subdir;       \
  (cd $subdir && make $target)  \
   || case "" in *k*) fail=yes;; *) exit 1;; esac; \
done && test -z "$fail"
making all in include
making all in libntp
/opt/FSUNf90/bin/fcc -c -DHAVE_CONFIG_H -I. -I. -I.. -I../incl
ude  -g -O2 -Wall adjtime.c
fcc: 警告: -W オプションの引数が誤っています。

  • fccを使うと,コンパイラオプションのエラーが表示されるが,これは無視して良い.
  • ファイルのインストールを行なう.

root@duo: make install
for subdir in include  libntp    libparse        authstuff
       ntpdate         ntpq    ntptrace        parseutil  
     xntpd   xntpdc  adjtimed        clockstuff      kernel
  util; do               \
  target=`echo install-recursive | sed s/-recursive//`; \
  echo making $target in $subdir;       \
  (cd $subdir && make $target)  \
   || case "" in *k*) fail=yes;; *) exit 1;; esac; \
done && test -z "$fail"
making install in include

  • /export/home/binにファイルがインストールされていることを確認する.

root@duo: pwd
/export/home/bin/xntp3-5.87

root@duo: cd ..
root@duo: ls -lat
合計 38784
drwxr-xr-x   4 root     root        2048 10月 10日  23:10 .
-rwxr-xr-x   1 root     other      59296 10月 10日  23:10 tickadj
-rwxr-xr-x   1 root     other     829068 10月 10日  23:10 xntpdc
-rwxr-xr-x   1 root     other    2551144 10月 10日  23:10 xntpd
-rwxr-xr-x   1 root     other     425548 10月 10日  23:10 ntptrace
-rwxr-xr-x   1 root     other     828008 10月 10日  23:10 ntpq
-rwxr-xr-x   1 root     other     605896 10月 10日  23:10 ntpdate
drwxr-xr-x  20 427      1024        1536 10月 10日  23:04 xntp3-5.87
drwxr-xr-x  14 root     root         512 10月 10日  23:01 ..
-rw-r--r--   1 root     other    11942400 10月 10日  21:08 xntp3-5.87.tar

root@duo:


参考文献



広告スペース
Google