安装
yum install nodejs git -y
npm install forever -g
npm install yarn -g
yarn global add pm2
mkdir /app/
cd /app/
git clone https://github.com/umami-software/umami.git
cd umami
yarn install
cat>.env<<EOF
DATABASE_URL=mysql://root:password@localhost:3306/umami
BASE_PATH = /analytics
EOF
yarn build
yarn start
pm2 start yarn --name umami -- start
pm2 startup
pm2 save
升级
cd /app/umami
#拉取仓库
git pull
#安装
yarn install
#构建项目
yarn build
#更新数据库
yarn update-db
pm2 restart umami
nginx反向代理配置
location /analytics {
proxy_pass http://localhost:3000;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
yum install nvme-cli mdadm -y
先用nvme tool清理一遍磁盘
nvme list #查看所有nvme磁盘
nvme format -s1 /dev/nvme{0..11}n1 --force
wipefs清理一遍,然后mdadm建立阵列
#for i in `ls /dev/nvm*n1|grep -v 2n1`
wipefs -a /dev/nvme{0..11}n1
for i in {0..11};do
parted -s -a optimal /dev/nvme${i}n1 mklabel gpt
parted -s -a optimal /dev/nvme${i}n1 mkpart primary 0% 100%
parted -s -a optimal /dev/nvme${i}n1 set 1 raid on
parted -s -a optimal /dev/nvme${i}n1 name 1 raid_part
done
mdadm --create --name=md10 /dev/md10 --run --level=10 --raid-devices=12 /dev/nvme{0..11}n1p1
cat /proc/mdstat #查看阵列状态
mdadm --detail /dev/md10 #查看阵列信息
检测下硬盘是否有阵列信息
mdadm --examine /dev/nvme{0..11}n1
#保存阵列信息
mdadm --detail --scan --verbose >> /etc/mdadm.conf
跑下DD测试
dd if=/dev/zero of=test bs=64k count=4k oflag=dsync
dd if=/dev/zero of=test bs=8k count=256k conv=fdatasync
跑下fio测试
fio --filename=/dev/md10 --direct=1 --rw=randread --bs=4k --ioengine=libaio --iodepth=256 --runtime=120 --numjobs=4 --time_based --group_reporting --name=iops-test-job --eta-newline=1 --readonly
顺道创建个lvm玩玩
yum install lvm2 -y
pvcreate /dev/md10
vgcreate vg0 /dev/md10
lvcreate -n test -L 20G vg0
mkfs.ext4 /dev/vg0/test
mount /dev/vg0/test /mnt
Global Switch/ Equinix DRT/Telin 为大多数人托管机柜比较多
本地运营商M1net的机房价格比较便宜, 但一般只有3kva电每个柜子,
singtel的机房本人了解不多.
Local Loop业务 SG.GS做的很全.
M1 MiWorld
M1
9 International Business Park, 609915, Singapore
Racks Central
Racks Central Pte Ltd
23 Tai Seng Drive Singapore 535224
535224 Singapore
Equinix SG3
26A Ayer Rajah Crescent, Singapore
Equnix SG2
15 Pioneer Walk, #04-01, Singapore, SG, 627753
Equinix SG1
20 Ayer Rajah Crescent, Singapore
阅读剩余部分...
最近入手了FriendlyElec NanoPi R5S
金属壳子和树莓派亚克力壳子一样大小.
m2 2208的 4T的ssd插进去只能识别用到2T容量
tmux # 新建一个无名称的会话
tmux new -s demo # 新建一个名称为demo的会话
tmux detach # 断开当前会话,会话在后台运行
tmux a # 默认进入第一个会话
tmux a -t demo # 进入到名称为demo的会话
tmux kill-session -t demo # 关闭demo会话
tmux kill-server # 关闭服务器,所有的会话都将关闭
tmux list-session # 查看所有会话
tmux ls # 查看所有会话,提倡使用简写形式
更多细节https://louiszhai.github.io/2017/09/30/tmux/
https://suggestion.baidu.com/su?wd=%E5%86%A0%E7%8A%B6%E7%97%85%E6%AF%92&cb=window.baidu.sug
https://google.com/complete/search?output=toolbar&q=%25%E8%AE%BE%E8%AE%A1
https://suggest.taobao.com/sug?area=etao&code=utf-8&callback=KISSY.Suggest.callback&q=%E8%AE%BE%E8%AE%A1
http://sg1.api.bing.com/qsonhs.aspx?type=cb&cb=callback&q=%E8%AE%BE%E8%AE%A1
https://sor.html5.qq.com/api/getsug?key={$key}
https://sug.so.360.cn/suggest?callback=suggest_so&encodein=utf-8&encodeout=utf-8&format=json&src=so_home&fields=word&word={$key}&llbq=A5%2CB5%2CC5%2CD5