How to Install Atlassian Bitbucket Server on CentOS 8 / Rocky Linux 8 – Complete Git Repository Management Guide
Looking for a secure, self-hosted Git platform for your development team?
While GitHub and GitLab are popular choices, many enterprises prefer Atlassian Bitbucket because of its tight integration with Jira, fine-grained access controls, pull-request workflows, and enterprise collaboration features.
In this tutorial, we will install Bitbucket Server on CentOS 8 using a Vagrant lab environment and learn how to create projects, repositories, and push code from a local Git client.
Bitbucket is most widely used in the IT industry to provide team collaborative work for short size of teams. Its greater ability is to have integration with Jira and other DevOps tools. Bitbucket encourages private repository creation by default. So they are mostly not available for search engines to discover these projects! So, startup projects will do better here.
What We'll Learn
By the end of this article, you will be able to:
- Understand Bitbucket Server architecture
- Install Git and Java prerequisites
- Deploy Bitbucket Server on CentOS/Rocky Linux
- Configure Bitbucket for team collaboration
- Create projects and repositories
- Push source code from a local machine
- Understand common Bitbucket use cases
- Integrate Bitbucket into a DevOps workflow
What is Bitbucket?
Bitbucket is a Git-based source code management platform developed by Atlassian. It enables software teams to collaborate on code, manage repositories, review pull requests, and integrate development workflows with tools such as Jira and Confluence.
Key Features of Bitbucket
- Git repository hosting
- Pull requests(PR) and code reviews
- Branch management
- Jira integration
- CI/CD integrations such as Jenkins
- Fine-grained access controls
- Enterprise-grade security
- Self-hosted and cloud deployment options
One of Bitbuckets major strengths is its seamless integration with the Atlassian ecosystem, making it a popular choice for organizations already using Jira for project management.
Prerequisites for Bitbucket installation
Recommended System Requirements
| Component | Minimum | Recommended |
|---|---|---|
| CPU | 2 vCPU | 4 vCPU |
| Memory | 3 GB | 4 GB+ |
| Disk | 20 GB | 50 GB |
| Java | OpenJDK 11+ | OpenJDK 17 |
| Git | 2.31+ | Latest Stable |
Network Requirements
Ensure the following ports are accessible:
| Port | Purpose |
|---|---|
| 7990 | Bitbucket Web UI |
| 7999 | Git SSH Access |
| 22 | Server Administration |
For AWS/Cloud deployments:
- Update Security Groups
- Allow inbound TCP traffic
- Restrict access to trusted networks
Vagrant.configure(2) do |config|
config.vm.box = "centos/8"
config.vm.boot_timeout=600
#config.landrush.enabled = true
config.vm.define "mstr" do |mstr|
mstr.vm.host_name = "mstr.devopshunter.com"
mstr.vm.network "private_network", ip: "192.168.33.100"
mstr.vm.provider "virtualbox" do |vb|
vb.cpus = "4"
vb.memory = "4096"
end
end
config.vm.define "node1" do |node1|
node1.vm.network "private_network", ip: "192.168.33.110"
node1.vm.hostname = "node1.devopshunter.com"
node1.vm.provider "virtualbox" do |vb|
vb.cpus = "2"
vb.memory = "1024"
end
end
config.vm.define "node2" do |node2|
node2.vm.network "private_network", ip: "192.168.33.120"
node2.vm.hostname = "node2.devopshunter.com"
node2.vm.provider "virtualbox" do |vb|
vb.cpus = "2"
vb.memory = "1024"
end
end
end
sudo yum remove git* -y sudo yum install java wget -y sudo yum groupinstall -y 'Development Tools'; sudo yum install -y \
autoconf \
curl-devel \
expat-devel \
gettext-devel \
openssl-devel \
perl-CPAN \
zlib-devel \
gcc \
make \
perl-ExtUtils-MakeMaker \
cpio \
perl-CPAN \
vim
# Download and Install Git source wget https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.39.3.tar.gz tar zxvf git-2.39.3.tar.gz cd git-2.39.3/ ./configure make sudo make install prefix=/usr install # Download and install Bitbucket wget https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-8.11.0-x64.bin sudo chmod +x atlassian-bitbucket-8.11.0-x64.bin ./atlassian-bitbucket-8.11.0-x64.bin
Atlassian Bitbucket Setup configuration
Go to bitbucket server link
Access Bitbucket
- Create Project
- Create repositories
- Manage Users
- Configure Access permissions
- Create pull requests
How to add a project to git repo to the remote Git server?
cd demo-local git init git remote add origin https://url-demo-repo1.git git add . git commit -m "update" git push -u origin master all the files in the demo-local will be added to remote repo.Check the changes on the browser on the remote repo.
Modern DevOps | SecOps Use Cases
Bitbucket is commonly used for:
Infrastructure as Code
Store:
- Terraform
- Ansible
- CloudFormation
CI/CD Pipelines
Integrate with:
- Jenkins
- Bamboo
- GitHub Actions
- GitLab Runners
Container Platforms
Manage:
- Kubernetes manifests
- Helm charts
- Dockerfiles
Security Scanning
Integrate:
- SonarQube
- Trivy
- Snyk
- Checkov
Best practice for SecOps
Reader Challenge
Try extending your Bitbucket installation with the following:
Beginner
- Create multiple repositories
- Configure user permissions
Intermediate
- Integrate Jira with Bitbucket
- Configure SSH authentication
Advanced
- Integrate Jenkins CI/CD
- Configure SonarQube quality gates
- Implement branch protection policies
- Automate repository backups
Conclusion
Dear Reader Question for you
Which Git platform does your organization use today—Bitbucket, GitHub, GitLab, Azure Repos, or another solution?
Share your experience in the comments and let fellow DevOps engineers learn from your journey.
Comments