# 服务器搭建——入门踩坑 (1)

服务器搭建——入门踩坑(1)

本人目的

​ 初始,搭建服务器,配置环境,实现远程热部署。

建议开始

​ 下面都不用看,直接看jenkins篇。(内有阿里云搭建链接(大神写的))

流程以及曲折

​ 本人一开始想实现服务器搭建+热部署,想用tomcat+maven插件去实现(即将实现时,得知现在公司都用jenkins)。得知jenkins,开始搭jenkins,这边布的也是简单的springboot项目。

​ 连接github,最后实现自动部署,实现了war包的jenkins部署,实现了jar包的部署。写了很简单的shell脚本。(简单勿喷)。

​ 未实现:github上传构建(触发远程构建),有机会再填坑。

以下为个人笔记.. 纯属自己当初留下的

tomcat 安装位置

  • /usr/local/tomcat
  • find .. -name “tomcat”

java 安装位置

  • whereis java 指令 whereis 查找路径有限
  • 找到了 etc (系统配置文件)下的 java.conf 在user/share/java

https://www.cnblogs.com/lossingdawn/p/10856199.html

/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-1.el7_6.x86_64/jre/bin/java

这个神仙操作啊,超链接

linux 文件目录

https://www.runoob.com/linux/linux-system-contents.html

maven 安装目录

/root/app/maven/apache-maven-3.6.1

去8080端口显示

https://blog.csdn.net/Magic_Ninja/article/details/82975659

传统项目部署三种方式(不用看)

直接看第三种好了,本质就是我白天写的linux 下,tomcat的 context 三种方式(好像是的)

https://cloud.tencent.com/developer/news/255843

最佳部署???? 结果只能内网访问??

https://www.jb51.net/article/115660.htm

https://www.cnblogs.com/ouyxy/p/6663811.html

以上都是普通项目

作死的坑来了,又要从头看

创了一个maven

https://blog.csdn.net/zz210891470/article/details/53737883

为什么这个tomcat-maven 远程库里没有啊

要加依赖

<dependency>  <groupId>org.apache.tomcat.maven</groupId>  <artifactId>tomcat7-maven-plugin</artifactId>  <version>2.2</version>  <type>maven-plugin</type></dependency>

https://www.cnblogs.com/luchangyou/p/7573481.html

此贴终结。我不做了。

问了朋友,现在不流行这样做

jenkins 对比 tomcat 的区别

https://blog.csdn.net/Magic_Ninja/article/details/82975659

tomcat9 卡住了,解决方案

https://blog.csdn.net/queshuihaimian/article/details/78117356

jenkins 转这边了

https://blog.csdn.net/tomatocc/article/details/83930714

原文地址:https://www.cnblogs.com/EsMussSeinHui/p/11184706.html