忍者ブログ

◆当blogは、Linuxサーバ構築する際の実際の設定手順を個人的メモとして記載しております。LinuC試験の役に立つ情報があるかも…?

LinuC(Linux技術者認定資格)&リナックスサーバ構築設定事例

   

【プロキシサーバ】の設定メモ

[root]# vi /etc/squid/squid.conf←Squidの設定ファイル
■以下のように編集↓■
  http_port 8080←ポート番号指定
 acl our_networks src 192.168.1.0/24←アクセスリスト設定
 acl working_time time 00:00-23:59←アクセスリスト設定
 http_access deny !working_time←拒否条件
 http_access allow our_networks
←許可条件

[root]# /etc/rc.d/init.d/squid restart←設定反映の為、再起動
squidを停止中:                                             [失敗]
init_cache_dir /var/spool/squid... squidを起動中: ..       [  OK  ]

[root]# tail /var/log/messages
Nov 12 17:16:20 reverie last message repeated 15 times
Nov 12 17:16:20 reverie cups: cupsd startup succeeded
Nov 12 17:16:20 reverie xfs: xfs startup succeeded
Nov 12 17:16:21 reverie anacron: anacron startup succeeded
Nov 12 17:16:21 reverie atd: atd startup succeeded
Nov 12 17:16:21 reverie xfs: ignoring font path element /usr/X11R6/lib/X11/fonts/cyrillic (unreadable)
Nov 12 17:16:25 reverie kernel: mice: PS/2 mouse device common for all mice
Nov 12 17:16:52 reverie sshd(pam_unix)[1316]: session opened for user reverie by (uid=500)
Nov 12 17:16:55 reverie 11月 12 17:16:55 su(pam_unix)[1346]: session opened for user root by reverie(uid=500)
Nov 12 17:40:15 reverie squid[1425]: Squid Parent: child process 1427 started
←Squid起動を確認

[root]# ls -al /var/log/squid←Squidのログがあることを確認
合計 12
drwxr-x---    2 squid    squid        4096 11月 12 17:40 .
drwxr-xr-x    8 root     root         4096 11月 12 17:16 ..
-rw-r--r--    1 squid    squid           0 11月 12 17:40 access.log
-rw-r--r--    1 squid    squid        1865 11月 12 17:40 cache.log
-rw-r--r--    1 squid    squid           0 11月 12 17:40 store.log

[root]# more /var/log/squid/cache.log←キャッシュログ確認
2010/11/12 17:40:15| Starting Squid Cache version 2.5.STABLE1 for i386-redhat-linux-gnu...
2010/11/12 17:40:15| Process ID 1427
2010/11/12 17:40:15| With 1024 file descriptors available
2010/11/12 17:40:15| DNS Socket created at 0.0.0.0, port 32770, FD 5
2010/11/12 17:40:15| Adding nameserver 192.168.0.99 from /etc/resolv.conf
2010/11/12 17:40:15| Unlinkd pipe opened on FD 10
2010/11/12 17:40:15| Swap maxSize 102400 KB, estimated 7876 objects
2010/11/12 17:40:15| Target number of buckets: 393
2010/11/12 17:40:15| Using 8192 Store buckets
2010/11/12 17:40:15| Max Mem  size: 8192 KB
2010/11/12 17:40:15| Max Swap size: 102400 KB
2010/11/12 17:40:15| Rebuilding storage in /var/spool/squid (DIRTY)
2010/11/12 17:40:15| Using Least Load store dir selection
2010/11/12 17:40:15| Set Current Directory to /var/spool/squid
2010/11/12 17:40:15| Loaded Icons.
2010/11/12 17:40:17| Accepting HTTP connections at 0.0.0.0, port 8080, FD 11.
2010/11/12 17:40:17| WCCP Disabled.
2010/11/12 17:40:17| Ready to serve requests.
2010/11/12 17:40:17| Done scanning /var/spool/squid swaplog (0 entries)
2010/11/12 17:40:17| Finished rebuilding storage from disk.
2010/11/12 17:40:17|         0 Entries scanned
2010/11/12 17:40:17|         0 Invalid entries.
2010/11/12 17:40:17|         0 With invalid flags.
2010/11/12 17:40:17|         0 Objects loaded.
2010/11/12 17:40:17|         0 Objects expired.
2010/11/12 17:40:17|         0 Objects cancelled.
2010/11/12 17:40:17|         0 Duplicate URLs purged.
2010/11/12 17:40:17|         0 Swapfile clashes avoided.
2010/11/12 17:40:17|   Took 2.0 seconds (   0.0 objects/sec).
2010/11/12 17:40:17| Beginning Validation Procedure
2010/11/12 17:40:17|   Completed Validation Procedure
2010/11/12 17:40:17|   Validated 0 Entries
2010/11/12 17:40:17|   store_swap_size = 0k
2010/11/12 17:40:19| storeLateRelease: released 0 objects

←Windows上でプロキシサーバを設定してWWWサーバへアクセスさせる

[root]# tail /var/log/httpd/access_log←ログ確認
192.168.0.50 - - [12/Nov/2010:17:53:02 +0900] "GET / HTTP/1.1" 304 0 "-" "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)"
192.168.0.50 - - [12/Nov/2010:17:53:05 +0900] "GET /index.html HTTP/1.1" 200 117 "-" "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)"

PR

COMMENT

Name
Title
Mail(非公開)
URL
Color
Emoji Vodafone絵文字 i-mode絵文字 Ezweb絵文字
Comment
Pass   コメント編集に必要です
 管理人のみ閲覧

TRACKBACK

Trackback URL:

更新日付

03 2025/04 05
S M T W T F S
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30

RECOMMEND

プロフィール

HN:
Account
HP:
性別:
非公開
職業:
--- NODATA ---
趣味:
--- NODATA ---
自己紹介:
◆当blogは、Linuxサーバ構築する際の実際の設定手順を個人的メモとして記載しております。LinuC試験の役に立つ情報があるかも…?

リンク

<<【SAMBA】の設定メモ  | HOME |  【WWWサーバ】の設定メモ>>
Copyright ©  -- LinuC(Linux技術者認定資格)&リナックスサーバ構築設定事例 --  All Rights Reserved
Design by CriCri / Photo by Melonenmann / powered by NINJA TOOLS / 忍者ブログ / [PR]