环境搭建
一、搭建环境前的准备:
需要了解的工具和包
二:将包上传到服务器上
三、安装步骤
1、安装jdk
2、解压 tomcat 服务器包
(1)tar -zxvf 包名
解压后的服务器 apache-tomcat-7.0.56
(2)进入tomcat 目录,熟悉目录下的文件
(1)bin目录
(2)启动服务器
(3)在浏览器上输入:ip+端口 http://192.168.1.44:8080/
启动出现以上界面,最好关闭服务器,
(4)替换webapp 下的代码包
(5)先启动代码包war, war 启动后自动解压,不需要手动解压
(6)配置前,后端两包
配置后端:
修改前端的配置文件:
7\操作数据库
(1)启动数据库
service mysqld start
(2)创建一个新库duoyoumi (备注 :新建的数据库,要和配置文件中的数据库一致)
(2)还原数据库
如果是新的数据库就要进行授权,刷新权限
(8)检查:
1、防火墙关闭没有 :service iptables stop
2、数据库是否重启:service mysqld restart
3、数据库是否授权:grant all privileges on *.* to root@'%' identified by '123456'; 是否刷新:flush privileges
4、 vim /etc/mys.cnf 添加一下不区分大小写:lower_case_table_names=1
5、配置文件两个文件是否都正确
6、启动tomcat ,先关闭在启动
(9)在浏览器汇总输入ip+端口