通用机环境下安全版单机数据库使用非root用户管理的解决方案
source link: https://blog.51cto.com/u_13646489/5503872
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
通用机环境下安全版单机数据库使用非root用户管理的解决方案
原创瀚高数据库
系统平台:银河麒麟 (CPUX86_64),Linux x86-64 Red Hat Enterprise Linux 7
版本:4.5.7,4.5.6,4.5.2
本文旨在提供通用机环境下瀚高数据库安全版单机场景使用非root用户管理的解决方案。
当安全版数据库安装完毕后,默认会使用root用户启动和管理数据库,在通用机环境下瀚高数据库安全版单机场景也可以使用非root用户来管理数据库。下面介绍使用highgo用户来管理数据库的具体操作步骤。
注:需要先将数据库停库后再进行操作,操作完毕后正常启动数据库即可。
第一步,将软件目录的属主和属组改为对应系统用户。
第二步,修改systemctl服务文件,将User=root改为User=highgo。
[Unit]
Description=highgodb-4.5.7
Requires=network.target local-fs.target
After=network.target local-fs.target
[Service]
Type=forking
User=highgo
............
第三步,当data目录不在默认的安装目录中时,修改data目录的属主和属组。
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK