1.安裝JDKhtml
tar -xvf jdk-7u51-linux-x64.tar.gz 解壓並安裝java
mv jdk1.7.0_51/ jdk1.7重命名爲jdk1.7mysql
1.1 配置環境變量linux
vim /etc/profilesql
i 進入vim命令數據庫
JAVA_HOME=/home/software/jdk1.7apache
PATH=$JAVA_HOME/bin:$PATHvim
CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jartomcat
export JAVA_HOME PATH CLASSPATHtcp
esc 而後:wq退出vim命令
1.2讓環境變量當即生效
source /etc/profile
1.3jdk配置是否成功
java -version
2.安裝TOMCAT
2.1把tomcat安裝包拖到software文件夾下
2.2解壓tomcat
tar -xvf apache-tomcat-7.0.55.tar.gz
2.3修更名稱
mv apache-tomcat-7.0.55/ tomcat7
cd tomcat/ 要用alt+/
cd bin/ 注意有個/
2.4啓動tomcat
sh startup.sh
2.5關閉防火牆
service iptables stop
2.6開啓對外端口
iptables -I INPUT -p tcp --dport 8080 -j ACCEPT
3.安裝Mysql
建立mysql目錄 mysql
3.1解壓文件
tar -xvf Percona-Server-5.6.24-72.2-r8d0f85b-el6-x86_64-bundle.tar
解壓後出現這些文件,一個一個的執行
1.rpm -ivh Percona-Server-56-debuginfo-5.6.24-rel72.2.el6.x86_64.rpm
2.rpm -ivh Percona-Server-shared-56-5.6.24-rel72.2.el6.x86_64.rpm
3.rpm -ivh Percona-Server-client-56-5.6.24-rel72.2.el6.x86_64.rpm
4.rpm -ivh Percona-Server-server-56-5.6.24-rel72.2.el6.x86_64.rpm
執行完後出現七個文件後綴爲.rpm
3.2啓動mysql服務
service mysql start
3.3登錄mysql
Mysql 進入後exit
3.4設置mysql用戶名密碼
mysqladmin -u root password "root"
3.5登錄mysql
mysql -u root -p //回車數據密碼 root 進入mysql數據庫中
3.6建立數據庫
create database ht;
3.7設置字符集
use ht
set names utf8
3.8導入數據
source ht.sql
3.9:給root分配權限
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root' WITH GRANT OPTION ;
FLUSH PRIVILEGES
3.10開放3306端口
iptables -I INPUT -p tcp --dport 3306 -j ACCEPT
3.11mysql客戶端鏈接測試
卸載mysql時,提示libmysqlclient.so.16()(64bit) is needed by (installed) postfix