2018.09.14 15:04:04 Word count 507 Reading 94
Confirm that the JDK has not been installed before. If it is installed, make sure that the jdk is not the gcj version, otherwise Jenkins may run abnormally and you need to uninstall and reinstall the JDK;
# java -version
# yum remove java
# yum search openjdk
image.png
# yum install java-1.8.0-openjdk
[ root@localhost ~]# java -version
openjdk version "1.8.0_161"
OpenJDK Runtime Environment (build 1.8.0_161-b14)
OpenJDK 64-Bit Server VM (build 25.161-b14, mixed mode)
yum install git
wget -O /etc/yum.repos.d/jenkins.repo http://jenkins-ci.org/redhat/jenkins.repo
rpm --import http://pkg.jenkins-ci.org/redhat/jenkins-ci.org.key
yum install jenkins
image.png
chkconfig --list | grep jenkins
image.png
The war package of jenkins is stored in the /usr/lib/jenkins directory, and the configuration file path is /etc/sysconfig/jenkins, which stores related configurations: port number, jenkins home directory path, etc.
image.png
service jenkins start
image.png
cat /var/lib/jenkins/secrets/initialAdminPassword //View password
image.png
Click [Install recommended plug-in]
image.png
image.png
image.png
You can install the ThinBackup plug-in, copy the backup folder to the new server after backup, and import it into the jenkins-ThinBackup of the new server;
Note when backing up:
If the path folder does not exist, it may cause the backup to fail, you need to create it manually, and set 755 and jenkins permissions;
Specific use can refer to:
https://blog.csdn.net/tengdazhang770960436/article/details/62043154
If deployed on a LAN and deployed to a remote server, you also need to install Phing, Publish Over SSH, etc. for remote deployment;
However, it is generally not recommended to deploy locally, which is relatively troublesome. When starting the service through Java web, a fixed IP from the external network is required, and the local area network and dynamic IP cannot be realized;
Open System Management -> System Settings -> gitlab, fill in name, Gitlab host URL, use the newly copied Private token to configure a new Gitlab API token and use it, Test connection;
image.png
0 People like
( adsbygoogle = window.adsbygoogle || []).push({});
Recommended Posts