Offline Installation
You need to set up either the Jenkins or GitLab environment. Do not install both of them on the same server. The following describes how to install the Jenkins environment. The operations are for reference only.
- Go to https://archives.jenkins.io/ to obtain the Jenkins installation package of a target OS. You are advised to obtain an installation package in the LTS Releases row.
- After Jenkins is installed, initialize Jenkins. For details, see Performing the Initial Configuration of Jenkins.
- Download plugin installation packages (.hpi) as required from the Jenkins plugin home page and install the plugins offline.
The following uses the Blue Ocean plugin as an example:
- Access Manage Jenkins > Plugins. On the Plugins page, click Advanced settings on the left. On the displayed page, upload the plugin installation package.
Figure 1 Installing the Blue Ocean plugin (1)
- After the upload, click Deploy to install the Blue Ocean plugin.
Figure 2 Installing the Blue Ocean plugin (2)
- Access Manage Jenkins > Plugins. On the Plugins page, click Advanced settings on the left. On the displayed page, upload the plugin installation package.
- During the installation, the system prompts you to install other dependencies. Download and install the required dependencies as well from the Jenkins plugin home page.Figure 3 Dependency plugins
- Export all files in the /var/lib/jenkins/plugins directory on the server where Jenkins plugins are installed, and save the files to the same directory (if no, create one) on the server hosting the Jenkins offline environment. Then run the systemctl restart jenkins.service command to restart the Jenkins service.
- Many dependencies are required for offline plugin installation. For example, the Blue Ocean plugin requires more than 70 dependencies. You need to download and install the dependencies of each plugin. Download method: https://mirrors.huaweicloud.com/jenkins/plugins/Plugin name/Plugin version/
- Plugin name: Replace it with the actual plugin name.
- Plugin version: Replace it with the actual plugin version.
Example: https://mirrors.huaweicloud.com/jenkins/plugins/blueocean-commons/1.27.16/
Parent topic: (Optional) Installing Jenkins