GBase 8c
安装配置
文章

CentOS/RHEL 7.2环境特殊配置

GBase社区管理员
发表于2024-02-05 09:54:30122次浏览1个评论

CentOS/RHEL 7.2或Kylin-Server-20200711及之后版本的操作系统中,systemd-logind服务引入一个新特性——RemoveIPC,表现为:用户登录后创建的文件,在logout后会被自动删除。该特性由/etc/systemd/logind.conf参数文件中RemoveIPC选项来控制。详细信息请执行man logind.conf(5)命令查看。

当使用默认值(即RemoveIPC=yes)的情况,当用户退出时,操作系统会crash掉使用了Shared Memory Segment (SHM) or Semaphores (SEM)的应用程序,导致GBase 8c数据库进程将会被中断。

因此在CentOS7.2+、RHEL 7.2+或Kylin-Server-20200711+操作系统环境中,需检查RemoveIPC参数,避免发生此类问题。操作步骤如下:

步骤1查看RemoveIPC参数值是否为yes

[root@gbase8c ~]# loginctl show-session | grep RemoveIPC
[root@gbase8c ~]# systemctl show systemd-logind | grep RemoveIPC

如果为yes,则需要修改;如果为no,则无需继续执行后续步骤。

步骤2 修改RemoveIPC参数值。执行以下操作:

  • 修改/etc/systemd/logind.conf配置文件

[root@gbase8c ~]# vim /etc/systemd/logind.conf

将RemoveIPC参数值设置为no,键入“:wq”保存并退出。

  • 修改/usr/lib/systemd/system/systemd-logind.service配置文件,将RemoveIPC参数值设置为no。

[root@gbase8c ~]# vim /usr/lib/systemd/system/systemd-logind.service

将RemoveIPC参数值设置为no,键入“:wq”保存并退出。

步骤3 重新加载配置文件,执行以下命令:

[root@gbase8c ~]# systemctl daemon-reload
[root@gbase8c ~]# systemctl restart systemd-logind

再次检查是否生效即可。

评论

登录后才可以发表评论
崔哥发表于 4个月前
恻恻轻寒翦翦风,小梅飘雪杏花红。夜深斜搭秋千索,楼阁朦胧烟雨中。