Show newer
王小美 boosted

阻止ssh自动断开(重发)

cd /etc/ssh

grep ClientAlive sshd_config

cp sshd_config sshd_config.bak
sed -i "s/#ClientAliveInterval 0/ClientAliveInterval 60/g" sshd_config

sed -i "s/#ClientAliveCountMax 3/ClientAliveCountMax 3/g" sshd_config

grep ClientAlive sshd_config

diff sshd_config sshd_config.bak

service sshd reload

再补上一条@literalkernel:

sed -i '/^PasswordAuthentication/c PasswordAuthentication yes' ${SSHD_CONFIG}

nohup的使用(重发)

$ nohup my_command > my.log 2>&1 &
$ echo $! > save_pid.txt

fg命令(Re-enter interactive mode after Ctrl-z)

fg [jobspec]
Resume jobspec in the foreground, and make
it the current job. If jobspec is not
present, the shell’s notion of the current
job is used. The return value is that of
the command placed into the foreground, or
failure if run when job control is dis-
abled or, when run with job control
enabled, if jobspec does not specify a
valid job or jobspec specifies a job that
was started without job control.

发现一个比较难受的问题,填加了标签的嘟文,如果可见范围没有设置成完全公开,那么你就不能在该标签的列表中看到它。

本来我的想法是通过标签可以把嘟文做成类似专栏的形式来记笔记,同时笔记设置为不公开,以避免在公共事件线上打扰到大家。看来现在还是得把笔记设置成公开了 :ac_classic22:

王小美 boosted

自建实例的同学,请务必添加如下两个定时任务,推荐在每天早晨低峰时段运行

RAILS_ENV=production /home/mastodon/live/bin/tootctl media remove --days=14

清理缓存的外站媒体文件,和

RAILS_ENV=production /home/mastodon/live/bin/tootctl media remove-orphans

清理未关联任何 toot 的“无主”媒体文件

另外推荐配合以下任务食用

RAILS_ENV=production /home/mastodon/live/bin/tootctl statuses remove

清理没有同本站任何用户产生关联的 toot 本身(比如跨站轴上收到的、没有本站用户转发/评论/收藏过的消息)

各命令参数请参考 -h 和官方文档按实际情况调整:docs.joinmastodon.org/admin/to

#实例维护 #长毛象建站 #长毛象中文使用指南

您的钱包会感谢我的╮( ̄▽ ̄")╭

nohup的使用

$ nohup my_command > my.log 2>&1 &
$ echo $! > save_pid.txt

阻止ssh自动断开

cd /etc/ssh

grep ClientAlive sshd_config

cp sshd_config sshd_config.bak
sed -i "s/#ClientAliveInterval 0/ClientAliveInterval 60/g" sshd_config

sed -i "s/#ClientAliveCountMax 3/ClientAliveCountMax 3/g" sshd_config

grep ClientAlive sshd_config

diff sshd_config sshd_config.bak

service sshd reload

子目录磁盘占用分析

$ du -h --max-depth=0 *

王小美 boosted

#BBC 中美关系:美国或公布“中共党员签证禁令”掀起舆论波澜 bbc.com/zhongwen/simp/world-53

王小美 boosted

Dear Doctor, we have just updated the official stickers “Anecdotes”! Please visit our official website for download~
Click here:

arknights.global/fankit

:sys_twitter: twitter.com/ArknightsEN/status

搜索功能暂停一下,我把数据导入docker里面,以后方便管理

Show thread

全文搜索ElasticSearch已启用,又少了700M内存 :bili_2233_tuhun:

王小美 boosted

m.gretaoto.ca 玻璃翼长毛象站欢迎大家入驻。自带跨站关注功能,可在本站关注/订阅 Twitter, Instagram上的用户。

新注册的用户可以到m.gretaoto.ca/about/more 了解详情

-----

Welcome to m.gretaoto.ca . We are a custom modified mastodon instance with unique features. You can follow any Twitter and Instagram users on gretaoto.

王小美 boosted

@star 活吧已经退出中继了。应该没问题了

王小美 boosted

《科技爱好者周刊(第116期)》:视频会议软件 Zoom 的画面布局,是所有人平均分配屏幕空间。
日本很多用户纷纷反馈,上下级的头像一样大,搞不清楚谁是领导,不好区分地位级别,希望能更改界面。日本网友就画出了日本企业想要的的屏幕布局。
ruanyifeng.com/blog/2020/07/we

:sys_twitter: twitter.com/ruanyf/status/1283

Show older
小森林

每个人都有属于自己的一片森林,也许我们从来不曾走过,但它一直在那里,总会在那里。迷失的人迷失了,相逢的人会再相逢。愿这里,成为属于你的小森林。