jenkins 在centOS中部署
Posted 百年渔翁_肯肯
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了jenkins 在centOS中部署相关的知识,希望对你有一定的参考价值。
[root@localhost ~]# history
1 ifconfig
2 ll
3 tar -xvf apache-maven-3.8.3-bin.tar.gz
4 mv apache-maven-3.8.3-bin.tar.gz /usr/local/
5 cd /usr/local/
6 ls
7 tar -zxvf apache-maven-3.8.3-bin.tar.gz
8 ls
9 ls
10 unzip apache-maven-3.8.3-bin.zip
11 ls
12 vi /etc/profile
13 pwd
14 cd apache-maven-3.8.3/
15 pwd
16 vi /etc/profile
17 source /etc/profile
18 mvn -v
19 cd conf/
20 ls
21 vi settings.xml
22 vi /etc/profile
23 source /etc/profile
24 mvn -v
25 vi /etc/profile
26 source /etc/profile
27 mvn -v
28 mkdir /usr/java/
29 mv jdk-8u311-linux-x64.tar.gz /usr/java/
30 cd /usr/java/
31 ll
32 tar -xzvf jdk-8u311-linux-x64.tar.gz
33 history
34 ll
35 vi /etc/profile
36 source /etc/profile
37 java -version
38 echo $java_home
39 echo $JAVA_HOME
40 history
41 cd /usr/java/
42 ll
43 cd jdk1.8.0_311/
44 ll
45 cd bin
46 ll
47 cd java
48 cd /java
49 pwd
50 mvn -v
51 reboot
52 cd /var/lib
53 ll
54 yum install apt
55 wget apt-0.5.15lorg3.94a-4.el5.rf.i386.rpm
56 ls
57 mv apache-maven-3.8.3-bin.zip /usr/local
58 mv apache-maven-3.6.1-bin.tar.gz /usr/local/
59 cd /usr/local
60 tar -zxvf apache-maven-3.6.1-bin.tar.gz
61 vi /etc/profile
62 source /etc/profile
63 mvn -v
64 yum list installed |grep java
65 yum -y remove java-1.8.0-openjdk*
66 yum -y remove tzdata-java*
67 yum -y list java*
68 yum -y install java-1.8.0-openjdk*
69 which java
70 java -version
71 wget --no-check-certificate -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo
72 rpm --import http://pkg.jenkins.io/redhat-stable/jenkins.io.key
73 yum clean all
74 yum makecache
75 vim /etc/profile
76 source /etc/profile
77 mvn -v
78 vim /etc/profile
79 source /etc/profile
80 echo $JAVA_HOME
81 java -version
82 vim /etc/profile
83 source /etc/profile
84 mvn -v
85 vim /etc/profile
86 source /etc/profile
87 cd /opt
88 ls
89 mkdir maven
90 ls
91 mv apache-maven-3.8.3/ maven/
92 ls
93 cd maven/
94 ls
95 cd apache-maven-3.8.3/
96 cd conf/
97 ls
98 vim conf/
99 vim settings.xml
100 mvn -v
101 vi /etc/
102 cd /etc
103 ls
104 cd profile
105 vi profile
106 source /etc/profile
107 mvn -v
108 echo $JAVA_HOME
109 ls `$JAVA_HOME`
110 echo $JAVA_HOME
111 /usr/java/jdk1.8.0_311/bin/java -v
112 /usr/java/jdk1.8.0_311/bin/java -version
113 mvn
114 export JAVA_HOME=/usr/java/jdk1.8.0_311/bin/java
115 mvn
116 cd `$JAVA_HOME`
117 cd /usr/java/jdk1.8.0_311/bin/java
118 cd /usr/java/jdk1.8.0_311/bin
119 ls
120 ll java
121 echo $JAVA_HOME
122 export JAVA_HOME=/usr/java/jdk1.8.0_311
123 mvn
124 cd -
125 mvn -v
126 mvn -v
127 vi /etc/profile
128 source /etc/profile
129 mvn -v
130 cd /usr/local/
131 ls
132 cd apache-maven-3.6.1/
133 pwd
134 cd /usr/local/
135 cd apache-maven-3.8.3/
136 pwd
137 cd /usr/local/
138 rm -rf /usr/local/apache-maven-3.6.1
139 rm apache-maven-3.6.1
140 rm -rf apache-maven-3.6.1
141 ls
142 rm -rf apache-maven-3.8.3
143 ls
144 echo $JAVA_HOME
145 ls
146 cd apache-maven-3.8.3/
147 mvn -v
148 pwd
149 cd /usr/local/
150 ls
151 mv apache-maven-3.8.3 /opt/
152 cd CloudPayment
153 cd /opt
154 ls
155 cd maven/
156 ls
157 cd apache-maven-3.8.3/
158 ls
159 vi README.txt
160 ifconfg
161 ifconfig
162 tail /var/lib/jenkins/secrets/initialAdminPassword
163 cd /var/lib/jenkins/secrets/
164 ls
165 pwd
166 cd ./
167 ls
168 cd /var/lib/jenkins/
169 ls
170 cd plugins/
171 ls
172 pwd
173 LS
174 ls
175 pwd
176 cd /var/lib/jenkins
177 ls
178 systemctl daemon-reload
179 systemctl start jenkins
180 cd /var/lib/
181 ls
182 cd jenkins/
183 ls
184 cd plugins/
185 ls
186 cd cloudbees-folder/
187 ls
188 reboot
189 which java
190 java -version
191 wget http://mirrors.hust.edu.cn/apache/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz
192 wget https://dlcdn.apache.org/maven/maven-3/3.8.3/binaries/apache-maven-3.8.3-bin.tar.gz
193 wget --no-check-certificate https://dlcdn.apache.org/maven/maven-3/3.8.3/binaries/apache-maven-3.8.3-bin.tar.gz
194 tar -xvf apache-maven-3.8.3-bin.tar.gz
195 pwd
196 ls
197 mv -f apache-maven-3.8.3 /usr/local/
198 cd /root
199 ls
200 mv -f apache-maven-3.8.3 /usr/local/
201 vim /etc/profile
202 source /etc/profile
203 mvn -v
204 java -version
205 vim /etc/profile
206 source /etc/profile
207 mvn –v
208 yum install subversion
209 svnserve --version
210 mkdir -p /data/svn
211 cd /data/svn
212 svnadmin create project
213 vim /etc/sysconfig/svnserve
214 vim /data/svn/project/conf/svnserve.conf
215 vim /data/svn/project/conf/passwd
216 vim /data/svn/project/conf/authz
217 setenforce 0
218 systemctl start svnserve
219 systemctl enable svnserve
220 netstat -ntpl
221 firewall-cmd --add-port=3690/tcp
222 firewall-cmd --add-port=3690/tcp --permanent
223 mkdir /data/project
224 cd /data/project
225 svn co svn://localhost/project . //最后有个点
226 touch aaa.txt
227 svn ci -m "" //上传
228 svn ci -m ""
229 svn ci -m
230 svn ci -m ""
231 ls
232 svn ci -m aaa.txt
233 svn list svn://localhost/project
234 ls
235 svn list
236 vim aaa.txt
237 svn list
238 svn ci -m aaa.txt
239 svn ci -m aaa.txt -F
240 pwd
241 cd /data
242 ll
243 svn log
244 svn log filename -v
245 svn log -r 1 -v
246 svn update -r version_no
247 wget http://pkg.jenkins-ci.org/redhat/jenkins-2.39-1.1.noarch.rpm
248 ls
249 pwd
250 rpm --import http://pkg.jenkins-ci.org/redhat/jenkins.io.key
251 yum -y install jenkins-*.noarch.rpm
252 cd /usr/lib/jenkins/jenkins.war
253 cd /usr/lib/jenkins/
254 ls
255 vim /etc/sysconfig/jenkins
256 systemctl daemon-reload
257 systemctl start jenkins
258 ls
259 cp cloudbees-folder.hpi /var/lib/jenkins/plugins
260 service jenkins start
261 service jenkins stop
262 service jenkins restart
263 jenkins
264 systemctl start jenkins
265 cd /usr/lib/jenkins/
266 cd /
267 ls
268 wget --no-check-certificate -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat/jenkins.repo
269 wget --no-check-certificate -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat/jenkins.repo
270 rpm --import https://pkg.jenkins.io/redhat/jenkins.io.key
271 yum -y install jenkins
272 rpm-Va--nofiles--nodigest
273 skip break
274 yum -y install jenkins
275 systemctl start jenkins
276 vim /etc/sysconfig/jenkins
277 firefox http://192.168.182.131:8089
278 firefox http://192.168.182.131:8089/pluginManager/advanced
279 systemctl start jenkins
280 firefox http://192.168.182.131:8089
281 systemctl start jenkins
282 service jenkins restart
283 irefox http://192.168.182.131:8089/pluginManager/advanced
284 firefox http://192.168.182.131:8089/pluginManager/advanced
285 rpm --import http://pkg.jenkins-ci.org/redhat/jenkins.io.key ## 公钥
286 yum -y install jenkins-*.noarch.rpm
287 firefox http://192.168.182.131:8089/pluginManager/advanced
288 cd /usr/lib/jenkens
289 cd /usr/lib/jenkins
290 ls
291 cd /var/lib/jenkins
292 ls
293 cd plugins/
294 ls
295 ll
296 cd cloudbees-folder/
297 ls
298 ll
299 cd ..
300 ll
301 chmod 777 cloudbees-folder.hpi
302 history
以上是关于jenkins 在centOS中部署的主要内容,如果未能解决你的问题,请参考以下文章