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服務(wù): sudo start mysql
停止MySQL服務(wù): sudo stop mysql
授權(quán)
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 關(guān)閉防火墻
sudo ufw status
4、內(nèi)存溢出
set JAVA_OPTS=-Xms128m -Xmx350m
或者set CATALINA_OPTS=-Xmx300M -Xms256M
5、遠(yuǎn)程復(fù)制
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常用命令集錦