AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-310604

Santosh Garole's questions

Martin Hope
Santosh Garole
Asked: 2021-10-09 00:09:23 +0800 CST

安装提供程序“aws”时出错:openpgp:未知实体的签名

  • -1

我的提供程序代码init.tf如下:

provider "aws" {
 shared_credentials_file = "~/.aws/credentials"
 region                  = "us-east-1"
}

我使用的 Terraform 版本是:0.11.14

我在执行以下操作时收到如下错误terraform init:

Error installing provider "aws": openpgp: signature made by unknown entity.

Terraform analyses the configuration and state and automatically downloads
plugins for the providers used. However, when attempting to download this
plugin an unexpected error occured.

This may be caused if for some reason Terraform is unable to reach the
plugin repository. The repository may be unreachable if access is blocked
by a firewall.

If automatic installation is not possible or desirable in your environment,
you may alternatively manually install plugins by downloading a suitable
distribution package and placing the plugin's executable file in the
following directory:
    terraform.d/plugins/windows_amd64
aws openpgp
  • 1 个回答
  • 361 Views
Martin Hope
Santosh Garole
Asked: 2019-11-26 05:12:24 +0800 CST

我们如何检查操作系统版本和要在 Linux 服务器上应用的安全补丁的数量?

  • 0

我编写了一个 bash 脚本,它检查操作系统版本并根据操作系统分布计算可用的安全补丁。

这里的查询是脚本不适用于 Ubuntu OS。脚本如下:

#!/bin/bash


# Detecting OS Distribution
if [ -f /etc/os-release ]; then
  . /etc/os-release
  OS=$PRETTY_NAME

elif [ -f /etc/redhat-release ]; then

   REDHAT=$(cat /etc/redhat-release)

else
   echo " OS is not supported "
fi

#Check how many packages for security and available to update
if [[ $OS == *"Red Hat"* ]] || [[ $OS == *"Amazon Linux"* ]] || [[ $OS == 
    *"CentOS"*  ]] || [[ $REDHAT == *"Red Hat"*  ]] ; then

    SECPKGCNT=$(sudo yum list-security --security | awk 'NR>2 {print last} 
{last=$0}' | wc -l)
    echo "${OS},${REDHAT},${SECPKGCNT}"

elif [[ $OS == *"Ubuntu"* ]] ;then

    SECPKGCOUNT=$(sudo apt list --upgradable 2>/dev/null | grep "\-security" 
    | wc -l)
    echo "${OS},${SECPKGCOUNT}"
   else
  echo " No security packages to update"
   fi

ubuntu机器中的O/p:

root@ip-XXXX:~# sh -x getos.sh
+ [ -f /etc/os-release ]
+ . /etc/os-release
+ NAME=Ubuntu
+ VERSION=14.04.5 LTS, Trusty Tahr
+ ID=ubuntu
+ ID_LIKE=debian
+ PRETTY_NAME=Ubuntu 14.04.5 LTS
+ VERSION_ID=14.04
+ HOME_URL=http://www.ubuntu.com/
+ SUPPORT_URL=http://help.ubuntu.com/
+ BUG_REPORT_URL=http://bugs.launchpad.net/ubuntu/
+ OS=Ubuntu 14.04.5 LTS
+ [[ Ubuntu 14.04.5 LTS = *Red Hat* ]]
getos.sh: 29: getos.sh: [[: not found
+ [[ Ubuntu 14.04.5 LTS = *Amazon Linux* ]]
getos.sh: 29: getos.sh: [[: not found
+ [[ Ubuntu 14.04.5 LTS = *CentOS* ]]
getos.sh: 29: getos.sh: [[: not found
+ [[ = *Red Hat* ]]
getos.sh: 29: getos.sh: [[: not found
+ [ Ubuntu 14.04.5 LTS = *Ubuntu* ]
getos.sh: 34: [: Ubuntu: unexpected operator
+ echo  No security packages to update
No security packages to update

在上面的 ubuntu 系统中,脚本没有按预期工作,我的意思是它应该打印操作系统版本和安全补丁的数量。

bash shell-script
  • 1 个回答
  • 1158 Views
Martin Hope
Santosh Garole
Asked: 2019-05-28 08:47:19 +0800 CST

如何检查多台服务器上的java版本?[复制]

  • 1
这个问题在这里已经有了答案:
Linux 相当于 PowerShell 的“一对多”远程处理 7 个答案
3年前关闭。

我有 100 台服务器,我需要使用脚本从中央服务器使用 ssh 登录它们:我在下面尝试了这个,我应该将版本重定向到将存储在中央服务器的文件。

#!/bin/bash

CMD='java -version'
while read line
do
    ssh -n user@"$line" $CMD >> /pathforoutputfile/outputjava.txt

done < /pathforhosts/hosts.txt

但我没有在文件中生成输出/pathforoutputfile/outputjava.txt

shell-script ssh
  • 1 个回答
  • 1503 Views
Martin Hope
Santosh Garole
Asked: 2019-05-16 02:48:56 +0800 CST

当 EFS 为 Linux EC2 服务器卸载时,我们如何发出警报?

  • 0

我在 cron 作业中使用以下脚本来在 EFS 卸载时收到警报。

但是当 EFS 被卸载时它不会提醒我。

#!/bin/bash
Hostname=$(hostname)
##email subject
subject="EFS is unmounted"
## sending mail to
to="[email protected]"
## send carbon copy to
also_to="[email protected]"

## Check if EFS is mounted or not
efscommenpart=$(df -kh | grep amazonaws.com | cut -d "." -f4)

## If EFS is unmounted
if [[ "$efscommenpart" -ne amazonaws  ]]

then

        echo -e "EFS is not mounted" | mailx -s "$subject" -r "$Hostname" -c "$to" "$also_to"
fi

谁能建议我我在哪里做错了?

这是紧急的……!!!

shell-script amazon-ec2
  • 1 个回答
  • 134 Views
Martin Hope
Santosh Garole
Asked: 2019-03-26 05:58:48 +0800 CST

如何找到特定时间的最高内存和 CPU 消耗进程?

  • 0

我检查了 sar 报告,发现 CPU 和内存在特定时间(例如前一天)得到了更多的利用。

是否可以找到占用大量 CPU 和内存的进程?我们如何发现哪个进程正在消耗该内存和 CPU。

cpu memory
  • 4 个回答
  • 2302 Views
Martin Hope
Santosh Garole
Asked: 2019-03-08 02:53:43 +0800 CST

什么是快速计算 4TB 文件中行数的方法?

  • 5

我有一个从 Teradata 记录导出的 4TB 大文本文件,我想知道该文件中有多少条记录(在我的情况下为行)。

我怎样才能快速有效地做到这一点?

text-processing cat
  • 6 个回答
  • 7542 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    模块 i915 可能缺少固件 /lib/firmware/i915/*

    • 3 个回答
  • Marko Smith

    无法获取 jessie backports 存储库

    • 4 个回答
  • Marko Smith

    如何将 GPG 私钥和公钥导出到文件

    • 4 个回答
  • Marko Smith

    我们如何运行存储在变量中的命令?

    • 5 个回答
  • Marko Smith

    如何配置 systemd-resolved 和 systemd-networkd 以使用本地 DNS 服务器来解析本地域和远程 DNS 服务器来解析远程域?

    • 3 个回答
  • Marko Smith

    dist-upgrade 后 Kali Linux 中的 apt-get update 错误 [重复]

    • 2 个回答
  • Marko Smith

    如何从 systemctl 服务日志中查看最新的 x 行

    • 5 个回答
  • Marko Smith

    Nano - 跳转到文件末尾

    • 8 个回答
  • Marko Smith

    grub 错误:你需要先加载内核

    • 4 个回答
  • Marko Smith

    如何下载软件包而不是使用 apt-get 命令安装它?

    • 7 个回答
  • Martin Hope
    user12345 无法获取 jessie backports 存储库 2019-03-27 04:39:28 +0800 CST
  • Martin Hope
    Carl 为什么大多数 systemd 示例都包含 WantedBy=multi-user.target? 2019-03-15 11:49:25 +0800 CST
  • Martin Hope
    rocky 如何将 GPG 私钥和公钥导出到文件 2018-11-16 05:36:15 +0800 CST
  • Martin Hope
    Evan Carroll systemctl 状态显示:“状态:降级” 2018-06-03 18:48:17 +0800 CST
  • Martin Hope
    Tim 我们如何运行存储在变量中的命令? 2018-05-21 04:46:29 +0800 CST
  • Martin Hope
    Ankur S 为什么 /dev/null 是一个文件?为什么它的功能不作为一个简单的程序来实现? 2018-04-17 07:28:04 +0800 CST
  • Martin Hope
    user3191334 如何从 systemctl 服务日志中查看最新的 x 行 2018-02-07 00:14:16 +0800 CST
  • Martin Hope
    Marko Pacak Nano - 跳转到文件末尾 2018-02-01 01:53:03 +0800 CST
  • Martin Hope
    Kidburla 为什么真假这么大? 2018-01-26 12:14:47 +0800 CST
  • Martin Hope
    Christos Baziotis 在一个巨大的(70GB)、一行、文本文件中替换字符串 2017-12-30 06:58:33 +0800 CST

热门标签

linux bash debian shell-script text-processing ubuntu centos shell awk ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve