一. 配置JDK
- 下载jdk,这里下载的是linux64位的tar压缩包
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html - 解压
tar xzfv jdk-8u151-linux-x64.tar.gz
- 设置环境变量
vi /etc/profile
export JAVA_HOME=/usr/local/jdk1.8.0_151
export PATH=$PATH:${JAVA_HOME}/bin
- 执行,刷新环境变量设置
source /etc/profile
- 验证
java -version
如果打印出版本信息,完成
二、设置tomcat
- 下载tomcat
https://tomcat.apache.org/download-70.cgi - 解压
unzip apache-tomcat-7.0.82.zip
- 设置环境变量
vi /etc/profile
export CATALINA_HOME=/usr/local/apache-tomcat-7.0.82
export PATH=$PATH:${CATALINA_HOME}/bin
- 执行,刷新环境变量设置
source /etc/profile
- 给.sh文件授予执行权限
cd /usr/local/apache-tomcat-7.0.82/bin
chmod u+x *.sh
- 验证
执行startup.sh
出现:
Using CATALINA_BASE: /usr/local/apache-tomcat-7.0.82
Using CATALINA_HOME: /usr/local/apache-tomcat-7.0.82
Using CATALINA_TMPDIR: /usr/local/apache-tomcat-7.0.82/temp
Using JRE_HOME: /usr/local/jdk1.8.0_151
Using CLASSPATH: /usr/local/apache-tomcat-7.0.82/bin/bootstrap.jar:/usr/local/apache-tomcat-7.0.82/bin/tomcat-juli.jar
Tomcat started.
就成功了
三、配置nodejs
- 下载6.10.1版本
https://npm.taobao.org/mirrors/node/v6.10.1/ - 解压
tar xzfv node-v6.10.1-linux-x64.tar.gz
- 配置环境变量
vi /etc/profile
export PATH=$PATH:/usr/local/node-v6.10.1-linux-x64/bin
- 执行,刷新环境变量设置
source /etc/profile
- 验证
node -v
v6.10.1
网友评论