一、发布sql
1、打开浏览器浏览网址
http://192.168.1.241/index.php/db/sql/oracle/{table_name}
{table_name}为表的名称,注意不需要{}
将内容如:
CREATE TABLE cm_real (
CM_ID integer,
CM_NAME varchar2(20),
ID_CARD varchar2(40),
ID_TYPE integer,
ID_CARD_DIS varchar2(20) not null,
CM_CREATE varchar2(8),
STATUS integer,
CM_VALID_DATE varchar2(8),
CM_PHONE varchar2(11),
CM_IMG1 blob,
CM_IMG2 blob not null,
IMG_TYPE integer,
USE_ERROR varchar2(200) not null,
CM_FLAG integer,
CM_VERIFY_ERROR varchar2(200) not null,
L_BANK_CARD varchar2(20) not null,
L_BANK_ID varchar2(20) not null
);
comment on table cm_real is '客户真实信息';
comment on column cm_real.CM_ID is '用户id';
comment on column cm_real.CM_NAME is '姓名';
comment on column cm_real.ID_CARD is '身份证';
comment on column cm_real.ID_TYPE is '身份证类别';
comment on column cm_real.ID_CARD_DIS is '展示出来的身份证';
comment on column cm_real.CM_CREATE is '创建日期';
comment on column cm_real.STATUS is '状态';
comment on column cm_real.CM_VALID_DATE is '有效期';
comment on column cm_real.CM_PHONE is '手机号码';
comment on column cm_real.CM_IMG1 is '证件1';
comment on column cm_real.CM_IMG2 is '证件2';
comment on column cm_real.IMG_TYPE is '0:默认|1:户口本';
comment on column cm_real.USE_ERROR is '通信过程错误';
comment on column cm_real.CM_FLAG is '审核标志';
comment on column cm_real.CM_VERIFY_ERROR is '审核失败';
comment on column cm_real.L_BANK_CARD is '用于报失';
comment on column cm_real.L_BANK_ID is '联行号';
alter table cm_real add primary key (CM_ID);
复制一下
2、连接oracle环境
使用mstsc工具远程连接到192.168.1.231
用户名xp
密码123
打开PlSQL Developer
密码ecard2013
选择File=>New=>Sql Window打开,并粘贴sql命令
二、发布tomcat
1、连接linux
192.168.1.232
用户名root
密码123456
2、进入目录
cd /home/tomcat
cd apache-tomcat-7.0.70
cd bin
检查tomcat进程是否存在
ps -ef|grep tomcat
如下为不存在
ps -ef|grep tomcat
root 3228 3210 0 13:12 pts/0 00:00:00 grep tomcat
如下为存在
[root@oracle bin]# ps -ef|grep tomcat
root 3239 1 33 13:13 pts/0 00:00:08 /usr/java/jdk1.6.0_45/bin/java -Djava.util.logging.config.file=/home/tomcat/apache-tomcat-7.0.70/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -server -Xms4g -Xmx4g -XX:PermSize=256M -XX:MaxPermSize=512m -Djdk.tls.ephemeralDHKeySize=2048 -Djava.endorsed.dirs=/home/tomcat/apache-tomcat-7.0.70/endorsed -classpath /home/tomcat/apache-tomcat-7.0.70/bin/bootstrap.jar:/home/tomcat/apache-tomcat-7.0.70/bin/tomcat-juli.jar -Dcatalina.base=/home/tomcat/apache-tomcat-7.0.70 -Dcatalina.home=/home/tomcat/apache-tomcat-7.0.70 -Djava.io.tmpdir=/home/tomcat/apache-tomcat-7.0.70/temp org.apache.catalina.startup.Bootstrap start
root 3282 3210 0 13:13 pts/0 00:00:00 grep tomcat
[root@oracle bin]#
此时进程id为3239
关闭tomcat
sh shutdown.sh
之后等待10秒左右,查看进程是否存在
启动tomcat
sh startup.sh
发布程序
进入tomcat webapps目录
cd /home/tomcat/apache-tomcat-7.0.70/webapps
首先上传war包到这个文件夹
使用ftp工具上传至/home/ftpuser下
ip:192.168.1.232
用户名:ftpuser
密码:ftpuser
cp /home/ftpuser/ecard.war ./
然后启动tomcat,并且查看logs目录下的日志文件
此时可以开启两个窗口,查看日志文件
cd /home/tomcat/apache-tomcat-7.0.70/logs
tail -f ecard_log.log