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.

Bitbucket installation on Linux


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

ComponentMinimumRecommended
CPU2 vCPU4 vCPU
Memory3 GB4 GB+
Disk20 GB50 GB
JavaOpenJDK 11+OpenJDK 17
Git2.31+Latest Stable

Network Requirements

Ensure the following ports are accessible:

PortPurpose
7990Bitbucket Web UI
7999Git SSH Access
22Server Administration

For AWS/Cloud deployments:

  • Update Security Groups
  • Allow inbound TCP traffic
  • Restrict access to trusted networks

For this demonstration, we will use a Vagrant-based CentOS 8 lab.
 
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
  

1) Bitbucket supports git version 2.31 to 2.39 currently 
2) Minimum RAM required is 3GB. So need to modify the below line in vagrant file
vb.memory = "4096" then run vagrant reload mstr to get working.

If you want to install on CentOS/8

 
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
Follow the wizard instructions

Atlassian Bitbucket Setup configuration

Product: Bitbucket
License type: Bitbucket (server)
Organization: vybhavatechnologies
your instance is up and running
server-id: BDFG-ZKCQ-RWTR-YOXP [changes for you!]

click on the "Generate License" Button
pop-up confirmation please confirm it so that you can see the evaluation 90 days license key will be shown in the gray text box.

come back to set up 
Next  we need to set the Administrator account, see the following are example inputs
Username: admin
full name pavan devarakonda
email address pavan.dev@devopshunter.com
Note: Please enter the strong password, enter same in the confirm password 

Go to bitbucket server link

After installation and configuration completed, open: http://SERVER-IP:7990
Login with a newly created admin account. Enjoy your Project creation and each Project can have multiple repositories. The repository which you create on the Bitbucket Web-UI is an empty bare repository. 

For Windows
- GitBash
- BitBucket 

Access Bitbucket 

After login to Bitbucket you can do 
  • Create Project
  • Create repositories
  • Manage Users
  • Configure Access permissions
  • Create pull requests
A Bitbucket repository created through the web interface starts as an empty Git repository.

How to add a project to git repo to the remote Git server?


On your local have a project directory and have some code.

Create a repo on the bitbucket say 'demo-repo1'
On your client VM or from your Personal Laptop GitBash navigate to the folder and run the following command sequence to push the code to remote repository :
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

Enable SSH access - Avoid using username, password for git operations on repos
Use branch protection - protect main/master and release branches
Enable pull request reviews - Require peer review and approval before merge
Integration with SonarQube - Prevent low quality code reaching production
Automated Backup & Restore - Enable backup and restoration with automated schedule implementation for DR plans.

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

Bitbucket remains a powerful Git repository management platform for organizations that require secure source code hosting, enterprise collaboration, and deep integration with Jira and other DevOps tools.

By following this guide, you have successfully installed Bitbucket Server on CentOS 8, configured the platform, created repositories, and pushed code from a local client. The next step is integrating Bitbucket into your CI/CD pipeline to build a complete DevOps workflow.

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

Popular Articles

DevOps Weapons

Ansible URI Module Tutorial: Real-World Application Health Checks, REST API Validation and DevOps Automation

Ansible Jinja Templates Explained with Real world examples