服务器管理员

系统和网络管理员的问答

6
Ansible:如果满足特定条件,则在vars文件中有条件地定义变量
根据在group_vars中定义的变量的值(真/假),我尝试在vars文件中定义一些变量。它们的值取决于var组的值。 我当前的var文件如下所示: {% if my_group_var %} test: var1: value var2: value ... varn: value {% else %} test: var1: other_value var2: other_value ... varn: other_value {% endif %} 对于我的每个角色,我都使用在此文件中定义的变量。 我的测试剧本如下所示: - name: blabla hosts: blabla vars_files: - <path>/test_vars.yml roles: blabla 运行剧本后收到的错误是: {% if my_group_var %} ^ here exception type: <class …

3
使用PHP7的fastcgi_pass的权限被拒绝
我正在用PHP7.0运行LEMP。 我已经在我的服务器块中 fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; 但是,当我打开站点时,它将返回502 Bad Gateway。下面是错误日志。 *1 connect() to unix:/var/run/php/php7.0-fpm.sock failed (13: Permission denied) while connecting to upstream, client: xxx.xxx.xxx.xxx, server: example.com, request: "GET / HTTP1.1", upstream: "fsatcgi://unix:/var/run/php/php7.0-fpm.sock:", host: "example.com" 它说“ 权限被拒绝”。怎么了 我已经检查过了,但似乎找不到需要什么样的许可。 谢谢。
19 nginx  php  php7 


4
错误-无法找到GraphViz软件包的`dot`命令
Ubuntu Precision(12.04.1 LTS) 我是PEAR的新手。 我安装了PEAR。然后,使用梨我安装了phpdoc。 除了绘图功能外,它似乎工作得很好。 我运行了以下命令: /var/www/site5 $ phpdoc -f models/classes.php -t ./docs/classes Collecting files .. OK Initializing parser .. OK Parsing files Parsing /var/www/site5/models/classes.php Storing cache in "/var/www/site5/docs/classes" .. OK Load cache .. 0.026s Preparing template "clean" .. 0.069s Preparing 15 transformations .. 0.000s Build "elements" index .. …
19 ubuntu  path  pear  graph 


1
什么时候使用MySQL套接字,什么时候使用host:port?
许多应用程序允许我使用用户名,密码主机和端口连接到Mysql。有些允许我配置套接字而不是host:port。 有明显的优势吗?我可以想象一个套接字仅在MySQL在同一台计算机上时才起作用。是这样吗?如果是这样,使用该套接字而不是连接到它localhost:3306是否有好处? 我对网络和套接字的来龙去脉不太熟悉,所以也许我完全错过了一些关键信息,而我的问题却很愚蠢。如果是这样,您能解释我所缺少的吗?

1
在Linux上,“ net_ratelimit:抑制了44个回调”是什么意思?
我正在尝试在基于Debian的路由器上调整Snort的性能。我看到的东西是: snort packet recv contents failure: No buffer space available 因此,根据http://fasterdata.es.net/fasterdata/host-tuning/linux/上的调优指南,我将缓冲区增加到8M,当不起作用时我尝试了16M : #!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on success or any other # value on error. # # …

3
如何获得dnsmasq指定备用DNS服务器?
我正在使用具有约10个kubuntu台式机(以及大量服务器和IP电话)的网络,并且正在尝试让dnsmasq将另一台dns服务器指定为故障转移。我尝试使用 server=192.168.0.90 但这只是将单个dhcp / dns服务器添加到了我的测试计算机上的/etc/resolv.conf中(动态IP,并且无需租借即可重新启动)。

2
如何在Linux中设置首选网络接口
我已经建立了这样的网络。 http://docs.google.com/Doc?docid=0AZ1YxuLE4djaZGhqN2s1NmRfMjhjNjc0Ym1meg&hl=zh-CN 换句话说:我有一台具有两个网络接口的计算机(Calcium,运行Arch Linux)。eth0连接到路由器,并且为千兆位。Eth1通过10兆位直接连接到大学网络。路由器的上行链路也连接到大学网络,它也是10Mbit。 当前(我相信),Calcium上的所有流量都通过路由器通过eth0,而不管它是内部还是外部。(如何确认?) 理想情况下,发往内部网络(192.168.10.0/24)的流量将通过eth0到达路由器,无论走到哪里。所有其他流量都应通过eth1。

5
如何在Linux中全局将日期格式设置为ISO?
我想将Linux日期格式全局设置为ISO,大致如下所示: YYYY-MM-DD HH:MM:SS 2009-03-16 15:20:00 具有不同级别的细节,例如省略时间,秒数等。 我知道对于某些应用程序,您可以手动配置它,但是我希望为每个程序自动设置它。 我专门使用Ubuntu Intrepid,但是最好在所有发行版中都可以使用的通用解决方案。

3
我正在使用哪些AWS服务?
当我登录到AWS管理控制台时,我仅看到所有服务的列表。我怎么知道我正在使用哪些?我可以隐藏不使用的那些吗? 我非常喜欢Heroku的组织方式。它首先显示您的应用程序。然后,当您单击某个应用程序时,它仅显示该应用程序正在使用的加载项(服务)。想象一下登录Heroku,然后看到所有Heroku附加组件的列表。

3
如何永久设置ulimit值?
在Debian Wheezy上,ulimit -a给出: open files (-n) 1024 我将此添加到/etc/security/limits.conf * hard nofile 64000 然后重启。 而且ulimit -a仍然提供最多1024个打开的文件。有人可以对此加以说明吗?
19 debian  ulimit 

3
MySQL崩溃了,无法启动
我们的生产mysql服务器刚刚崩溃,无法恢复。出现段错误。我尝试重新启动,只是不知道还要尝试什么。这是堆栈跟踪: 140502 14:13:05 [注意]插件“ FEDERATED”已禁用。 InnoDB:日志扫描已通过检查点lsn 108 1057948207 140502 14:13:06 InnoDB:数据库未正常关闭! InnoDB:开始崩溃恢复。 InnoDB:从.ibd文件读取表空间信息... InnoDB:从doublewrite还原可能的半写数据页 InnoDB:缓冲区... InnoDB:正在执行恢复:扫描到日志序列号108 1058059648 InnoDB:1个必须回滚或清理的事务 InnoDB:总共15行操作要撤消 InnoDB:Trx ID计数器为0 562485504 140502 14:13:06 InnoDB:正在将一批日志记录应用于数据库... InnoDB:进度百分比:4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 …
19 mysql  innodb  crash 

4
Ubuntu卸载elasticsearch
我在ubuntu中安装了带deb文件的elasticsearch.90.7。我尝试使用以下命令卸载elasticsearch.90.7: sudo apt-get --purge autoremove elasticsearch 然后我下载elasticsearch-1.6.0.deb了安装Elasticsearch 1.6。 当我运行此命令以通过deb文件安装elasticsearch 1.6时: dpkg -i elasticsearch-1.6.0.deb 它向我展示了这一点: Selecting previously unselected package elasticsearch. (Reading database ... 89826 files and directories currently installed.) Preparing to unpack elasticsearch-1.6.0.deb ... Creating elasticsearch group... OK Creating elasticsearch user... OK Unpacking elasticsearch (1.6.0) ... Setting up elasticsearch (1.6.0) ... …

2
如何列出ssh​​服务器支持的MAC,密码和KexAlogrithms?
如何确定ssh服务器支持的支持的MAC,密码,密钥长度和KexAlogrithms? 我需要为外部安全审核创建列表。我在寻找类似的东西openssl s_client -connect example.com:443 -showcerts。从我的研究中,ssh使用列出的默认密码man sshd_config。但是,我需要可以在脚本中使用的解决方案,man sshd_config并且不会列出有关密钥长度的信息。我需要在此处更正自己:您可以ServerKeyBits在中指定sshd_config。 我想这会ssh -vv localhost &> ssh_connection_specs.out返回我需要的信息,但是我不确定列出的密码是客户端还是服务器支持的密码。另外,我不确定如何在脚本中运行此非交互式。 有获取SSH连接信息的便捷方法吗?
19 linux  ssh  audit 

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.