一、 Jdk
l 下载地址:http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
页面地址:http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
下载地址:http://download.oracle.com/otn-pub/java/jdk/7u79-b15/jdk-7u79-linux-x64.tar.gz
cd /usr/local/share/soft
//wget命令下载时会断掉,所以要用如下方式处理
wget --no-cookies--no-check-certificate --header"Cookie:gpw_e24=http%3a%2f%2fwww.oracle.com%2ftechnetwork%2fjava%2fjavase%2fdownloads%2fjdk7-downloads-1880260.html;oraclelicense=accept-securebackup-cookie"
http://download.oracle.com/otn-pub/java/jdk/7u79-b15/jdk-7u79-linux-x64.tar.gz
//解压
tar -xzvfjdk-7u79-linux-x64.tar.gz
//配置环境变量
sudo vi /etc/bashrc
1. 在末尾行添加
export JAVA_HOME=
/usr/local/share/soft/jdk1.7.0_79
export CLASSPATH=.
:%JAVA_HOME%/lib/dt.
jar:%JAVA_HOME%
/lib/tools.jar
export PATH=.
:$JAVA_HOME/
bin:$JRE_HOME/
bin:$PATH
2. 保存退出,输入
source /etc/bashrc
使更改的配置立即生效
java -version 查看JDK版本信息
二、 Tomcat
cd /usr/local/share/soft
下载:wget http://mirrors.tuna.tsinghua.edu.cn/apache/tomcat/tomcat-8/v8.5.4/bin/apache-tomcat-8.5.4.tar.gz
tar xzvf apache-tomcat-8.5.4.tar.gz
改名为tomcat8
cd tomcat8/bin
//给bin目录授权
chmodu+x *.sh
//启动tomcat
startup.sh
//修改端口
一、 Mysql
cd /usr/local/share/soft
//用redhat的才能安装,其他的在centos里有问题
下载:wget http://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.14-1.el6.x86_64.rpm-bundle.tar
tar -xvf mysql-5.7.14-1.el6.x86_64.rpm-bundle.tar
rpm -ivh mysql-community-common-5.7.14-1.el6.x86_64.rpm
rpm -ivh mysql-community-libs-5.7.14-1.el6.x86_64.rpm
rpm -ivh mysql-community-client-5.7.14-1.el6.x86_64.rpm
rpm -ivh mysql-community-server-5.7.14-1.el6.x86_64.rpm
//缺少perl yum –y install perl
//缺少libaio.so.1()(64bit) yum –yinstall libaio
//缺少libnuma.so.1()(64bit) yum-y install numactl
rpm -ivh mysql-community-devel-5.7.14-1.el6.x86_64.rpm
//启动mysql
service mysqld start
//查看初始化密码
grep 'temporary password' /var/log/mysqld.log
//登录mysql
myql -uroot -p
mx7=yi!pFsr-
//修改密码
alter user 'root'@'localhost' IDENTIFIED BY 'TTZ_pwd@YQH2016';
参考文章:http://www.centoscn.com/mysql/2016/0515/7233.html
//添加外网用户
CREATEUSER 'ttz'@'%' IDENTIFIED BY 'ttz@loveU123';
//授权
GRANTALL ON *.* TO 'ttz'@'%';
参考文章:http://www.jb51.net/article/31850.htm
//开启外网访问防火墙
vi/etc/sysconfig/iptables
添加3306端口
-A INPUT-m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT
serviceiptables restart