linux下安裝apache和maven

來源:互聯網
上載者:User
文章目錄
  •   1 下載apache-tomcat-7.0.19.tar.gz
  •   2 解壓到目標目錄
  •   3 設定環境變數
  •   4 測試是否成功
  •   1 下載apache-maven-3.0.3-bin.tar.gz
  •   2 解壓到目標目錄
  •   3 設定環境變數
  •   4 測試是否成功

  為了使用mahout,與自己的程式對比,必須先安裝tomcat和maven,這裡記錄一下安裝步驟。

  系統內容:ubuntu server

一 安裝apache-tomcat-7.0.19  1 下載apache-tomcat-7.0.19.tar.gz

 

http://mirror.bjtu.edu.cn/apache/tomcat/tomcat-7/v7.0.19/bin/apache-tomcat-7.0.19.tar.gz

  2 解壓到目標目錄

  tar -xzvf apache-tomcat-7.0.19.tar.gz

  3 設定環境變數

  在/etc/profile檔案中加入以下內容(具體路徑需要根據安裝目錄修改,我的安裝目錄為/usr/local/):

  export TOMCAT_HOME=/usr/local/apache-tomcat-7.0.19
  PATH=$PATH:$TOMCAT_HOME/bin

  使用source /etc/profile命令使更改生效。

  4 測試是否成功

  在本機開啟瀏覽器,輸入localhost:8080;或者在其他電腦上輸入“ip地址:8080”,如果彈出Apache Tomcat/7.0.19的頁面,說明安裝成功。

二 安裝maven3.0.3
  1 下載apache-maven-3.0.3-bin.tar.gz

 

http://apache.etoak.com//maven/binaries/apache-maven-3.0.3-bin.tar.gz

  2 解壓到目標目錄

  tar -xzvf apache-maven-3.0.3-bin.tar.gz

  3 設定環境變數

  在/etc/profile檔案中加入以下內容(具體路徑需要根據安裝目錄修改,我的安裝目錄為/usr/local/):

  export MAVEN_HOME=/usr/local/apache-maven-3.0.3
  PATH=$PATH:$MAVEN_HOME/bin

  使用source /etc/profile命令使更改生效。

  4 測試是否成功

  在命令列輸入mvn -v,如果顯示包含Apache Maven 3.0.3 的資訊,說明安裝成功

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.