linux°²×°awstats¶ÔapacheÈÕÖ¾½øÐмà²â
Ê×ÏÈÏÂÔØÁ½¸öÎļþ£º
wget http://cronolog.org/download/cronolog-1.6.2.tar.gz
wget http://prdownloads.sourceforge.net/awstats/awstats-6.7.tar.gz
cronologÊÇÓÃÀ´¸Ä±äÈÕÖ¾µÄ¸ñʽÒÔÊʺÏawstatsµÄ·ÖÎö
cronologºÜºÃ×°£¬ÏÂÔغó½â°ü£¬ÃüÁîÐа²×°
./configure
make
make install
½ÓÏÂÀ´ÐÞ¸ÄapacheÅäÖÃÎļþhttpd.conf
°ÑÕâÐÐ
CustomLog logs/access_log common
Ð޸ijÉ
CustomLog "|/usr/local/sbin/cronolog /usr/local/apache2/logs/access-%Y%m%d_log" combined
CronologÕâ¸ö½Å±¾ÔÚcronolog×°ÍêÒÔºó¾Í»á²úÉú¡£
¶Ôawstats½â°ü£¬²¢ÃüÁîÐÐÖ´ÐУº
cp -r awstats-6.7/ /usr/local/awstats
cd /usr/local/awstats
perl tools/awstats_configure.pl
ÔÚYour web site, virtual server or profile name:Àï
ÊäÈëÄúµÄIP£¨ÓòÃû£©£¬ÆäËû»ù±¾¶¼Äܹ»»Ø³µºÍy
ÐÞ¸ÄawstatsµÄÅäÖÃÎĵµ
vi /etc/awstats/awstats.192.168.0.104.conf
LogFile="/usr/local/apache2/logs/access-%YYYY-0%MM-0%DD-0_log"
DirData="/usr/local/apache2/htdocs/awstats/test/dirdata"(±£´æÊý¾Ý)
cp -R /usr/local/awstats/wwwroot/css/ /usr/local/apache2/htdocs/test/
cp -R /usr/local/awstats/wwwroot/icon/ /usr/local/apache2/htdocs/test/
Ö÷ÒªÓÃÓÚÏÔʾͼƬ
cd /usr/local/apache2/htdocs
mkdir -p awstats/test/dirdata
perl /usr/local/awstats/wwwroot/cgi-bin/awstats.pl -update -config=192.168.0.104
perl /usr/local/awstats/wwwroot/cgi-bin/awstats.pl -config=192.168.0.104 -output -staticlinks > /usr/local/apache2/htdocs/test/index.html
ÕâÁ½¸öÃüÁîдÈëcrontab ÖÐ
30 * * * * /usr/bin/perl /usr/local/awstats/wwwroot/cgi-bin/awstats.pl -update -config=192.168.0.104
30 * * * * /usr/bin/perl /usr/local/awstats/wwwroot/cgi-bin/awstats.pl -config=192.168.0.104 -output -staticlinks > /usr/local/apache2/htdocs/test/index.html
Á½¸öÃüÁîÊÇÓÃÀ´Éú³Éindex.htmlÎĵµ
ÅäÖÃtestµÄ·ÃÎÊȨÏÞ
# SSLRequireSSL
Options None
AllowOverride None
Order allow,deny
Allow from all
# Order deny,allow
# Deny from all
# Allow from 127.0.0.1
AuthName "Awstats Access"
AuthType Basic
AuthUserFile /usr/local/apache2/htdocs/test/htpasswd.users
Require valid-user
/usr/local/apache2/bin/htpassw
Ïà¹ØÎĵµ£º
20.1 LinuxÄÚºËÒÆÖ²Òªµã
LinuxµÄ´úÂëÍêÈ«¿ª·ÅÒÔ¼°ÆäÁ¼ºÃµÄ½á¹¹Éè¼Æ·Ç³£ÊÊÓÚǶÈëʽϵͳ¡£ÒÆÖ²Linuxϵͳ°üÀ¨Äںˡ¢³ÌÐò¿âºÍÓ¦ÓóÌÐò£¬ÆäÖÐ×îÖ÷ÒªµÄ¾ÍÊÇÄÚºËÒÆÖ²¡£ÓÉÓÚLinuxÄں˵Ŀª·ÅÐÔ£¬³öÏÖÁËÐí¶àÕë¶ÔǶÈëʽӲ¼þϵͳµÄÄں˰汾£¬ÆäÖÐÖøÃûµÄ°üÀ¨μcLinux¡¢RT-LinuxµÈ¡£
Linux±¾Éí¶ÔÄÚ´æ¹ÜÀí£¨MMU£©ÓкܺõÄÖ§³Ö¡£Ò ......
Ç° ÑÔ
“Linux£¿Ëü±ÈWindows¸üºÃÂð£¿ÎÒÄÜÓÃËü´òħÊÞÂ𣿔
“¿È£¡±ðÌáÁË£¬Ëü²Ù×÷ÆðÀ´ÌرðÂé·³£¬ÄãµÃ²»Í£µØÇû÷¼üÅÌ¡£Ã»×¼Ëü»¹»á³ÃÄã²»×¢ÒâµÄʱºòÔÚÄãµÄÊÖָͷÉÏÒ§Ò»¿ÚÄØ£¡”
»òÐíÄãÒ²ÓÐÀàËƵÄÏë·¨¡£µ«ÎÞÂÛÈËÃǶÔLinuxÓÐÔõÑùµÄÎó½â£¬ÖÁÉÙÎÒ²»ÔÙÏñǰЩÄêÄÇÑùƵ·±µØ»Ø´ð“Linux ......
µÚ1Õ Linux¸ÅÊö
ʲôÊÇLinux£¿ÔÚËùÓйØÓÚLinuxµÄÎÊÌâÖУ¬Ã»ÓбÈÕâ¸ö¸ü»ù±¾µÄÁË¡£¼òµ¥µØ˵£¬LinuxÊÇÒ»ÖÖ²Ù×÷ϵͳ£¬¿ÉÒÔ°²×°ÔÚ°üÀ¨·þÎñÆ÷¡¢¸öÈ˵çÄÔ¡¢ÄËÖÁPDA¡¢ÊÖ»ú¡¢´òÓ¡»úµÈ¸÷ÀàÉ豸ÖС£³¢ÊÔÒ»¸öеIJÙ×÷ϵͳÄÑÃâÈÃÈËÐij±ÅìÅÈ£¬Èç¹û¶ÁÕß֮ǰ»¹Ã»ÓнӴ¥¹ýLinuxµÄ»°£¬ÔÚÕýʽ¿ªÊ¼°²×°ºÍʹÓÃLinux֮ǰ£¬Ê×ÏÈÈÃ×Ô¼º·ÅËÉ£ ......
ÔÚLinuxϲúÉú²¢µ÷ÊÔcoreÎļþ
ÏÈ¿´¿´ÎÒÓõÄÊǸöʲô»úÆ÷£º
$ uname -a
Linux dev 2.4.21-9.30AXsmp #1 SMP Wed May 26 23:37:09 EDT 2004 i686 i686 i386 GNU/Linux
ÔÙ¿´¿´Ä¬ÈϵÄһЩ²ÎÊý£¬×¢Òâcore file sizeÊǸö0£¬³ÌÐò³ö´íʱ²»»á²úÉúcoreÎļþÁË¡£
$ ulimit -a
core file size (blocks, -c) 0
data seg size (kbyt ......
°üÀ¨ÎÒ×Ô¼ºÔÚÄÚ£¬ºÜ¶àÈ˶ÔÄںˣ¬½ø³Ì£¬Ïß³Ìͬ²½¶¼²»ÊǺÜÇå³þ£¬ÏÂÃæÉÔ΢×ܽáһϣº
ÄÚºËͬ²½£º
Ö÷ÒªÊÇ·ÀÖ¹¶àºË´¦ÀíÆ÷ͬʱ·ÃÎÊÐÞ¸Äij¶Î´úÂ룬»òÕßÔÚ¶ÔÉ豸Çý¶¯³ÌÐò½øÐÐÁÙ½çÇø±£»¤¡£Ö÷ÒªÓÐһϼ¸ÖÖ·½Ê½£º
1. Mutex£¨»¥³â£©
Í·Îļþ£º
#include <linux/mutex.h>
³õʼ»¯·½·¨£º
DEFINE_MUTEX(name);»òÕß ......