当前位置: 首页 > news >正文

如何找做网站的客户如何seo网站推广

如何找做网站的客户,如何seo网站推广,做网站的公司怎么样,阳江房产网二手房林夏婷经纪人目录 一、安装配置jenkins 1、环境配置 2、软件要求 3、jdk安装(我是最小化安装,UI自带java要先删除rm -rf /usr/local/java 4、安装jenkins-2.419-1.1 二、Jenkins配置 1、修改jenkins初始密码 2、安装 Jenkins 必要插件 3、安装 Publish Over SS…

目录

一、安装配置jenkins

1、环境配置

2、软件要求

 3、jdk安装(我是最小化安装,UI自带java要先删除rm -rf /usr/local/java

4、安装jenkins-2.419-1.1

二、Jenkins配置

1、修改jenkins初始密码

2、安装 Jenkins 必要插件

 3、安装 Publish Over SSH 、 Maven Integration 插件

三、目前主流网站部署的流程

1、配置git主机

2、配置jenkins主机

3、配置 Maven、JDK、Git 环境

4、新建Maven项目

5、验证 Jenkins 自动打包部署结果


一、安装配置jenkins

1、环境配置

[root@client2 ~]# hostname jenkins
[root@client2 ~]# bash
[root@jenkins ~]# systemctl stop firewalld.service 
[root@jenkins ~]# iptables -F
[root@jenkins ~]# setenforce 0

2、软件要求

可以从国内清华园在下jenkins比较快,jdk推荐用17版本,11也行

 3、jdk安装(我是最小化安装,UI自带java要先删除rm -rf /usr/local/java

[root@jenkins ~]# ll
-rw-r--r--. 1 root root  89346360 8月  21 13:48 jenkins-2.419-1.1.noarch.rpm[root@jenkins ~]# tar xf jdk-17_linux-x64_bin.tar.gz
[root@jenkins ~]# mv jdk-17.0.8/ /usr/local/java
[root@jenkins ~]# vim /etc/profile
export JAVA_HOME=/usr/local/java/
export CLASSPATH=$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar
export PATH=$JAVA_HOME/bin:$PATH
[root@jenkins ~]# source /etc/profile

4、安装jenkins-2.419-1.1

[root@jenkins ~]# rpm -ivh jenkins-2.419-1.1.noarch.rpm 
警告:jenkins-2.419-1.1.noarch.rpm: 头V4 RSA/SHA512 Signature, 密钥 ID ef5975ca: NOKEY
准备中...                          ################################# [100%]
正在升级/安装...1:jenkins-2.419-1.1                ################################# [100%][root@jenkins ~]# jenkins start     //不要打断
2023-08-21 06:35:01.243+0000 [id=30]	INFO	jenkins.install.SetupWizard#init: *************************************************************
*************************************************************
*************************************************************Jenkins initial setup is required. An admin user has been created and a password generated.
Please use the following password to proceed to installation:465b5873c2e8486591a8c55916752ce8   #这是登录密码This may also be found at: /root/.jenkins/secrets/initialAdminPassword*************************************************************
*************************************************************
*************************************************************

RPM包安装的内容

 

 

二、Jenkins配置

1、修改jenkins初始密码

修改完保存重新登录即可

2、安装 Jenkins 必要插件

在 Jenkins 首页中,点击左侧的Manage Jenkins>>Manage Plugins>>可选插件,在过滤搜索框中输入要安装的 Publish Over SSH 、 Maven Integration 插件,并勾中其左侧的复选框,点击“直接安装”即可开始插件安装操作。

 3、安装 Publish Over SSH 、 Maven Integration 插件

配置jenkins并发执行数量

用于提高提高执行效率

Manage Jenkins >> Configure System >> Maven项目配置

传统代码上线的过程

开发人员发起代码上线的需求(邮件中包含开发做好的WAR包)-->运维人员连接线上负载调度器(Nginx)--> 隔离一组服务器(Tomcat)--> 连接服务器(Tomcat)--> 备份旧代码(tar打包)--> 删除旧代码目录 --> 上传新的WAR包 --> 外网测试 --> 测试不通过则通过备份回滚代码 --> 测试通过则利用rsync的脚本推送代码到其他服务器--> 统一外网测试 -->连接调度器恢复隔离机制  --> 隔离另一组服务器实施上线步骤 --> 上线完成。

三、目前主流网站部署的流程

目前主流网站部署方法:通过 Hudson/Jenkins 工具平台实现全自动部署+测试,是一个可扩展的持续集成引擎,属于开源软件项目,旨在提供一个开放易用的软件平台,使软件的持续集成变成可能。Jenkins 非常易于安装和配置,简单易用。

  1. 开发人员:写好代码,不需要自己进行源码编译、打包等工作,直接将代码分支存放在 SVN、Git 仓库即可。
  2. 运维人员:减轻人工干预的错误率,同时解放运维人员繁杂的上传代码、手动备份、更新等操作。
  3. 测试人员:可以通过 Jenkins 进行简单的代码及网站测试。

实验环境

操作系统

IP地址

主机名

角色

CentOS7.5

192.168.147.137

git

git服务器

CentOS7.5

192.168.147.139

Jenkins git客户端

jenkins服务器

CentOS7.5

192.168.147.140

tomcat

web服务器

 所有主机关闭防火墙和selinux

[root@localhost ~]# systemctl stop firewalld 
[root@localhost ~]# iptables -F
[root@localhost ~]# setenforce 0

1、配置git主机

# rpm安装安装依赖关系:git和jenkins主机都安

[root@gitclient ~]# yum -y install curl-devel expat-devel gettext-devel  openssl-devel zlib-devel

# 编译安装—服务端和客户端,访问https://mirrors.edge.kernel.org/pub/software/scm/git/下载所需要的版本

[root@gitclient ~]# wget https://github.com/git/git/archive/v2.22.0.tar.gz
[root@gitclient ~]# tar xf git-2.22.0.tar.gz -C /usr/src/
[root@gitclient ~]# cd /usr/src/git-2.22.0/
[root@git git-2.22.0]# make configure  #最小化安装要yum下载autoconf命令
#最小化要有gcc、gcc-c++
[root@git git-2.22.0]# ./configure --prefix=/usr/local/git && make && make install
[root@git git-2.22.0]# ln -sf /usr/local/git/bin/git /usr/bin/
[root@git git-2.22.0]# git --version
git version 2.22.0#在git服务端配置用户
[root@git ~]# useradd git
[root@gitclient ~]# echo "123465" | passwd --stdin git
更改用户 git 的密码 。
passwd:所有的身份验证令牌已经成功更新。
[root@git ~]# su - git
上一次登录:一 8月 21 15:48:06 CST 2023pts/0 上

创建本地仓库probe

[git@git ~]$ mkdir probe.git
[git@git ~]$ cd probe.git/
[git@git probe.git]$ git --bare init
已初始化空的 Git 仓库于 /home/git/probe.git/
[git@git probe.git]$ exit
登出

克隆项目代码同步到自己创建的仓库中

[root@git ~]# rz  #上传psi-probe.tar.gz
[root@git ~]# tar xf psi-probe.tar.gz
[root@git ~]# git clone git@192.168.147.137:/home/git/probe.git
正克隆到 'probe'...
git@192.168.147.137's password: 
warning: 您似乎克隆了一个空仓库。
[root@git probe]# git add .
[root@git probe]# git config --global user.email "skl@163.com"
[root@git probe]# git config --global user.name "skl"
[root@git probe]# git commit -m "all probe"
[root@git probe]# git push origin master
git@192.168.147.137's password: 
枚举对象: 1168, 完成.
对象计数中: 100% (1168/1168), 完成.
压缩对象中: 100% (1121/1121), 完成.
写入对象中: 100% (1168/1168), 2.01 MiB | 7.06 MiB/s, 完成.
总共 1168 (差异 398),复用 0 (差异 0)
To 192.168.147.137:/home/git/probe.git* [new branch]      master -> master

2、配置jenkins主机

1)添加验证凭据 :凭证这里添不添加都可以,这个试验不牵扯到凭证

跟着填写

填写以上数据后,点击“确定”就可以查看到新增的远程 web 主机账号。

2)添加 Publish Over SSH 远程主机

#tomcat主机创建目录
root@tomcat ~]# mkdir data

在 Jenkins 首页中点击“Manage Jenkins”->“Configure System”->“Publish over SSH”->“SSH Servers”->“增加”选项按钮,添加 SSH 远程主机。如图所示,输入 Name、Hostname、Username 等必要信息后,点击“高级”选项按钮->勾选“Use Password authentication,or use a different key”选项->输入“远程主机登录密码”->“Test Configuration”测试远程主机配置。测试远程主机配置成功后点击“保存”按钮即可。

 添加tomcat远程主机和密码

监测,显示成功,保存

 

3、配置 Maven、JDK、Git 环境

在 Jenkins 首页中点击“Manage Jenkins”->“Global Tool Configuration”->“JDK” ->新增“JDK”,设置 JDK 别名为”JDK17”。去掉“Install automatically”选项,设置 “JAVA_HOME”为本案例中 JDK 实际安装路径。

 

 在Jenkins安装maven、为maven更换阿里云镜像站

[root@jenkins ~]# rz -E
rz waiting to receive.
[root@jenkins ~]# tar xf apache-maven-3.5.0-bin.tar.gz 
[root@jenkins ~]# mv apache-maven-3.5.0 /usr/local/maven-3.5.0
[root@jenkins ~]# vim /usr/local/maven-3.5.0/conf/settings.xml 
#把147到158删除
146   <mirrors>
147     <!-- mirror
148      | Specifies a repository mirror site to use instead of a given repository. The repository that
149      | this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used
150      | for inheritance and direct lookup purposes, and must be unique across the set of mirrors.
151      |
152     <mirror>
153       <id>mirrorId</id>
154       <mirrorOf>repositoryId</mirrorOf>
155       <name>Human Readable Name for this Mirror.</name>
156       <url>http://my.repository.com/repo/path</url>
157     </mirror>
158      -->
159   </mirrors>替换成
146   <mirrors>
147       <mirror>
148         <id>nexus-aliyun</id>
149         <mirrorOf>central</mirrorOf>
150         <name>Nexus aliyun</name>
151         <url>http://maven.aliyun.com/nexus/content/groups/public</url>
152       </mirror>
153   </mirrors>

 在“Global Tool Configuration”配置界面中找到 Maven 配置选项,然后点击“新增 Maven”并设置别名为“Maven3.5”。

 Git 配置

[root@jenkins ~]# which git
/usr/bin/git

3、配置web主机 

[root@tomcat ~]#  tar xf apache-tomcat-8.5.40.tar.gz 
[root@tomcat ~]#  mv apache-tomcat-8.5.40 /usr/local/tomcat
[root@tomcat ~]#  yum -y install java

 发布公钥给jenkins主机

[root@tomcat ~]# ssh-keygen
[root@tomcat ~]# ssh-copy-id 192.168.147.139

主机Jenkins默认用jenkins用户去连接git,所以用jenkins用户生成密钥对,并发送给git。

[root@jenkins ~]# which git
/usr/bin/git
[root@jenkins ~]# id jenkins
uid=997(jenkins) gid=995(jenkins) 组=995(jenkins)
[root@jenkins ~]# su -s /bin/bash jenkinsbash-4.2$ ssh-keygen
bash-4.2$ ssh-copy-id git@192.168.147.137bash-4.2$ ssh git@192.168.147.137
Last failed login: Tue Aug 22 14:13:44 CST 2023 from 192.168.147.139 on ssh:notty
There were 3 failed login attempts since the last successful login.
Last login: Mon Aug 21 16:30:48 2023
[git@git ~]$ exit
登出
Connection to 192.168.147.137 closed.
bash-4.2$ exit[root@jenkins ~]# ssh-keygen
[root@jenkins ~]# ssh-copy-id git@192.168.147.137
[root@jenkins ~]# ssh git@192.168.147.137             #登录测试

4、新建Maven项目

在以上配置完成后,回到 Jenkins 首页,选择“新建任务”,然后输入一个任务名称 “probe”,并选中“Maven project”点击当前页面下方的“确定”按钮。

在点击“确定”按钮后,选择“源码管理”选中“Git”,配置“RepositoriesURL”为

git@192.168.147.137:/home/git/probe.git

 选择“Build

clean package -Dmaven.test.skip=true

选择“构建后操作“中的“send build artfacts over SSH “Exec command”中执行命令的含义是:在自动部署前先杀掉 Tomcat 进程,然后删除 war 包,用 scp 远程拷贝命令将 Jenkins 自动打包好的项目 war 包拷贝到当前 Tomcat 应用目录。 然后重启 Tomcat 。

scp 192.168.147.139:/root/.jenkins/workspace/probe/psi-probe-web/target/probe.war /usr/local/tomcat/webapps/
/usr/local/tomcat/bin/startup.sh

5、验证 Jenkins 自动打包部署结果

在web主机上查看 probe 目录是否被拷贝到/usr/local/tomcat/webapps 目录下

[root@tomcat ~]# ls /usr/local/tomcat/webapps/
docs  examples  host-manager  manager  probe  probe.war  ROOT
[root@tomcat ~]# ls /usr/local/tomcat/webapps/ -l
总用量 26624
drwxr-x---. 14 root root     4096 8月  23 20:00 docs
drwxr-x---.  6 root root       83 8月  23 20:00 examples
drwxr-x---.  5 root root       87 8月  23 20:00 host-manager
drwxr-x---.  5 root root      103 8月  23 20:00 manager
drwxr-x---.  7 root root       88 8月  23 21:16 probe
-rw-r--r--.  1 root root 27253197 8月  23 21:16 probe.war
drwxr-x---.  3 root root     4096 8月  23 20:00 ROOT

从以上结果来看,Jenkins 已把打好的 probe war 包拷贝过来了。

192.168.147.143就是192.168.147.139太卡了 ,我换了一台

[root@tomcat ~]# vim /usr/local/tomcat/conf/tomcat-users.xml<role rolename="manager-gui"/><role rolename="admin-gui"/><user username="tomcat" password="tomcat" roles="manager-gui,admin-gui"/>
</tomcat-users>	# 最下面此行前加入上面三行[root@tomcat ~]# vim /usr/local/tomcat/webapps/manager/META-INF/context.xml
<!--  <Valve className="org.apache.catalina.valves.RemoteAddrValve"allow="127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1" /> -->[root@tomcat ~]# /usr/local/tomcat/bin/shutdown.sh 
[root@tomcat ~]# /usr/local/tomcat/bin/startup.sh

 

 至此,Jenkins 自动打包部署完毕。


文章转载自:
http://dinncosulfonamide.bkqw.cn
http://dinncoearned.bkqw.cn
http://dinncograngerise.bkqw.cn
http://dinncokopje.bkqw.cn
http://dinncozoon.bkqw.cn
http://dinncomotuan.bkqw.cn
http://dinncoanomalistic.bkqw.cn
http://dinncodeleterious.bkqw.cn
http://dinncooup.bkqw.cn
http://dinncoapatite.bkqw.cn
http://dinncoplacer.bkqw.cn
http://dinncophytopathogen.bkqw.cn
http://dinncounderwood.bkqw.cn
http://dinncomingimingi.bkqw.cn
http://dinncoholds.bkqw.cn
http://dinncofiguration.bkqw.cn
http://dinncopayable.bkqw.cn
http://dinncoalbata.bkqw.cn
http://dinncoholystone.bkqw.cn
http://dinncoirritative.bkqw.cn
http://dinncodemander.bkqw.cn
http://dinncobraid.bkqw.cn
http://dinncocredibility.bkqw.cn
http://dinncosyndactylous.bkqw.cn
http://dinncoteleplasm.bkqw.cn
http://dinncotrichlorophenol.bkqw.cn
http://dinncoindianization.bkqw.cn
http://dinncogothicism.bkqw.cn
http://dinncohyperoxide.bkqw.cn
http://dinncoarchicarp.bkqw.cn
http://dinncocoranglais.bkqw.cn
http://dinncohandlers.bkqw.cn
http://dinncomicrospectrophotometer.bkqw.cn
http://dinncononorgasmic.bkqw.cn
http://dinncopolycrystalline.bkqw.cn
http://dinncophilanthropy.bkqw.cn
http://dinncocondensed.bkqw.cn
http://dinncomortify.bkqw.cn
http://dinncohoodwink.bkqw.cn
http://dinncomaturate.bkqw.cn
http://dinncooffaly.bkqw.cn
http://dinncoscooter.bkqw.cn
http://dinncoscarf.bkqw.cn
http://dinncocymometer.bkqw.cn
http://dinncoappreciate.bkqw.cn
http://dinncoetta.bkqw.cn
http://dinncofloral.bkqw.cn
http://dinncobopeep.bkqw.cn
http://dinncoanhydride.bkqw.cn
http://dinncoenchantress.bkqw.cn
http://dinncodigester.bkqw.cn
http://dinnconeuroepithelium.bkqw.cn
http://dinncoblackie.bkqw.cn
http://dinncoakinetic.bkqw.cn
http://dinncocicely.bkqw.cn
http://dinncotufthunting.bkqw.cn
http://dinncowist.bkqw.cn
http://dinncoelektron.bkqw.cn
http://dinncoantipope.bkqw.cn
http://dinncomage.bkqw.cn
http://dinncopropeller.bkqw.cn
http://dinncomolasses.bkqw.cn
http://dinncocoward.bkqw.cn
http://dinncotpr.bkqw.cn
http://dinncoparang.bkqw.cn
http://dinncocrossbearer.bkqw.cn
http://dinncomasonic.bkqw.cn
http://dinncostockcar.bkqw.cn
http://dinncopredestinate.bkqw.cn
http://dinncomethodically.bkqw.cn
http://dinncobleacherite.bkqw.cn
http://dinncorichen.bkqw.cn
http://dinncosamizdatchik.bkqw.cn
http://dinncotouchdown.bkqw.cn
http://dinncoepibolic.bkqw.cn
http://dinncogardenesque.bkqw.cn
http://dinncoearned.bkqw.cn
http://dinnconamen.bkqw.cn
http://dinncoporte.bkqw.cn
http://dinncocomprador.bkqw.cn
http://dinncosaccharize.bkqw.cn
http://dinncoarrestor.bkqw.cn
http://dinncoululation.bkqw.cn
http://dinncoaster.bkqw.cn
http://dinncobusk.bkqw.cn
http://dinncocytoplast.bkqw.cn
http://dinncoconservatism.bkqw.cn
http://dinncoflinty.bkqw.cn
http://dinncoundrape.bkqw.cn
http://dinncodardanelles.bkqw.cn
http://dinncotailwagging.bkqw.cn
http://dinncofantod.bkqw.cn
http://dinncoslave.bkqw.cn
http://dinncoforthcoming.bkqw.cn
http://dinncopipelike.bkqw.cn
http://dinncoplenilune.bkqw.cn
http://dinncodecouple.bkqw.cn
http://dinncofootmark.bkqw.cn
http://dinncoinveracity.bkqw.cn
http://dinncoylem.bkqw.cn
http://www.dinnco.com/news/136490.html

相关文章:

  • 山西省网站备案要多久全球搜索引擎排名
  • 织梦网站漏洞修复班级优化大师手机版下载
  • 怎样建设一个网站教学微信营销的方法有哪些
  • 宝坻建设委员会网站关键词代发排名
  • 网站建设合作网站统计代码
  • 福州网站制作好的企业专业搜索引擎seo服务
  • 深圳建设交易宝安百度关键词网站排名优化软件
  • 网站做负载均衡seo专员简历
  • 做网站和网页有区别吗什么样的人适合做策划
  • 沈阳做网站 智域百度榜单
  • wordpress fresh girl主题武汉网站seo德升
  • 苍山做网站美国今天刚刚发生的新闻
  • 做甜品网站的需求分析推荐友情链接
  • wordpress豆瓣插件seo网站地图
  • 陕西省城乡建设网站5118大数据平台官网
  • 百科类网站建设网站联盟
  • 瑜伽网站模版运营推广
  • a做爰视频免费观费网站百度指数可以查询多长时间的
  • 小榄网站广州seo网站推广优化
  • 赣州网站建设策划自己如何做一个网站
  • 网络营销师在哪里报名考试杭州百度快照优化排名推广
  • 做营销看的网站有哪些内容泉州seo培训
  • 做网站 异地域名中文搜索引擎有哪些
  • 河南移动商城网站建设今日最新国际新闻
  • 做淘宝差不多的网站广告推广渠道有哪些
  • 做界面网站用什么语言国内哪个搜索引擎最好用
  • 学做网站论坛vip号码seo数据优化
  • c 做网站session用法seo的优化技巧有哪些
  • 外贸平台有哪些分别对应哪个市场网站seo怎么做
  • 程序员源码网站seo免费诊断电话