市场经营部署文档步骤
环境:windows服务器、tomcat、oracle数据库、pl/sql、javaweb项目war包
第一步:
1、创建表空间:
CREATE TABLESPACE "SUPP_DATA" DATAFILE
'D:\APP\ADMINISTRATOR\ORADATA\ORCL\SUPP_DATA01.DBF' SIZE 33554432
AUTOEXTEND ON NEXT 10485760 MAXSIZE 1073741824
LOGGING ONLINE PERMANENT BLOCKSIZE 8192
EXTENT MANAGEMENT LOCAL AUTOALLOCATE DEFAULT NOCOMPRESS SEGMENT SPACE MANAGEMENT AUTO
ALTER DATABASE DATAFILE
'D:\APP\ADMINISTRATOR\ORADATA\ORCL\SUPP_DATA01.DBF' RESIZE 1073741824
2、创建用户:
用户名和密码相同。
授予权限:
GRANT
CREATE SESSION, CREATE ANY TABLE, CREATE ANY VIEW ,CREATE ANY INDEX, CREATE ANY PROCEDURE,DBA,
ALTER ANY TABLE, ALTER ANY PROCEDURE,
DROP ANY TABLE, DROP ANY VIEW, DROP ANY INDEX, DROP ANY PROCEDURE,SELECT ANY TABLE,
INSERT ANY TABLE,
UPDATE ANY TABLE,
DELETE ANY TABLE,
SELECT ANY SEQUENCE,
CREATE ANY SEQUENCE,DROP ANY SEQUENCE,create triggerTO MARKET;
ALTER user MARKET QUOTA UNLIMITED ON SUPP_DATA;
3、导入数据库:
1)修改D:\app\Administrator\product\11.2.0\client_1\network\admin路径下的tnsnames.ora文件,增加网络连接配置
ORCL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = xxx.xxx.xxx.xxx)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = orcl)
)
)
2)imp MARKET/MARKET @ORCL full=y ignore=y file=数据库备份文件地址
第二步:
在xxx.xxx.xxx.7服务器进行项目部署:
1)将项目打包文件复制到d盘。
2)将编译后的文件放到D/workspace目录下
3)复制D:\server路径下的tomcat
4)修改tomcat配置:
D:\server\CITC\tomcat-5-market\bin下,修改文件catalina.bat参数:
D:\server\CITC\tomcat-5-market\conf\Catalina\localhost
path="/market"
docBase="D:\workspace\market"
修改端口:D:\server\CITC\tomcat-5-market\conf (要求不与已有的项目端口重复)
修改配置文件:
1、
WEB-INF/class Poolman.xml
jdbc:oracle:thin:@// xxx.xxx.xxx.xxx:xxxx:orcl
d
d
2、
WEB-INF/class velocity.properties
修改文件中的下列数据项,路径为应用模板存放路径
file.resource.loader.path = D:\ workspace\app\creatorepp\WEB-INF\templates
WEB-INF/class properties-sys.xml
approot为改成工程文件存放的目录
WEB-INF/class manager-provider.xml
module.xml所在路径
注意:路径最后需带上"\"。
3、启动tomcat:运行:D:\server\CITC\tomcat-5-market\bin目录下的startup.bat批处理。
第三步:
配置外网:
1、设置nginx外网映射:在D:\server\nginx-1.12.1\conf路径下
location /market {
#add_header 'Access-Control-Allow-Origin' '*';
#add_header 'Access-Control-Allow-Methods' 'GET, PUT, POST, DELETE';
#add_header 'Access-Control-Allow-Headers' 'Origin, Content-Type, Accept, Authorization, Show-In-UI-View, X-Requested-With';
#add_header 'Access-Control-Max-Age' '3600';
proxy_pass http://xx.xxx.xxx.7:8001/market ;
proxy_set_header Host $host:8080;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
#add_header From www.xxx.com:8080/market/;
#proxy_cookie_path /market/ /;
#proxy_set_header Cookie $http_cookie;
}
2、在任务管理器中结束nginx进程,然后重启nginx(D:\server\nginx-1.12.1目录下)