简体   繁体   中英

Redis , configure redis.conf from command line

在此处输入图像描述 I try to create a automated process to install redis on multiple windows machines.

I saw.msi files that installs correctly. The way i install is from command line like this:

Redis-x64-3.2.100.msi /qb port=6379 maxmemory=750M

My goal is to automate the process of configuring the redis.conf file (Edit the Bind section)

I want to edit the 'Bind 127.0.0.1' to 'Bind 0.0.0.0'

I've looked for a lot of blogs and redis documentations but it seems like those are the arguments that the msi file works with.

Is there anyway that i can automatically configure the redis.conf file without editing manually the file itself after each installation?

Any help would be appreciated

you can use this command with git-bash after Redis installation:

sed -i 's/bind 127.0.0.1/bind 0.0.0.0/g' redis.windows.conf

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