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-99201

user99201's questions

Martin Hope
user99201
Asked: 2020-02-11 09:53:43 +0800 CST

使用 sed 去除具有不同名称的多个案例

  • 0

我有一个 ansible 库存,我需要删除所有以site2-.

例如,我有一个列表,其中包含名为:

[site2-static-web]
site2-ansible
site2-accounts
site2-admin
site2-analytics
site2-audit
site2-botruntime
site2-campaigns
site2-config
site2-coupons
site2-edge
site2-minio
site2-permissions
site2-registry
site2-surveys
site2-websockets
site2-amc-server
site2-static-web
site2-elasticsearch
site2-logstash
site2-kibana
site2-keycloak
site2-pgsql
site2-mysql
site2-rabbitmq
site2-redis
site2-zipkin

我试过sed -i.bak 's/site2-*///g' mmp_default了,但我得到的只是site2把末端留在里面的移除。

site2-ansible
site2-accounts

成为:

ansible
accounts

我怎样才能正确地做到这一点?

sed
  • 1 个回答
  • 38 Views
Martin Hope
user99201
Asked: 2020-02-04 07:49:11 +0800 CST

检查 SSH 隧道是否仍在运行

  • 0

我正在运行一个 SSH 隧道命令,如下所示:

ssh -v [email protected] -L 9999:10.238.93.43:8991

但是当我使用 netstat 命令测试监听连接时,我看不到隧道端口:

bastion001 ABB-LAB] 0 15:45:16 [~] $ netstat -tulpn | grep -i listen
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      -
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      -
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      -
tcp6       0      0 ::1:25                  :::*                    LISTEN      -
tcp6       0      0 :::111                  :::*                    LISTEN      -
tcp6       0      0 :::8080                 :::*                    LISTEN      1078/java
tcp6       0      0 :::80                   :::*                    LISTEN      -
tcp6       0      0 :::8081                 :::*                    LISTEN      1078/java
tcp6       0      0 :::22                   :::*                    LISTEN      -

这里发生了什么?为什么我看不到隧道端口?

ssh-tunnel
  • 1 个回答
  • 878 Views
Martin Hope
user99201
Asked: 2019-08-27 13:32:45 +0800 CST

如何在 Linux 上列出所有 IPA 组

  • 0

我可以使用该getent group命令获取 linux 服务器上的组列表。但是,这只给了我 /etc/group 文件中的本地组。

服务器连接到用于创建活动目录组的 IPA。如何获取服务器上组 IPA/Active Directory 组的列表。

active-directory
  • 1 个回答
  • 5540 Views
Martin Hope
user99201
Asked: 2019-08-26 15:58:02 +0800 CST

重新部署 Azure VM 并保留静态 IP

  • 1

我为 Azure VM 配置了一个我不想丢失的 IP 地址,因为它是在 DNS 中配置的。但是,由于某些问题,我想重新部署服务器。

有没有办法重新部署 Azure VM 并保持与以前相同的 IP?

azure
  • 1 个回答
  • 340 Views
Martin Hope
user99201
Asked: 2018-10-31 06:57:35 +0800 CST

Bash 中数组表示法的差异

  • 0

这两个数组表示法有什么区别?

  • "${aws_user_roles[@]}"
  • "${aws_user_roles[*]}"
bash
  • 1 个回答
  • 22 Views
Martin Hope
user99201
Asked: 2018-07-10 11:27:38 +0800 CST

无法在后缀中使用邮件中继:传递到命令:procmail

  • 0

我正在尝试在本地测试 VM 上设置邮件中继服务器。我正在使用 Ubuntu 18.04。

当我使用我的 postfix 配置发送电子邮件时,邮件从未收到,我在邮件日志中看到此条目:

status=sent (delivered to command: procmail -a "$EXTENSION")

这是我的后缀配置:

tdunphy@tdunphy-dev:~$ postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
compatibility_level = 2
inet_interfaces = all
inet_protocols = all
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
mydestination = $myhostname, company.com, tdunphy-VirtualBox, localhost.localdomain, localhost
myhostname = noreply.company.com
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
relayhost = smtpout.us.companyworld.company.com
smtp_sasl_auth_enable = no
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes

我正在使用此命令在命令行上发送电子邮件:

 mail -s "Test Subject" [email protected] < mail_test.txt

这是我在日志中看到的:

Jul  9 14:31:22 tdunphy-VirtualBox postfix/local[7906]: 1C485E36C: to=<[email protected]>, relay=local, delay=35, delays=35/0.01/0/0.02, dsn=2.0.0, status=sent (delivered to command: procmail -a "$EXTENSION")
Jul  9 14:31:22 tdunphy-VirtualBox postfix/qmgr[7890]: 1C485E36C: removed
Jul  9 14:31:25 tdunphy-VirtualBox postfix/smtpd[7901]: disconnect from localhost[127.0.0.1] ehlo=1 mail=1 rcpt=1 data=1 quit=1 unknown=0/1 commands=5/6

但是电子邮件永远不会到达。我该如何解决?

linux
  • 1 个回答
  • 230 Views
Martin Hope
user99201
Asked: 2018-01-03 08:10:44 +0800 CST

使用firewalld打开所有端口到特定IP

  • 12

我在一台red hat 7机器上,我需要打开防火墙上特定IP的所有端口。

我试过这个命令:

firewall-cmd --permanent --zone=public --add-rich-rule='   rule family="ipv4"   source address="64.39.96.0/20"   port protocol="tcp" port="*" accept'

但是我收到了一个无效的端口错误 *

有谁知道并且可以告诉我如何正确地做到这一点?

firewalld
  • 2 个回答
  • 34448 Views
Martin Hope
user99201
Asked: 2016-09-03 06:24:28 +0800 CST

自定义 AWS 登录域

  • 1

我的旧公司有如下所示的自定义 AWS 登录 URL:

https://company-us-aws-dev.signin.aws.amazon.com/console
https://company-us-aws-qa.signin.aws.amazon.com/console
https://company-us-aws-stage.signin.aws.amazon.com/console
https://company-us-aws-prod.signin.aws.amazon.com/console

当您单击上述任何链接时,您会看到一个如下所示的登录页面:

AWS 登录

这是一个登录页面,让您有机会切换到您的 aws root 帐户。但是我不知道这个页面叫什么。

我现在需要在我的新公司进行设置。有没有您可以指出我的文档,或者您可以提供如何执行此操作的说明?

我需要了解如何在 DNS 中创建这些自定义 URL,以及如何将这些 URL 指向这些登录屏幕。如果我只是在 DNS 中创建一条 A 记录并将其指向一个 AWS IP,当我在浏览器中访问该 URL 时,我只会得到一个 404 屏幕。

请帮忙

amazon-web-services
  • 3 个回答
  • 1519 Views

Sidebar

Stats

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

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

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

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve