Teamcity references (follow these/updated versions, use below as summary)
The steps are based on zsh history, so there might me some missing.
/private/var/root/.BuildServer
Go to Teamcity > Admin > Global Settings and look for the directory labeled "Data directory"
Alternative: sudo find / 2>/dev/null | grep .BuildServer/config
/Library/TeamCity/
find / 2>/dev/null | grep TeamCity-readme.txt
Installation of Postgres mostly based on http://www.moncefbelyamani.com/how-to-install-postgresql-on-a-mac-with-homebrew-and-lunchy/ and from brew install's output
brew install postgresql
ln -sfv /usr/local/opt/postgresql/*.plist ~/Library/LaunchAgents
launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
psql template1
template1?
CREATE DATABASE teamcity;
CREATE ROLE teamcityuser;
ALTER ROLE teamcityuser WITH PASSWORD 'password123'
Test database access
psql -d teamcity
This will depend on the java version (java -version
)
cd /private/var/root/.BuildServer/lib/jdbc
curl https://jdbc.postgresql.org/download/postgresql-9.4-1201.jdbc41.jar -O
Stop Teamcity:
launchctl stop jetbrains.teamcity.server
create a copy of the Postgres sample file and edit it
cp /private/var/root/.BuildServer/config/database.postgresql.properties.dist /tmp/database.properties
vim /tmp/database.properties
set the hostname to localhost, keep the default port, set the database name. Set the username and password
...
connectionUrl=jdbc:postgresql://localhost:5432/teamcity
connectionProperties.user=teamcityuser
connectionProperties.password=password123
...
run the migration script included in Teamcity:
/Library/TeamCity/bin/maintainDB.sh migrate -A /private/var/root/.BuildServer -T /tmp/database.properties