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

Konstantin Boyandin's questions

Martin Hope
Konstantin Boyandin
Asked: 2016-04-16 18:48:09 +0800 CST

安排作业每 23 分钟运行一次

  • 2

在某些情况下,我需要以 Cron 能够提供的更复杂的方式运行计划作业。比如说,安排一个作业每 23 或 65 分钟运行一次。

在后一种情况下,可以通过添加多个 Cron 条目来运行同一行来解决它。在第一种情况下,要添加的行数太多了。

三个明显的解决方案:

  • 每分钟运行一次该过程;使用作业自己的逻辑来推断它应该何时实际运行并将其状态保持在某个地方(例如,在文件中)
  • 在脚本中使用“sleep”暂停指定的时间,并使用像Supervisor这样的东西保持运行
  • 使用任何能够以任意周期定期运行进程的实用程序(例如监视实用程序)并使用它启动任务

但在某些情况下,它们都是不方便的。

是否有更智能的 Cron 替代品,至少可用于 POSIX 系统,能够使用任意时间表?

cron posix
  • 2 个回答
  • 2440 Views
Martin Hope
Konstantin Boyandin
Asked: 2015-01-19 22:44:04 +0800 CST

Apache 2.2 <Location> 错误:尝试提供目录,没有重写

  • 0

设置:Apache 2.2(Windows,win32)。

httpd.conf 片段:

Alias /custom /var/www/custom

DirectoryIndex index.html

<Location /custom>
    SetHandler custom_handler
    DirectoryIndex index.html
</Location>

<Directory /var/www>
    Allow From all
    Options +Indexes
    AllowOverride all
    DirectoryIndex index.html
</Directory>

还:

  • mod_dir, mod_rewrite 激活
  • /var/www/custom 中的 index.html
  • 服务器进程 UID 可以读取 /var/www 中的所有文件/目录
  • Apache 服务监听所有接口
  • 自定义处理程序处理位置路径中的某些 URL,其他从文件系统提供;index.html 被处理为好像没有处理程序存在

问题:

  • 重写以位置路径开头的 URL 不起作用(未报告错误)
  • 当尝试服务http://server/custom(不关闭斜杠)时,会发生以下情况:
    • Apache 重定向到http://ServerName/custom/(到 ServerName 指令值)
    • “尝试服务目录”被写入 /var/www/custom/ 的错误日志
    • 返回 404 错误

上述情况如何处理?以下是必需的:

  • 输入http://server/custom时提供 /var/www/custom/index.html ,或
  • 重写某些 URL,例如

    重写规则 ^custom/$ /custom/index.html [L,R]

上面的重写规则不起作用,无论它放在哪里(在位置内或位置外)

apache-2.2
  • 1 个回答
  • 4548 Views
Martin Hope
Konstantin Boyandin
Asked: 2013-09-11 21:13:32 +0800 CST

自动挂载加密文件系统(使用随机密钥),驻留在 CentOS 6 下的常规文件中。*

  • 3

任务:在 CentOS 6.x 系统中,使用一次性(随机)密钥设置和挂载自动加密的文件系统,驻留在常规文件中。

CentOS 6.* 中的 /etc/crypttab 不允许使用纯文件作为块设备来自动挂载和映射。

所以,/etc/crypttab 行是这样的

cfs   /var/file-with-encrypted-filesystem    some-password-source

在 CentOS 中被忽略。

以下命令序列可用于在 CentOS 中执行该任务:

losetup /dev/loop0 /var/tmpfile
dd if=/dev/urandom of=/dev/shm/tmppass bs=512 count=1
cryptsetup luksFormat /dev/loop0 --use-urandom --batch-mode --key-file /dev/shm/tmppass
cryptsetup luksOpen /dev/loop0 ctmp --batch-mode --key-file /dev/shm/tmppass
mkfs.ext2 /dev/mapper/ctmp
mount -t ext2 /dev/mapper/ctmp /mountpoint
shred -n 1 /dev/shm/tmppass
rm -f /dev/shm/tmppass

假设保存文件系统的文件是 /var/tmpfile

以类似 Debian 的方式(在 /etc/crypttab 和 /etec/fstab 中指定相关条目)是否有更简单的方法来实现相同的目标?

centos
  • 1 个回答
  • 1784 Views
Martin Hope
Konstantin Boyandin
Asked: 2013-02-05 19:18:01 +0800 CST

通过在同一台服务器上运行的 KMS 激活 MS Office 2013 Standard

  • 4

鉴于:Microsoft Windows Server 2008 R2 Enterprise 64 位,应用了所有最新的安全更新。

KMS 服务已设置并运行,应用了所有推荐的更新(以处理 Windows 8 等可能的激活问题)

Microsoft Office 2013 Standard 部署在上述服务器和 Intranet 上的工作站上,批量许可有效(已输入用于激活 Microsoft Office 2013 的正确 KMS 密钥)。

问题:我无法激活在运行 KMS 服务的同一台服务器上运行的 MS Office 2013 安装。

KMS 事件日志中没有与此故障相关的条目。

一切都已重新启动、重新安装等多次(包括安装 32 位和 64 位版本的 Office)。

请注意,KMS 服务工作正常。所有工作站均能顺利激活 MS Office 2013。但是,服务器本身的安装拒绝使用 KMS。

防火墙设置正确。主机名已正确提供(通过“cscript ospp.vbs /sethst:hostname”,我尝试了所有相关的主机名,从用于从工作站激活的主机名开始)。所有其他记录在案的必需检查/操作也在激活之前执行。

从我在下面包含的内容来看,ospp.vbs 提示无法通过 KMS 激活上述内容。确实如此(即,我应该改用 MAK 激活),还是我仍然遗漏了什么?

我遵循了KMS 故障排除提示和相关文章,目前在 Technet 上没有关于上述是否可行的建议。

slmgr.vbs / dlv 2E28138A-847F-42BC-9752-61B03FFF33CD 的输出:

---------------------------
Windows Script Host
---------------------------
Software licensing service version: 6.1.7601.17946

Name: Office 15, KMSHostVL edition
Description: Office 15, VOLUME_KMS channel
Activation ID: 2e28138a-847f-42bc-9752-61b03fff33cd
Application ID: 0ff1ce15-a989-xxxx-xxxx-xxxxxxxxxxxx
Extended PID: 55041-00206-234-486666-03-xxxx-xxxx.xxxx-xxxxxxx
Installation ID: 01683679734050124078134659xxxxxxxxxxxxxxxxxxxxxxxxxxx
Processor Certificate URL: http://go.microsoft.com/fwlink/?LinkID=88342
Machine Certificate URL: http://go.microsoft.com/fwlink/?LinkID=88343
Use License URL: http://go.microsoft.com/fwlink/?LinkID=88345
Product Key Certificate URL: http://go.microsoft.com/fwlink/?LinkID=88344
Partial Product Key: xxxxx
License Status: Licensed
Remaining Windows rearm count: 4
Trusted time: 2/05/2013 10:00:12 AM

Key Management Service is enabled on this machine
    Current count: 5
    Listening on Port: 1688
    DNS publishing disabled
    KMS priority: Normal

Key Management Service cumulative requests received from clients
    Total requests received: 6
    Failed requests received: 0
    Requests with License Status Unlicensed: 0
    Requests with License Status Licensed: 0
    Requests with License Status Initial grace period: 6
    Requests with License Status License expired or Hardware out of tolerance: 0
    Requests with License Status Non-genuine grace period: 0
    Requests with License Status Notification: 0

---------------------------
OK   
---------------------------

cscript ospp.vbs /act的输出

Microsoft (R) Windows Script Host Version 5.8
Copyright (C) Microsoft Corporation. All rights reserved.

---Processing--------------------------
---------------------------------------
Installed product key detected - attempting to activate the following product:
SKU ID: b13afb38-cd79-4ae5-xxxx-xxxxxxxxxxxx
LICENSE NAME: Office 15, OfficeStandardVL_KMS_Client edition
LICENSE DESCRIPTION: Office 15, VOLUME_KMSCLIENT channel
Last 5 characters of installed product key: xxxxx
ERROR CODE: 0xC004F074
ERROR DESCRIPTION: The Software Licensing Service reported that the product could not
be activated. No Key Management Service (KMS) could be contacted. Please see the
Application Event Log for additional information.
To view the activation event history run: cscript ospp.vbs /dhistorykms
---------------------------------------
---------------------------------------
---Exiting-----------------------------

cscript ospp.vbs /dstatus的输出

Microsoft (R) Windows Script Host Version 5.8
Copyright (C) Microsoft Corporation. All rights reserved.

---Processing--------------------------
---------------------------------------
SKU ID: b13afb38-cd79-4ae5-xxxx-xxxxxxxxxxxx
LICENSE NAME: Office 15, OfficeStandardVL_KMS_Client edition
LICENSE DESCRIPTION: Office 15, VOLUME_KMSCLIENT channel
LICENSE STATUS:  ---NOTIFICATIONS---
ERROR CODE: 0xC004F056
ERROR DESCRIPTION: The Software Licensing Service reported that the product could
not be activated using the Key Management Service (KMS).
Last 5 characters of installed product key: xxxxx
        DNS auto-discovery: KMS name not available
        KMS machine registry override defined: xxxxxx:1688
        Activation Interval: 120 minutes
        Renewal Interval: 10080 minutes
        KMS host caching: Enabled
---------------------------------------
---------------------------------------
---Exiting-----------------------------
windows
  • 3 个回答
  • 47428 Views
Martin Hope
Konstantin Boyandin
Asked: 2012-05-22 01:28:03 +0800 CST

跨不同子网的内网路由段

  • 1

同一个内网(同一个子网)有两个(目前分开的)网段。上述两个网段都可以连接到不同子网中的路由器。在伪图形中:

Intranet      <-> Gateway A      Router       Gateway B  <->  Intranet
192.168.10.0/24   192.168.10.1                192.168.10.2    192.168.10.0/24
                  10.0.0.2   <-> 10.0.0.1 <-> 10.0.0.3

是否可以使用静态路由在没有 VPN 隧道的情况下联合两个 Intranet 网段?

如果这很重要,那么两个网关都是运行 CentOS 的计算机。

谢谢。

vpn routing
  • 2 个回答
  • 504 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