准备工作

安装之前,需要对我们使用BitBucket情况进行初步的评测,以解决在使用过程中的资源使用情况,包括仓库数、仓库的代码量大小、提交并发量,使用何种数据库,以确认我们应该为BitBucket配置的资源,这包括以下内容

端口号开放:可以参照旧有开放端口号进行端口授权,包括但不限定于(如为集群咅方式,可参见:00-Atlassian各产品默认端口号)


注意

安装BitBucket

# ./atlassian-bitbucket-7.21.1-x64.bin 
Unpacking JRE ...
Starting Installer ...
2021-07-03 21:58:58,294 WARN  [main]  c.a.s.i.s.g.b.DefaultGitBinaryHelper /usr/local/git/bin/git is version 2.35.0. The next major Bitbucket version will require Git 2.35.0 or higher.

Bitbucket 7.21.2 installation wizard
Would you like to install or upgrade an instance?
Install a Server instance [1, Enter], Install a Data Center instance [2], Install a Smart Mirroring instance [3]

如果我们进行集群癉,我们需要选择2来进行安装,当然如果选择1进行单机部署,我们也可在后续安装后进行调整。

确认安装目录

Select the folder where you would like Bitbucket 7.21.2 to be installed,

then click Next.

[/opt/atlassian/bitbucket/7.21.2]

## 默认为此目录,可以填写指定目录,确认后回车执行

确认文件目录

此目录为存储BitBucket存储以下仓库代码提交后存放的地址,目录占用空间较大

The location for Bitbucket data.
This will be the default location for repositories, plugins, and other data.

Ensure that this location is not used by another Bitbucket installation.
[/var/atlassian/application-data/bitbucket]

## 默认为此目录,可以填写指定目录,确认后回车执行

确认访问端口

默认为7990,后期可以在配置文件中进行修改

Configure TCP Ports
Bitbucket requires a TCP port that isn't being used by other applications.

The HTTP port is where users access Bitbucket through their browsers.

Bitbucket also requires ports 7992 and 7993 are available to run an embedded
Elasticsearch instance that provides search functionality to Bitbucket.
HTTP Port Number
[7990]

确认是否安装服务

Run as a service

For a production server we recommend that you run Bitbucket as a

Windows/Linux service because Bitbucket will restart automatically when the

computer restarts.

Install Bitbucket as a service?

Yes [y, Enter], No [n]

确认安装的设置

Installation Summary
Installation Directory: /opt/atlassian/bitbucket/7.14.0 
Home Directory: /var/atlassian/application-data/bitbucket 
HTTP Port: 7990 
Install as a service: Yes 

Install [i, Enter], Exit [e]

回车后开始安装

启动服务

回车后,开始进行安装,安装完成后会提示是否需要启动

Installation of Bitbucket is complete

Would you like to launch Bitbucket?

Yes [y, Enter], No [n]

注意,在启动之后,我们的BitBucket需要连接外部数据,需要提前将连接数据库的驱动包放置在BitBucket的安装目录下指定位置,比如/opt/atlassian/bitbucket/7.14.0/app/WEB-INF/lib目录下

之后,我们进行回车,启动服务。

至此,BitBucket安装完成,将进入到BitBucket的启动配置界面进行BitBucket系统配置。

初始化服务

接下来请继续

如果安装的是DataCentere授权,可以继续:


有问题可以在119-使用问题 找相关资料来进行解决