#安裝JDKjava
yum install java-1.7.0-openjdk.x86_64mysql
#安裝MysqlServersql
若是找不到可用的軟件包,請安裝mysql yum源,以下: wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm sudo yum localinstall -y mysql-community-release-el7-5.noarch.rpm
yum install mysql-serverapache
chkconfig mysqld ontomcat
service mysqld starttcp
mysqladmin -u root password '1sarewa123'ide
#MysqlServer遠程訪問ui
mysql -uroot -p1sarewa123spa
grant all privileges on *.* to 'root'@'%' identified by 'a654ac7ab' with grant option;rest
flush privileges;
quit
#MysqlServer准許訪問3306端口
/sbin/iptables -I INPUT -p tcp --dport 3306 -j ACCEPT
/etc/rc.d/init.d/iptables save
/etc/init.d/iptables restart
#准許訪問8080端口
/sbin/iptables -I INPUT -p tcp --dport 8080 -j ACCEPT
/etc/rc.d/init.d/iptables save
/etc/init.d/iptables restart
#安裝Tomcat
cd /usr/local
mkdir tomcat
wget http://archive.apache.org/dist/tomcat/tomcat-6/v6.0.37/bin/apache-tomcat-6.0.37.tar.gz
tar -zxf apache-tomcat-6.0.37.tar.gz
cd apache-tomcat-6.0.37/bin
./startup.sh