原文:
【1】常用命令
pwd
查看当前目录
df -h
查看当前硬盘使用状况
clear
清屏幕
ls
查看当前目录文件列表
dir
查看当前目录文件列表
【2】安装JDK,path之类的已经自动设置好了
yum list java*
yum list java-1.7*
yum install java-1.7.0-openjdk* -y
【3】安装tomcat
注:tomcat版本会随时更新
cd /home
7
wget http://mirrors.hust.edu.cn/apache/tomcat/tomcat-7/v7.0.70/bin/apache-tomcat-7.0.70.tar.gz
8
wget http://mirrors.hust.edu.cn/apache/tomcat/tomcat-8/v8.0.36/bin/apache-tomcat-8.0.36.tar.gz
tar -zxf apache-tomcat-7.0.70.tar.gz
cd apache-tomcat-7.0.70/bin
启动tomcat
./startup.sh
停止tomcat
./shutdown.sh
【4】安装Nginx
(1)下载Nginx的RPM包
6
wget http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm
7
wget http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
(2)安装rpm包
rpm -ivh nginx-release-centos-6-0.el6.ngx.noarch.rpm
(3)采用yum进行安装Nginx
yum install nginx
启动 service nginx start
查看Nginx的进程netstat -lntp | grep nginx
设置开机自动启动 chkconfig nginx on
【5】安装Git
yum install git
【6】安装Maven
wget http://mirrors.cnnic.cn/apache/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz
export M2_HOME=/usr/local/maven
PATH=$PATH:$JAVA_HOME/bin:$M2_HOME/bin