28 Centos 7.4 rsync 两台服务器文件实时同步 备注: 1. 有设置 /etc/rsyncd.conf 这台主机. /etc/rsyncd.secrets 一定是 “root:Ancky_123” 而不是 “Ancky_123” 2. 没有设置 /etc/rsyncd.conf 这台主机 ,/etc/rsyncd.secrets 也要设置,否则会报错. 3. 两台服务器都要 禁用SELinux ,否则 会报错 rsync failed: Permission denied 1vi /etc/selinux/config 1SELINUX=disabled //然后reboot重启 0. 两台服务器IP地址分别为: 源服务器:192.168.122.22 /home/wwwroot/default/ 目标服务器:192.168.122.80 /home/wwwroot/default/ 账户名: root 密码: Ancky_123 1. 源服务器:192.168.122.22 /home/wwwroot/default/ 1-1. 检查一下是否有安装 rsync 1rpm -qa | […]
27 zerotier-one 命令详解 1-1. 查看是否已安装服务zerotier-one 1rpm -qa | grep zerotier-one 2-1. 安装 zerotier-one https://install.zerotier.com/ 1curl -s https://install.zerotier.com/ | sudo bash 3-1. 查看服务状态zerotier-one 1systemctl status zerotier-one.service 3-2. 启动服务zerotier-one 1systemctl start zerotier-one.service 3-3. 关闭服务zerotier-one 1systemctl stop zerotier-one.service 3-4. 重启服务zerotier-one 1systemctl restart zerotier-one.service 3-5. 设置开机启动项服务zerotier-one 1systemctl enable zerotier-one.service 3-6. 取消开机启动项服务zerotier-one 1systemctl disable zerotier-one.service 4-1. 列出各种服务开机是否启动 1systemctl list-unit-files 4-2. […]
26 rsyslog 安装及 修改 sshd 服务日志记录 – 进阶篇 1https://www.bndstone.com/1233.html 8-1. 不用local5模块,换别的模块 [3-1 步骤换下面的] 例如: 127.0.0.1-20190901.log 1vi /etc/rsyslog.conf 然后在GLOBAL DIRECTIVE块 追加以下的模板 123$template Remotelogs,"/var/log/%FROMHOST-IP%-%$YEAR%%$MONTH%%$DAY%.log" * *.* ?Remotelogs & ~ 备注: 123456789101112131415$template […]
25 rsyslog命令详解 1-1. 查看是否已安装服务rsyslog 1rpm -qa | grep rsyslog 2-1. 安装 rsyslog 1yum install -y rsyslog 3-1. 查看服务状态rsyslog 1systemctl status rsyslog.service 3-2. 启动服务rsyslog 1systemctl start rsyslog.service 3-3. 关闭服务rsyslog 1systemctl stop rsyslog.service 3-4. 重启服务rsyslog 1systemctl restart rsyslog.service 3-5. 设置开机启动项服务rsyslog 1systemctl enable rsyslog.service 3-6. 取消开机启动项服务rsyslog 1systemctl disable rsyslog.service 4-1. 列出各种服务开机是否启动 1systemctl list-unit-files 4-2. 列出rsyslog服务是否开机启动 1systemctl list-unit-files | […]
24 rsyslog 安装及 修改 sshd 服务日志记录 12345https://blog.csdn.net/weixin_34194551/article/details/89782299 https://www.cnblogs.com/zhouhbing/p/4004306.html https://www.solves.com.cn/it/wlyx/fwq/2019-09-27/5522.html https://blog.csdn.net/jack__cj/article/details/54645006 http://blog.chinaunix.net/uid-26925027-id-3248201.html 1-1. 查看是否已安装服务rsyslog 1rpm -qa | grep rsyslog 2-1. 安装 rsyslog 1yum install -y rsyslog 3-1. 编辑syslog配置文件 – 监听端口 1vi /etc/rsyslog.conf 1234567# Provides UDP syslog reception $ModLoad imudp //这个注释#要去掉 $UDPServerRun […]
解决 报错 “kvm vcpu unhandled rdmsr/wrmsr” 问题 1https://my.oschina.net/anglix/blog/504822 将kvm虚拟机的cpu设定为 1cpu mode=’host-passthrough’ 或者 1cpu mode=’host-model’ 时,宿主系统的内核会默认开启追踪。 而其中某些功能qemu并不支持,故抛出此类提示: 1dmesg | grep kvm 12345678910111213141516171819202122232425[ 46.635265] kvm [1741]: vcpu0 unhandled rdmsr: 0x606 [ 48.795973] kvm [1741]: vcpu0 unhandled rdmsr: 0x611 [ 48.796030] kvm [1741]: vcpu0 unhandled rdmsr: 0x639 [ 48.796059] kvm [1741]: vcpu0 unhandled rdmsr: […]
22 Rsync 命令详解 – 进阶篇 – 上 123https://www.cnblogs.com/linyouyi/p/10437702.html https://www.cnblogs.com/weikui/p/10584599.html http://blog.51cto.com/douer/1914098 1. 查看是否已经安装了rsync 1rpm -qa | grep rsync 2. 安装rsync 1yum install -y rsync 3-1. 创建同步文件所需要的密码文件 – 服务端[密码:test_123] 12touch /etc/rsyncd.secrets echo ‘test_123’ > /etc/rsyncd.secrets 3-2. 创建同步文件所需要的密码文件 – 客户端[账号:test,密码:test_123] 12touch /etc/rsyncd.secrets echo ‘test:test_123’ > /etc/rsyncd.secrets 4. /etc/rsyncd.secrets 赋予 600 权限 1chmod 600 /etc/rsyncd.secrets 5. rsync的配置文件位置: 1vi /etc/rsyncd.conf […]
21 ssh命令详解 1-1. 查看是否已安装服务openssh 1rpm -qa | grep openssh 1-2. 查看是否已安装服务openssh-server 1rpm -qa | grep openssh-server 1-3. 查看是否已安装服务openssh-clients 1rpm -qa | grep openssh-clients 2-1. 安装 openssh 1yum install -y openssh 2-2. 安装 openssh-server 1yum install -y openssh-server 2-3. 安装 openssh-clients 1yum install -y openssh-clients 3-1. 查看服务状态sshd 1systemctl status sshd.service 3-2. 启动服务sshd 1systemctl start sshd.service 3-3. […]
23 CentOS 7 使用Google-Authenticator进行多因素认证 1http://blog.51cto.com/41084/1952500 1. 安装所需的软件: 12yum update -y yum install -y autoconf automake libtool pam-devel git qrencode 2. 安装google-authenticator 1234567git clone https://github.com/google/google-authenticator-libpam.git 或 git clone https://gitee.com/ancky2006/google-authenticator-libpam.git cd google-authenticator-libpam/ ./bootstrap.sh ./configure make make install ln -s /usr/local/lib/security/pam_google_authenticator.so /usr/lib64/security/pam_google_authenticator.so 3. 配置openssh, 1vi /etc/pam.d/sshd 1auth required pam_google_authenticator.so nullok #加在最上面一行 编辑/etc/ssh/sshd_config为 1vi […]
1 下载 http://winsoft.bndstone.com/wubi.zip 2-1解压wubi.zip,有一个wubi.exe 2-2 选择路径,语言,设置开机密码,开始安装 开始完装