Style:Macmysql
Series:Javalinux
Since:2018-09-10sql
End:2018-09-10apache
Total Hours:1vim
Degree Of Diffculty:5bash
Degree Of Mastery:5maven
Practical Level:5gradle
Desired Goal:5lua
Archieve Goal:3blog
Gerneral Evaluation:3
Writer:kingdelee
Related Links:
http://www.cnblogs.com/kingdelee/
1.當安裝了zsh與linux不一樣
單純的使用這個方法 vim ~/.bash_profile,
export JAVA_8_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home export JAVA_10_HOME=/Library/Java/JavaVirtualMachines/jdk-10.0.2.jdk/Contents/Home export JAVA_11_HOME=/Library/Java/JavaVirtualMachines/jdk-11.jdk/Contents/Home export GRADLE_HOME=$/Users/kingdelee/Library/gradle/gradle-4.10.2 export GRADLE_USER_HOME=/Users/kingdelee/workstation/gradle/.gradle export MAVEN_HOME=/Users/kingdelee/Library/Maven/apache-maven-3.5.4 alias jdk8="export JAVA_HOME=$JAVA_8_HOME" alias jdk10="export JAVA_HOME=$JAVA_10_HOME" alias jdk11="export JAVA_HOME=$JAVA_11_HOME" export JAVA_HOME=$JAVA_11_HOME PATH="${PATH}:${JAVA_HOME}:${GRADLE_HOME}/bin:${MAVEN_HOME}/bin" export PATH
再執行source ~/.bash_profile ,新建標籤的時候,新標籤仍舊沒法生效
必需要 open ~/.zshrc,而後再文檔末尾追加
source ~/.bash_profile
這樣執行source ~/.zshrc,新開標籤也能夠了。
然並卵,仍是得在 ~/.zshrc 後面追加 具體的環境變量設置,即把/.bash_profile的那些拷貝到zshrc裏邊
vim ~/.zshrc
source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh source ~/.bash_profile source /etc/profile #export JAVA_8_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home #export JAVA_10_HOME=/Library/Java/JavaVirtualMachines/jdk-10.0.2.jdk/Contents/Home #export JAVA_11_HOME=/Library/Java/JavaVirtualMachines/jdk-11.jdk/Contents/Home #export GRADLE_HOME=$/Users/kingdelee/Library/gradle/gradle-4.10.2 #export GRADLE_USER_HOME=/Users/kingdelee/workstation/gradle/.gradle #export MAVEN_HOME=/Users/kingdelee/soft/maven/maven-3.6.0 #alias jdk8="export JAVA_HOME=$JAVA_8_HOME" #alias jdk10="export JAVA_HOME=$JAVA_10_HOME" #alias jdk11="export JAVA_HOME=$JAVA_11_HOME" #alias mysql="/usr/local/mysql/bin/mysql" #alias mysqladmin="/usr/local/mysql/bin/mysqladmin" #export JAVA_HOME=$JAVA_11_HOME PATH="${PATH}:${JAVA_HOME}:${GRADLE_HOME}/bin:${MAVEN_HOME}/bin" export PATH