1. 程式人生 > >linux下部署maven的web專案

linux下部署maven的web專案

本文針對伺服器端部署環境已經搭建好,Tomcat7,jdk1.7,本地jdk1.7,jre1.7,maven專案
1.war包準備

    1.檢查pom.xml下打包外掛的配置環境
    <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion
>
4.0.0</modelVersion> <groupId>com.333.333</groupId> <artifactId>33333</artifactId> <packaging>war</packaging> <version>0.0.1-SNAPSHOT</version> <name>33333</name> <url>http://maven.apache.org</url> <repositories>
<repository> <id>nexus</id> <name>Team Nexus Repository</name> <url>888888</url> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>
nexus</id> <name>Team Nexus Repository</name> <url>88888</url> </pluginRepository> </pluginRepositories> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <maven.build.timestamp.format>yyyyMMddHHmmss</maven.build.timestamp.format> <jdk.version>1.7</jdk.version> <junit.version>4.10</junit.version> <mysql-connector-java.version>5.1.34</mysql-connector-java.version> <spring.version>4.0.4.RELEASE</spring.version> <timestamp>${maven.build.timestamp}</timestamp> <!--新增開始--> <jedis.version>2.9.0</jedis.version> <zxing.core.version>3.3.0</zxing.core.version> <zxing.javase.version>3.0.0</zxing.javase.version> <jackson.version>2.6.0</jackson.version> <fastjson.version>1.1.41</fastjson.version> <!--新增結束--> </properties> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>${junit.version}</version> <scope>test</scope> </dependency> <!-- <dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> <version>2.5</version> </dependency> --> <dependency> <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId> <version>3.0.1</version> <scope>provided</scope> </dependency> <dependency> <groupId>jstl</groupId> <artifactId>jstl</artifactId> <version>1.2</version> </dependency> <!-- spring start --> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-aop</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-aspects</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-beans</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context-support</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-core</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-expression</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-jdbc</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-orm</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-oxm</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-test</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-tx</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-web</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-webmvc</artifactId> <version>${spring.version}</version> </dependency> <!-- spring end --> <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis</artifactId> <version>3.2.1</version> </dependency> <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis-spring</artifactId> <version>1.2.0</version> </dependency> <dependency> <groupId>com.alibaba</groupId> <artifactId>druid</artifactId> <version>1.0.9</version> </dependency> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>${mysql-connector-java.version}</version> </dependency> <dependency> <groupId>commons-codec</groupId> <artifactId>commons-codec</artifactId> <version>1.10</version> </dependency> <dependency> <groupId>commons-collections</groupId> <artifactId>commons-collections</artifactId> <version>3.2.1</version> </dependency> <dependency> <groupId>commons-fileupload</groupId> <artifactId>commons-fileupload</artifactId> <version>1.3.1</version> </dependency> <dependency> <groupId>commons-httpclient</groupId> <artifactId>commons-httpclient</artifactId> <version>3.1</version> </dependency> <dependency> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId> <version>2.4</version> </dependency> <dependency> <groupId>commons-lang</groupId> <artifactId>commons-lang</artifactId> <version>2.6</version> </dependency> <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> <version>1.2</version> </dependency> <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>1.2.17</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>1.7.9</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-log4j12</artifactId> <version>1.7.9</version> </dependency> <dependency> <groupId>org.codehaus.jackson</groupId> <artifactId>jackson-mapper-asl</artifactId> <version>1.9.13</version> </dependency> <dependency> <groupId>org.codehaus.jackson</groupId> <artifactId>jackson-jaxrs</artifactId> <version>1.9.13</version> </dependency> <!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-core --> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-core</artifactId> <version>${jackson.version}</version> </dependency> <!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind --> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> <version>${jackson.version}</version> </dependency> <!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-annotations --> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-annotations</artifactId> <version>${jackson.version}</version> </dependency> <dependency> <groupId>com.fasterxml.jackson.module</groupId> <artifactId>jackson-module-jaxb-annotations</artifactId> <version>${jackson.version}</version> </dependency> <dependency> <groupId>com.fasterxml.jackson.dataformat</groupId> <artifactId>jackson-dataformat-xml</artifactId> <version>${jackson.version}</version> </dependency> <dependency> <groupId>dom4j</groupId> <artifactId>dom4j</artifactId> <version>1.6.1</version> <exclusions> <exclusion> <artifactId>xml-apis</artifactId> <groupId>xml-apis</groupId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.aspectj</groupId> <artifactId>aspectjweaver</artifactId> <version>1.6.8</version> </dependency> <dependency> <groupId>org.apache.poi</groupId> <artifactId>poi</artifactId> <version>3.9</version> </dependency> <dependency> <groupId>org.apache.poi</groupId> <artifactId>poi-ooxml</artifactId> <version>3.9</version> </dependency> <dependency> <groupId>org.apache.poi</groupId> <artifactId>poi-ooxml-schemas</artifactId> <version>3.9</version> </dependency> <dependency> <groupId>org.apache.xmlbeans</groupId> <artifactId>xmlbeans</artifactId> <version>2.3.0</version> </dependency> <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-frontend-jaxws</artifactId> <version>3.0.3</version> </dependency> <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-frontend-jaxrs</artifactId> <version>3.0.3</version> </dependency> <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-transports-http</artifactId> <version>3.0.3</version> </dependency> <!-- https://mvnrepository.com/artifact/javax.mail/mail --> <dependency> <groupId>javax.mail</groupId> <artifactId>mail</artifactId> <version>1.4</version> </dependency> <!-- https://mvnrepository.com/artifact/opensymphony/oscache --> <dependency> <groupId>opensymphony</groupId> <artifactId>oscache</artifactId> <version>2.4</version> </dependency> <dependency> <groupId>org.bouncycastle</groupId> <artifactId>bcprov-jdk15on</artifactId> <version>1.52</version> </dependency> <dependency> <groupId>com.bigdata</groupId> <artifactId>uploadFDFS</artifactId> <version>0.0.2</version> </dependency> <dependency> <groupId>com.bigdata</groupId> <artifactId>sms</artifactId> <version>0.0.1</version> </dependency> <dependency> <groupId>org.mybatis.generator</groupId> <artifactId>mybatis-generator-core</artifactId> <version>1.3.2</version> </dependency> <dependency> <groupId>jdom</groupId> <artifactId>jdom</artifactId> <version>1.1</version> </dependency> <dependency> <groupId>org.jdom</groupId> <artifactId>jdom</artifactId> <version>1.1.3</version> </dependency> <dependency> <groupId>net.sf.json-lib</groupId> <artifactId>json-lib</artifactId> <version>2.4</version> <classifier>jdk15</classifier> </dependency> <dependency> <groupId>com.kenai.nbpwr</groupId> <artifactId>org-apache-batik-all</artifactId> <version>1.7-201002241055</version> </dependency> <dependency> <groupId>com.google.zxing</groupId> <artifactId>javase</artifactId> <version>${zxing.javase.version}</version> </dependency> <dependency> <groupId>com.google.zxing</groupId> <artifactId>core</artifactId> <version>${zxing.core.version}</version> </dependency> <dependency> <groupId>redis.clients</groupId> <artifactId>jedis</artifactId> <version>${jedis.version}</version> </dependency> <dependency> <groupId>com.alibaba</groupId> <artifactId>fastjson</artifactId> <version>${fastjson.version}</version> </dependency> <!--<dependency>--> <!--<groupId>com.aliyun</groupId>--> <!--<artifactId>aliyun-java-sdk-core</artifactId>--> <!--<scope>system</scope>--> <!--<systemPath>D:/idea/bigdata_analysis_ciyun1.0/src/main/webapp/WEB-INF/lib/aliyun-java-sdk-core-3.2.3.jar</systemPath>--> <!--</dependency>--> <!--<dependency>--> <!--<groupId>com.aliyun</groupId>--> <!--<artifactId>aliyun-java-sdk-dysmsapi</artifactId>--> <!--<scope>system</scope>--> <!--<systemPath>D:/idea/bigdata_analysis_ciyun1.0/src/main/webapp/WEB-INF/lib/aliyun-java-sdk-dysmsapi-1.0.0-SANPSHOT.jar</systemPath>--> <!--</dependency>--> <!--<dependency>--> <!--<groupId>com.alipay</groupId>--> <!--<artifactId>alipay-sdk-java</artifactId>--> <!--<scope>system</scope>--> <!--<systemPath>D:/idea/bigdata_analysis_ciyun1.0/src/main/webapp/WEB-INF/lib/alipay-sdk-java20170324180803.jar</systemPath>--> <!--</dependency>--> <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpclient</artifactId> <version>4.5.3</version> </dependency> </dependencies> <licenses> <license> <name>The BSD 3-Clause License</name> <url>https://opensource.org/licenses/BSD-3-Clause</url> <distribution>repo</distribution> </license> </licenses> <scm> <url>https://github.com/wxpay/WXPay-SDK-Java</url> <connection>[email protected]:wxpay/WXPay-SDK-Java.git</connection> <developerConnection>https://github.com/wxpay/WXPay-SDK-Java</developerConnection> </scm> <build> <finalName>bigdata_analysis_wobian_${timestamp}_1.0</finalName> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.5.1</version> <configuration> <source>${jdk.version}</source> <target>${jdk.version}</target> <encoding>utf8</encoding> <compilerArguments> <extdirs>src\main\webapp\WEB-INF\lib</extdirs> </compilerArguments> </configuration> </plugin> <!--<plugin>--> <!--<groupId>org.mybatis.generator</groupId>--> <!--<artifactId>mybatis-generator-maven-plugin</artifactId>--> <!--<version>1.3.5</version>--> <!--<configuration>--> <!--&lt;!&ndash; 配置檔案 &ndash;&gt;--> <!--<configurationFile>src/main/resources/mybatis-generator.xml</configurationFile>--> <!--&lt;!&ndash; 允許移動和修改 &ndash;&gt;--> <!--<verbose>true</verbose>--> <!--<overwrite>true</overwrite>--> <!--</configuration>--> <!--<dependencies>--> <!--&lt;!&ndash; jdbc 依賴 &ndash;&gt;--> <!--<dependency>--> <!--<groupId>mysql</groupId>--> <!--<artifactId>mysql-connector-java</artifactId>--> <!--<version>5.1.40</version>--> <!--</dependency>--> <!--<dependency>--> <!--<groupId>com.itfsw</groupId>--> <!--<artifactId>mybatis-generator-plugin</artifactId>--> <!--<version>1.0.11</version>--> <!--</dependency>--> <!--</dependencies>--> <!--</plugin>--> <!-- mybatis-generator --> <plugin> <groupId>org.mybatis.generator</groupId> <artifactId>mybatis-generator-maven-plugin</artifactId> <version>1.3.2</version> <configuration> <verbose>true</verbose> <overwrite>true</overwrite> </configuration> </plugin> </plugins> <resources> <resource> <directory>src/main/resources</directory> <excludes> <exclude>config/dev/</exclude> <exclude>config/test/</exclude> <exclude>config/production/</exclude> </excludes> <filtering>true</

相關推薦

linux部署springboot專案用到的一些命令

1.檢視埠情況 netstat –apn | grep 8080 2.殺死一個程序 kill -9 pid #pid 為相應的程序號 3.刪除資料夾 rm -rf /home/java/jdk1.8 4.檢視是否已經安裝了mysql rpm -qa | grep -i

Tomcat在Linux部署SpringMVC專案域名對映(外網訪問)

在網上搜了好多資料,Tomcat的域名對映,就是不使用ip加埠訪問,直接使用已有的域名訪問。按照網上的方法是修改Tomcat安裝目錄下conf資料夾下的server.xml檔案。 基本上大同小異都是修改Host標籤name的屬性為已有域名,然後再新增Context標籤指

Linux部署WEB專案

轉載宣告: http://www.cnblogs.com/xdp-gacl/p/4097608.html解壓tomcat伺服器壓縮包 配置環境變數  tomcat伺服器執行時是需要JDK支援的,所以必須配置好JDK用到的那些環境變數編輯/etc下的profile檔案,加上如下

Linux部署web專案常見命令

連線Linux使用工具為winSCP和putty,兩者結合者用,可以再winSCP選項->選項下進行配置,一起使用 如圖: 部署使用到的命令無非開啟目錄,刪除,複製等 1. cd命令 如:cd /tomcat/bin tomcat下的bin目錄 2.rm 命令 如:rm -rf web.w

Linux部署Javaweb專案

在這篇文章裡本人將詳細介紹在Linux(Centos6.5 64位)平臺下部署Javaweb專案 本人使用的騰訊雲伺服器 如果你有一臺伺服器,你可以選擇這個映象(比較省事,jdk版本有1.6,1.7,1.8,同時tomcat的版本也有6,7,8三個版本,自帶mysql,可以

Resin在Linux部署專案

1 檢視jdk是否正常安裝(1.7版本)  java -version 沒有安裝則先安裝jdk 2 將resin-4.0.36.tar.gz壓縮檔案放到opt資料夾下並解壓   解壓 tar zxvf resin-4.0.36.tar.gz 3

linux部署專案節點相關指令碼

linux節點相關部署指令碼: 1 節點打包時pom相關配置: <build>        <finalName>suninfoReport</finalName>       &nb

linux部署專案,下載檔案時,中文檔名亂碼問題

本人在linux伺服器的tomcat下部署一個war包專案,但是裡面建立中文檔名檔案一直亂碼,經過多重測試後找到解決方案: 需要在Tomcat啟動的時候強制設定LC_ALL 環境變量 =zh_CN.UTF­8,同時設定上­Dfile.encoding=UTF­8,如下圖是本人使用守護程序啟動to

Linux部署開源版“禪道”專案管理系統

1.開源版安裝包下載(64位的下載64位,32位的選中32位)  [[email protected]~]# wget http://dl.cnezsoft.com/zentao/9.0.1/ZenTaoPMS.9.0.1.zbox_32.tar.gz 2.直

Java web專案Linux部署的中文亂碼問題

轉載:https://blog.csdn.net/qq_28039297/article/details/76686022 我們專案的開發是在windows下完成的。  然後匯出.sql資料庫檔案,並匯出war包,準備部署到linux下的tomcat伺服器上。  部署完成出現

Linux部署Tomcat ,然後部署web專案

轉載宣告: http://www.cnblogs.com/xdp-gacl/p/4097608.html 解壓tomcat伺服器壓縮包   配置環境變數   tomcat伺服器執行時是需要JDK支援的,所以必須配置好JDK用到的那些環境變數 編輯/etc下的profile檔案,加上如下內

linux部署maven的web專案

本文針對伺服器端部署環境已經搭建好,Tomcat7,jdk1.7,本地jdk1.7,jre1.7,maven專案 1.war包準備 1.檢查pom.xml下打包外掛的配置環境 <project xmlns="http://maven.a

linux作業系統部署Javaweb專案教程

.tar  解包:tar xvf FileName.tar 打包:tar cvf FileName.tar DirName (注:tar是打包,不是壓縮!) ——————————————— .gz 解壓1:gunzip FileName.gz 解壓2:gzip -d FileName.gz 壓縮:gzip F

Linux部署maven-web專案

寫在前面(建議)安裝XShell,編寫指令非常方便,可以拷貝 安裝FTP,傳輸檔案非常方便 設定vim,顯示行號sudo vim /etc/vim/vimrc,新增set number即可安裝JDK 方法1:1、檢視jdk版本apt-cache search openjdk2、找到合適的版本後安裝:sudo

Linux部署grafana + influxdb + telegraf , 構建性能監控平臺

grafana 監控 Grafana+telegraf+InfluxDB,采用客戶端->服務端存儲->WEB界面顯示的工作模式,使用UTP傳輸數據,並且支持自定義圖表,有良好的擴展性,重要的是Grafana頁面展示比較美觀,更關鍵的是InfluxDB提供了Python的API,Influx

linux部署一個JavaEE項目的簡單步驟

per cat source div read manage 沒有 scp git 部署項目的前提是準備好環境,包括:Java運行環境(JDK),Tomcat,Mysql數據庫 1.首先將東西上傳到服務器,我是在windows安裝ssh工具(下載安裝git即可http:

linux部署程序,tomcat啟動正常,但網頁無法訪問

tom 環境部署 firewalld png 開啟 但是 system emctl 圖片 問題背景:測試環境部署程序,之前是可以的。但是在安裝rabbitmq的時候,再來打開網頁的時候就出現一直轉圈圈,網頁無法打開。 經過檢查發現是由於開啟了防火墻。 系統是cento

Linux部署Samba服務環境的操作記錄

command 解決辦法如下 some var sco most get -c can 關於Linux和Windows系統之間的文件傳輸,很多人選擇使用FTP,相對較安全,但是有時還是會出現一些問題,比如上傳文件時,文件名莫名出現亂碼,文件大小改變等問題。相比較來說,使

linux 部署單片 elasticsearch 服務

es本文是部署單機elasticsearch 服務。是通過yum進行安裝。elasticsearch 需要java環境。另一篇文章有配置java8環境說明。1: 首先下載 gpg簽名文件:rpm --import https://packages.elastic.co/GPG-KEY-elasticsearc

Linux 部署Django項目

重啟nginx system files 退出 box 協議類型 nec ret views Linux 下部署Django項目 說明:本文所使用的環境為CentOS 6+Python2.7+Django1.11 安裝Django、Nginx和uWSGI 1