<!DOCTYPE html><html><head><title></title><style type="text/css">
p.MsoNormal,p.MsoNoSpacing{margin:0}</style></head><body><div>with the help from koha irc and lots of try&error&code-reading I figured some things out<br></div><div><br></div><div>### on your database server:<br></div><div><br></div><div>apt update && apt install -y mariadb-server<br></div><div>sed -i -e 's/^bind-address\s*=\s*127\.0\.0\.1$/bind-address = */' /etc/mysql/mariadb.conf.d/50-server.cnf<br></div><div>/etc/init.d/mariadb restart<br></div><div>mysql -e "CREATE DATABASE koha_demo;"<br></div><div>mysql -e "CREATE USER 'koha_demo'@'%' IDENTIFIED BY 'kohadbpw';"<br></div><div>mysql -e "GRANT ALL PRIVILEGES on koha_demo.* TO koha_demo;"<br></div><div>mysql -e "FLUSH PRIVILEGES;"<br></div><div><br></div><div>### on your koha server<br></div><div>apt update && apt install -y wget gnupg<br></div><div>wget -q -O- <a href="https://debian.koha-community.org/koha/gpg.asc">https://debian.koha-community.org/koha/gpg.asc</a> | apt-key add -<br></div><div>echo 'deb <a href="http://debian.koha-community.org/koha">http://debian.koha-community.org/koha</a> 22.05 main' | tee /etc/apt/sources.list.d/koha.list<br></div><div>apt update<br></div><div>apt install koha-common -y<br></div><div><br></div><div>a2enmod rewrite<br></div><div>a2enmod cgi<br></div><div>service apache2 restart<br></div><div><br></div><div><div>mv /etc/mysql/koha-common.cnf /etc/mysql/koha-common.cnf.bak<br></div><div>echo "[client]<br></div><div>host     = mariadb<br></div><div>user     = koha_demo<br></div><div>password = kohadbpw" > /etc/mysql/koha-common.cnf<br></div><div><div><br></div><div>sed -i -e 's/^DOMAIN="\.myDNSname\.org"$/DOMAIN=".koha-support.eu"/' /etc/koha/koha-sites.conf<br></div><div>sed -i -e 's/^OPACSUFFIX=""$/OPACSUFFIX="-opac"/' /etc/koha/koha-sites.conf<br></div><div><br></div><div>#instance:username:password:dbname:dbhost<br></div></div><div>echo "koha-demo:koha_demo:kohadbpw:koha_demo:mariadb" > koha_db_passwdfile.txt<br></div><div><br></div><div>koha-create --passwdfile=koha_db_passwdfile.txt --use-db koha-demo<br></div><div><br></div><div>On Thu, 29 Sep 2022, at 6:47 PM, David Schmidt wrote:<br></div></div><blockquote type="cite" id="qt" style=""><div>im trying to create a koha instance configured for a remote mariadb server<br></div><div><br></div><div><div><a href="https://wiki.koha-community.org/wiki/Debian#Create_a_Koha_instance">https://wiki.koha-community.org/wiki/Debian#Create_a_Koha_instance</a><br></div><div><br></div><div>> remove <span class="qt-font" style=""><span class="font" style="font-family:menlo, consolas, "courier new", monospace;">/etc/mysql/koha-common.cnf</span></span><br></div><div>> create a new file in its place containing the connection<br></div><div>                  information for the server, in the form of a my.cnf file.<br></div><div><div><br></div><div>what does that mean? the only my.cnf file that I can find on the system is /etc/mysql/my.cnf and that doesnt look right<br></div></div><div><br></div></div><div><br></div><div>$ koha-create --dbhost 172.23.0.3 --database kohadb --request-db koha-demo<br></div><div>$ vim koha-demo-db-request.txt<br></div><div>$ koha-create --dbhost 172.23.0.3 --database kohadb --populate-db koha-demo<br></div><div>Koha instance is empty, no staff user created.<br></div><div><br></div><div>after that I still see the autogenerated password in /etc/koha/sites/koha-demo/koha-conf.xml and the mariadb database is empty<br></div><div><br></div><div>after reading the koha-create source i have a feeling this --request-db/--populate-db stuff cant possibly work. --populate-db is trying to get the db passwort using getinstancemysqluser() but that function is a wrapper around xmlstarlet and i was just told by `koha-create --request-db` to write the new db password into this txt file.<br></div><div> <br></div><div>I will update the wiki after I figured this out<br></div><div><br></div><div>cheers<br></div><div>david<br></div><div>_______________________________________________<br></div><div>Koha-devel mailing list<br></div><div><a href="mailto:Koha-devel@lists.koha-community.org">Koha-devel@lists.koha-community.org</a><br></div><div><a href="https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel">https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel</a><br></div><div>website : <a href="https://www.koha-community.org/">https://www.koha-community.org/</a><br></div><div>git : <a href="https://git.koha-community.org/">https://git.koha-community.org/</a><br></div><div>bugs : <a href="https://bugs.koha-community.org/">https://bugs.koha-community.org/</a><br></div><div><br></div></blockquote><div><br></div></body></html>