虚拟机开机启动服务相应指令:
cd /developer/[tomcat安装目录名] /bin
./startup.sh
service vsftpd restart
service iptables restart
cd /usr/local//nginx/sbin
./nginx
./nginx -s reload
ps -ef|grep nginx
service mysqld start
service iptables stop
jdk安装
下载jdk:
wget [jdk下载地址]
解压jdk:
sudo rpm -ivh [jdk包名]
cd /usr/java/[jdk包名]
配置jdk环境变量:
sudo vim /etc/profile
export JAVA_HOME=/usr/java/jdk1.7.0_80
export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$JAVA_HOME/bin:$PATH
使配置生效:
source /etc/profile
java -version
Tomcat安装
下载tomcat:
wget http://learning.happymmall.com/tomcat/apache-tomcat-7.0.73.tar.gz
解压缩:
tar -zxvf [tomcat包名]
配置tomcat环境变量:
sudo vim /etc/profile
注:CATALINA_HOME 后面的是安装 tamcat 的路径
export CATALINA_HOME=/developer/[tomcat安装目录名]
使配置生效:
source /etc/profile
配置UTF-8字符集,在配置8080默认端口位置的xml节点末尾增加URIEncoding=“UTF-8”:
vim [CATALINA_HOME]/conf/server.xml
tomcat验证,进入系统解压缩后的tomcat目录下的bin目录:
cd [CATALINA_HOME]/bin
./startup.sh
验证tomcat是否启动:
虚拟机输入localhost:8080
Maven安装
下载maven:
wget http://learning.happymmall.com/maven/apache-maven-3.0.5-bin.tar.gz
解压缩:
tar -zxvf [maven包名]
配置tomcat环境变量:
sudo vim /etc/profile
注:MAVEN_HOME后面的是安装 maven的路径
export MAVEN_HOME=/developer/[maven安装目录名]
export PATH=$JAVA_HOME/bin:$MAVEN_HOME/bin:$PATH
使配置生效:
source /etc/profile
maven验证:
mvn -version
vsftpd安装
下载vsftpd:
yum -y instal