You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2020/02/13 01:43:13 UTC

[GitHub] [couchdb] wohali commented on issue #1989: Windows installer removing user configuration

wohali commented on issue #1989: Windows installer removing user configuration
URL: https://github.com/apache/couchdb/issues/1989#issuecomment-585507440
 
 
   This is now fixed in the new Windows CouchDB 3.0 installer (to be uploaded with the 3.0 release), as part of changes necessary to support prompting for the admin user/password on install.
   
   The new installer now takes these actions, in order:
   * prompts for the mandatory admin user & password
   * Installs the user-editable config files as `vm.args.dist` and `local.ini.dist`
   * Creates the file `etc\local.d\10-admins.ini` with the admin user specified in the installer, but **only if** the file does not yet exist
   * Copies the `vm.args.dist` file to `vm.args`, but **only if** that file doesn't exist yet
   * Copies the `local.ini.dist` file to `local.ini`, but **only if** that file doesn't exist yet
   * Starts the CouchDB service, which encrypts the plaintext password in `etc\local.d\10-admins.ini` immediately
   
   On uninstall, the new uninstaller:
   * correctly stops both the Apache CouchDB service and the `epmd.exe` process
   * only removes the `vm.args` file, but **only if** it exactly matches the `vm.args.dist` file
   * only removes the `local.ini` file, but **only if** it exactly matches the `local.ini.dist` file
   * removes the `vm.args.dist` and `local.ini.dist` files along with the rest of the install
   * leaves behind the `etc\local.d\10-admins.ini` file, along with the contents of `data\`
   
   The new behaviour above is supported through a WiX custom action written in C#.
   
   Upgrades for now are still uninstall-then-reinstall, but the above safeguards mean that both your data and the user configurations are untouched during the process.
   
   @popojargo Keep in mind that when you uninstall CouchDB 2.3.1, it'll still remove the user config files, but after you install 3.0.0, it won't happen again.
   
   One final note, since people may want to know: if you want to do a silent install of CouchDB,  here's how:
   
   ```
   msiexec /i apache-couchdb-3.0.0.msi /quiet ADMINUSER=admin ADMINPASSWORD=hunter2 /norestart
   ```
   
   The uninstall is similar:
   
   ```
   msiexec /x apache-couchdb-3.0.0.msi /quiet /norestart
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services