{"id":11717,"date":"2023-04-24T09:47:06","date_gmt":"2023-04-24T01:47:06","guid":{"rendered":"https:\/\/www.gbase8.cn\/?p=11717"},"modified":"2023-04-24T09:47:06","modified_gmt":"2023-04-24T01:47:06","slug":"gbase-8a-v95%e7%89%88%e6%9c%ac%e8%ae%be%e7%bd%ae%e7%8e%af%e5%a2%83setsysenv-py%e5%bf%85%e9%a1%bb%e7%94%a8%e6%93%8d%e4%bd%9c%e7%b3%bb%e7%bb%9froot%e7%94%a8%e6%88%b7%e6%89%a7%e8%a1%8c%e5%90%97%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/www.gbase8.cn\/en\/11717","title":{"rendered":"\u5357\u5927\u901a\u7528GBase 8a V95\u7248\u672c\u8bbe\u7f6e\u73af\u5883SetSysEnv.py\u5fc5\u987b\u7528\u64cd\u4f5c\u7cfb\u7edfroot\u7528\u6237\u6267\u884c\u5417\uff1f"},"content":{"rendered":"<p>\u5728GBase V8\u7248\u672c\uff0c\u6570\u636e\u5e93\u7684\u5b89\u88c5\uff0c\u5347\u7ea7\uff0c\u670d\u52a1\u542f\u505c\u7b49\uff0c\u90fd\u9700\u8981\u5728root\u6743\u9650\u4e0b\u8fd0\u884c\u3002\u800c\u5728V95\u7248\u672c\uff0c\u6570\u636e\u5e93\u6240\u6709\u670d\u52a1\u5168\u90e8\u8fd0\u884c\u5728dbauser\u4e0b\uff0c\u4e00\u822c\u662fgbase\uff0c\u4f46\u662f\u4e00\u4e9b\u73af\u5883\u8bbe\u7f6e\u64cd\u4f5c\uff0c\u8fd8\u662f\u9700\u8981root\u6743\u9650\u624d\u80fd\u64cd\u4f5c\u7684\u3002root\u6743\u9650\u53ef\u4ee5\u662froot\u7528\u6237\uff0c\u6216\u8005sudo\u7528\u6237\u90fd\u53ef\u4ee5\uff0c\u4e0d\u8981\u6c42\u5fc5\u987b\u662froot\u7528\u6237\u3002\u4e00\u4e9b\u73b0\u573a\u4e5f\u4e0d\u4f1a\u63d0\u4f9broot\u7684\u5bc6\u7801\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">sudo\u7528\u6237\u8fd0\u884cSetSysEnv.py<\/h2>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code>&#91;root@gbase_rh7_015 sudoers.d]# su - gbase\r\nLast login: Mon Apr 24 09:36:53 CST 2023 on pts\/0\r\n&#91;gbase@gbase_rh7_015 ~]$\r\n&#91;gbase@gbase_rh7_015 ~]$ sudo .\/SetSysEnv.py --dbaUser=gbase\r\n&#91;gbase@gbase_rh7_015 ~]$ ll \/tmp -rt\r\ntotal 16\r\ndrwx------ 3 root  root    17 Apr 23 14:32 systemd-private-24ca765234c04bce98d8097686f952f7-rtkit-daemon.service-YlG9uz\r\ndrwx------ 3 root  root    17 Apr 23 14:32 systemd-private-24ca765234c04bce98d8097686f952f7-systemd-hostnamed.service-3p4q5h\r\ndrwx------ 3 root  root    17 Apr 23 14:32 systemd-private-24ca765234c04bce98d8097686f952f7-cups.service-VLoG3n\r\ndrwx------ 3 root  root    17 Apr 23 14:32 systemd-private-24ca765234c04bce98d8097686f952f7-colord.service-yCOKCU\r\ndrwx------ 3 root  root    17 Apr 23 14:32 systemd-private-24ca765234c04bce98d8097686f952f7-systemd-localed.service-6y6vkP\r\ndrwx------ 2 root  root     6 Apr 23 14:38 tracker-extract-files.0\r\n-rw-rw-r-- 1 gbase gbase 9322 Apr 23 14:44 InstallTar_2023_04_23.log\r\ndrwx------ 3 root  root    17 Apr 24 09:34 systemd-private-3f88f95c55d94f1080eb490fd66800bc-rtkit-daemon.service-qO71jJ\r\ndrwx------ 3 root  root    17 Apr 24 09:34 systemd-private-3f88f95c55d94f1080eb490fd66800bc-cups.service-fhR0Cy\r\ndrwx------ 3 root  root    17 Apr 24 09:34 systemd-private-3f88f95c55d94f1080eb490fd66800bc-colord.service-sKFAU5\r\n-rw-r--r-- 1 root  root  3297 Apr 24 09:37 SetSysEnv.log\r\n&#91;gbase@gbase_rh7_015 ~]$ tail \/tmp\/SetSysEnv.log\r\n2023-04-24 09:37:31,733-root-INFO reference: ulimit -m, value: unlimited\r\n2023-04-24 09:37:31,733-root-INFO exec cmd:su - gbase -c \"ulimit -m\"\r\n2023-04-24 09:37:31,770-root-INFO exec cmd:su - gbase -c \"ulimit -m\",and return value:unlimited\r\n2023-04-24 09:37:31,770-root-INFO Set system max memory size to end.\r\n2023-04-24 09:37:31,770-root-INFO Set system virtual memory...\r\n2023-04-24 09:37:31,770-root-INFO reference: ulimit -v, value: unlimited\r\n2023-04-24 09:37:31,771-root-INFO exec cmd:su - gbase -c \"ulimit -v\"\r\n2023-04-24 09:37:31,810-root-INFO exec cmd:su - gbase -c \"ulimit -v\",and return value:unlimited\r\n2023-04-24 09:37:31,810-root-INFO Set system virtual memory to end\r\n2023-04-24 09:37:31,811-root-INFO Modify system env end.\r\n&#91;gbase@gbase_rh7_015 ~]$\r\n<\/code><\/pre>","protected":false},"excerpt":{"rendered":"<p>\u5728GBase V8\u7248\u672c\uff0c\u6570\u636e\u5e93\u7684\u5b89\u88c5\uff0c\u5347\u7ea7\uff0c\u670d\u52a1\u542f\u505c\u7b49\uff0c\u90fd\u9700\u8981\u5728root\u6743\u9650\u4e0b\u8fd0\u884c\u3002\u800c\u5728V95\u7248\u672c\uff0c\u6570\u636e\u5e93\u6240\u6709\u670d\u52a1\u5168\u90e8\u8fd0\u884c\u5728dbauser\u4e0b\uff0c\u4e00\u822c\u662fgbase\uff0c\u4f46\u662f\u4e00\u4e9b\u73af\u5883\u8bbe\u7f6e\u64cd\u4f5c\uff0c\u8fd8\u662f\u9700\u8981root\u6743\u9650\u624d\u80fd\u64cd\u4f5c\u7684\u3002root\u6743\u9650\u53ef\u4ee5\u662froot\u7528\u6237\uff0c\u6216\u8005sudo\u7528\u6237\u90fd\u53ef\u4ee5\uff0c\u4e0d\u8981\u6c42\u5fc5\u987b\u662froot\u7528\u6237\u3002\u4e00\u4e9b\u73b0\u573a\u4e5f\u4e0d\u4f1a\u63d0\u4f9broot\u7684\u5bc6\u7801\u3002<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-11717","post","type-post","status-publish","format-standard","hentry","category-gbase8a"],"_links":{"self":[{"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/posts\/11717","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/comments?post=11717"}],"version-history":[{"count":1,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/posts\/11717\/revisions"}],"predecessor-version":[{"id":11718,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/posts\/11717\/revisions\/11718"}],"wp:attachment":[{"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/media?parent=11717"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/categories?post=11717"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/tags?post=11717"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}