#安装JDK

yum install java-1.7.0-openjdk.x86_64


#安装MysqlServer


如果找不到可用的软件包,请安装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-server

chkconfig mysqld on

service mysqld start

mysqladmin -u root password '1sarewa123'


#MysqlServer远程访问

mysql -uroot -p1sarewa123

grant all privileges on *.* to 'root'@'%' identified by 'a654ac7ab' with grant option;

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