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

招商网站整合营销沟通

招商网站,整合营销沟通,设计感十足的网站,ae有么有做gif的网站基于基于Jenkins自动打包并部署Tomcat环境_学习新鲜事物的博客-CSDN博客环境 准备git仓库 [rootgit ~]# su - git 上一次登录:五 8月 25 15:09:12 CST 2023从 192.168.50.53pts/2 上 [gitgit ~]$ mkdir php.git [gitgit ~]$ cd php.git/ [gitgit php.git]$ git --b…

基于基于Jenkins自动打包并部署Tomcat环境_学习新鲜事物的博客-CSDN博客环境

准备git仓库

[root@git ~]# su - git

上一次登录:五 8月 25 15:09:12 CST 2023从 192.168.50.53pts/2 上

[git@git ~]$ mkdir php.git

[git@git ~]$ cd php.git/

[git@git php.git]$ git --bare init

初始化空的 Git 版本库于 /home/git/php.git/

[git@git php.git]$ exit

登出

上传代码到仓库

[root@git ~]# git clone git@192.168.50.51:/home/git/php.git/

正克隆到 'php'...

git@192.168.50.51's password:

warning: 您似乎克隆了一个空版本库。

[root@git ~]# cd php/

[root@git php]# cat << EOF > index.php

> <?php

> phpinfo();

> ?>

> EOF

[root@git php]# git add .

[root@git php]# git commit -m "all"

[master(根提交) a251610] all

 1 file changed, 3 insertions(+)

 create mode 100644 index.php

[root@git php]# git push origin master

git@192.168.50.51's password:

Counting objects: 3, done.

Writing objects: 100% (3/3), 218 bytes | 0 bytes/s, done.

Total 3 (delta 0), reused 0 (delta 0)

To git@192.168.50.51:/home/git/php.git/

 * [new branch]      master -> master

部署web主机环境

[root@tomcat ~]#  yum install -y httpd mariadb-server mariadb mariadb-devel php php-mbstring php-mysql php-bcmath php-gd php-xmlrpc php-ldap php-xml libevent libevent-devel net-snmp net-snmp-devel libxml2 libxml2-devel ntpdate

[root@tomcat ~]# yum -y install rsync

[root@tomcat ~]# systemctl start httpd

[root@tomcat ~]# systemctl start mariadb

Jenkins主机将密钥发布到web主机

[root@jenkins ~]# su -s /bin/bash jenkins
bash-4.2$ ssh-keygen
bash-4.2$ ssh-copy-id root@192.168.50.54

[root@jemkins ~]# su -s /bin/bash jenkins

bash-4.2$  ssh-copy-id root@192.168.50.54

/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/var/lib/jenkins/.ssh/id_rsa.pub"

The authenticity of host '192.168.50.54 (192.168.50.54)' can't be established.

ECDSA key fingerprint is SHA256:QTpNCUOIFG1aAs7OSxPHKn0MlNEnLbS7SP/V1xdN8Cg.

ECDSA key fingerprint is MD5:f8:df:e8:5f:ae:af:56:a8:e9:0c:76:13:8b:0e:07:4c.

Are you sure you want to continue connecting (yes/no)? yes

/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed

/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys

root@192.168.50.54's password:

Number of key(s) added: 1

Now try logging into the machine, with:   "ssh 'root@192.168.50.54'"

and check to make sure that only the key(s) you wanted were added.

基于rsync部署

创建一个Freestyle project

git@192.618.50.51:/home/git/php.git

 

 

rsync -avz --delete * root@192.168.50.54:/var/www/html/

 

 

 

 

[root@tomcat ~]#  ls /var/www/html/

index.php

[root@tomcat ~]#  cat /var/www/html/index.php

<?php

phpinfo();

?>

 基于ansible部署

[root@jemkins ~]# yum -y install ansible

[root@jemkins ~]#  vim /etc/ansible/hosts

 [webservers]
192.168.50.54

修改jenkins运行用户

[root@jemkins ~]# vim /usr/lib/systemd/system/jenkins.service

 34 User=root

 35 Group=root

一般在/etc/init.d/jenkins或/usr/lib/systemd/system/jenkins.service。根据不同的Linux发行版可能略有不同,请根据实际情况进行查找。

添加Ansible插件 

 创建php-ansible

 

 做好ssh密钥通联

 

 

 src=${WORKSPACE} dest=/var/www/html rsync_opts=--exclude=.git

 

 

 

 

 访问http://192.168.50.54/php-ansbile/

 再见

http://www.15wanjia.com/news/30480.html

相关文章:

  • 优秀行业网站口碑营销的前提及好处有哪些?
  • 四川建设行业网站有哪些百度广告联盟收益
  • dz论坛做分类网站广东知名seo推广多少钱
  • 疫情地区查询最新企业网站优化软件
  • 自媒体时代做网站有前途吗seo查询 工具
  • 简述web页面设计原则我是seo关键词
  • 网站建设多少钱一个月西安网约车
  • 免费企业网站建设深圳搜索引擎优化收费
  • 免费外贸网站模板下载某网站seo诊断分析
  • 泰和县建设局网站营销工具
  • 南京哪些公司做网站aso优化服务站
  • 深圳建设银行官方网站上海网站建设费用
  • rp怎么做网站软文推广文章范文
  • 数字货币交易网站开发怎么做网站正能量免费推广软件
  • 新疆建设职业学院网站6成都关键词快速排名
  • 汽车大全官网seo关键词优化平台
  • 室内设计网站推荐知乎磁力bt种子搜索
  • 在县城做同城网站怎么样淮北网络推广
  • 网站建设周期湖北网络营销网站
  • 取消网站的通知搜索关键词查询工具
  • .net网站莱阳seo排名
  • 宿州哪家做网站好北京seo怎么优化
  • 网站开发设计实训总结整合营销
  • 做电影网站怎样赚钱吗郑州营销型网站建设
  • 兰州网站建设公司电话快手seo关键词优化
  • 有什么做美食的网站seo人才招聘
  • 阿里云网站建设最后什么样子如何申请域名
  • 有哪些官网做的比较好的网站小说网站排名前十
  • 网站别人做的收到方正侵权淘宝关键词指数
  • 网站建设叫什么软件网络营销论坛