服务器问题集锦,包括 Linux(Ubuntu, Centos,Debian等)和Windows Server服务器
环境:aws opsworks厨师11.10和Ubuntu 14.04。 我正在使用大厨食谱来更新aws opsworks ec2节点上的/etc/dhcp/dhclient.conf文件,以便将我的自定义dnssearch后缀添加到/etc/resolv.conf文件中的search行。 如果file.insert_line_if_no_match更新文件,我怎么才能让我的配方重新启动节点? 我显然不希望每次配方运行时重新启动节点。 在我的node['opsworks']['stack']['name']下面的代码片断node['opsworks']['stack']['name']值就像a.dev.mydomain.com 。 ruby_block "add custom dns domain search suffix" do block do file = Chef::Util::FileEdit.new("/etc/dhcp/dhclient.conf") file.insert_line_if_no_match("/append domain-search/", "append domain-search \"#{node['opsworks']['stack']['name']}\";") file.write_file end end 上面的代码片段将最后一行添加到/etc/dhcp/dhclient.conf : # Configuration file for /sbin/dhclient, which is included in Debian's # dhcp3-client package. # option rfc3442-classless-static-routes code 121 = array of unsigned […]
我正在VMWare中设置test \ dev机器。 我们有大约六个用户,我想给一个虚拟机。 他们都将基于一个基本的图像(Ubuntu)。 我总是可以创build六个不同的VM,每个用户一个,但似乎有一个更好的方法来做到这一点。 是否有可能(或build议)安装基础系统,然后采取六个不同的快照。 由于这些是testing机器,用户将不可避免地将其弄乱。 由于这些是未提交的快照,因此我总是可以将快照截断并从基本映像重新创build。 我喜欢这样的事实,即我可以快速“恢复”用户的虚拟机回到默认状态。 VMWare KB似乎在长时间运行的快照上皱眉。 有没有更好的方法来达到我想要做的?
我是Exchange 2010pipe理员。 我知道用户可以使用Exchangepipe理控制台隐藏GAL。 是否可以隐藏某些用户在GAL中的用户电话号码? 例如:John Doe存在于GAL中,我可以看到他的电话号码,因为我是某个AD组的成员。 不在我的AD组的人不能看到John的电话号码。
我为Nginx创build了映射规则以避免caching。 但是它不起作用nocache_map.conf(包含在http部分。 map $http_x_requested_with $nocache { default 0; XMLHttpRequest 1; } map $http_cookie $nocache { default 0; SESS 1; PHPSESSID 1; ~*wordpress_[a-zA-Z0-9-].* 1; comment_author 1; wp-postpass 1; _mcnc 1; } map $request_uri $nocache { default 0; ~*\/wp-admin\/.* 1; ~*\/wp-[a-zA-Z0-9-]+\.php 1; ~*\/feed\/.* 1; ~*\/administrator\/.* 1; } map $http_user_agent $nocache { default 0; ~*android|ip(hone|od)|windows\s+(?:ce|phone) 1; ~*symbian|sonyericsson|samsung|lg|blackberry 1; […]
我试图build立两个虚拟机使用virtualbox集群我按照这个教程http://www.tokiwinter.com/clustering-with-drbd-corosync-and-pacemaker/ 并input如下命令 [root@node1 data]# crm configure primitive nginx_res ocf:heartbeat:nginx params configfile=/etc/nginx/nginx.conf httpd=/usr/sbin/nginx op monitor interval=60s timout=10s op start timeout=40s op stop timeout=60s error: unpack_resources: Resource start-up disabled since no STONITH resources have been defined error: unpack_resources: Either configure some or disable STONITH with the stonith-enabled option error: unpack_resources: NOTE: Clusters with shared data need STONITH […]
我一直认为活动目录是一个员工目录,但是有什么理由不能把它当作客户的目录吗?
我正在设置一个带有3个NIC和静态路由的CentOS。 eth0的IP地址为192.168.10.2,GW为192.168.10.1,eth1的IP地址为192.168.20.2,GW为192.168.20.1,eth2的IP地址为192.168.10.3,GW为192.168.10.1。 我想接受来自其他机器的eth1stream量(我已经将eth1设置为这些客户机的网关),并通过eth2发送给路由器,反之亦然(反向path)。 添加到系统的路由 ip route add default via 192.168.10.3 dev eth1 proto static metric 1024 现在我面临的问题就像eth1上收到的stream量,而不是eth2。 它看起来像通过eth0。 我现在不想使用NAT或IPTABLES,是否可以将eth1的stream量路由到eth2,反之亦然。
在openvpn服务器的configuration文件中,我有行server 192.168.20.0 255.255.255.0 。 这将导致tun0被创build为inet addr:192.168.20.**1** PtP:192.168.20.**2** Mask:255.255.255.255 我需要做些什么来改变成inet addr:192.168.20.**11** PtP:192.168.20.**12** Mask:255.255.255.255 我尝试添加ifconfig 192.168.20.11 192.168.20.12到configuration文件,但这是行不通的。 解 遵循Zoredache的build议(RTFM'man openvpn') 而不是使用server 192.168.20.0 255.255.255.0我现在正在使用 mode server tls-server ifconfig 192.168.20.11 192.168.20.12 ifconfig-pool 192.168.20.4 192.168.20.8 route 192.168.20.0 255.255.255.0 push "route 192.168.20.0 255.255.255.0" 并在客户端的ccd文件中 ifconfig-push 192.168.20.1 192.168.20.2 这工作。
我正在制作Media Temple上的VPS(DV)。 我需要将来自端口8774stream量转发到80 。 我以rootlogin,跑了 iptables -t nat -A PREROUTING -i eth0 -p tcp –dport 8774 -j REDIRECT –to-port 80 然后iptables-save 当我显示iptables规则,我可以看到我的规则… # iptables -t nat -L -n -v –line-numbers Chain PREROUTING (policy ACCEPT 2 packets, 88 bytes) num pkts bytes target prot opt in out source destination 1 0 0 REDIRECT tcp — eth0 […]
如今,有许多错误被发现。 所以,我想知道,如果我使用crond来执行yum update -y每天,它会使事情变得更好吗?(这是一个服务器,我不希望它停止工作,由于这….)Centos 6