简体   繁体   English

更改memsql的安装目录

[英]Change the installation directory of memsql

The memsql installation page says that memsql-ops is installed in /var/lib/memsql-ops and memsql is installed in /var/lib/memsql memsql 安装页面说memsql-ops安装在/ var / lib / memsql-ops中,memsql安装在/ var / lib / memsql中

在此输入图像描述

How do i change the installation directory as i donot want it to be in /var but somewhere else say /mnt/pd 我如何更改安装目录,因为我不希望它在/ var中,但在其他地方说/ mnt / pd

Both the Answers were great , but i found an easier way from the doc 这两个答案都很棒,但我从文档中找到了一种更简单的方法

MemSQL Ops is installed by default in /var/lib/memsql-ops. MemSQL Ops默认安装在/ var / lib / memsql-ops中。 In addition, it stores data including logs in /var/lib/memsql-ops/data .This directory can be changed at installation time by specifying the option --ops-datadir . 此外,它还将包含日志的数据存储在/ var / lib / memsql-ops / data中。通过指定选项--ops-datadir,可以在安装时更改此目录

MemSQL Ops by default will store MemSQL installations in /var/lib/memsql. 默认情况下,MemSQL Ops会将MemSQL安装存储在/ var / lib / memsql中。 This directory can be changed at installation time by specifying the option --memsql-installs-dir . 通过指定选项--memsql-installs-dir,可以在安装时更改此目录。

For instance, to save MemSQL Ops data in /path/to/memsql-ops-data and MemSQL installations in /path/to/memsql-installs, run: 例如,要将/ path / to / memsql-ops-data中的MemSQL Ops数据和/ path / to / memsql-installs中的MemSQL安装保存,请运行:

sudo ./install.sh --ops-datadir /path/to/memsql-ops-data --memsql-installs-dir /path/to/memsql-installs

If you want to move the installation directory for both MemSQL and MemSQL Ops, the current best option is to mount a filesystem/directory of your choice over /var/lib/memsql and /var/lib/memsql-ops . 如果要移动MemSQL和MemSQL Ops的安装目录,当前最佳选择是在/var/lib/memsql/var/lib/memsql-ops上安装所选的文件系统/目录。 Ops will happily install into the mount thus allowing you flexibility to put it anywhere. Ops很乐意安装到支架上,因此可以灵活地将它放在任何地方。

You can simplify this by using the memsql_installs_dir option as mentioned by eklhad to move the memsql installs directory into the memsql-ops data directory (set it to /var/lib/memsql-ops/data/memsql for example). 您可以使用memsql_installs_dir提到的memsql_installs_dir选项将memsql installs目录移动到memsql-ops数据目录(例如将其设置为/var/lib/memsql-ops/data/memsql )来简化此/var/lib/memsql-ops/data/memsql Note this needs to be set before you install any MemSQL nodes onto the agent. 请注意, 将任何MemSQL节点安装到代理上之前,需要先设置此项。 You will also need to set the variable in the UI when you are deploying new agents to the cluster. 在将新代理部署到群集时,还需要在UI中设置变量。

I recommend using a bind mount (good reference here: https://unix.stackexchange.com/a/198591 ) if you want to 'mount' a path over /var/lib/{memsql,memsql-ops} . 如果你想在/var/lib/{memsql,memsql-ops}上“安装”一个路径,我建议使用一个bind mount(这里有一个很好的参考: https/var/lib/{memsql,memsql-ops}

If you hit any issues come say hi at http://chat.memsql.com/ . 如果你遇到任何问题,请在http://chat.memsql.com/上打个招呼。

Try updating the setting memsql_installs_dir in your <MEMSQL OPS HOME>/settings.conf to the path you would like your installs to be at. 尝试更新设置memsql_installs_dir<MEMSQL OPS HOME>/settings.conf的路径,你想你的安装是在。 For example: 例如:

[memsql-ops]
...
memsql_installs_dir = /foo/bar
...

Here is more information on MemSQL Ops configuration. 以下是有关MemSQL Ops配置的更多信息。 . You will want to restart MemSQL Ops on every node (using ./memsql-ops restart ) for the new configuration to take effect. 您将需要在每个节点上重新启动MemSQL Ops(使用./memsql-ops restart )以使新配置生效。

All future installations will now be installed at /foo/bar . 所有未来的安装现在都将安装在/foo/bar However, if you have an existing installation, it will not be moved. 但是,如果您有现有安装,则不会移动它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM