今天本來想安裝一個(gè)phpstorm編輯器的太示。然而環(huán)境不支持处坪,系統(tǒng)默認(rèn)的是jdk1.7 那好吧……
(CentOS 6.5 i386)然后去官網(wǎng)下載:
wget http://download.oracle.com/otn-pub/java/jdk/8u91-b14/jdk-8u91-linux-i586.tar.gz
[root@localhost ~]# rpm -qa | grep java
javapackages-tools-3.4.1-6.el7_0.noarch
tzdata-java-2014i-1.el7.noarch
java-1.7.0-openjdk-headless-1.7.0.71-2.5.3.1.el7_0.x86_64
java-1.7.0-openjdk-1.7.0.71-2.5.3.1.el7_0.x86_64
python-javapackages-3.4.1-6.el7_0.noarch
卸載OpenJDK魁索,執(zhí)行以下操作:
[root@localhost ~]# rpm -e --nodeps tzdata-java-2014i-1.el7.noarch
[root@localhost ~]# rpm -e --nodeps java-1.7.0-openjdk-headless-1.7.0.71-2.5.3.1.el7_0.x86_64
[root@localhost ~]# rpm -e --nodeps java-1.7.0-openjdk-1.7.0.71-2.5.3.1.el7_0.x86_64
在 usr/里創(chuàng)建一個(gè)文件夾,解壓到j(luò)ava文件夾中:
mkdir /usr/java
tar -zxf jdk-8u91-linux-i586.tar.gz /usr/java
修改環(huán)境變量:
i /etc/profile
添加如下代碼:
JAVA_HOME=/usr/java/
PATH=$JAVA_HOME/bin:$PATH
CLASSPATH=$JAVA_HOME/jre/lib/ext:$JAVA_HOME/lib/tools.jar
export JAVA_HOME PATH CLASSPATH
立即生效:
source /etc/profile
安裝成功棒搜。
[root@localhost 桌面]# java -version
java version "1.8.0_91"
Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
Java HotSpot(TM) Client VM (build 25.91-b14, mixed mode)
[root@localhost 桌面]# ./PhpStorm-145.1616.3/bin/phpstorm.sh
Java HotSpot(TM) Server VM warning: ignoring option MaxPermSize=250m; support was removed in 8.0
六月 25, 2016 12:20:24 上午 java.util.prefs.FileSystemPreferences$1 run
INFO: Created user preferences directory.
六月 25, 2016 12:20:24 上午 java.util.prefs.FileSystemPreferences$6 run
WARNING: Prefs file removed in background /root/.java/.userPrefs/prefs.xml
[ 181807] WARN - ConfigurableExtensionPointUtil - ignore deprecated groupId: editor for id: editor.preferences.import
[ 202912] WARN - ConfigurableExtensionPointUtil - ignore deprecated groupId: editor for id: editor.preferences.import
phpstorm成功運(yùn)行潜必。