假设我将正在运行的 Debian 系统的内核更新apt-get upgrade linux-image-amd64为更高的次版本号(例如,5.10.10更新为5.10.11)。我是否必须重新启动 Debian 服务器才能使更新生效?
我有两台服务器,A 和 B。我希望服务器 B 只接受来自服务器 A 的 HTTP 请求。“access-control-allow-origin”是实现该功能的安全方法吗?
使用 Ubuntu Focal fossa。我试图为 VPN 安装检查点 ssl 软件,但似乎有些东西弄乱了我的所有证书。现在每当我尝试
sudo apt-get update
Run Code Online (Sandbox Code Playgroud)
我收到以下错误。
Get:1 file:/var/cudnn-local-repo-ubuntu2004-8.3.1.22 InRelease
Ign:1 file:/var/cudnn-local-repo-ubuntu2004-8.3.1.22 InRelease
Get:2 file:/var/cudnn-local-repo-ubuntu2004-8.3.1.22 Release [564 B]
Get:2 file:/var/cudnn-local-repo-ubuntu2004-8.3.1.22 Release [564 B]
Ign:3 https://dl.google.com/linux/chrome/deb stable InRelease
Ign:4 https://gitlab.com/feren-os/feren-repositories-neon-focal/raw/master stable InRelease
Err:5 https://dl.google.com/linux/chrome/deb stable Release
Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. Could not handshake: Error in the certificate verification. [IP: 74.125.68.91 443]
Ign:6 https://dl.winehq.org/wine-builds/ubuntu focal InRelease
Ign:7 https://gitlab.com/feren-os/feren-repositories-focal/raw/master stable InRelease
Err:8 https://dl.winehq.org/wine-builds/ubuntu focal Release
Certificate verification failed: The …Run Code Online (Sandbox Code Playgroud) 要使用从 json 收集的变量,我需要它是原始的,不带引号:
我有
ok: [device] => {
"fact": {
"int": "7"
},
}
Run Code Online (Sandbox Code Playgroud)
我想
ok: [device] => {
"fact": {
"int": 7
},
}
Run Code Online (Sandbox Code Playgroud)
问题是引号不是变量的一部分,所以我无法使用| int或| replace删除引号。
有办法吗?
我的 Armbian Bullseye 系统坚持在 /dev/zram0 上设置交换空间。我不希望这样,因为我已经创建了一个我更愿意使用的交换分区。
\n但我找不到如何永久删除交换空间/dev/zram0。它可以通过 swapoff 暂时删除,但在重新启动时会恢复。/etc/fstab 或我能找到的其他任何地方都没有相关内容。
\n安装 zram-tools 没有帮助,因为服务失败。
\n搜索后会出现很多有关 swap 或 zram 的页面,但似乎没有任何内容可以回答这个看似简单的问题!请问有什么建议吗?
\n添加以下答案:命令
\nsystemctl --type swap\nRun Code Online (Sandbox Code Playgroud)\n屏蔽并重新启动后,显示:
\ndev-disk-by\\x2duuid-1e389607\\x2d8cdf\\x2d4ce7\\x2dacfb\\x2dccb7426a336b.swap loaded active active /dev/disk/by-uuid/1e389607-8cdf-4ce7-acfb-ccb7426a336b \n\n\xe2\x97\x8f dev-zram0.swap masked active active /dev/zram0 \nRun Code Online (Sandbox Code Playgroud)\n第一行是交换分区。不幸的是,根据 swapon --show,zram 交换还没有消失:
\nNAME TYPE SIZE USED PRIO \n/dev/sda2 partition 2G 0B -2 \n/dev/zram0 partition 995.2M 0B 5\nRun Code Online (Sandbox Code Playgroud)\n 我刚刚使用 Ubuntu。
刚刚在我的 DEV 服务器上安装了 CentOS,并且在进行更新或安装新软件包时立即遇到问题。
这是错误:
sudo yum update
Last metadata expiration check: 0:41:22 ago on Tue 15 Feb 2022 10:38:21 AM.
Error:
Problem 1: problem with installed package libidn2-2.3.0-7.el9.x86_64
- cannot install the best update candidate for package libidn2-2.3.0-7.el9.x86_64
- nothing provides libunistring.so.0()(64bit) needed by libidn2-2.3.2-1.el7.x86_64
Problem 2: cannot install the best update candidate for package python3-tracer-0.7.5-4.el9.noarch
- problem with installed package python3-tracer-0.7.5-4.el9.noarch
- package python3-tracer-0.7.5-4.el9.noarch requires tracer-common = 0.7.5-4.el9, but none of the providers can be installed …Run Code Online (Sandbox Code Playgroud) server{
..
server_name some_other_domain_name.com;
..
}
Run Code Online (Sandbox Code Playgroud)
我已通过 godaddy 将我的域名映射到我的虚拟机的公共 IP。
当我在浏览器中输入域名时,它就可以访问虚拟机上托管的网站(通过nginx)。但是,我预计 nginx 不会允许该请求,因为 server_name 属性设置为 some_other_domain_name.com
nginx 不检查 server_name 属性吗?
提供了一个文件示例/etc/nginx/nginx.conf。
服务器有 2 个监听,如下:
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
...
}
Run Code Online (Sandbox Code Playgroud)
第一次听和第二次听有什么区别?
第一个监听似乎监听端口 443 上的任何请求,而第二个监听似乎监听端口 443 上任何源 IP 的任何请求?
我想在这篇文章的开头加上这样的免责声明:我对 yum 的功能有些不熟悉,也不熟悉自 CentOS 8 停产以来所需更改的细节。
大约一个月前,我的容器构建无法成功运行,因为当我进行 yum update 时,出现错误。我在这里找到了解决方案并将其添加到我的容器构建中:
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-Linux-*
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-Linux-*
Run Code Online (Sandbox Code Playgroud)
这让我度过了一段时间,直到今天,它似乎又崩溃了。
bash-4.4# yum update
CentOS Linux 8 - AppStream 149 kB/s | 8.4 MB 00:58
CentOS Linux 8 - BaseOS 113 kB/s | 4.6 MB 00:41
CentOS Linux 8 - Extras 716 B/s | 10 kB 00:14
CentOS Linux 8 - PowerTools 0.0 B/s | 0 B 01:26
Errors during downloading metadata for repository 'powertools':
- Curl error (28): Timeout was reached …Run Code Online (Sandbox Code Playgroud) 在将Flask应用程序部署到Google Cloud Platform时,我收到此错误:
[ERROR] Exception in worker process from itsdangerous import json as _json ImportError: cannot import name 'json' from 'itsdangerous'
2022-02-18 08:00:30 default[20220218t132659] Traceback (most recent call last):
File "/layers/google.python.pip/pip/lib/python3.7/site-packages/gunicorn/arbiter.py", line 589, in spawn_worker
worker.init_process()
File "/layers/google.python.pip/pip/lib/python3.7/site-packages/gunicorn/workers/gthread.py", line 92, in init_process
super().init_process()
File "/layers/google.python.pip/pip/lib/python3.7/site-packages/gunicorn/workers/base.py", line 134, in init_process
self.load_wsgi()
File "/layers/google.python.pip/pip/lib/python3.7/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi
self.wsgi = self.app.wsgi()
File "/layers/google.python.pip/pip/lib/python3.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
self.callable = self.load()
File "/layers/google.python.pip/pip/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 58, in load
return self.load_wsgiapp() …Run Code Online (Sandbox Code Playgroud) centos ×2
centos8 ×2
debian ×2
nginx ×2
yum ×2
ansible ×1
apt ×1
certificate ×1
http ×1
http-headers ×1
kernel ×1
linux-kernel ×1
security ×1
swap ×1
ubuntu-20.04 ×1
update ×1