centos7安装基本环境怎么选,mongodb用法

把漂亮的灯泡记错了

[root@mongodb3 ~]# systemctlstartmongodauthorizationnotavailable.checkifpolkitserviceisrunningorseedebugmessageformoreinformation.failedtostatatand ontimedoutseesystemlogsand ‘ systemctlstatusmongod.service ‘ for details.[ root @ MongoDB 3至systemctlstatusmongod.service ] ble,document-oriented database.loaded 3360加载bad; vendor preset : disabled (active : inactive ) docs : man : systemd-sysv-generator (8) [根@ MongoDB 3至systemctlstartmongodauthorizationnotavailable.checkifpolkitserviceisrunningorseedebugmessageformoreinformation.failedtostatatand ontimedoutseesystemlogsand ‘ systemctlstatusmongod.service ‘ for details.[ root @ MongoDB 3至systemctlstatuspolkitpolkit 0 loaded (/usr/lib/systemd/system/polkit.system static; vendor preset : enabled (active : failed (result : time out (since tue 2020-02-0419336007336015 CST; 9hagodocs:man:polkit(8) process :6867 execstart=/usr/lib/polkit-1/polki TD– no-debug ) code=kill polki TD-no-debug signal=term (主PID :6867 ) code=killed, signal=term (feb 0419336005336027 MongoDB 3系统[1] : startingauthorizationmanager . feb 0419336005336029 MongoDB3ppodb: startedpolkitdversion 0.112 feb 0419336006336043 MongoDB : loadingrulesfromdirectory/etc/polkit-1 rules.dfeb 0419336006336043 MongoDB3polki TD [ 6867 ] : loadingrulesfromdires rules.dfeb 0419336006336043 MongoDB3polki TD [ 6867 ] : finished loading, compilingandexecuting 11 rules feb 0419336006336043 MongoDB3polki TD [ 6867 ] 3360 acquiredthenameorg.free desktop.policy kit1onthesystembusfeb 0419336007336015 MongoDB3systemd [1] 3360 polkit.servicestartoperationtimedout.terminating.feb 0419336007336015 MongoDB3systemd [1] 3360 failedtostartauthorizationmanager.feb 0419336007336015 MongoDB 3系统[1] 3360 unitpolkit.serviceenteredfailedstate.feb 0419336007336015 MongoDB3systemd [1] : polkit.service failed.[ root ] systemctlstoppolkitauthorizationnotavailable.checkifpolkitserviceisrunningorseedebugmessageformoreinformation.failed to stop outseesystemlogsand ‘ systemctlstatuspolkit.service ‘ for details.failedtogetloadstateofpolkit.failedtogetetloadstateteofpofpolkit

1. /var/log/mongodb/mongod.log日志中没有第一个日志,而是生成polkit。 这是什么服务?

参考网站

3359 wiki.arch Linux.org/index.PHP/polkit _ (简体中文)

33559 www.free desktop.org/software/polkit/docs/latest/polkit.8.html

大概知道

polkit是linux服务器上的验证组件,旨在验证用户是否属于用户组。 更详细的内容请参考上面的URL。

1.ensuretheexistenceofapolkitdsystemusergroup

复制/路径the following2compound-commandstoarootterminaltocheckforandconditionallycreatetheuser/group

getentgrouppolkitd/dev/nullecho-e ‘\e [ 1; 32 mpolkitdgroupalreadyexists\e [ 0m ‘|{ groupadd-rpolkitdecho-e ‘\e [ 1; 33 maddedmissingpolkitdgroup\e [ 0m ‘|| echo-e ‘\e [ 1; 31 maddingpolkitdgroupfailed\e [ 0m ‘; } getentpasswdpolkitd/dev/nullecho-e ‘\e [ 1; 32 mpolkitduseralreadyexists\e [ 0m ‘|{ useradd-r-gpolkitd-d/- s/sbin/nolog in-c ‘ userforpolkitd ‘ polki TD } 31 maddingpolkitduserfailed\e [ 0m ‘; }2. resetthepermissionsanduser/groupownershipforallfilesprovidedbythepolkitandpolkit-pkla-compat软件包

copy/pastethefollowingcompound-commandtoarootterminaltocheckforandconditionallyresetuser/grouppermsownership

rpm -Va polkit\* echo -e ‘\e[1; 32 mpolkit * rpmverificationpassed\e [ 0m ‘|{ echo-e ‘\e [ 1; 33 mresettingpolkit * rpm user/groupownershipperms\e [ 0m ‘; rpm—- setugidspolkitpolkit-pkla-compat; rpm—- setpermspolkitpolkit-pkla-compat; } 3.Reboot

arebootofthemachinewillberequiredtomakesurethatallchangestakeaffectandthatpolkithasreconnectedtothedbus

shutdown -r now重新启动服务后,启动mongod服务并正常启动

` ` ` bash [ root @ MongoDB3~~] # systemctlstartmongod [ root @ MongoDB3~~] # mongo—port 27017-u ‘ admin ‘-p ‘ admin ‘– authentication database ‘ admin ‘ MongoDB shell版本3:3.2.22 conened 05336014336044.7410800 I控制[ initandlisten ] 2020-02-05t 05336014336044.7410800 I控制] * * warning 3333 transparent _ hugepaaage enabled is ‘ always ‘.2020-02-05t 05336014336044.7410800 I控制[ initandlisten ] * * wesuggestsettingitto ‘ never ‘ 2020-02-05t 05336014336044.7410800 I控制[ initandlisten ] 2020-02-05t 05:14336044.774 warning :/sys/kernel/mm/transparent _ hugepaaage defrag is ‘ always ‘.2020-02-05t 0533601436044.7410800 I控制wesuggestsettingitto ‘ never ‘ 2020-02-05t 05336014336044.7410800 I控制[ initandlisten ] 2020-02-05t 05:14336044.774 warning : softrlimitstoolow.rlimitssetto 4096 process eet 6000 files.numberofprocessesshouldbeatleast 320000:5 timesnumbemberor

Published by

风君子

独自遨游何稽首 揭天掀地慰生平

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注