系统环境:windows 10 x64
JDK版本 : 7u80
tomcat版本 :7.0.88
安装目录:D:\softwares\apache-tomcat-7.0.88
官网下载地址:http://tomcat.apache.org/
当前系统是64位,所以我们下载64位的tomcat
下载后解压到 D:\softwares\apache-tomcat-7.0.88
下面我们开始启动tomcat服务器
目录:D:\softwares\apache-tomcat-7.0.88\bin
双击startup.bat即可启动服务
打开浏览器:访问 http://127.0.0.1:8080/
至此,tomcat服务器已经成功启动。
我们来查看下tomcat当前加载了哪些应用,点击Manager App
弹出以下登陆框
目前我们还没设置管理员账号,所以点击取消。
根据页面提示,我们来配置 tomcat 管理员账号
关闭tomcat服务器,可以用快捷键Ctrl+c 来停止tomcat服务器
配置文件 :D:\softwares\apache-tomcat-7.0.88\conf\tomcat-users.xml
在标签<tomcat-users>内添加
<role rolename="manager-gui"/>
<user username="admin" password="1" roles="manager-gui"/>
管理员登陆名:admin 登陆密码:1
保存即可
启动tomcat服务器,启动成功后访问 http://127.0.0.1:8080/。
点击Manager App,输入管理员admin账号密码,登陆即可
以下就是tomcat已经加载的应用
访问tomcat服务器,默认端口是8080
如果想更改默认端口,可以在D:\softwares\apache-tomcat-7.0.88\conf\server.xml文件中修改。
此次,我们把tomcat端口号改为80,保存文件,重启tomcat服务器,启动成功后,
访问地址: http://127.0.0.1/
80端口号,可以省略