with the help from koha irc and lots of try&error&code-reading I figured some things out
### on your database server:
apt update && apt install -y mariadb-server
sed -i -e 's/^bind-address\s*=\s*127\.0\.0\.1$/bind-address = */' /etc/mysql/mariadb.conf.d/50-server.cnf
/etc/init.d/mariadb restart
mysql -e "CREATE DATABASE koha_demo;"
mysql -e "CREATE USER 'koha_demo'@'%' IDENTIFIED BY 'kohadbpw';"
mysql -e "GRANT ALL PRIVILEGES on koha_demo.* TO koha_demo;"
mysql -e "FLUSH PRIVILEGES;"
### on your koha server
apt update && apt install -y wget gnupg
apt update
apt install koha-common -y
a2enmod rewrite
a2enmod cgi
service apache2 restart
mv /etc/mysql/koha-common.cnf /etc/mysql/koha-common.cnf.bak
echo "[client]
host = mariadb
user = koha_demo
password = kohadbpw" > /etc/mysql/koha-common.cnf
sed -i -e 's/^DOMAIN="\.myDNSname\.org"$/DOMAIN=".koha-support.eu"/' /etc/koha/koha-sites.conf
sed -i -e 's/^OPACSUFFIX=""$/OPACSUFFIX="-opac"/' /etc/koha/koha-sites.conf
#instance:username:password:dbname:dbhost
echo "koha-demo:koha_demo:kohadbpw:koha_demo:mariadb" > koha_db_passwdfile.txt
koha-create --passwdfile=koha_db_passwdfile.txt --use-db koha-demo
On Thu, 29 Sep 2022, at 6:47 PM, David Schmidt wrote:
im trying to create a koha instance configured for a remote mariadb server
> remove /etc/mysql/koha-common.cnf
> create a new file in its place containing the connection
information for the server, in the form of a my.cnf file.
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
$ koha-create --dbhost 172.23.0.3 --database kohadb --request-db koha-demo
$ vim koha-demo-db-request.txt
$ koha-create --dbhost 172.23.0.3 --database kohadb --populate-db koha-demo
Koha instance is empty, no staff user created.
after that I still see the autogenerated password in /etc/koha/sites/koha-demo/koha-conf.xml and the mariadb database is empty
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.
I will update the wiki after I figured this out
cheers
david
_______________________________________________
Koha-devel mailing list