項目地址:https://gitee.com/iBase4J/iBase4J
搭建步驟:
1、git 代碼
2、安裝 Zookeeper
3、打包部署 Dubbo Admin
4、安裝 Nginx
5、配置文件
6、啟動Web Server 和 Service Server
7、搭建完成
詳細步驟:
1、git代碼
本人用的 idea -> File -> New -> Project From Version Control -> Git
輸入 iBase4J 地址: https://gitee.com/iBase4J/iBase4J.git
選擇本地保存地址輸入名稱,點擊 Clone,稍等一會,代碼下載完畢,如下圖:
2、安裝 Zookeeper
安裝方法:http://blog.csdn.net/antma/article/details/79219493
3、打包部署 Dubbo Admin
本人是直接把源碼下載下來,自己打包
部署方法見: http://blog.csdn.net/antma/article/details/79219739
4、安裝 Nginx
下載地址:http://nginx.org/en/download.html
下載解壓后,修改 conf/nginx.conf 文件為:
- worker_processes 1;
- events {
- worker_connections 1024;
- }
- http {
- include mime.types;
- default_type application/octet-stream;
- sendfile on;
- keepalive_timeout 65;
- server {
- listen 80;
- server_name localhost;
- # 靜態頁面目錄
- root <span style="color:#ff0000;"><strong>E:\MyCode\iBase4J\iBase4J-UI\iBase4J-UI-AngularJS</strong></span>;
- # 默認首頁
- index index.html;
- location / {
- # 用戶瀏覽器端的緩存設置
- location ~* \.(css|js|jpg|jpeg|gif|png|swf|htm|html|json|xml|svg|woff|ttf|eot|map|ico)$ {
- expires 1h;
- if (-f $request_filename) {
- break;
- }
- }
- # 動態頁面,交給tomcat處理
- if ( !-e $request_filename) {
- proxy_pass http://127.0.0.1:8088;
- }
- }
- error_page 500 502 503 504 /50x.html;
- location = /50x.html {
- root html;
- }
- }
- }
其中:
- # 靜態頁面目錄
- root <span style="color:#ff0000;"><strong>E:\MyCode\iBase4J\iBase4J-UI\iBase4J-UI-AngularJS</strong></span>;
- # 動態頁面,交給tomcat處理
- if ( !-e $request_filename) {
- proxy_pass <span style="color:#ff0000;"><strong>http://127.0.0.1:8088;</strong></span>
- }
Nginx配置完畢!
命令行運行 Nginx -t 檢查配置文件語法是否正確,然后運行 start nginx 啟動Nginx,如下圖:
經過以上配置,直接訪問 http://localhost 即可打開前端頁面:
待續....