Download TeamCity from the following location, making sure that you click on the “OS X” button on this page:

https://www.jetbrains.com/teamcity/download

When the download has completed, extract the TeamCity-10.0.tar.gz as follows:

cd /Local
tar xvzf ~/Downloads/TeamCity-10.0.tar.gz

Now, we can set up TeamCity to start when the Mac boots up. Open TextWrangler and create a new file with the following contents:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
    <dict>
        <key>Label</key>
        <string>jetbrains.teamcity.server</string>

        <key>WorkingDirectory</key>
        <string>/Local/TeamCity</string>

        <key>ProgramArguments</key>
        <array>
            <string>bin/teamcity-server.sh</string>
            <string>run</string>
        </array>

        <key>KeepAlive</key>
        <true/>
    </dict>
</plist>

Save the file here:

/Library/LaunchDaemons/com.jetbrains.teamcity.plist
Now, type the following command to make sure it has the correct owner:
cd /Library/LaunchDaemons
sudo chown root:wheel com.jetbrains.teamcity.plist

You may find it useful to bookmark the following location whenever you want to look at TeamCity:

http://localhost:8111

Further information available at this link