小编sol*_*ier的帖子

xxxx-client 和 xxxx-server 包有什么区别?

当我要安装软件包或软件时,我可以看到客户端 | 服务器版本。这实际上是什么意思?例如:

apt-get install xxxx-client
apt-get install xxxx-server
Run Code Online (Sandbox Code Playgroud)

这些有什么区别?当我们需要安装应用程序或包时,我们如何分类?让我们说:

如果我想安装 nginx,我只需输入 即可安装apt-get install nginx,所以我们不会有任何混淆。

当我在寻找 MySQL 时,如何选择我应该安装哪个版本?我对客户端和服务器很困惑。

server mysql package-management apt client

8
推荐指数
2
解决办法
2150
查看次数

apt 更新 docker.com Release 404 未找到

我最近尝试使用这种方法安装 docker

curl -fsSL get.docker.com -o get-docker.sh
sh get-docker.sh
Run Code Online (Sandbox Code Playgroud)

但它对我不起作用,可能是损坏的软件包或其他东西,之后我使用 apt 方法安装了 docker && docker compose 并且效果很好但是当我尝试更新或升级我的系统时,我可以看到以下消息我实际上不知道是什么是问题请给我一个解决方案谢谢。

$ sudo apt-get update

Hit:1 http://ppa.launchpad.net/daniruiz/flat-remix/ubuntu bionic InRelease
Hit:2 https://dl.winehq.org/wine-builds/ubuntu bionic InRelease                                    
Hit:3 http://security.ubuntu.com/ubuntu bionic-security InRelease                                  
Ign:4 http://dl.google.com/linux/chrome/deb stable InRelease                                       
Hit:5 http://dl.google.com/linux/chrome/deb stable Release                                         
Hit:6 http://ppa.launchpad.net/ondrej/php/ubuntu bionic InRelease                                  
Hit:7 http://lk.archive.ubuntu.com/ubuntu bionic InRelease                                         
Ign:9 https://download.docker.com/linux/debian bionic InRelease                                    
Hit:10 http://lk.archive.ubuntu.com/ubuntu bionic-updates InRelease                                
Err:11 https://download.docker.com/linux/debian bionic Release                                     
  404  Not Found [IP: 13.35.8.98 443]
Hit:13 http://lk.archive.ubuntu.com/ubuntu bionic-backports InRelease                              
Hit:12 https://packagecloud.io/slacktechnologies/slack/debian jessie InRelease
Reading package lists... Done                                
E: …
Run Code Online (Sandbox Code Playgroud)

upgrade updates apt 18.04

5
推荐指数
2
解决办法
2万
查看次数

用于计算域到期剩余天数的 Bash 脚本

您好,我有一项任务是查找域过期的剩余天数。的输出应保持的天数(整数),所以我试图这样我可以通过域作为参数

例如:- 我的域 - www.xplosa.com

脚本文件:- ./domain-exp.sh

执行方法:- ./domain-exp.sh www.xplosa.com

#!/bin/bash

target=$1

# Get the expiration date
expdate="$(whois $1 | egrep -i 'Registrar Registration Expiration Date:' | head -1)"

# Turn it into seconds (easier to compute with)
expdate=("$expdate" +%s)

# Get the current date in seconds
curdate=$(date +%s)

# Print the difference in days
echo  ($expdate - $curdate) / 86400 
Run Code Online (Sandbox Code Playgroud)

这不是我期望的输出,请帮助我解决这个问题,谢谢。

command-line bash scripts 18.04

2
推荐指数
1
解决办法
993
查看次数

用于计算网站中 SSL 证书到期剩余天数的 Bash 脚本

我有一个名为的网站xplosa.com,它有一个有效的 SSL 证书,我通过 bash 脚本应该能够计算剩余天数到期。我知道有很多替代方法可以完成这项工作,但我喜欢使用 Ubuntu bash 。顺便说一句,我正在使用Ubuntu 18.04

这是我的示例逻辑

#!/bin/bash

get_the_cert_expiry_date() {
    # command to retrieve the expiry date
}

currentDate="$(date +%Y-%m-%d)"
website="xplosa.com"
certExpDate="$(get_the_cert_expiry_date)"
count=$((currentDate - certExpDate))

echo "remaining days for expiry: ${count}"
Run Code Online (Sandbox Code Playgroud)
  • 这是一个正确的逻辑吗?
  • 如何实施 get_the_cert_expiry_date

command-line bash scripts ssl

1
推荐指数
1
解决办法
2879
查看次数