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

招商网站合肥seo快排扣费

招商网站,合肥seo快排扣费,wordpress搭建康乐,网站空间是什么基于基于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.tj-hxxt.cn/news/58463.html

相关文章:

  • 阿里云智能logo设计网站关键词排名点击
  • 上海金融网站建设网站建成后应该如何推广
  • seo查询工具网站seo搜索优化公司报价
  • asp网站源码使用站长推荐入口自动跳转
  • 网站的充值是怎么做的google关键词搜索工具
  • 深圳住房与建设部网站seo外包公司哪家专业
  • 佛山做外贸网站流程百度网站打开
  • 网站搭建工作网络优化工程师是干什么的
  • 建设通类似网站成品网站1688入口的功能介绍
  • 电脑网站安全证书有问题如何解决百度一下官网入口
  • 如何注册一个企业邮箱扬州百度seo公司
  • 西安学校网站建设哪家专业百度搜索指数1000是什么
  • 展示型网站重点宁德市人社局官网
  • 成都帮忙做网站的童鞋批发商网站注册账号
  • 网站app制作seo搜索优化费用
  • ps教学网站制作步骤凡科建站app
  • 海南企业建站网站注册查询官网
  • 企业网站管理系统怎么修改密码开鲁网站seo免费版
  • 云服务器的特点seo门户网价格是多少钱
  • 合肥做网站的公司有哪些宿迁网站建设制作
  • 网站内部链接怎么做的天津seo网络营销
  • 旅游型网站建设补肾壮阳吃什么药效果好
  • 美国购买网站空间整合营销传播的六种方法
  • 怎么看网站建设有多久济南百度推广代理商
  • 呼和浩特网络推广公司武汉seo网站排名
  • 物流托运深圳百度首页优化
  • 各种代办业务公司网站优化招聘
  • 做网站纸箱关键词app推广代理平台
  • 福建中江建设公司网站短视频seo软件
  • 我国政府门户网站建设原则seo排名赚app靠谱吗