代码如下:
cat access.log | grep /item | awk '{ print $1 }' | sort | uniq -c | sort -rn | head -n 10
代码如下:
cat access.log | grep /item | awk '{ print $1 }' | sort | uniq -c | sort -rn | head -n 10
安装服务端和客户端
wget -O /etc/yum.repos.d/mqtt.repo download.opensuse.org/repositories/home:/oojah:/mqtt/CentOS_CentOS-6/home:oojah:mqtt.repo
yum update
yum install mosquitto mosquitto-clients
chkconfig mosquitto on
service mosquitto start
安装pypy
yum install pypy*
安装pip
wget https://raw.github.com/pypa/pip/master/contrib/get-pip.py
pypy get-pip.py
添加pypy pip别名
alias pypy_pip='/usr/lib64/pypy-2.2.1/bin/pip'
建立virtualenv
virtualenv ~/pypy -p `which pypy`
source ~/pypy/bin/activate
python --version
deactivate
直接运行deactivate
即可