ECS上简单搭建web
以下为大致步骤:
mkdir -p /home/webDemo/jdk /home/webDemo/tomcat
cd /home/webDemo/jdk && wget http://mirrors.linuxeye.com/jdk/jdk-8u271-linux-x64.tar.gz && tar -xzvf jdk-8u271-linux-x64.tar.gz
cd /home/webDemo/tomcat && wget http://mirrors.tuna.tsinghua.edu.cn/apache/tomcat/tomcat-8/v8.5.63/bin/apache-tomcat-8.5.63.tar.gz && tar -xzvf apache-tomcat-8.5.63.tar.gz
echo -e "#set java environment\nexport JAVA_HOME=/home/webDemo/jdk/jdk1.8.0_271\nexport JRE_HOME=/home/webDemo/jdk/jdk1.8.0_271/jre\nexport CLASSPATH=.:\$JAVA_HOME/lib/dt.jar:\$JRE_HOME/lib/tools.jar\nexport PATH=\$JAVA_HOME/bin:\$PATH" >> /etc/profile
source /etc/profile
echo -e "export JAVA_HOME=/home/webDemo/jdk/jdk1.8.0_271\nexport JRE_HOME=/home/webDemo/jdk/jdk1.8.0_271/jre" >> /home/webDemo/tomcat/apache-tomcat-8.5.63/bin/setclasspath.sh
cd /home/webDemo/tomcat/apache-tomcat-8.5.63/bin/ && sh startup.sh
- 点赞
- 收藏
- 关注作者
评论(0)