我正在尝试仅为内部 LAN 使用(Linux 服务器、Windows 客户端)配置绑定,并且我想通过 fqdn 和短名称解析工作站。
例如,如果没有DNS 服务器,假设有一个名为host001我能够做的主机:
nslookup host001
ping host001
Run Code Online (Sandbox Code Playgroud)
它有效。使用 DNS 服务器我需要指定 FQDN:
nslookup host001.example.com
ping host001.example.com
Run Code Online (Sandbox Code Playgroud)
有没有办法在 DNS 中输入短名称,这样host001我就可以获取解析查询host001.example.com?
谢谢你
我有一个带有 ip 的 Windows 2008 域控制器10.0.2.x。我还在远程站点中使用 ip 的另一组(工作组)PC 10.0.1.x。
这两个站点通过 VPN 与 ZyXEL 路由器相连。我想知道如何配置域控制器,以便我可以加入域并抛出网络10.0.1.x,最终只有一个具有 2 个子网和全局组策略的域
我是 Ansible 的新手,所以我可能会遗漏一些明显的东西。我有一个剧本执行以下操作:
- name: Create real users
user: name="{{item.user_name}}" comment="{{item.user_description}}" home="/home/{{item.user_name}}" shell="/bin/bash" uid="{{item.user_id}}"
with_items:
- { user_name: "user1", user_description: "user 1", user_id: "2000" }
- { user_name: "user2", user_description: "user 2", user_id: "2001" }
- name: Copy SSH keys
copy:
src: "keys/{{ item.user_name }}.key"
dest: "/home/{{ item.user_name }}/.ssh/authorized_keys"
owner: "{{ item.user_name }}"
group: "{{ item.user_name }}"
mode: 0600
with_items:
- { user_name: "user1", user_description: "user 1", user_id: "2000" }
- { user_name: "user2", user_description: "user 2", user_id: "2001" } …Run Code Online (Sandbox Code Playgroud) 有PHP-FPM和OPCache(从php.net下载并编译)
opcache.enable = 1
opcache.use_cwd = 1
zend_extension=opcache.so
Run Code Online (Sandbox Code Playgroud)
php-fpm 配置文件在 chroot 中运行,即/home/user1/www/index.php-> /www/index.php、/home/user2/www/index.php-> /www/index.php,这index.php两种情况下都会看到。
user1已经安装了WordPress。user2有定制index.php。
user1user2's index.php 在's之前执行index.php。
在这种情况下,当我index.php从文件夹调用时,我会看到来自文件夹user2的编译输出。index.phpuser1
目前的解决方案。我可以为每个用户运行不同的 PHP,否则我必须终止我漂亮的结构/home/user1/www,导致/home/user1/user1www/OPcache 需要查看不同的路径。或者我禁用OPcache,但它会影响性能。
有没有办法保留/home/user1/www、/home/user2/www等并让 OPcache 正常工作?
我设置了以下新贵脚本:
# autossh
description "autossh connections"
start on started dbus
stop on (runlevel [06] or stopped dbus)
respawn
respawn limit 5 60 # respawn max 5 times in 60 seconds
script
export AUTOSSH_PIDFILE=/var/run/autossh.pid
export AUTOSSH_POLL=60
export AUTOSSH_FIRST_POLL=30
export AUTOSSH_GATETIME=0
export AUTOSSH_DEBUG=1
exec sudo -H -u pi -s autossh -M 0 \
-R remoteport:127.0.0.1:localport remoteuser@remote.host
exec sudo -H -u pi -s autossh -M 0 \
-R remoteport2:127.0.0.1:localport2 remoteuser@remote.host
end script
Run Code Online (Sandbox Code Playgroud)
但每次启动后我都会收到此错误消息:
ssh 提前退出,状态为 0
我该如何修复它?
谢谢
我在使用 logrotate 3.12.2 中的 prerotate 脚本时遇到了问题。我在该prerotate/endscript部分中指定的脚本没有接收要轮换的文件名作为第一个参数 ( $1)。
这是 logrotate 配置:
compress
/external-logs/syslog {
daily
rotate 3
olddir OLD
missingok
prerotate
/root/filter-syslog.sh
endscript
}
Run Code Online (Sandbox Code Playgroud)
这是/root/filter-syslog.sh:
#!/bin/sh
echo "log file subject to prerotate: $1"
Run Code Online (Sandbox Code Playgroud)
最后,这是 logrotate 运行的详细输出:
reading config file /external-config/logrotate.conf
olddir is now OLD
Reading state from file: /external-logs/logrotate.state
Allocating hash table for state file, size 64 entries
Creating new state
Handling 1 logs
rotating pattern: /external-logs/syslog after 1 days (3 rotations)
olddir is OLD, …Run Code Online (Sandbox Code Playgroud) 我也有一个主名称服务器设置和几个从站。今天,当我遇到一条奇怪的错误消息时,我正在将其中一个从属服务器更改为新服务器。
在主服务器上更新 DNS 记录并重新启动 BIND 后,我注意到它ns3.mydomain.com正在尝试发送ns4.mydomain.com通知。我检查的配置文件,并没有在那里它拥有的IP地址ns4.mydomain.com的ns3.mydomain.com配置文件。
它不应该ns1.mydomain.com将通知发送给ns4而不是ns3吗?我还要指出,双方的DNS记录ns3,并ns4似乎被更新。
这是 ns3 上的错误消息(IP 地址:)107.161.xxx.xxx:
May 15 22:08:22 vps named[23851]: client 185.38.xxx.xxx#59396: received notify for zone 'mydomain1.com'
May 15 22:08:22 vps named[23851]: zone mydomain1.com/IN: refused notify from non-master: 185.38.xxx.xxx#59396
May 15 22:08:22 vps named[23851]: client 185.38.xxx.xxx#59396: received notify for zone 'mydomain2.com'
May 15 22:08:22 vps named[23851]: zone mydomain2.com/IN: refused notify from non-master: 185.38.xxx.xxx#59396
May …Run Code Online (Sandbox Code Playgroud) 我winsat过去常常在 Windows 8 上查看我的磁盘读/写速度,并且效果很好:
winsat disk -drive c
Run Code Online (Sandbox Code Playgroud)
这可以在 Windows Server 2012 上使用吗?
- name: be sure check-http.rb is copied
copy:
src: /tmp/sensu-plugins-http/bin/check-http.rb
dest: /etc/sensu/plugins/check-http.rb
remote_src: true
owner: sensu
group: sensu
mode: 0500
notify:
- restart sensu-api
- restart sensu-client
- restart sensu-server
- name: be sure check_websites.json is copied
template:
src: check_websites.j2
dest: "{{ sensu_conf_d }}/check_websites.json"
register: check_websites_config
notify:
- restart sensu-api
- restart sensu-client
- restart sensu-server
Run Code Online (Sandbox Code Playgroud)
而不是重复:
notify:
- restart sensu-api
- restart sensu-client
- restart sensu-server
Run Code Online (Sandbox Code Playgroud)
是否可以使其简洁,例如:
notify:
- restart sensu-services
Run Code Online (Sandbox Code Playgroud)
预期答案
@knowhy 建议这个解决方案,但我正在寻找一个能够在处理程序中而不是在任务目录中组合多次重新启动的解决方案
ansible ×2
bind ×2
chroot ×1
debian ×1
domain ×1
hard-drive ×1
hostname ×1
internal-dns ×1
logrotate ×1
master-slave ×1
nameserver ×1
networking ×1
nslookup ×1
opcache ×1
performance ×1
php-fpm ×1
ssh ×1
ssh-tunnel ×1
subnet ×1
upstart ×1