「 LINUX篇 」 六月 27, 2023
SSH 配置开启隧道的 TCP 转发
文章字数 314 阅读约需 1 mins.
ssh 配置开启隧道的 tcp 转发
有时我们开启 本地端口转发或者远程端口转发想在内网的其他服务器上使用该端口,修改修改 /etc/ssh/sshd_config
配置文件来开启转发
- 打开配置项 AllowTcpForwarding yes
- 打开配置项 GatewayPorts yes
- 如果长时间保持连接,那么还需要开启 TCPKeepAlive yes
「 LINUX篇 」 九月 07, 2023
文章字数 237 阅读约需 1 mins.
有时需要进行数据的备份和恢复, 涉及到大量的小文件拷贝, 速度很慢,找了一个速度相对较快的命令来操作, 记录下
cd source/; tar cf - . | (cd target/; tar ...
查看全文
「 LINUX篇 」 六月 27, 2023
文章字数 314 阅读约需 1 mins.
ssh 配置开启隧道的 tcp 转发
有时我们开启 本地端口转发或者远程端口转发想在内网的其他服务器上使用该端口,修改修改 /etc/ssh/sshd_config
配置文件来开启转发
「 LINUX篇 」 四月 27, 2022
文章字数 607 阅读约需 1 mins.
有时服务器断电后再开机启动需要启动一些服务,除了正常的 rc 命令可以实现外,之前我常用的是 systemctl service, 今天发现 crontab 的 reboot 标签也可以实现
crontab -e
# 启动后 120 秒启动 canal adapter
@reboot sleep 120; cd /data/msmp-service/canal/canal.adapter-1.1.5/bin && sh restart.sh
@reboot sleep 600...
查看全文
「 LINUX篇 」 九月 03, 2021
文章字数 4.4k 阅读约需 4 mins.
最近在内网部署一些服务,原生的 CentOS mini 系统很多命令没有安装无法使用,手上又没有可用的源,于是想到使用 busybox 来解决问题
yum install -y gcc gcc-c++ glibc glibc-devel pcre pcre-devel openssl openssl-devel systemd-devel zlib-devel libmcrypt-devel glibc-static ncurses-devel
cd tmp
mkdir busybox
cd...
查看全文
「 LINUX篇 」 八月 30, 2021
文章字数 971 阅读约需 1 mins.
yum install ntp
修改配置文件 /etc/ntp.conf
将配置文件里的
server 0.centos.pool.ntp.org iburst
server 1.centos.pool.ntp.org iburst
server 2.centos.pool.ntp.org iburst
server 3.centos.pool.ntp.org iburst
全部注释掉, 换成本地时间服务器
server 127.127.1.0 iburst
systemctl enable...
查看全文