1、jdk安装配置
tar zxvf jdk-7u79-linux-x64.tar.gz -C /usr/local/
JAVA_HOME=/usr/local/jdk1.7.0_79
JAVA_BIN=/usr/local/jdk1.7.0_79/bin
PATH=$PATH:$JAVA_BIN
classpath=:$java_home/lib/dt.jar:$java_home/lib/tools.jar:$jre_home/liblinux常用命令。classpath=.:$java_home/lib/dt.jar:$java_home/lib/tools.jar:$java_home/lib/htmlco。export classpath=$java_home/lib/dt.jar:$java_home/lib/tools.jar。
export JAVA_HOME JAVA_BIN PATH CLASSPATH
$ sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.7/bin/java 300。sudo update-alternatives --install "/usr/bin/java" "java" "/usr/java/jdk_8u60/bin/java" 300linux常用命令。sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/java-1.7.0-openjdk-amd64/bin/javac 300。
$ sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.7/bin/javac 300。sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/java-1.7.0-openjdk-amd64/bin/javac 300。$ sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.7/bin/java 300。
2、tomcat 安装配置
tar zxvf apache-tomcat-7.0.73.tar.gz -C /usr/local/
#set tomcat environment
CATALINA_HOME=/usr/local/apache-tomcat-7.0.73
export CATALINA_HOME
CATALINA_HOME=/usr/local/apache-tomcat-7.0.73
JAVA_HOME=/usr/local/jdk1.7.0_79
3、mysql 方面
启动MySQL服务: sudo start mysql
停止MySQL服务: sudo stop mysql
授权
GRANT ALL PRIVILEGES ON . TO ‘root’@’%’ IDENTIFIED BY ‘root’ WITH GRANT OPTION;
FLUSH PRIVILEGES;
1、tomcat 在project 放项目配置
/usr/local/apache-tomcat-7.0.73/project/HiFive
2、js时间 谷歌浏览器 date的横杠 ‘-‘
3、ubuntu 关闭防火墙
sudo ufw status
4、内存溢出
set JAVA_OPTS=-Xms128m -Xmx350m
或者set CATALINA_OPTS=-Xmx300M -Xms256M
5、远程复制
scp -r /home/shangdong/apache-tomcat-7.0.42/project/HiFive kssj@101.200.40.179:/home/kssj/tomcat/apache-tomcat-7.0.42/webapps
原文:大专栏 linux常用命令集锦