1 Star 1 Fork 49

zfxujun / front-monitor

forked from zhangrenyang / front-monitor 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

3.安装配置nginx

3.1

vi /etc/yum.repos.d/nginx.repo

[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/7/$basearch/
gpgcheck=0
enabled=1
yum install nginx -y 安装nginx
nginx -v 查看安装的版本
nginx -V 查看编译时的参数

/bin/systemctl start nginx.service
nginx -s reload

4. mysql

wget -i -c http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm
yum -y install mysql57-community-release-el7-10.noarch.rpm
yum -y install mysql-community-server
systemctl start  mysqld.service
systemctl status mysqld.service
grep "password" /var/log/mysqld.log
mysql -uroot -p
ALTER USER 'root'@'localhost' IDENTIFIED BY 'PrWB460pA<Qu';
grant all privileges on *.* to 'root'@'*' identified by 'PrWB460pA<Qu' with grant option;
CREATE DATABASE IF NOT EXISTS platform DEFAULT CHARSET utf8 COLLATE utf8_general_ci;
flush privileges
exit
firewall-cmd --zone=public --add-port=3306/tcp --permanent
firewall-cmd --zone=public --add-port=8080/tcp --permanent
firewall-cmd --reload

5. redis

yum install redis -y
/bin/systemctl  start  redis.service

6. 安装node

$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
https://github.com/nvm-sh/nvm
$ . /root/.bashrc
$ nvm ls-remote
$ nvm install v12.18.0
$ npm install -g cnpm --registry=https://registry.npm.taobao.org
$ 查看源 npm config get registry
$ 切换源 npm config set registry https://registry.npm.taobao.org

yarn config set registry https://registry.npm.taobao.org -g
yarn config set sass_binary_site http://cdn.npm.taobao.org/dist/node-sass -g

7. fee

yum install gcc gcc-c++ gdb autoconf automake -y
yum install librdkafka-devel -y
git clone https://github.com/LianjiaTech/fee.git
wget http://img.zhufengpeixun.cn/fee.zip
https://www.nuget.org/downloads

server目录

cd server
npm install
npm run watch
npm run fee Utils:TemplateSQL 
node dist/fee.js Utils:TemplateSQL

client目录

cnpm install
npm run build
cp -f dist/* /usr/share/nginx/monitor/
error_log  /var/log/nginx/error.log warn;
log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';
access_log  /var/log/nginx/access.log  main;

include /etc/nginx/conf.d/*.conf;
server {
    listen       80;
    server_name  monitor.zhufengpeixun.cn;

    #charset koi8-r;
    #access_log  /var/log/nginx/host.access.log  main;

    location / {
        root   /usr/share/nginx/monitor;
        index  index.html index.htm;
    }
}

文件被占用导致操作无法完成怎么办? https://jingyan.baidu.com/article/948f5924d1c3a2d80ff5f98d.html

 if ($time_iso8601 ~ "^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})") {
        set $year $1;
        set $month $2;
        set $day $3;
        set $hour $4;
        set $minute $5;
    }
    access_log  /var/log/nginx/access/$year$month/$day/$hour/$minute.log  main;
$time_local	-	-	$http_x_real_ip	$http_host	$status	$request_time	$request_length	$body_bytes_sent	15d04347-be16-b9ab-0029-24e4b6645950	-	-	9689c3ea-5155-2df7-a719-e90d2dedeb2c 937ba755-116a-18e6-0735-312cba23b00c	$request	- 	$http_user_agent	-	sample=-&_UC_agent=-&lianjia_device_id=-&-	-	-	-

node-gyp,是由于node程序中需要调用一些其他语言编写的 工具

npm install --global --production windows-build-tools
  python(v2.7 3.x不支持);
  visual C++ Build Tools,或者 vs2015以上包含15))
  net framework 4.5.1
npm install -g node-gyp

node dist/fee.js -h

node dist/fee.js SaveLog:Nginx

CreateCache
node dist/fee.js  CreateCache:UpdatePerOneMinute

Parse
node dist/fee.js Parse:Device "2020-06-12 12:33" "2020-06-12 12:33"
node dist/fee.js Parse:MenuClick "2020-06-11 19:09" "2020-06-11 19:09"
node dist/fee.js Parse:Monitor "2020-06-11 21:05" "2020-06-11 21:05"
node dist/fee.js Parse:Performance "2020-06-11 15:54"   "2020-06-11 15:55"
node dist/fee.js Parse:TimeOnSiteByHour "2020-06-11 19:20"   "2020-06-11 19:20"
node dist/fee.js Parse:UV "2020-06-11 20:06"   "2020-06-11 20:06"
node dist/fee.js Parse:UserFirstLoginAt "2020-06-11 20:06" minute


Summary
node dist/fee.js Summary:Error "2020-06-11 21:05"   minute
node dist/fee.js Summary:HttpError "2020-06-11"   day
node dist/fee.js Summary:NewUser "2020-06-11"   day
node dist/fee.js Summary:Performance "2020-06-11"   day
node dist/fee.js Summary:SystemBrowser "2020-06"   month
node dist/fee.js Summary:SystemDevice "2020-06"   month
node dist/fee.js Summary:SystemOS "2020-06"   month
node dist/fee.js Summary:SystemRuntimeVersion "2020-06"  month
node dist/fee.js Summary:TimeOnSite "2020-06"  month
node dist/fee.js Summary:UV "2020-06-11 19"  hour
node dist/fee.js Summary:UV "2020-06-11"  day
node dist/fee.js Summary:UV "2020-06"  month

Task
node dist/fee.js Task:Manager

node dist/fee.js Utils:CleanOldLog
node dist/fee.js Utils:GenerateSQL
node dist/fee.js Utils:TemplateSQL
node dist/fee.js Utils:Test

WatchDog
node dist/fee.js WatchDog:Alarm
node dist/fee.js WatchDog:Saas
 log_format  main '$time_iso8601	-	-	$remote_addr	$http_host	$status	$request_time	$request_length	$body_bytes_sent	15d04347-be16-b9ab-0029-24e4b6645950	-	-	9689c3ea-5155-2df7-a719-e90d2dedeb2c 937ba755-116a-18e6-0735-312cba23b00c	-	-	$request	$http_user_agent	-	sample=-&_UC_agent=-&lianjia_device_id=-&-	-	-	-';
 #access_log  logs/access.log  main;
Copyright(c) 2017 Lianjia, Inc. All Rights Reserved Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

暂无描述 展开 收起
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/zfxujun/front-monitor.git
git@gitee.com:zfxujun/front-monitor.git
zfxujun
front-monitor
front-monitor
master

搜索帮助

14c37bed 8189591 565d56ea 8189591