Previously, Jenkins has been used as a test environment code release tool, sonar as a static code inspection tool, idea as a
development tool, jira as a defect management platform, and upstream as a code review tool (under research).
DevOps has been hot recently, but the core seems to be all jenkins. In 18 years, it is ready to build a standardized platform.
surroundings:
CentOS Linux release 7.4.1708
1. Install Java
Download jdk-8u162 on Oracle's official website (of course the latest jdk8)
Since the system has installed its own openjdk
Check the installed openjdk version:
rpm -qa | grep jdk
java-1.8.0-openjdk-1.8.0.144-0.b01.el7_4.x86_64
java-1.8.0-openjdk-headless-1.8.0.144-0.b01.el7_4.x86_64
Uninstall openjdk
rpm -e java-1.8.0-openjdk --nodeps
rpm -e java-1.8.0-openjdk-headless --nodeps
Install jdk
rpm -ivh jdk-8u162-linux-x64.rpm
After successful installation
Run java -version to see that it has been successfully installed
Note: The default installation is in the /usr/java/jdk1.8.0_162 directory (required when configuring jenkins later)
2. Install jenkins
Download the latest version of jenkins rpm package on jenkins official website
installation:
rpm -ivh jenkins-2.89.4-1.1.noarch.rpm
Modify jenkins default port (8080, conflict with tomcat default port)
vim / etc / sysconfig / jenkins
Configure the JDK directory of Jenkins (added after candidates)
vim /etc/rc.d/init.d/jenkins
Start jenkins
service jenkins start
3. Configure jenkins
Access the virtual machine's jenkins address through a browser and ask for an initialization key to initialize the password (under the linux directory)
View key
vim / var / lib / jenkins / secrets / initialAdminPassword
A white screen appears after pasting and copying continue
You will be asked to select the plug-in to be installed later, choose to skip, enter the system, and prompt that the password is not set. The first thing is to set the admin password, otherwise you will not be able to log in next time, there are many online modification of configuration files to achieve login-free function, here is still choose to set a password