Install AWStats- Free Logfile Analyzer for Site Statistics Cài đặt AWStats-Miễn phí Logfile Analyzer cho Site Statistics
Prerequisite Điều kiện tiên quyết
As AWStats is Perl based, a Perl Interpreter need to be installed first to take anvantage of AWStats. Như AWStats là Perl dựa, một phiên Perl cần phải được cài đặt trước để có anvantage của AWStats. For instruction on how to install Perl in Windows machine, check out Đối với chỉ dẫn về cách cài đặt Perl trong Windows máy, hãy kiểm tra this article bài viết này . .
Download AWStats Tải về AWStats
Download latest stable release of AWStats from Tải về bản phát hành ổn định mới nhất của AWStats từ http://www.awstats.org/ http://www.awstats.org/ . . Choose the setup package that ended with .exe extension. Chọn các gói cài đặt kết thúc với phần mở rộng. Exe.
Install AWStats Cài đặt AWStats
Launch the AWStats setup file by double clicking on the executable that just has been downloaded. Khởi chạy file cài đặt AWStats bằng cách nhấp đúp vào tập tin thực thi mà chỉ đã được tải về.

Click “Next” to continue. Click "Next" để tiếp tục.

Click “I Agree” to continue. Click "I Agree" để tiếp tục.

You may want to change the installation folder here. Bạn có thể muốn thay đổi thư mục cài đặt ở đây. Then click on “Install” to start the installation. Sau đó click vào nút "Cài đặt" để bắt đầu cài đặt.
Setup and Configuration for Apache Web Server Cài đặt và Cấu hình cho Apache Web Server
AWStats installer will automatically launches the awstats_configure.pl script to do several setup actions. AWStats cài đặt sẽ tự động phát awstats_configure.pl kịch bản để làm một vài hành động thiết lập. If you're not using the Windows installer, you can find the script in the AWStats tools directory. Nếu bạn không sử dụng bộ cài đặt Windows, bạn có thể tìm thấy kịch bản trong thư mục công cụ AWStats. To execute it use (if location of perl.exe is within your path environment): Để thực hiện lệnh đó sử dụng (nếu vị trí của perl.exe là trong môi trường đường dẫn của bạn):
perl awstats_configure.pl perl awstats_configure.pl
This is what the script does/asks (you can do all these steps manually instead of running awstats_configure.pl (automatically launch by Windows installer) if you prefer): Đây là những gì các tập lệnh không / yêu cầu (bạn có thể làm tất cả những bước này bằng tay thay vì chạy awstats_configure.pl (tự động khởi động của Windows cài đặt) nếu bạn thích):
A) awstats_configure.pl tries to determine your current log format from your Apache web server configuration file httpd.conf (it asks for the path if not found). Một awstats_configure.pl) cố gắng để xác định dạng đăng nhập hiện tại của bạn từ máy chủ web Apache httpd.conf file cấu hình của bạn (nó yêu cầu đường dẫn nếu không tìm thấy). If you use a common log, awstats_configure.pl will suggest changing it to the NCSA combined/XLF/ELF format (you can use your own custom log format but this predefined log format is often the best choice and makes setup easier). Nếu bạn sử dụng đăng nhập chung, awstats_configure.pl sẽ đề xuất thay đổi nó vào NCSA kết hợp / xlf / ELF định dạng (bạn có thể sử dụng định dạng tùy chỉnh của riêng bạn đăng nhập, nhưng định dạng này đăng nhập được xác định trước thường là lựa chọn tốt nhất và làm cho thiết lập dễ dàng hơn).
If you answer yes, awstats_configure.pl will modify your httpd.conf, changing the following directive from: Nếu bạn trả lời có, awstats_configure.pl httpd.conf của bạn sẽ được sửa đổi, thay đổi các chỉ thị sau từ:
CustomLog /yourlogpath/yourlogfile common CustomLog / yourlogpath / yourlogfile chung
to tới
CustomLog /yourlogpath/yourlogfile combined CustomLog / yourlogpath / yourlogfile kết hợp
See the Apache manual for more information on this directive (possibly installed on your server as www.mysite.com/manual). Xem hướng dẫn sử dụng Apache để thêm thông tin về chỉ thị này (có thể cài đặt trên máy chủ của bạn như www.mysite.com / hướng dẫn sử dụng).
B) awstats_configure.pl will then add, if not already present, the following directives to your Apache configuration file (note that the “/usr/local/awstats/wwwroot” path might differ according to your distribution or OS: B) awstats_configure.pl sau đó sẽ bổ sung thêm, nếu không đã có, sau chỉ thị cho tập tin cấu hình Apache của bạn (lưu ý rằng "/ usr / local / Awstats / wwwroot" đường dẫn có thể khác theo phân phối hoặc hệ điều hành của bạn:
# #
# Directives to add to your Apache conf file to allow use of AWStats as a CGI. Chỉ thị # để thêm vào tập tin conf Apache của bạn để cho phép sử dụng như là một AWStats CGI.
# Note that path “/usr/local/awstats/” must reflect your AWStats Installation path. # Lưu ý rằng đường dẫn "/ usr / local / Awstats /" phải phản ánh đường dẫn cài đặt AWStats của bạn.
# #
Alias /awstatsclasses “/usr/local/awstats/wwwroot/classes/” Alias / awstatsclasses "/ usr / local / Awstats / wwwroot / lớp /"
Alias /awstatscss “/usr/local/awstats/wwwroot/css/” Alias / awstatscss "/ usr / local / Awstats / wwwroot / css /"
Alias /awstatsicons “/usr/local/awstats/wwwroot/icon/” Alias / awstatsicons "/ usr / local / Awstats / wwwroot / biểu tượng /"
ScriptAlias /awstats/ “/usr/local/awstats/wwwroot/cgi-bin/” ScriptAlias / Awstats / "/ usr / local / Awstats / wwwroot / cgi-bin /"# #
# This is to permit URL access to scripts/files in AWStats directory. # Điều này là để cho phép truy cập vào URL để script / AWStats ảnh trong thư mục.
# #Options None Tùy chọn None
AllowOverride None AllowOverride None
Order allow,deny Đặt hàng cho phép, từ chối
Allow from all Cho phép từ tất cảC) if changes were made as indicated in parts A and B, awstats_configure.pl restarts Apache to apply the changes. C), nếu thay đổi đã được thực hiện như được chỉ ra ở phần A và B, khởi động lại awstats_configure.pl Apache để áp dụng các thay đổi. To be sure the log format change is effective, go to your homepage. Để bảo đảm sự thay đổi định dạng đăng nhập có hiệu quả, hãy vào trang chủ của bạn. This is an example of the type of records you should see inserted in your new log file after Apache was restarted: Đây là một ví dụ về các loại hồ sơ, bạn nên xem lắp vào tập tin đăng nhập mới của bạn sau khi Apache được khởi động lại:
62.161.78.75 – - [dd/mmm/yyyy:hh:mm:ss +0000] “GET / HTTP/1.1″ 200 1234 “http://www.from.com/from.html” “Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)” 62.161.78.75 - - [dd / mmm / yyyy: hh: mm: ss 0.000] "GET / HTTP/1.1" 200 1234 "http://www.from.com/from.html" "Mozilla/4.0 (compatible ; MSIE 5,01; Windows NT 5,0) "
D) awstats_configure.pl will ask you for a name for the configuration profile file. D) awstats_configure.pl sẽ yêu cầu bạn cho một tên cho file cấu hình cấu hình. Enter an appropriate name such as that of your web server or the virtual domain to be analyzed, ie mysite. Nhập tên thích hợp như rằng các máy chủ web của bạn hoặc tên miền ảo để được phân tích, tức là mysite.
awstats_configure.pl will create a new file called awstats.mysite.conf by copying the template file awstats.model.conf. awstats_configure.pl sẽ tạo một tập tin mới gọi là awstats.mysite.conf bằng cách sao chép tập tin mẫu awstats.model.conf. The new file location is: Các vị trí tập tin mới là:
- For Linux/BSD/Unix users: /etc/awstats. - Đối với Linux / BSD / Unix người dùng: / etc / Awstats.
- For Mac OS X, Windows and other operating systems: the same directory as awstats.pl (cgi-bin). - Đối với Mac OS X, Windows và hệ điều hành khác: cùng thư mục với awstats.pl (cgi-bin).E) awstats_configure.pl ends. E) awstats_configure.pl kết thúc.
Check through the httpd.conf is configured properly according to steps above. Kiểm tra thông qua httpd.conf được cấu hình đúng theo các bước ở trên. It has been reported that sometime the CustomLog is not changed from common to combined. Nó đã được thông báo rằng đôi khi CustomLog không được thay đổi từ thông thường để kết hợp.
Additional Configuration at Main Parameters of awstats. mysite .conf Cấu hình bổ sung tại các tham số chính của Awstats mysite.. Conf
A) Change Apache log file directory by: A) Thay đổi Apache đăng nhập tập tin thư mục bằng cách:
Find : LogFile=”/var/log/apache/access.log” Tìm: logfile = "/ var / log / apache / access.log"
Replace with : LogFile=”C:/Program Files/Apache Group/Apache2/logs/access_log” Thay bằng: logfile = "C: / Program Files / Apache Group/Apache2/logs/access_log"
(Important: The setting is for default Apache installation path. If you change your Apache path, please input accordingly. Note that the directory seperator is /) (Quan trọng: thiết lập là mặc định cho đường dẫn cài đặt Apache. Nếu bạn thay đổi đường dẫn Apache của bạn, hãy nhập vào cho phù hợp. Lưu ý rằng Seperator thư mục là /)
B) Change log file type (Optional, typically no need to change) B) Thay đổi kiểu tập tin đăng nhập (tùy chọn, thông thường không cần thay đổi)
Find : LogType=W Tìm: LogType = W
Replace the value with “W” for analyzing web server log files, “S” for a streaming server log file, “M” for mail log files, “F” for ftp log files. Thay thế giá trị với "W" cho việc phân tích các tập tin nhật ký máy chủ web, "S" cho một tập tin nhật ký máy chủ streaming, "M" cho các tập tin đăng nhập mail, "F" cho các tập tin đăng nhập ftp.
C) Check if LogFormat has the value “1″ (it means “NCSA apache combined/ELF/XLF log format”) or use a personalized log format if you don't use combined log format. C) Kiểm tra nếu LogFormat có giá trị "1" (có nghĩa là "NCSA kết hợp apache / ELF / xlf log định dạng"), hoặc sử dụng một định dạng nhật ký cá nhân nếu bạn không sử dụng định dạng đăng nhập kết hợp.
D) Check if SiteDomain parameter with the main domain name or the intranet web server name used to reach the web site to analyze (Example: www.mydomain.com). D) Kiểm tra nếu SiteDomain tham số với tên miền chính hoặc các trang web mạng nội bộ máy chủ tên được sử dụng để tiếp cận các trang web để phân tích (Ví dụ: www.mydomain.com).
E) If you have several possible name for same site, add list in HostAlias parameter: E) Nếu bạn có một số tên có thể cho cùng một trang web, thêm vào danh sách HostAlias tham số:
Find : HostAliases=”localhost 127.0.0.1 REGEX[^.*\.myserver\.com$]” Tìm: HostAliases = "localhost 127.0.0.1 Regex [^ .* \ myserver \. Com $.]"
Replace with : HostAliases=”yoursite.com localhost 127.0.0.1″ Thay bằng: HostAliases = "yoursite.com 127.0.0.1 localhost"
(You can include alias names from dynamic DNS accounts such as www.mysite.serveftp.net and etc.) (Bạn có thể bao gồm tên bí danh DNS động từ các tài khoản như www.mysite.serveftp.net và vv)
F) AWStats statistics can be updated from a browser, to provide real-time statistics, by clicking the “Update now” link that appears when AWStats is used as a CGI. F) thống kê AWStats có thể được cập nhật từ trình duyệt, để cung cấp các số liệu thống kê thời gian thực, bằng cách nhấn vào "Update now" liên kết xuất hiện khi AWStats được sử dụng như một CGI. To enable it: Để kích hoạt nó:
Find : AllowToUpdateStatsFromBrowser=0 Tìm: AllowToUpdateStatsFromBrowser = 0
Replace with : AllowToUpdateStatsFromBrowser=1 Thay bằng: AllowToUpdateStatsFromBrowser = 1
G) Edit 'awstats.pl' located in “C:\Program Files\AWStats\wwwroot\cgi-bin\” and change the path on the first line to point to exact location of perl.exe in your system, ie #!C:\perl\bin\perl.exe. G) Hiệu chỉnh 'awstats.pl' nằm ở "C: \ Program Files \ AWStats \ wwwroot \ cgi-bin \" và thay đổi các đường dẫn trên dòng đầu tiên để trỏ đến vị trí chính xác của perl.exe trong hệ thống của bạn, ví dụ: #! C: \ perl \ bin \ perl.exe.
To Maintain Just Single CGI Directory – Optional Để Duy trì Chỉ cần đơn CGI Directory - Optional
New version of AWStats creates alias directory entries at the bottom of Apache httpd.conf file. Phiên bản mới của AWStats tạo bí danh mục thư mục ở cuối tập tin httpd.conf Apache. If you want to have just one CGI executable directory, you have to move the AWStats scripts to existing CGI directory. Nếu bạn muốn có chỉ một thư mục CGI thực thi, bạn phải di chuyển các script CGI AWStats vào thư mục hiện có.
The following assume installation in default path. Sau đây giả định cài đặt trong đường dẫn mặc định.
- Copy ALL files and sub-folders contained within “C:\Program Files\AWStats\wwwroot\cgi-bin\” and paste into your Apache2 web server's cgi-bin at “C:\Program Files\Apache Group\Apache2\cgi-bin\” TẤT CẢ chép các tập tin và thư mục con chứa trong "C: \ Program Files \ AWStats \ wwwroot \ cgi-bin \" và dán vào cgi Apache2 web server của bạn-bin tại "C: \ Program Files \ Apache Group \ Apache2 \ cgi - bin \ "
- Copy ALL files and sub-folders contained within “C:\Program Files\AWStats\wwwroot\icon\” and paste into our Apache2 web server's icons folder at “C:\Program Files\Apache Group\Apache2\icons\” TẤT CẢ chép các tập tin và thư mục con chứa trong "C: \ Program Files \ AWStats \ wwwroot \ biểu tượng \" và dán vào các biểu tượng Apache2 máy chủ web của chúng tôi tại thư mục "C: \ Program Files \ Apache Group \ Apache2 \ biểu tượng \"
Edit again the awstats. mysite .conf file, the change the following: Chỉnh sửa lại các Awstats mysite.. Tập tin conf, các thay đổi sau đây:
Find : DirIcons=”/icon” Tìm: DirIcons = "/ biểu tượng"
Replace with : DirIcons=”/icons” Thay bằng: DirIcons = "/ biểu tượng"
Delete from Apache web server's httpd.conf the alias directory that has been inserted by AWStats setup program. Xóa từ httpd.conf Apache web của máy chủ thư mục bí danh mà đã được chèn vào bởi chương trình cài đặt AWStats.
Optional Setup Section Thiết lập tùy chọn mục
Find : DefaultFile=”index.html” Tìm: DefaultFile = "index.html"
Replace with your default index page, only if necessary, ie DefaultFile=”index.php” or DefaultFile=”index.php index.html” Thay thế với trang chỉ mục mặc định của bạn, chỉ khi cần thiết, tức là DefaultFile = "index.php" hoặc index.php DefaultFile = "index.html"
Find : SkipHosts=”" Tìm: SkipHosts = ""
Replace with : SkipHosts=”127.0.0.1 REGEX[^192\.168\.] REGEX[^10\.0\.]” Thay bằng: SkipHosts = "127.0.0.1 Regex [^ 192 \ .168 \] Regex. [^ 10 \ .0 \.]"
This is to not include statistics from your own local machines, they will remain in the actual log files but excluded from awstats counts. Điều này là không bao gồm các số liệu thống kê từ các máy riêng của địa phương của bạn, họ sẽ ở lại trong tập tin ghi trên thực tế, nhưng bị loại trừ khỏi đếm Awstats. To get actual hits and figures it's sometime necessary, but is not essential at this stage. Để có được số truy cập thực tế và con số đó đôi khi cần thiết, nhưng không cần thiết ở giai đoạn này.
Build/Update Statistics Xây dựng / Cập nhật Thống kê
There are two possible way to analyze, update and generate the AWStats statistics, command line and browser based. Có hai cách để có thể phân tích, cập nhật và tạo ra các số liệu thống kê AWStats, dòng lệnh và trình duyệt dựa.
Command Line Option Command Line Option
Go to the command line, and change directory to your AWStats cgi-bin directory, ie C:\Program Files\AWStats\wwwroot\cgi-bin. Vào dòng lệnh, và thư mục để thay đổi của bạn AWStats cgi-bin thư mục, tức là C: \ Program Files \ AWStats \ wwwroot \ cgi-bin.
The AWStats update command line is (replace with your domain): Bản cập nhật AWStats dòng lệnh là (thay thế với tên miền của bạn):
perl awstats.pl -config=www.yourdomain.com -update perl awstats.pl-config = www.yourdomain.com-cập nhật
AWStats database files are saved in directory defined by DirData parameter in config file, which we left as default (current directory). AWStats tập tin cơ sở dữ liệu được lưu trong thư mục được xác định bởi DirData tham số trong cấu hình tập tin, mà chúng tôi còn là mặc định (hiện tại thư mục). Update might take a while, if the log file is big. Cập nhật có thể mất một lúc, nếu log file là lớn. When update is finished, you should get on screen a result like this: Khi cập nhật xong, bạn sẽ nhận được trên màn hình là một kết quả như thế này:
Update for config “/etc/awstats/awstats.myvirtualhostname.conf” Cập nhật cho config "/ etc / Awstats / awstats.myvirtualhostname.conf"
With data in log file “/pathtoyourlog/yourlog.log”… Với dữ liệu trong log file "/ pathtoyourlog / yourlog.log" ...
Phase 1 : First bypass old records, searching new record… Giai đoạn 1: Trước tiên bỏ qua các hồ sơ cũ, tìm kiếm hồ sơ ...
Searching new records from beginning of log file… Tìm kiếm hồ sơ mới từ đầu của tập tin đăng nhập ...
Phase 2 : Now process new records (Flush history on disk after 20000 hosts)… Giai đoạn 2: Bây giờ quá trình quản lý (Xóa lịch sử trên đĩa sau khi 20.000 máy) ...
Jumped lines in file: 0 Nhảy dòng trong tập tin: 0
Parsed lines in file: 225730 Phân tách dòng trong tập tin: 225.730
Found 122 dropped records, Hàng giảm xuống 122 hồ sơ,
Found 87 corrupted records, Tìm thấy 87 hồ sơ bị hỏng,
Found 0 old records, Hàng 0 hồ sơ cũ,
Found 225521 new qualifed records. Hàng 225.521 hồ sơ mới qualifed.
Browser Option Lựa chọn trình duyệt
AWStats statistics can be updated from a browser, to provide real-time statistics, by clicking the “Update now” link that appears when AWStats is used as a CGI (only applicable if AllowToUpdateStatsFromBrowser is set to 1 in AWStats config file ). AWStats thống kê có thể được cập nhật từ trình duyệt, để cung cấp các số liệu thống kê thời gian thực, bằng cách nhấn vào "Update now" liên kết xuất hiện khi AWStats được sử dụng như một CGI (chỉ áp dụng nếu AllowToUpdateStatsFromBrowser được cài là 1 trong AWStats config file).
Read Statistics Đọc Thống kê
Again, there is 2 methods where AWStats's statistics can be read, corresponding to the generation method of the stats mentioned above. Một lần nữa, có 2 phương pháp thống kê của AWStats nơi có thể được đọc, tương ứng với thế hệ của các phương pháp thống kê nói trên.
Command Line Option Command Line Option
At the same directory, after the first update command is finished, run the following command: Tại thư mục đó, sau khi lệnh đầu tiên cập nhật xong, chạy lệnh sau đây:
perl awstats.pl -config=myvirtualhostname -output -staticlinks > awstats.myvirtualhostname.html perl awstats.pl-config = myvirtualhostname-ra-staticlinks> awstats.myvirtualhostname.html
The process may take a while, after it's finished, a html will be generated where you can view it with a browser by double clicking on it. Quá trình có thể mất một lúc, sau khi nó kết thúc, một html sẽ được tạo ra nơi bạn có thể xem nó với một trình duyệt bằng cách nhấp đúp vào nó.
Browser Option Lựa chọn trình duyệt
Access the following directory (replace with your own domain): Truy cập vào thư mục sau đây (thay thế với tên miền riêng của bạn):
http://www.myserver.mydomain/awstats/awstats.pl?config=myvirtualhostname http://www.myserver.mydomain/awstats/awstats.pl?config=myvirtualhostname
IMPORTANT : The page is machine translated and provided "as is" without warranty. Quan trọng: Sửa là máy dịch và cung cấp "như là" không có bảo hành. Machine translation may be difficult to understand. Máy dịch thuật có thể khó hiểu. Please refer to Vui lòng tham khảo original English article bản gốc tiếng Anh bài viết whenever possible. bất cứ khi nào có thể.
Related Articles Bài viết liên quan
- Site Statistics Tracker Performancing Metrics Reviews Site Statistics Tracker Performancing Metrics Đánh giá
- WordPress Plugin: Display Google Analytics and FeedBurner Reports Statistics from Site Admin WordPress Plugin: Hiển thị Google Analytics và FeedBurner Báo cáo thống kê từ trang web Admin
- Install, Setup and Configure CGI and Perl in Windows XP Cài đặt, cài đặt và cấu hình CGI và Perl trong Windows XP
- Install Web Server in Windows XP with Apache2, PHP5 and MySQL4 – Part 2 Cài đặt Web Server trong Windows XP với Apache2, PHP5 và MySQL4 - Phần 2
- Google AdSense and AdWords Statistics Not Updating and Delay Again Google AdSense và AdWords Thống kê không cập nhật và Delay Again
- Download Free Disk Analyzer to Monitor and Clean Up Hard Disk Space Usage Download Miễn phí Disk Analyzer để giám sát và Clean Up Hard Disk Space Usage
- AdSense Reports and Statistics Not Real-Time Báo cáo AdSense và Thống kê Không phải Real-Time
- Install Web Server in Windows XP with Apache2, PHP5 and MySQL4 – Part 3 Cài đặt Web Server trong Windows XP với Apache2, PHP5 và MySQL4 - Phần 3
- Redirect Blogger RSS Feed to FeedBurner for Detailed Statistics and Monetize Ads Chuyển đến Blogger RSS FeedBurner cho chi tiết Thống kê và kiếm tiền từ quảng cáo
- Compare Website Traffic and Website Statistics Easily Alexaholic So sánh Website giao thông và Website Thống kê Dễ dàng Alexaholic









































