CentOS6 installs Maptail to visualize and display user visit area maps in real time

888u

Last update at :2024-06-13,Edit by888u

A few days ago, Snail accidentally saw the introduction document of Maptail on GITHUB. It is also one of the monitoring tools. It reads the user IP address of the log file, and then uses GeoIP to map the user and the region. displayed, and the effect is still real-time. After installation, the user's region and real-time characteristics can be analyzed more clearly.

The above rendering is what you see after logging in to the web after installing the Maptail tool. Move the mouse to the user hotspot area to see the current user's location. In short, the interface looks quite handsome. If it is used in an actual production environment, it depends on our actual needs. The snail here is purely built with a lot of experience. It has encountered some problems before and was unable to achieve the effect.

First, preparations

1. If we also want to have fun, it is recommended to operate in the test environment. Do not install it directly in the production environment. We cannot guarantee whether it will definitely affect the current WEB and project environment. After all, we also need to install some software in it. .

2. The snail (laozuo.org) here uses centOS6 64bit environment, and needs a WEB website environment in the current VPS environment, because LOG log files need to be generated before the log display can be obtained later, according to our own habits Install the WEB environment, as long as there are logs.

Second, download and install the software

wget -c https://github.com/stagas/maptail/archive/master.zip –no-check-certificatewget -c http://nodejs.org/dist/v0.8.16/node-v0.8.16 -linux-x64.tar.gzunzip mastertar zxvf node-v0.8.16-linux-x64.tar.gzcd node-v0.8.16-linux-x64

Download the latest version of the MATTAIL program from GITHUB here, as well as the required NODE.JS.

/root/node-v0.8.16-linux-x64/bin/npm install

Install the software packages required by node.

If you see an error message here, you need to solve the problem.

/root/node-v0.8.16-linux-x64/bin/npm install -g express

Seeing such an interface means there is no problem.

Third, install the required component support

If we activate and start the tail log now, an error will definitely be reported. We have not installed geoip and other required components.

/root/node-v0.8.16-linux-x64/bin/npm install geoip-lite-with-city-data/root/node-v0.8.16-linux-x64/bin/npm install express/root/ node-v0.8.16-linux-x64/bin/npm install simpl

Three components/software support direct installation.

Fourth, installation and activation log reading

cp /root/node-v0.8.16-linux-x64/bin/node /usr/bin/chmod o+x /root/maptail-master/bin/maptailcd /root/maptail-master/bin/maptail< /p>

Perform authorization.

nohup tail -fn 20 /home/wwwlogs/laobuluo.com_nginx.log |./maptail -h 198.74.49.209 -p 8080 &

This should be executed based on the website log path address we actually need to monitor, and then the IP address of the server.

After execution, we can see that no error is reported, and you can log in to the WEB client through IP:8080. The effect seen by the snail here is like this.

Fifth, Maptail monitoring summary

1. The interface looks pretty cool, and you can see the areas visited by users, but it is not of much use value. It is suitable for users who want to play around with this tool to experience it.

2. Do not install and play in a production environment unless you are very sure. No one knows about some possible problems, so be cautious.

This article refers to the following articles:

1. http://devops.jiunile.com/ops/1.html

2. https://github.com/stagas/maptail

Recommended site searches: overseas virtual host space, registered unregistered domain name, Singapore server, registration-free host in mainland China, server rental, free Japanese server, free ip proxy, which is the best foreign server rental, ip segment query, ip Search,

CentOS6 installs Maptail to visualize and display user visit area maps in real time

All copyrights belong to 888u unless special state
取消
微信二维码
微信二维码
支付宝二维码