Linux下安装MySQL5.7以及JDK1.8脚本分享

废话不多,直接上代码,代码均是通过PRM包安装,系统请保证为CentOS系列X64系统,CentOS6测试通过。

1.安装MySQL5.7:

yum -y remove mysql-*
m -fr /usr/lib/mysql
rm -fr /usr/include/mysql
rm -f /etc/my.cnf
rm -fr /var/lib/mysql
rm -fr /usr/share/mysql
yum -y install make numactl perl gcc-c++ cmake bison-devel ncurses-devel libaio libaio-devel
wget http://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.13-1.el6.x86_64.rpm-bundle.tar
tar xvf mysql-5.7.13-1.el6.x86_64.rpm-bundle.tar
rpm -ivh mysql-community-common-5.7.13-1.el6.x86_64.rpm
rpm -ivh mysql-community-libs-5.7.13-1.el6.x86_64.rpm
rpm -ivh mysql-community-client-5.7.13-1.el6.x86_64.rpm
rpm -ivh mysql-community-server-5.7.13-1.el6.x86_64.rpm
mysqld --initialize --user=mysql
cat /var/log/mysqld.log //密码在此文件最后一行
service mysqld start
chkconfig --add mysqld
mysql -V
chkconfig mysqld on

2.安装JDK1.8:

wget http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.rpm
mkdir /usr/java
cp jdk-8u131-linux-x64.rpm /usr/java/
cd /usr/java
chmod +x jdk-8u101-linux-x64.rpm
rpm -ivh jdk-8u101-linux-x64.rpm
java -version
» 本文链接:Linux下安装MySQL5.7以及JDK1.8脚本分享
» 转载请注明来源:刺客博客
» 如果文章失效或者安装失败,请留言进行反馈。
jdkMySQL
Comments (0)
Add Comment