RHEL7 & CentOS7 (推薦centos7, 能夠直接使用epel源)html
JDK 1.7 (OpenJDK or Oracle不限)前端
Tomcat 7 (除solr外, 能夠直接使用yum源中的安裝包)mysql
172.28.128.9nginx
taotao-manager:8080 ROOTredis
172.28.128.8sql
taotao-search:8080 ROOT數據庫
haproxy:80json
172.28.128.7centos
taotao-rest:8080 ROOTtomcat
redis:6379
solr:8080 solr
172.28.128.5
taotao-sso:8080 ROOT
FTP:21
Nginx:80
172.28.128.3
taotao-order:8080 ROOT
mysql:3306
172.28.128.1
taotao-portal:8080 ROOT
推薦的外圍模塊部署順序:
1. Mysql
jdbc.driver=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://mysql.taotao.com:3306/taotao?characterEncoding=utf-8
jdbc.username=ttsc
jdbc.password=redhat
2. Nginx & FTP
http://ttsc-ftp/images/2017/02/10/1486742213740119.png
http://ftp.taotao.com/images/2017/02/23/1487895806072804.jpg
listen 80 default_server;
root /usr/share/nginx/html;
FTP_ADDRESS=ftp.taotao.com
FTP_PORT=21
FTP_USERNAME=ttsc
FTP_PASSWORD=redhat
FTP_BASE_PATH=/usr/share/nginx/html/images
IMAGE_BASE_URL=http://ftp.taotao.com/images
3. redis
修改監聽地址到私網IP
4. Solr
solr http://solr.taotao.com:8080/solr/
1. 在haproxy中設置反向代理,肯定訪問入口(IP + Port)、承載服務器(IP + Port),重啓haproxy
2. 設置Tomcat,修改tomcat-user.xml,啓動Tomcat
<role rolename="manager-gui" />
<role rolename="manager-script" />
<user username="tomcat" password="tomcat" roles="manager-gui, manager-script"/>
3. 修改項目中調用資源(db,redis,ftp,nginx,js,jsp)的域名及端口號。
4. 修改pom文件,指定工程熱部署要指定的路徑、用戶名及密碼。
5. 修改IDEA的熱部署配置
6. 部署war包
7. 在承載服務器中修改/etc/hosts文件
8. 測試
1. taotao-manager
功能:
淘淘商城後臺管理系統
商品管理
新增商品、查詢商品、規格參數
(訪問數據庫,編輯商品類目、標頭、賣點、價格、數量條形碼、圖片、商品描述、商品規格等信息)
網站內容管理
內容分類管理,內容管理(訪問數據庫,影響portal頁面各區域的顯示內容)
關聯關係:
Mysql DB(db.properties)
FTP/Nginx圖片服務器(resource.properties)
前端頁面:
有
測試用例:
2. taotao-rest
功能:
前臺系統服務層,功能是發佈服務,便於適配Android,iOS和PC等不一樣的portal門戶
關聯關係:
Mysql DB(db.properties)
Redis(applicationContext-jedis.xml)
前端頁面:
無
測試條件:
http://rest.taotao.com/rest/itemcat/list (所有商品分類展現json)
3. taotao-search
功能:
xxx
關聯關係:
Mysql DB(db.properties)
sorl(resource.properties)
前端頁面:
無
測試條件:
http://search.taotao.com/search/query?q=手機
http://search.taotao.com/search/manager/importall
4. taotao-sso
功能:
xxx
關聯關係:
Mysql DB(db.properties)
Redis(applicationContext-jedis.xml)
前端頁面:
有
測試條件:
http://sso.taotao.com/page/login
5. taotao-order
功能:
xxx
關聯關係:
Mysql DB(db.properties)
Redis(applicationContext-jedis.xml)
前端頁面:
無
測試條件:
單元功能就不測了,留到最終測試
6. taotao-portal
功能:
前臺系統表現層,淘淘商城首頁,沒有業務邏輯,依靠調用taotao-rest完成服務
關聯關係:
resource.properties
其餘的全部localhost
前端頁面:
無
測試條件:
http://www.taotao.com
完整下單流程