一、先裝好node.jsapache
$ yum install nodejsnpm
二、安裝log.iovim
$sudo npm install -g log.io --user "root"瀏覽器
三、啓動log.io serverapp
$nohup log.io-server &ssh
四、修改配置文件spa
vim ~/.log.io/harvester.confcode
exports.config = { nodeName: "application_server", logStreams: { apache: [ "/var/log/apache2/access.log", "/var/log/apache2/error.log" ] }, server: { host: '0.0.0.0', port: 28777 } }
修改.log目錄server
五、啓動log.io客戶端
$ nohup log.io-harvester &
六、瀏覽器查看
http://localhost:28778
發現那兩個啓動命令會出現ssh終端退出進程就自動關閉,能夠用這兩個命令
sudo nohup node /bin/log.io-server &
sudo nohup node /bin/log.io-harvester &