This is the first day for me to participate in the Wen Challenge.

The title
The operating system CentOS 7.4 64
CPU 1 the nuclear
memory 1 GB
Public network bandwidth 1 Mbps
The logged in user root

1. Install Java and Tomcat

Use the RZ or FTP tool to upload java.gz and tomcat.gz to the /opt directory

Tar ZXVF jdK-8u191-linux-x64.tar. gz decompress the package

Vim /etc/profile Add Java environment variables as follows:

#java env

JAVA_HOME=/opt/jdk1.8.0_191

JRE_HOME=$JAVA_HOME/jre

PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin

CLASSPATH=:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib/dt.jar

export JAVA_HOME JRE_HOME PATH CLASSPATH
Copy the code

Add it directly to the end of the file, and the effect after adding is shown as follows:

After saving the Settings, run source /etc/profile to take effect of environment variables

Run the Java -version command to check the JDK version.

Upload tomcat.gz to the opt directory

Tar ZXVF apache-tomcat-8.5.30.tar.gz Decompress the package

Chmod 777 apache-tomcat-8.5.30 Add permission

CD /opt/apache-tomcat-8.5.30/bin Go to the bin directory

Run the./startup.sh command to start tomcat. Port 8080 is used by default. You can use a browser to check whether tomcat is successfully started

JDK and Tomcat have been installed successfully

2. Installation of mysql

CD into the/opt directory wget download mysql repo source at http://repo.mysql.com/mysql57-community-release-el7-8.noarch.rpm

rpm -ivh mysql57-community-release-el7-8.noarch.rpm

Yum -y install mysql-server

Service mysqld restart Starts mysql

Run the following command to query the initial password: grep “password” /var/log/mysqld.log

Then change the password and create a remote user mysql -u root -p

Copy the initial password and paste Enter Password:

alter user ‘root’@’localhost’ identified by ‘Aa@123123’; (Aa123123 is the new password.)

CREATE USER ‘root’@’%’ IDENTIFIED BY ”Aa@123123”; Example Create a remote user

grant all on *.* to ‘root’@’%’ identified by ”’Aa@123123”’ with grant option; Assigning root permission

Flush PRIVILEGES Refresh permission

Process the screenshot

Navicat Premium is used to verify mysql installation.

3. Install SVN

CD/Go to the root directory

yum install subversion

cd /data

Mkdir SVN # Create a directory to store the SVN directory

Svnadmin create./ SVN /test/ # Create a SVN repository

View the contents of the directory:

drwxr-xr-x 2 root root 4096 Dec  1 15:10 conf

drwxr-sr-x 6 root root 4096 Dec  1 15:10 db

-r--r--r-- 1 root root    2 Dec  1 15:10 format

drwxr-xr-x 2 root root 4096 Dec  1 15:10 hooks

drwxr-xr-x 2 root root 4096 Dec  1 15:10 locks

-rw-r--r-- 1 root root  229 Dec  1 15:10 README.txt
Copy the code

The following notes about the catalogue:

Hooks directory: the directory where the hook footsteps file is located

The LOCKS directory: the directory where Subversion’s DB lock files and db_logs lock files are stored and used to track clients accessing file libraries

The format directory: is a text file that contains only an integer representing the version number of the current file library configuration

Conf directory: this is the repository configuration file (repository user access accounts, permissions)

CD conf Modify configuration items

Vim SVNserve. conf Release the comments on the following configuration items, as shown in the figure

:wq Save vim passwd and add a user

Vim Auhz licenses the user

Svnserve -d -r /data/ SVN / # Start SVN Use the SVN client for authentication

After this page is displayed, the SVN is successfully installed. If the SVN cannot be connected, disable the firewall or set the whitelist.

4. Install Jinkins

1. Download the dependent wget -o/etc/yum repos. D/Jenkins. ‘https://pkg.jenkins.io/redhat-stable/jenkins.repo

2. Import the secret-key RPM – import https://pkg.jenkins.io/redhat-stable/jenkins.io.key

3. Install yum install Jenkins

Install Jenkins RPM -ql Jenkins

Jenkinsz Main directory description:

/usr/lib/jenkins/ Jenkins installation directory where the war package will be placed.

/etc/sysconfig/jenkins Jenkins configuration file, “port”, “JENKINS_HOME” can be configured here.

/var/lib/jenkins/ default JENKINS_HOME.

The/var/log/Jenkins Jenkins. Log Jenkins log file.

Jenkins port setting, default 8080

Vim /etc/sysconfig/jenkins find JENKINS_PORT and change it to 8888

Start Jenkins systemctl start Jenkins

We used systemctl status jenkins.service to check the detailed error message.

Starting Jenkins bash: /usr/bin/java: No such file or directory

Vim /etc/sysconfig/jenkins

JENKINS_JAVA_CMD=”/opt/jdk1.8.0_191/bin/ Java”

For convenience, I am lazy and set JENKINS_USER directly to root to save trouble.

Run the systemctl start Jenkins command to start Jenkins.

Let’s open it with the browser and try it out, and follow the instructions for subsequent installation

Be sure to select select plug-in to install, then unselect the plug-in and click Install.

Due to the special network environment, if you select plug-ins, some plug-ins may fail to be installed, which is troublesome and pits. Therefore, install the basic environment first, and then manually download and install plug-ins.

Then follow the prompts to complete the installation.

Subversion plug-in installation, in this order to updates.jenkins-ci.org/download/pl… Directly press Ctrl+F to search, then click enter, now the latest version is ok, and then upload in order, upload the location in System Management -> Plug-in Management -> Advanced -> Upload plug-in, as shown in the picture

Install in the following order

1.script-security.hpi

2.command-launcher.hpi

3.bouncycastle-api.hpi

4.structs.hpi

5.workflow-step-api.hpi

6.workflow-scm-step.hpi

7.credentials.hpi

8.ssh-credentials.hpi

9.scm-api.hpi

10.workflow-api.hpi       

11.junit.hpi

12.mapdb-api.hpi

This is a screenshot of the complete installation

Maven plug-in installation, directly to the optional plug-in search Maven Integration, test can be installed.

According to the complete

Conf /setting. XML to change the location of the local repository and the default nexus address of the remote repository

<localRepository>/ opt/apache maven - 3.3.9 / repository</localRepository>
    <mirror>  
      <id>alimaven</id>  
      <name>aliyun maven</name>  
      <url>http://maven.aliyun.com/nexus/content/groups/public/</url>  
      <mirrorOf>central</mirrorOf>          
    </mirror>  
Copy the code

Save the file and upload it to the /opt directory

At this point, the Jenkins installation is basically over