linux服务环境的搭建
ubuntu下搭建服务器环境###
1、安装java####
1.1 清除原来的oepnjdk相关的包#####
sudo apt-get purge openjdk*
sudo rm /var/lib/dpkg/info/oracle-java7-installer*
sudo apt-get purge oracle-java7-installer*
sudo rm /etc/apt/sources.list.d/*java*
sudo apt-get update
1.2 在ubuntu下安装java
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
//备注:一定要更新
sudo apt-get install oracle-java7-installer
ubuntu安装软件时出现add-apt-repository: command not found的解决方法:
安装工具包 #apt-get install python-software-properties
2 安装和启动tomcat####
sudo apt-get install tomcat7
配置tomcat相关的JAVA_HOME:/etc/default/tomcat7 中的JAVA_HOME配置
sudo service tomcat7 restart //启动tomcat