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
    • 最新
    • 标签
主页 / server / 问题 / 705760
Accepted
pagid
pagid
Asked: 2015-07-15 13:32:13 +0800 CST2015-07-15 13:32:13 +0800 CST 2015-07-15 13:32:13 +0800 CST

适用于 Java 属性文件的 Augeas augtool

  • 772

我尝试使用 augeas 调整 Java 属性文件,但即使我的用例看起来非常简单,也无法真正让它工作。

我确实有一个带有默认 neo4j-server.properties 文件的 Neo4j 服务器(在 Ubuntu 14.04 上 - 从官方软件包安装),我想调整一个属性。但即使在此之前,我什至无法让 augtool 从该文件中读取任何内容。

这就是我想要实现的目标:

 sudo augtool --noautoload
 augtool> set /augeas/load/Properties/lens Properties.lns
 augtool> set /augeas/load/Properties/incl "/etc/neo4j/neo4j-server.properties"
 augtool> load

检查是否有效,使用:

 augtool> print /files/etc/neo4j/neo4j-server.properties

不返回任何东西。

我的下一步是:

 augtool> set /files/etc/neo4j/neo4j-server.properties/org.neo4j.server.webserver.port 8074
 augtool> save

但这当然没有意义。

如前所述 - 我使用官方包。属性文件可以在Neo4j 的 Github-Repo 中找到

如果有人可以帮助我自动进行调整,我会非常棒。

干杯

augeas
  • 1 1 个回答
  • 1540 Views

1 个回答

  • Voted
  1. Best Answer
    raphink
    2015-07-15T14:47:04+08:002015-07-15T14:47:04+08:00

    首先,当您使用 Augeas 1.2 时,无需手动设置镜头,只需执行以下操作:

    $ augtool -At "Properties.lns incl /etc/neo4j/neo4j-server.properties"
    

    你已经准备好了。

    现在,如果文件没有出现在 中/files,则需要检查解析错误。在 augtool 会话中键入以下内容:

    augtool> print /augeas/files/etc/neo4j/neo4j-server.properties//error
    

    并查看它是否返回有关无法解析的任何信息。

    注意:在 Augeas 1.4 上,您只需输入errors会话即可。

    • 2

相关问题

  • 使用 Puppet 而不是 Augeas 本身有什么好处?

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