• 欢迎访问db1024网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏db1024吧

一款功能强大的免费开源网站统计程序:百夫长统计

主机教程 Liam 1年前 (2019-04-30) 497次浏览 20个评论 扫描二维码
文章目录[隐藏]

简介

百夫长统计(Centcount Analytics)是一款功能强大的免费开源网站统计程序。采用PHP+MySQL+Redis开发而成,可以方便地部署在自己的服务器上,100%独享数据。数据精准是该统计系统的最大特点,我们尽最大可能收集用户浏览轨迹,从而为网站管理者提供极为精确的统计数据,发掘潜在价值。

截图

一款功能强大的免费开源网站统计程序:百夫长统计
一款功能强大的免费开源网站统计程序:百夫长统计
一款功能强大的免费开源网站统计程序:百夫长统计
一款功能强大的免费开源网站统计程序:百夫长统计

功能

  • 性能:百夫长统计处理速度飞快!配置较低的VPS即可轻松处理每天100PV
  • 项目:开放源码、自我部署、数据安全和隐私,100%独享数据。
  • 报告:丰富的统计报告,百夫长统计提供多达37个固定的统计报告。
  • 热力图:提供一种全新的,直接的方式展示访问者在您的网页上的浏览行为!
  • 自定义报告:随心所欲的玩转数据。多维度、多条件、多指标,按分组和顺序查询并返回你想要的数据。

安装

系统要求:CentOS 7Debian 8 +Ubuntu 16.04 +,且为64位系统,内存建议2G以上。
环境要求:NginxPHP> = 7.0MySQL> = 5.7Redis> = 3.0

这里说下宝塔面板和军哥LNMP两种安装方法,并且写到一起了,请注意区分开来。新手建议使用宝塔,喜欢折腾的用军哥的LNMP一键包。

1、安装Web环境

#安装宝塔面板 #Centos系统 yum install -y wget && wget -O install.sh http://download.bt.cn/install/install.sh && sh install.sh #Ubuntu系统 wget -O install.sh http://download.bt.cn/install/install-ubuntu.sh && sudo bash install.sh #Debian系统 wget -O install.sh http://download.bt.cn/install/install-ubuntu.sh && bash install.sh  #LNMP一键包 wget -c http://soft.vpser.net/lnmp/lnmp1.5beta.tar.gz && tar zxf lnmp1.5beta.tar.gz && cd lnmp1.5 && ./install.sh lnmp 

宝塔面板安装成功后,登录面板,安装NginxPHPMySQL,然后再添加域名。如果是LNMP,安装成功后,使用lnmp vhost add添加域名,并且自动签发ssl证书。

2、安装Redis并配置PHP

#宝塔面板 找到左侧软件管理-PHP7.x-设置-安装拓展-安装Redis。然后在设置里找到禁用函数,删除popen函数。  #LNMP一键包 #安装Redis cd /root/lnmp1.5 && ./addons.sh install redis #编辑PHP配置文件 编辑/usr/local/php/etc/php.ini文件,大概在314行,找到disable_functions,删除后面的popen, 

3、编辑mysql配置文件

#宝塔面板 找到左侧软件管理-MySQL 5.x-设置-配置修改  #LNMP一键包 编辑/etc/my.cnf文件 

然后将以下参数添加到[client]区块和[mysqld]区块。

[client] default-character-set  = utf8  [mysqld] default-storage-engine = INNODB character-set-server   = utf8 collation-server       = utf8_general_ci sql-mode = "NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" 

添加后记得重启Mysql数据库。宝塔直接在面板里重启,LNMP使用lnmp mysql restart命令重启。

4、下载程序文件

#安装必要命令 #Debian/Ubuntu系统 apt-get -y install git unzip #CentOS系统 yum -y install git unzip  #进入网站根目录 cd /www/wwwroot/domain.com  #宝塔面板,将domain.com修改成你的域名 cd /home/wwwroot/domain.com  #LNMP一键包 #下载文件 git clone https://github.com/WMJonssen/Centcount-Analytics.git CA mv CA/.git . rm -rf CA git reset --hard 

5、解压IP地址库压缩包

cd /www/wwwroot/domain.com/ipdb  #宝塔面板,将domain.com替换成你的域名 cd /home/wwwroot/domain.com/ipdb  #LNMP一键包 unzip ipdb.zip 

百夫长统计打包了2个免费的IP地址库(IP2LocationGeoIP),并提供API来访问它。您可以直接将免费版更换为提供ISP信息的,更精准的商业版。而且您不必更改任何代码。

6、修改安全配置文件

#编辑网站根目录config/config_security.php文件 /************* 安全配置开始 *************/ //force ssl define('FORCE_SSL', true);//如果你没有SSL证书,请将此常量设置为"false"。 //check ssl define('IS_HTTPS', isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] === 1 || $_SERVER['HTTPS'] === 'on') ? true : false); //define security transfer protocol define('PROTOCOL', IS_HTTPS ? 'https://' : 'http://'); //define API transfer protocol define('CURL_PROTOCOL', 'https://');//如果你没有SSL证书,请将此常量设置为"http://"。 /************** 安全配置结束 **************/ 

建议使用ssl证书。

7、修改通用配置文件

#编辑网站根目录config/config_common.php文件 /*************** CA CONFIG START **************/ //encode factor define('ENCODE_FACTOR', 123456789);//重设你的私有加密因子,这非常重要。 //mysql local root name define('ROOT_USER_LOCAL', 'root');//设置你的mysql登录用户名(该用户必须有创建数据库权限) //mysql local root password define('ROOT_PASSWORD_LOCAL', 'password');//设置你的mysql登录密码 //administrator's timezone: PRC define('ADMIN_TIMEZONE', 'PRC');//设置管理员时区 //default timezone: PRC define('DEFAULT_TIME_ZONE', 'PRC');//设置默认时区 //error log host define('ERROR_LOG_HOST', 'www.yourdomainname.com');//设置错误日志主机(此处替换为你的域名) /**************** CA CONFIG END ***************/ 

8、修改邮件配置文件
使用邮件VPS服务器必须开通25端口,这个主机商默认不给,发工单就行了,且需要安装Postfix,不过LNMP一键包和宝塔都自带,所以不用安装。如果不想使用邮件功能的可以跳过该步骤。

#编辑网站根目录config/config_mail.php文件 /************* Config Mail Start ***********/ //administrator mail defined('ADMIN_MAIL') || define('ADMIN_MAIL', '[email protected]');//设置管理员接收通知邮箱(请将下面三个通知邮箱放入管理员邮箱白名单列表) //auto response mail defined('AUTORESPONSE_MAIL') || define('AUTORESPONSE_MAIL', '[email protected]');//设置自动回复邮件发送邮箱 //notification mail defined('NOTIFICATION_MAIL') || define('NOTIFICATION_MAIL', '[email protected]');//设置通知邮件发送邮箱 //fatal error mail defined('FATALERROR_MAIL') || define('FATALERROR_MAIL', '[email protected]');//设置错误信息邮件发送邮箱 /************** Config Mail End ************/ 

9、安装百夫长统计
以上完成后直接进入https:/domain.com/install.php进行安装。由于LNMP一键包安装Redis的时候,没安装命令行,导致检测会出现Redis: Missed这个无视就行。
一款功能强大的免费开源网站统计程序:百夫长统计

依次填入数据库用户名,密码,邮箱,登录密码。
一款功能强大的免费开源网站统计程序:百夫长统计

添加自己站点网站。
一款功能强大的免费开源网站统计程序:百夫长统计

获取统计代码。
一款功能强大的免费开源网站统计程序:百夫长统计
最后放到网站里就可以了。

官方网站:https://cn.centcount.com/


db1024 , 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:一款功能强大的免费开源网站统计程序:百夫长统计
喜欢 (1)
关于作者:
发表我的评论
取消评论
表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
(20)个小伙伴在吐槽
  1. This is my first time pay a visit at here and i am truly happy to read all at alone place.
    black mass2020-08-28 21:04 回复 Mac OS X | Safari浏览器 601.1.27
  2. Hi there to all, the contents present at this site are genuinely remarkable for people experience, well, keep up the good work fellows.
    cheap flights2020-08-27 15:05 回复 Linux | Firefox浏览器 59.0
  3. Hi there friends, its enormous piece of writing concerning cultureand fully explained, keep it up all the time. 3gqLYTc cheap flights
    cheap flights2020-08-27 07:46 回复 Linux | Firefox浏览器 60.0.2
  4. I have been surfing online more than 3 hours today, yet I never found any interesting article like yours. It's pretty worth enough for me. Personally, if all web owners and bloggers made good content as you did, the net will be a lot more useful than ever before. yynxznuh cheap flights
    cheap flights2020-08-26 11:07 回复 Mac OS X | Chrome 66.0.3359.181
  5. Oh my goodness! Incredible article dude! Thanks, However I am going through troubles with your RSS. I don't know the reason why I am unable to join it. Is there anyone else getting identical RSS problems? Anyone who knows the solution can you kindly respond? Thanx!!
    content hosting2020-08-14 19:52 回复 Mac OS X | Firefox浏览器 59.0
  6. I’m not that much of a internet reader to be honest but your blogs really nice, keep it up! I'll go ahead and bookmark your website to come back later. Cheers
    webhosting2020-08-14 18:31 回复 Linux | Firefox浏览器 52.9
  7. Very good website you have here but I was curious if you knew of any discussion boards that cover the same topics discussed here? I'd really like to be a part of online community where I can get responses from other experienced people that share the same interest. If you have any recommendations, please let me know. Thanks!
    best hosting2020-08-14 10:18 回复 Windows 7 | 360浏览器 SE
  8. Good respond in return of this matter with solid arguments and telling all concerning that.
    best web hosting company2020-08-11 13:50 回复 Linux | 未知浏览器
  9. I would like to thank you for the efforts you have put in writing this site. I am hoping to view the same high-grade content by you in the future as well. In truth, your creative writing abilities has inspired me to get my very own blog now ;)
    best web hosting company2020-08-10 17:36 回复 Mac OS X | Firefox浏览器 61.0
  10. Piece of writing writing is also a excitement, if you be acquainted with after that you can write otherwise it is difficult to write.
    website hosting2020-08-06 21:17 回复 Linux | Firefox浏览器 60.0
  11. Hello there, just became aware of your blog through Google, and found that it is truly informative. I'm gonna watch out for brussels. I will appreciate if you continue this in future. Many people will be benefited from your writing. Cheers!
    web hosting reviews2020-08-05 22:04 回复 Mac OS X | Chrome 66.0.3359.139
  12. Hi there, this weekend is good in support of me, because this occasion i am reading this impressive informative post here at my home.
    cheap flights australia2020-07-31 12:25 回复 Linux | 未知浏览器
  13. I am in fact glad to glance at this webpage posts which carries plenty of useful information, thanks for providing these statistics. adreamoftrains best hosting
    adreamoftrains webhosting2020-07-30 18:13 回复 Linux | Firefox浏览器 61.0
  14. Hey! I'm at work browsing your blog from my new iphone 4! Just wanted to say I love reading through your blog and look forward to all your posts! Keep up the fantastic work!
    flight ticket booking2020-07-27 21:52 回复 Linux | Chrome 68.0.3398.0
  15. Hi there, just became aware of your blog through Google, and found that it's really informative. I'm gonna watch out for brussels. I will appreciate if you continue this in future. Many people will be benefited from your writing. Cheers!
    web hosting companies2020-07-23 10:06 回复 Linux | Chrome 64.0.3282.167
  16. I'm impressed, I have to admit. Seldom do I come across a blog that's both educative and amusing, and let me tell you, you have hit the nail on the head. The issue is something which not enough men and women are speaking intelligently about. I am very happy that I found this in my search for something relating to this.
    best website hosting2020-07-22 08:41 回复 Windows 7 | Internet Explorer 9.0
  17. Hello! I know this is kind of off topic but I was wondering which blog platform are you using for this site? I'm getting tired of Wordpress because I've had problems with hackers and I'm looking at alternatives for another platform. I would be great if you could point me in the direction of a good platform.
    web hosting companies2020-07-16 16:53 回复 Windows 8.1 | Firefox浏览器 59.0
  18. What's up mates, how is all, and what you desire to say on the topic of this post, in my view its actually awesome in favor of me.
    cbd oil that works 20202020-06-29 12:57 回复 Windows 8.1 | Chrome 65.0.3325.146
  19. It is the best time to make a few plans for the longer term and it is time to be happy. I have read this put up and if I may just I wish to suggest you few fascinating issues or tips. Perhaps you could write next articles relating to this article. I wish to read more things about it!
    tinyurl.com2020-06-26 22:11 回复 Windows Vista | Firefox浏览器 3.1b3
  20. This is a topic which is near to my heart... Best wishes! Exactly where are your contact details though?
    g rsacwgxy2020-06-22 13:47 回复 Linux | Chrome 66.0.3349.0