1.去java官網下載jdk1.8
http://www.oracle.com/technet...html
2.在usr目錄下創建java安裝目錄java
cd /usr mkdir java
3.解壓jdk到當前目錄mysql
tar -zxvf jdk-8u172-linux-x64.tar.gz
4.配置環境變量linux
vim /etc/profile 添加以下內容: JAVA_HOME=/usr/java/jdk1.8.0_60 CLASSPATH=$JAVA_HOME/lib/ PATH=$PATH:$JAVA_HOME/bin export PATH JAVA_HOME CLASSPATH
5.使配置的環境變量生效sql
source /etc/profile
6.查看安裝狀況(正常顯示版本號則安裝成功)數據庫
java -version
1.官網下載tomcat
https://tomcat.apache.org/apache
2.建立tomcat目錄並將下載的tomcat放在該目錄下,解壓vim
mkdir /usr/local/tomcat tar -zxf apache-tomcat-7.0.47.tar.gz
1.從oracle官網下載linux系統對應的linux系統對應的mysql的yum源
2.yum源包上傳到linux並安裝tomcat
yum localinstall mysql-community-release-el6-5.noarch.rpm
3.安裝mysqloracle
yum install mysql-server
4.啓動mysql
service mysqld start
5.設置數據庫密碼
/usr/bin/mysqladmin -u root password 'root'
6.遠程鏈接受權(這樣就能夠直接遠程建立和訪問數據庫)
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root' WITH GRANT OPTION;