简体   繁体   中英

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

在此输入图像描述

How do i change the installation directory as i donot want it to be in /var but somewhere else say /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. 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 .

MemSQL Ops by default will store MemSQL installations in /var/lib/memsql. This directory can be changed at installation time by specifying the option --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:

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 . Ops will happily install into the mount thus allowing you flexibility to put it anywhere.

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). Note this needs to be set before you install any MemSQL nodes onto the agent. You will also need to set the variable in the UI when you are deploying new agents to the cluster.

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} .

If you hit any issues come say hi at 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. For example:

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

Here is more information on MemSQL Ops configuration. . You will want to restart MemSQL Ops on every node (using ./memsql-ops restart ) for the new configuration to take effect.

All future installations will now be installed at /foo/bar . However, if you have an existing installation, it will not be moved.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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