- 目录添加WEB-INF
cd ~/apache-tomcat-7.0.37
cd conf/Catalina/localhost/
vi hadoop.xml
<?xml version='1.0' encoding='utf-8'?>
<Context path="/hadoop" docBase="/root/hadoop">
</Context>
cd ~/apache-tomcat-7.0.37/webapps/ROOT/
cp -r WEB-INF ~/hadoop/
- 配置目录浏览选项
cd ~/apache-tomcat-7.0.37
vi conf/web.xml
<init-param>
<param-name>listings</param-name>
<param-value>true</param-value>
</init-param>
- 启动
chmod +x bin/*.sh
./bin/startup.sh