Please find steps involved in installing TeamCity on Ubuntu server with MySQL:
Here below are the steps:
Java Installation
sudo apt-get update
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer -y
Teamcity Installation
First download the teamcity latest version.
sudo wget https://download.jetbrains.com/teamcity/TeamCity-2017.2.3.tar.gz
tar xfz TeamCity-2017.2.3.tar.gz
sudo mkdir /opt/jetbrains
sudo mv TeamCity/ /opt/jetbrains
sudo useradd teamcity
sudo vi /etc/init.d/teamcity
#!/bin/sh
# /etc/init.d/teamcity - startup script for teamcity
export TEAMCITY_DATA_PATH="/opt/jetbrains/TeamCity/.BuildServer"
export TEAMCITY_SERVER_OPTS=-Djava.awt.headless=true # Configure TeamCity for use on a headless OS.
case $1 in
start)
start-stop-daemon --start -c teamcity --exec /opt/jetbrains/TeamCity/bin/runAll.sh start
;;
stop)
start-stop-daemon --start -c teamcity --exec /opt/jetbrains/TeamCity/bin/runAll.sh stop
;;
esac
exit 0
sudo update-rc.d teamcity enable
sudo update-rc.d teamcity defaults
sudo chmod +x /etc/init.d/teamcity
sudo apt-get remove insserv -y
sudo apt install procps
sudo update-rc.d teamcity defaults
sudo chown -R ubuntu:ubuntu /opt/jetbrains/TeamCity
sudo service teamcity start
Open browser and access teamcity home page
http://server_ip:8111/
Click on Proceed
Now stop the Teamcity server
sudo service teamcity status
sudo service teamcity stop
MySQL Installation
TeamCity needs a database to run. You have options to choose Postgres, MySQL or any database.
Let us try with MySQL.
sudo apt-get install mysql-server -y
enter a password for default user root and repeat the password
sudo mysql -u root -p
Now execute all the commands:
create database teamcity character set UTF8 collate utf8_bin;
Use teamcity;
create user 'teamcityuser'@'localhost' identified by 'password';
grant all privileges on teamcity.* to 'teamcityuser'@'localhost';
type exit to come out
Download MySQL JDBC driver
sudo wget http://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.31.tar.gz -O mysql-connector.tar.gz
sudo tar zxvf mysql-connector.tar.gz
cd mysql-connector-java-5.1.31/
sudo mv mysql-connector-java-5.1.31-bin.jar /opt/jetbrains/TeamCity/.BuildServer/lib/jdbc/
cd /opt/jetbrains/TeamCity/.BuildServer/lib/jdbc
mv ? mysql-connector-java-5.1.31-bin.jar
sudo chown -R teamcity:teamcity /opt/jetbrains/TeamCity
sudo chown teamcity:teamcity /opt/jetbrains/TeamCity/.BuildServer/lib/jdbc/mysql-connector-java-5.1.31-bin.jar
sudo service teamcity start
Open browser, type http://serverip:8111/
Click proceed and select MySQL as database type
Click on Proceed
enter database name as teamcity
user as teamcityuser
password as password
leave host as it is
Click on Proceed
Agree the License agreement
Hands on DevOps Coaching provided on AWS and Azure Cloud platforms. please contact at devops.coaching@gmail.com for more info. You can also directly reach out to Coach AK at +1(469) 850-6424
Subscribe to:
Post Comments (Atom)
How to Deploy Springboot Microservices App into EKS cluster using Jenkins Pipeline and Helm | Deploy Microservices into EKS cluster using Helm and Jenkins Pipeline
We are going to learn how to automate build and deployment of Springboot Microservices Docker Container into Elastic Kubernetes Cluster(EKS)...

-
What is Amazon EKS Amazon EKS is a fully managed container orchestration service. EKS allows you to quickly deploy a production ready Kubern...
-
We will learn how to automate springboot microservices builds using Jenkins pipeline and Deploy into AWS EKS Cluster with help of Kubernetes...
-
Jenkins is an open source continuous integration/continuous delivery and deployment (CI/CD) automation software DevOps tool written in the J...
No comments:
Post a Comment