openssh-client不保存登陆数据
cat>>.ssh/config<<EOF
StrictHostKeyChecking=no
UserKnownHostsFile=/dev/null
EOF
-o StrictHostKeyChecking=no
选项告诉SSH客户端不要检查known_hosts
文件中的主机密钥。-o UserKnownHostsFile=/dev/null
选项告诉SSH客户端不要将主机密钥保存到任何文件中。
cat>>.ssh/config<<EOF
StrictHostKeyChecking=no
UserKnownHostsFile=/dev/null
EOF
-o StrictHostKeyChecking=no
选项告诉SSH客户端不要检查known_hosts
文件中的主机密钥。-o UserKnownHostsFile=/dev/null
选项告诉SSH客户端不要将主机密钥保存到任何文件中。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
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建立阵列
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 /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
yum install epel-release
yum -y groupinstall "KDE"
yum -y install langpacks-zh_CN.noarch
yum -y install xrdp
startx
systemctl start xrdp
systemctl enable xrdp
firewall-cmd --permanent --zone=public --add-port=3389/tcp --permanent
firewall-cmd --reload
/etc/xrdp/xrdp.ini 里面的port=3389可以修改成想要的端口.
然后可以通过GUI干一些其他的事情了.
/ip address add address={管理IP地址}/24 interface=ether1
/ip route add distance=1 gateway={网关IP地址} routing-mark=MGMT
/ip route rule add src-address={管理IP地址}/32 table=MGMT
/ip route vrf add interfaces=ether1 routing-mark=MGMT
纯粹口水一下caddy1遇上的启动报错问题.
报错内容如下
Process: 472999 ExecStart=/usr/bin/caddy -conf /etc/caddy/caddy.conf -root /tmp -agree (code=exited, status=1/FAILURE)
Main PID: 472999 (code=exited, status=1/FAILURE)
CPU: 26ms
Aug 12 11:48:36 klayer systemd[1]: Starting Caddy HTTP/2 web server...
Aug 12 11:48:36 klayer caddy[472992]: Caddyfile is valid
Aug 12 11:48:36 klayer systemd[1]: Started Caddy HTTP/2 web server.
Aug 12 11:48:36 klayer caddy[472999]: Activating privacy features... 2023/08/12 11:48:36 failed storage check: open /var/lib/caddy/rw_test_1203782840230465039>
Aug 12 11:48:36 klayer systemd[1]: caddy.service: Main process exited, code=exited, status=1/FAILURE
Aug 12 11:48:36 klayer systemd[1]: caddy.service: Failed with result 'exit-code'.
解决如下
ulimit -n 8192
cat>>/etc/security/limits.conf<<EOF
* soft nofile 65535
* hard nofile 65535
* soft nproc 65535
* hard nproc 65535
root soft nofile 65535
root hard nofile 65535
root soft nproc 65535
root hard nproc 65535
EOF
useradd -M caddy -s /sbin/nologin
mkdir /var/lib/caddy
chown caddy.caddy /var/lib/caddy
一个是limits系统参数问题,一个/var/lib/caddy目录问题, 如果caddy用户给root权限就没第二个问题.
半夜调路由, 手抖输错个字符还给commit了, BGP给整掉线了, 还好PTP的IP还在线, 顺手记录下
stelnet 目标IP 端口号, 然后回车输入用户密码登录完成.
ssh client first-time enable
stelnet host-ipv4 [ port ] [ [ prefer_kex { dh_group1 | dh_exchange_group } ] | [ prefer_ctos_cipher { des | 3des | aes128 } ] | [ prefer_stoc_cipher { des | 3des | aes128 } ] | [ prefer_ctos_hmac { sha1 | sha1_96 | md5 | md5_96 } ] | [ prefer_stoc_hmac { sha1 | sha1_96 | md5 | md5_96 } ] ] * [ -ki aliveinterval [ -kc alivecountmax ] ]
一般的Linux仓库都有,yum或者apt安装一下就可以用, 相对screen更好使些.
9600是默认波特率, 使用-b参数可以指定
picocom -b 9600 /dev/ttyUSB0
/dev/ttyUSB0为串口设备的路径, 可以用ls查看目录抓取出来所有可用设备.
ls /dev|grep USB
要退出picocom,请使用Ctrl+ a,然后Ctrl + x。
https://www.resell.biz/ 这个是uk2旗下的一级注册商和resellerclub用的是一套系统.
https://www.hexonet.net/ 1API 加拿大一级注册商, (德国马甲名key-systems)
https://www.resellerclub.com/ 这家就没啥说的了