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

Xudonax's questions

Martin Hope
Xudonax
Asked: 2016-04-14 23:07:46 +0800 CST

MongoDB 的 SELinux 设置

  • 1

我正在尝试从 mongodb.org 存储库在 CentOS 7.2 上安装 MongoDB。到目前为止一切都很好,但是主机已经为所有 MongoDB 数据文件创建了一个辅助磁盘 (/mongo)。这与 SELinux 权限冲突,导致 MongoDB 无法启动。我已经开始运行了setenforce 0,但这并不是我真正想要运行生产服务器的方式。

我有相当多的 Linux 经验,但我所有的 SELinux 经验只是将其关闭。我找到了这个 CentOS SELinux 教程,它让我想到了运行

[user@machine lib]$ sudo chcon -Rv --type mongod_var_lib_t /mongo
changing security context of ‘/mongo/mongod.lock’
changing security context of ‘/mongo/journal/WiredTigerLog.0000000001’
changing security context of ‘/mongo/journal/WiredTigerPreplog.0000000001’
changing security context of ‘/mongo/journal/WiredTigerPreplog.0000000002’
changing security context of ‘/mongo/journal’
changing security context of ‘/mongo/WiredTiger.lock’
changing security context of ‘/mongo/WiredTiger’
changing security context of ‘/mongo/WiredTiger.wt’
changing security context of ‘/mongo/WiredTiger.turtle’
changing security context of ‘/mongo/WiredTigerLAS.wt’
changing security context of ‘/mongo/sizeStorer.wt’
changing security context of ‘/mongo/_mdb_catalog.wt’
changing security context of ‘/mongo/storage.bson’
changing security context of ‘/mongo/collection-0-7567754672580995921.wt’
changing security context of ‘/mongo/index-1-7567754672580995921.wt’
changing security context of ‘/mongo/diagnostic.data/metrics.2016-04-14T06-51-54Z-00000’
changing security context of ‘/mongo/diagnostic.data/metrics.interim’
changing security context of ‘/mongo/diagnostic.data’
changing security context of ‘/mongo’
[user@machine lib]$ ls -Z /mongo
-rw-r--r--. mongod mongod system_u:object_r:mongod_var_lib_t:s0 collection-0-7567754672580995921.wt
drwxr-xr-x. mongod mongod system_u:object_r:mongod_var_lib_t:s0 diagnostic.data
-rw-r--r--. mongod mongod system_u:object_r:mongod_var_lib_t:s0 index-1-7567754672580995921.wt
drwxr-xr-x. mongod mongod system_u:object_r:mongod_var_lib_t:s0 journal
-rw-r--r--. mongod mongod system_u:object_r:mongod_var_lib_t:s0 _mdb_catalog.wt
-rw-r--r--. mongod mongod system_u:object_r:mongod_var_lib_t:s0 mongod.lock
-rw-r--r--. mongod mongod system_u:object_r:mongod_var_lib_t:s0 sizeStorer.wt
-rw-r--r--. mongod mongod system_u:object_r:mongod_var_lib_t:s0 storage.bson
-rw-r--r--. mongod mongod system_u:object_r:mongod_var_lib_t:s0 WiredTiger
-rw-r--r--. mongod mongod system_u:object_r:mongod_var_lib_t:s0 WiredTigerLAS.wt
-rw-r--r--. mongod mongod system_u:object_r:mongod_var_lib_t:s0 WiredTiger.lock
-rw-r--r--. mongod mongod system_u:object_r:mongod_var_lib_t:s0 WiredTiger.turtle
-rw-r--r--. mongod mongod system_u:object_r:mongod_var_lib_t:s0 WiredTiger.wt

会解决这个问题。之后,我做了一个touch /.autorelabel并重新启动。不幸的是,这并没有解决手头的问题。我将如何解决这个问题?

当前错误是: [user@machine lib]$ systemctl status mongod ● mongod.service - SYSV:Mongo 是一个可扩展的、面向文档的数据库。已加载:已加载 (/etc/rc.d/init.d/mongod) 活动:自 2016 年 4 月 14 日星期四 09:02:54 CEST 以来失败(结果:退出代码);2s 前 文档:man:systemd-sysv-generator(8) 进程:2180 ExecStart=/etc/rc.d/init.d/mongod start (code=exited, status=1/FAILURE)

Apr 14 09:02:54 LMG-TA-MONGO01.boolhosting.tld systemd[1]: Starting SYSV: Mongo is a scalable, document-oriented database....
Apr 14 09:02:54 LMG-TA-MONGO01.boolhosting.tld runuser[2187]: pam_unix(runuser:session): session opened for user mongod by (uid=0)
Apr 14 09:02:54 LMG-TA-MONGO01.boolhosting.tld runuser[2187]: pam_unix(runuser:session): session closed for user mongod
Apr 14 09:02:54 LMG-TA-MONGO01.boolhosting.tld mongod[2180]: Starting mongod: [FAILED]
Apr 14 09:02:54 LMG-TA-MONGO01.boolhosting.tld systemd[1]: mongod.service: control process exited, code=exited status=1
Apr 14 09:02:54 LMG-TA-MONGO01.boolhosting.tld systemd[1]: Failed to start SYSV: Mongo is a scalable, document-oriented database..
Apr 14 09:02:54 LMG-TA-MONGO01.boolhosting.tld systemd[1]: Unit mongod.service entered failed state.
Apr 14 09:02:54 LMG-TA-MONGO01.boolhosting.tld systemd[1]: mongod.service failed.
centos7 selinux mongodb
  • 3 个回答
  • 8055 Views
Martin Hope
Xudonax
Asked: 2015-02-08 16:25:34 +0800 CST

加入 Samba 4 AD 域,缺少 DNS 条目?

  • 2

我刚刚使用Samba 提供的指南设置了 Samba 4 Active Directory 域。到目前为止一切顺利,我设法按照设置 Samba AD 成员服务器指南将我的文件服务器加入到该域。但是,我似乎无法让我的 Windows 8.1 Professional 设备加入此域。我在 Samba 站点上找到了将 Windows 客户端加入域指南,但这要么引发错误“指定的域不存在或无法联系”(当我以全部大写形式键入域名时)或引发更详细的错误(当我输入小写的域名时):

 Note: This information is intended for a network administrator.  If you are not your network's administrator, notify the administrator that you received this information, which has been recorded in the file C:\Windows\debug\dcdiag.txt.

 The following error occurred when DNS was queried for the service location (SRV) resource record used to locate an Active Directory Domain Controller (AD DC) for domain "samba.local":

 The error was: "DNS name does not exist."
 (error code 0x0000232B RCODE_NAME_ERROR)

 The query was for the SRV record for _ldap._tcp.dc._msdcs.samba.local

 Common causes of this error include the following:>

 - The DNS SRV records required to locate a AD DC for the domain are not registered in DNS. These records are registered with a DNS server automatically when a AD DC is added to a domain. They are updated by the AD DC at set intervals. This computer is configured to use DNS servers with the following IP addresses:

 192.168.1.2

 - One or more of the following zones do not include delegation to its child zone:

 samba.local
 local
 . (the root zone)

我检查了/var/lib/samba/private/dns_update_list文件,它在里面。我唯一注意到的是,它前面有一个检查是否是读/写 DC。确切的行说

  ${IF_RWDC}SRV          _ldap._tcp.dc._msdcs.${DNSDOMAIN}                     ${HOSTNAME} 389

我的 DNS 域名(在配置期间指定)是samba.local. 有关设置的更多信息:

  Samba DC version:      4.1.13-Debian (running on Debian testing)
  Member server version: 4.1.14 (running on Fedora 21)
  Windows versions:      8.1 Professional and 10 Pro Tech Preview (both fully up to date)
  Server Role:           active directory domain controller
  Hostname:              DC1
  NetBIOS Domain:        SAMBA
  DNS Domain:            samba.local

我之前在 Windows 域方面的唯一经验是在 Server 2003R2 和 Windows XP 上,所以我对新版本的速度并不了解。

active-directory
  • 2 个回答
  • 8966 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