いつからか気が付けば
まだ私知らない私見つけ出してみたい
平成15年9月4日ずぼら人間に朗報。 コマンド名を忘れてしまったり、正確なつづりが分からなくなったときは、aproposコマンドを使う。このコマンドは、キーワードやコマンド名の一部からコマンド名を調べることができる。例
$ apropos ^pass
平成14年11月14日
> 自宅で cgi の動作確認だけであれば Windows のみで可能ですよ。
> 以下 URL を参照してみて下さい。
>
> http://www2j.biglobe.ne.jp/~apollo/server/server.html
平成14年11月11日
> apacheのインストール手順。
例:
su -
cd ~←ホームディレクトリに移動
wget http://www.apache.org/xxx/apache-1.3.26.tar.gz
cd /usr/local/src
tar zxvf ~/apache-1.3.26.tar.gz
cd apache-1.3.26
./configure
make
make install
平成14年11月10日
サーバサイド言語をJavaにする
http://plaza20.mbn.or.jp/~kobapy/linux/linux-install-02.html
平成14年10月27日
------------------------------------------------------------------------
<Apacheの設定方法>
1)ドキュメントルート(コンテンツ公開場所)
"/"(ルートディレクトリ)に"/public_html"と言うディレクトリを作成
"/public_html"ディレクトリはあらかじめたとえば40GBぐらいのパーティションを割り当てて
何でもデータ用のディレクトリにしておくとよい。
この下に/pub_html/arimotoと言うディレクトリを作成して、このディレクトリをsambaで見えるようにしておくと、Lan上のほかのマシンからコンテンツを投げられる。
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
[root@svr pub_html]# cd /public_html/arimoto <enter> ←ディレクトリ移動
[root@svr arimoto]# mkdir www <enter> ←ドキュメントルート作成
[root@svr arimoto]# ls -l <enter>
drwxr-xr-x 2 root root
4096 Oct 24
[root@svr arimoto]# cd www <enter> ←作成したディレクトリに移動
[root@svr www]# mkdir html <enter> ←さらにディレクトリを作成
[root@svr www]# ls -l <enter>
drwxr-xr-x 2 root root
4096 Oct 24
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2)設定ファイルの書き換え
ドキュメントルートは、"/public_html/arimoto/www/html"とする。apacheの設
定ファイルを以下のように書き換える。
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
[root@svr www]# vi
/etc/httpd/conf/httpd.conf <enter>
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
<httpd.conf>
# DocumentRoot: The directory out of which you will serve
your # documents. By default, all requests are taken from this directory, but #
symbolic links and aliases may be used to point to other locations. #
DocumentRoot "/var/www/html"
ここを#をはずし
DocumentRoot "/public_html/arimoto/www/html"
とかきなおす。
少し下の行、
# This should be changed to whatever you set DocumentRoot
to.
#
<Directory "/var/www/html">
を自分のドキュメントルートに書き変える。
<Directory
"/public_html/arimoto/www/html">
---------
<Directory "/public_html/arimoto/www/html">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
---
Options FollowSymLinks
AllowOverride None
</Directory>
設定はすべてコメントアウトします。
#<Directory >
#
Options FollowSymLinks
#
AllowOverride None
#</Directory>
そして自分のドキュメントルートを以下のように書き換える。
<Directory
"/public_html/arimoto/www/html">
Options FollowSymLinks ←Indexesは削除。
AllowOverride None ←.htaccesは使用しない。
Order allow,deny ←指示子"Allow"をチェックしたあとで、"Deny"をチェックするという順番指定。
Allow from all ←世界中から接続を許可。
</Directory>
Indexesは、index.html等のデフォルトファイルが無いディレクトリのリストを
表示するオプションです。ファイル構成を見られたく無いのでこれを削除する。
設定ファイルを編集したら、保存して終了します。
apacheを起動させます。すでに起動している場合は、"restart"とする。
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
[root@svr www]# /etc/rc.d/init.d/httpd start
<enter>
Starting httpd:
[ OK ]
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
apacheのデフォルトindex.htmlをコピーして無事表示できるか確認する。
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
[root@svr www]# cp /var/www/html/index.html /public_html/arimoto/www/html
<enter>
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
コピーしたらブラウザでアクセスしてみます。
http://localhost:80/
apacheのテストページが表示されれば、OK。
3)アクセス権(パーミッション)の変更
sambaで公開しているので、コンテンツファイルをドキュメントルートにコピーすると”書き込めません”
と怒られます。
arimotoがドキュメントルートを更新できるようにします。
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
[root@svr www]#
chown arimoto /public_html/arimoto/www/html
<enter>
[root@svr www]# ls -l <enter>
drwxr-xr-x 2 arimoto root
4096 Oct 24
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
これでsambaでドキュメントルートにアクセスして、
"html"ディレクトリ以下好きなようにコンテンツが置ける。
平成14年9月16日
http://linux.ascii24.com/linux/
日刊アスキーLiux
平成14年9月8日
開いてるポートをスキャンするソフト
nmap
にいきそこからダウンロードする。
redhat linux の場合(ver7.2で実施)
download をクリック
>su
password 入力して
> rpm -vhU http://download.insecure.org/nmap/dist/nmap-frontend-3.00-1.i386.rpm
> rpm -vhU http://download.insecure.org/nmap/dist/nmap-3.00-1.i386.rpm
この順序にやらないとだめみたいです。
つぎにwindows version もとってみる。
をとってきて実行するだけ、インストーラも実行するだけ。
次にしだれのメールマガジンを引用する
こちらはredhat linux 7.3
で バージョンアップするやり方が説明されていた。
今あるもの(古いバージョン)を確認するには
$ rpm -qa|grep 'nmap'
nmap-frontend-2.54BETA31-1
nmap-2.54BETA31-1
とし
を見ると新しいバージョンがリリースされているので、最初にバージョンアッ
プを実行します。
RPMパッケージも用意されていますが、今回はソースRPMを入手してリビルドし
ます。入手するファイルは
nmap-3.00-1.src.rpm
です。
# rpm --rebuild nmap-3.00-1.src.rpm
を実行します。リビルドを実行すると、
/usr/src/redhat/RPMS/i386/
の中に
nmap-3.00-1.i386.rpm
nmap-frontend-3.00-1.i386.rpm
の2つのファイルができあがります。バージョンアップを実行します。
# cd
/usr/src/redhat/RPMS/i386/
# rpm -Fvh nmap-3.00-1.i386.rpm
nmap-frontend-3.00-1.i386.rpm
Preparing...
########################## [100%]
1:nmap
########################## [ 50%]
2:nmap-frontend
########################## [100%]
NmapはCUIとGUIの両方に対応していますが、GUIを利用した方が危険そうなポ
ートを『赤』で表現してくれるのでわかりやすいかもしれません。
# xnmap &
または、
# nmapfe &
を実行します。(xnmapとnmapfeは同じものです。)まずは、
Host(s):127.0.0.1
の設定のまま、他の設定も変更せずに
Scan
ボタンを押します。
Starting nmap V. 3.00 (
www.insecure.org/nmap/ )
Interesting ports on
localhost.localdomain (127.0.0.1):
(The 1594 ports scanned but
not shown below are in state: closed)
Port State Service
22/tcp open
ssh →赤色
25/tcp open
smtp →青色
111/tcp open
sunrpc
5680/tcp open
canna
6000/tcp open X11
22273/tcp open wnn6
32771/tcp open
sometimes-rpc5
Nmap run completed -- 1 IP
address (1 host up) scanned in 3 seconds
2.0-1 2.0-2 2.0-3 2.0-4 2.0-5 2.0-6 2.0-7 2.0-8 2.0-9 2.0-10
2.0-11 2.0-12 2.0-13 2.0-14 2.0-15 2.0-16 2.0-17 2.0-18 2.0-19 2.0-20
2.0-21 2.0-22 2.0-23 2.0-24 2.0-25 2.0-26 2.0-27 2.0-28 2.0-29 2.0-30
2.0-31 2.0-32 2.0-33 2.0-34
2.0-35 2.0-36 2.0-40 2.0-50 2.0-51 2.0-52
月だけが見ていた