服务器问题集锦,包括 Linux(Ubuntu, Centos,Debian等)和Windows Server服务器
我正在使用spring cloud config server 1.3.1configuration一个spring boot 1.5.4客户端。 客户端和服务器工作没有任何身份validation。 但是,我试图configurationHTTP基本身份validation不起作用。 当我通过浏览器访问Spring云configuration服务器URL时,即使没有身份validation,它仍然可以访问。 我可能会错过一些基本的东西。 我的客户端bootstrap.properties文件是 spring.application.name=service1 spring.cloud.config.uri=https://config.example.com spring.cloud.config.username=username spring.cloud.config.password=xxxx spring.profiles.active=profile1,profile2 management.security.enabled=true 而我的云configuration服务器application.properties看起来像 – server.port=443 spring.application.name=spring-config spring.cloud.config.server.git.uri=https://gitlab.com/services/service1.git spring.cloud.config.server.git.username=serviceuser spring.cloud.config.server.git.password=servicepass spring.cloud.config.server.git.clone-on-start=true security.user.name=username security.user.password=xxxx spring.cloud.config.server.health.enabled=false spring.cloud.config.server.bootstrap=true spring.cloud.config.server.prefix=/config 当我访问` https://config.example.com/service1/label我没有得到任何forms的身份validation,但我看到我在JSONconfigurationservice1-label.properties 任何帮助表示赞赏!
所以,我有一个需要安装软件的脚本,但脚本需要以root身份运行。 我已经在GUI上创build了一个桌面图标(使用Ubuntu桌面),理想情况下,用户将点击这个图标,它会提示input密码,然后以root身份运行脚本。 到目前为止,如果以root用户身份运行脚本,脚本的作用并不如用户。 脚本看起来像这样: #!/bin/bash -l zenity –question –text "This script will reboot after installation is complete" –title="Warning\!" 2> /dev/null if [ $? = 0 ]; then install dependencies dpkg -i package.deb etc fi reboot 但是,如果我点击图标来运行脚本,它加载,它什么都不做,然后我检查日志,并意识到它失败: sudo: no tty present and no askpass program specified我知道我可以修改sudoers文件,但我不想这样做,因为我需要保持这个用户独立。 有没有办法强制运行脚本时要求用户成为root用户? 或者强制GUI要求input密码? 什么是最好的办法做到这一点? 我需要用户运行这个程序,但我需要以root用户身份运行程序,sudo不会因为任何原因执行此程序。
我疯狂地从dreamhost和他们可怕的产品运行 – 但是这给我留下了一个有趣的情况: 1网站是通过他们的webpanel“完全托pipe”的 – 这个自动创build“A”logging到他们的服务器 – 这指向正确的文件夹,网页文件在 2新网站已经过testing并准备好接收networkingstream量 3单击“仅限dns”将删除A并允许我将其指向新logging,但也会删除Web文件夹位置 4因此,当客户端击中旧的Alogging时,他们指向一个愚蠢的机器人错误消息,该网站已经失踪,而不是渲染旧的网站。 5我已经要求他们修改apache文件,修改Alogging,为我做一些事情,他们可以不在乎,告诉我有一个“美好的一天”! 我能做些什么来从这个可怕的公司有一个更好的过渡? 我可以提供两个logging,然后在一天之内抽出一个? 我是否需要将名称服务器移动到新的服务器上,并尝试从不同的angular度解决这个问题?
所以,NGINX 1.13.2今天发布了,我想更新我的1.13.1安装。 我不能简单地使用像$ apt-get install nginx这样的东西,因为我在构build中使用了一些静态模块。 因此,我有几个问题: 我应该完全覆盖现有的文件吗? 我最初提取NGINX本身到/opt/nginx所以我应该只是$ tar -xvzf nginx-1.13.2 -C /opt/nginx ? 我猜测我将需要再次运行./configure与以前相同的值。 当我运行make应该使用$ make upgrade而不是$ make install ? 还有什么我应该知道的? 我知道使用USR2和WINCH信号正常closures旧的主进程并启动新的进程,但我假设这是在步骤1和2之后。还有什么我应该知道的? 谢谢!
我试图更新一个红帽7系统,但不能由于以下依赖性消息: Error: Package: Trac-1.0.12-1.noarch (@/Trac-1.0.12-1.noarch) Requires: /bin/python Removing: python-2.7.5-34.el7.x86_64 (@rhel-7-server-rpms) Not found Updated By: python-2.7.5-48.el7.x86_64 (rhel-7-server-rpms) Not found / bin / python肯定存在。 我从'whereis python'得到以下内容: python: /usr/bin/python2.7 /usr/bin/python /usr/lib/python2.7 /usr/lib64/python2.7 /etc/python /usr/include/python2.7 /usr/share/man/man1/python.1.gz 正如你所看到的,没有/ bin / python – 这个重要吗? 我不确定whereis从哪里得到它的信息。 '哪个python'返回/ bin / python。 我需要这个系统更新干净 – 任何build议将受到感谢。
所以我有一个脚本,它在心里运行apachectl -t -D DUMP_VHOSTS来获取特定机器上所有虚拟主机的列表。 然后,greps从这个响应,并产生一个关于机器上的虚拟主机的configuration机器可parsing信息的json blob。 这将作为一个非特权用户运行,因为它只是一个分析什么,而不是一个特权尝试改变任何东西。 但是,在debian上,非特权用户,完全正确地不能读取/etc/ssl/private任何内容,所以我得到: – AH00526: Syntax error on line 27 of /etc/apache2/sitesenabled/ssl_proxy.conf: SSLCertificateKeyFile: file '/etc/ssl/private/ssl-cert-snakeoil.key' does not exist or is empty 这个问题在Apache上讨论:SSLCertificateKeyFile:文件不存在或为空 但是,我不希望用户运行脚本来访问密钥文件或者testingconfiguration,我只想让apache告诉我有关什么虚拟主机被定义。 在专门抛出这个错误的服务器上,我甚至没有使用SSL,所以它抱怨一个甚至不涉及VHOST的键,但是我可以看到它可能,但似乎Apache不能告诉只是继续,并忽略SSL模块或任何东西。 任何想法如何做到这一点,超越parsing的Apacheconfiguration直接? 编辑。 所以看来在检查时,apachectl在DUMP(s)_VHOSTS时所做的事情,并不像想象的那么愚蠢。 这本质上是validationconfiguration文件,也就是说,检查指定的文件是否存在。 不是,试图读取文件的内容。 因此,调用者不需要文件的读取权限,只需读取包含该文件的目录的权限即可。
我有Corosync + Pacemaker的下一个场景 节点1: eth0:10.143.0.21/24 eth1:10.10.10.1/30(Corosync通信) eth2:192.168.5.2/24 节点2: eth0:10.143.0.22/24 eth1:10.10.10.2/30(Corosync通信) eth2:192.168.5.3/24 浮动IP的 eth0:10.143.0.23/24 eth2:192.168.5.1/24 接口eth1仅用于corosync通信。 例如我断开networking电缆从接口eth0,但没有任何反应,其他例子我断开networking电缆从接口eth2,我有相同的结果,但我断开networking电缆从接口eth1(corosync通信)和浮动IP的传递到其他节点。 断开资源传递到另一个节点的任何接口时,我该如何做? 问候 UPDATE 我testing了以下设置 crm configure primitive PING-WAN ocf:pacemaker:ping params host_list="10.143.0.1" multiplier="1000" dampen="1s" op monitor interval="1s" crm configure primitive Failover-WAN ocf:heartbeat:IPaddr2 params ip=10.143.0.23 nic=eth0 op monitor interval=10s meta is-managed=true crm configure primitive Failover-LAN ocf:heartbeat:IPaddr2 params ip=192.168.5.1 nic=eth2 op monitor […]
我正在使用最新的官方nginx docker容器 。 无论何时启动容器,都会在/usr/share/nginx/html中创build两个文件 root@ba65db04a18f:/# ls -la /usr/share/nginx/html total 16 drwxr-xr-x 2 root root 4096 Jun 28 15:38 . drwxr-xr-x 3 root root 4096 Jun 23 00:55 .. -rw-r–r– 1 root root 537 May 30 13:03 50x.html -rw-r–r– 1 root root 612 May 30 13:03 index.html 如何防止这些文件被创build? 我用来启动容器的命令是: docker volume create static docker run -it […]
我有一个托pipe在Scaleway上的服务器,其上有多个登台站点。 我不小心将服务器归档了,而不是closures它,这意味着我的网站的MySQL数据目前存储在/mnt/volume0/var/lib/mysql但是MySQL目前正在查看/var/lib/mysql因此我的数据库都没有被拾起。 我怎样才能让MySQL查看卷上的MySQL数据的path呢? 我已经尝试遵循这个指南: https : //www.digitalocean.com/community/tutorials/how-to-move-a-mysql-data-directory-to-a-new-location-on-ubuntu-16-04 但是当再次启动MySQL时,我得到: Job for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details. 并运行systemctl status mysql给出: ● mysql.service – MySQL Community Server Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled) Active: activating (start-post) (Result: exit-code) since Wed 2017-06-28 17:53:13 UTC; […]
我希望给iptables添加一个规则,并在24小时后自动删除它。 有没有简单的方法来完成这个? 谢谢