Welcome to Alibaba Cloud Elastic Compute Service !

[root@izbp19stm1x1k2io1e7r3tz ~]# rpm -Uvh http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
Retrieving http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
Preparing... ################################# [%]
Updating / installing...
:mysql-community-release-el7- ################################# [%]
[root@izbp19stm1x1k2io1e7r3tz ~]#
[root@izbp19stm1x1k2io1e7r3tz ~]#
[root@izbp19stm1x1k2io1e7r3tz ~]# yum repolist enabled | grep "mysql.*-community.*"
mysql-connectors-community/x86_64 MySQL Connectors Community
mysql-tools-community/x86_64 MySQL Tools Community
mysql56-community/x86_64 MySQL 5.6 Community Server
[root@izbp19stm1x1k2io1e7r3tz ~]#
[root@izbp19stm1x1k2io1e7r3tz ~]#
[root@izbp19stm1x1k2io1e7r3tz ~]#
[root@izbp19stm1x1k2io1e7r3tz ~]#
[root@izbp19stm1x1k2io1e7r3tz ~]#
[root@izbp19stm1x1k2io1e7r3tz ~]#
[root@izbp19stm1x1k2io1e7r3tz ~]#
[root@izbp19stm1x1k2io1e7r3tz ~]#
[root@izbp19stm1x1k2io1e7r3tz ~]# yum -y install mysql-community-server
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package mysql-community-server.x86_64 :5.6.-.el7 will be installed
--> Processing Dependency: mysql-community-common(x86-) = 5.6.-.el7 for package: mysql-community-server-5.6.-.el7.x86_64
--> Processing Dependency: mysql-community-client(x86-) >= 5.6. for package: mysql-community-server-5.6.-.el7.x86_64
--> Processing Dependency: perl(Data::Dumper) for package: mysql-community-server-5.6.-.el7.x86_64
--> Processing Dependency: perl(DBI) for package: mysql-community-server-5.6.-.el7.x86_64
--> Processing Dependency: libaio.so.(LIBAIO_0.)(64bit) for package: mysql-community-server-5.6.-.el7.x86_64
--> Processing Dependency: libaio.so.(LIBAIO_0.)(64bit) for package: mysql-community-server-5.6.-.el7.x86_64
--> Processing Dependency: libaio.so.()(64bit) for package: mysql-community-server-5.6.-.el7.x86_64
--> Running transaction check
---> Package libaio.x86_64 :0.3.-.el7 will be installed
---> Package mysql-community-client.x86_64 :5.6.-.el7 will be installed
--> Processing Dependency: mysql-community-libs(x86-) >= 5.6. for package: mysql-community-client-5.6.-.el7.x86_64
---> Package mysql-community-common.x86_64 :5.6.-.el7 will be installed
---> Package perl-DBI.x86_64 :1.627-.el7 will be installed
--> Processing Dependency: perl(RPC::PlServer) >= 0.2001 for package: perl-DBI-1.627-.el7.x86_64
--> Processing Dependency: perl(RPC::PlClient) >= 0.2000 for package: perl-DBI-1.627-.el7.x86_64
---> Package perl-Data-Dumper.x86_64 :2.145-.el7 will be installed
--> Running transaction check
---> Package mariadb-libs.x86_64 :5.5.-.el7 will be obsoleted
---> Package mysql-community-libs.x86_64 :5.6.-.el7 will be obsoleting
---> Package perl-PlRPC.noarch :0.2020-.el7 will be installed
--> Processing Dependency: perl(Net::Daemon) >= 0.13 for package: perl-PlRPC-0.2020-.el7.noarch
--> Processing Dependency: perl(Net::Daemon::Test) for package: perl-PlRPC-0.2020-.el7.noarch
--> Processing Dependency: perl(Net::Daemon::Log) for package: perl-PlRPC-0.2020-.el7.noarch
--> Processing Dependency: perl(Compress::Zlib) for package: perl-PlRPC-0.2020-.el7.noarch
--> Running transaction check
---> Package perl-IO-Compress.noarch :2.061-.el7 will be installed
--> Processing Dependency: perl(Compress::Raw::Zlib) >= 2.061 for package: perl-IO-Compress-2.061-.el7.noarch
--> Processing Dependency: perl(Compress::Raw::Bzip2) >= 2.061 for package: perl-IO-Compress-2.061-.el7.noarch
---> Package perl-Net-Daemon.noarch :0.48-.el7 will be installed
--> Running transaction check
---> Package perl-Compress-Raw-Bzip2.x86_64 :2.061-.el7 will be installed
---> Package perl-Compress-Raw-Zlib.x86_64 :2.061-.el7 will be installed
--> Finished Dependency Resolution Dependencies Resolved ===========================================================================================================================================================================================================================================
Package Arch Version Repository Size
===========================================================================================================================================================================================================================================
Installing:
mysql-community-libs x86_64 5.6.-.el7 mysql56-community 2.0 M
replacing mariadb-libs.x86_64 :5.5.-.el7
mysql-community-server x86_64 5.6.-.el7 mysql56-community M
Installing for dependencies:
libaio x86_64 0.3.-.el7 base k
mysql-community-client x86_64 5.6.-.el7 mysql56-community M
mysql-community-common x86_64 5.6.-.el7 mysql56-community k
perl-Compress-Raw-Bzip2 x86_64 2.061-.el7 base k
perl-Compress-Raw-Zlib x86_64 :2.061-.el7 base k
perl-DBI x86_64 1.627-.el7 base k
perl-Data-Dumper x86_64 2.145-.el7 base k
perl-IO-Compress noarch 2.061-.el7 base k
perl-Net-Daemon noarch 0.48-.el7 base k
perl-PlRPC noarch 0.2020-.el7 base k Transaction Summary
===========================================================================================================================================================================================================================================
Install Packages (+ Dependent packages) Total download size: M
Downloading packages:
(/): libaio-0.3.-.el7.x86_64.rpm | kB ::
warning: /var/cache/yum/x86_64//mysql56-community/packages/mysql-community-common-5.6.-.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Public key for mysql-community-common-5.6.-.el7.x86_64.rpm is not installed
(/): mysql-community-common-5.6.-.el7.x86_64.rpm | kB ::
(/): mysql-community-libs-5.6.-.el7.x86_64.rpm | 2.0 MB ::
(/): perl-Compress-Raw-Bzip2-2.061-.el7.x86_64.rpm | kB ::
(/): perl-DBI-1.627-.el7.x86_64.rpm | kB ::
(/): perl-Compress-Raw-Zlib-2.061-.el7.x86_64.rpm | kB ::
(/): perl-Data-Dumper-2.145-.el7.x86_64.rpm | kB ::
(/): perl-Net-Daemon-0.48-.el7.noarch.rpm | kB ::
(/): perl-PlRPC-0.2020-.el7.noarch.rpm | kB ::
(/): perl-IO-Compress-2.061-.el7.noarch.rpm | kB ::
(/): mysql-community-client-5.6.-.el7.x86_64.rpm | MB ::
(/): mysql-community-server-5.6.-.el7.x86_64.rpm | MB ::
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 9.2 MB/s | MB ::
Retrieving key from file:/etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
Importing GPG key 0x5072E1F5:
Userid : "MySQL Release Engineering <mysql-build@oss.oracle.com>"
Fingerprint: a4a9 76fc bd3c 70c8 8c71 8d3b e1f5
Package : mysql-community-release-el7-.noarch (installed)
From : file:/etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
Installing : perl-Data-Dumper-2.145-.el7.x86_64 /
Installing : mysql-community-common-5.6.-.el7.x86_64 /
Installing : mysql-community-libs-5.6.-.el7.x86_64 /
Installing : mysql-community-client-5.6.-.el7.x86_64 /
Installing : libaio-0.3.-.el7.x86_64 /
Installing : :perl-Compress-Raw-Zlib-2.061-.el7.x86_64 /
Installing : perl-Net-Daemon-0.48-.el7.noarch /
Installing : perl-Compress-Raw-Bzip2-2.061-.el7.x86_64 /
Installing : perl-IO-Compress-2.061-.el7.noarch /
Installing : perl-PlRPC-0.2020-.el7.noarch /
Installing : perl-DBI-1.627-.el7.x86_64 /
Installing : mysql-community-server-5.6.-.el7.x86_64 /
Erasing : :mariadb-libs-5.5.-.el7.x86_64 /
Verifying : mysql-community-server-5.6.-.el7.x86_64 /
Verifying : perl-Compress-Raw-Bzip2-2.061-.el7.x86_64 /
Verifying : perl-Net-Daemon-0.48-.el7.noarch /
Verifying : mysql-community-common-5.6.-.el7.x86_64 /
Verifying : perl-Data-Dumper-2.145-.el7.x86_64 /
Verifying : mysql-community-libs-5.6.-.el7.x86_64 /
Verifying : perl-PlRPC-0.2020-.el7.noarch /
Verifying : :perl-Compress-Raw-Zlib-2.061-.el7.x86_64 /
Verifying : perl-DBI-1.627-.el7.x86_64 /
Verifying : libaio-0.3.-.el7.x86_64 /
Verifying : mysql-community-client-5.6.-.el7.x86_64 /
Verifying : perl-IO-Compress-2.061-.el7.noarch /
Verifying : :mariadb-libs-5.5.-.el7.x86_64 / Installed:
mysql-community-libs.x86_64 :5.6.-.el7 mysql-community-server.x86_64 :5.6.-.el7 Dependency Installed:
libaio.x86_64 :0.3.-.el7 mysql-community-client.x86_64 :5.6.-.el7 mysql-community-common.x86_64 :5.6.-.el7 perl-Compress-Raw-Bzip2.x86_64 :2.061-.el7 perl-Compress-Raw-Zlib.x86_64 :2.061-.el7
perl-DBI.x86_64 :1.627-.el7 perl-Data-Dumper.x86_64 :2.145-.el7 perl-IO-Compress.noarch :2.061-.el7 perl-Net-Daemon.noarch :0.48-.el7 perl-PlRPC.noarch :0.2020-.el7 Replaced:
mariadb-libs.x86_64 :5.5.-.el7 Complete!
[root@izbp19stm1x1k2io1e7r3tz ~]#
[root@izbp19stm1x1k2io1e7r3tz ~]# systemctl enable mysqld
[root@izbp19stm1x1k2io1e7r3tz ~]#
[root@izbp19stm1x1k2io1e7r3tz ~]#
[root@izbp19stm1x1k2io1e7r3tz ~]#
[root@izbp19stm1x1k2io1e7r3tz ~]#
[root@izbp19stm1x1k2io1e7r3tz ~]# systemctl start mysqld
[root@izbp19stm1x1k2io1e7r3tz ~]#
[root@izbp19stm1x1k2io1e7r3tz ~]#
[root@izbp19stm1x1k2io1e7r3tz ~]#
[root@izbp19stm1x1k2io1e7r3tz ~]# mysql_secure_installation NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY! In order to log into MySQL to secure it, we'll need the current
password for the root user. If you've just installed MySQL, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here. Enter current password for root (enter for none):
OK, successfully used password, moving on... Setting the root password ensures that nobody can log into the MySQL
root user without the proper authorisation. Set root password? [Y/n] Y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
... Success! By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment. Remove anonymous users? [Y/n] Y
... Success! Normally, root should only be allowed to connect from 'localhost'. This
ensures that someone cannot guess at the root password from the network. Disallow root login remotely? [Y/n] Y
... Success! By default, MySQL comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment. Remove test database and access to it? [Y/n] n
... skipping. Reloading the privilege tables will ensure that all changes made so far
will take effect immediately. Reload privilege tables now? [Y/n] Y
... Success! All done! If you've completed all of the above steps, your MySQL
installation should now be secure. Thanks for using MySQL! Cleaning up...
[root@izbp19stm1x1k2io1e7r3tz ~]#
[root@izbp19stm1x1k2io1e7r3tz ~]#
[root@izbp19stm1x1k2io1e7r3tz ~]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is
Server version: 5.6. MySQL Community Server (GPL) Copyright (c) , , Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> show tables;
ERROR (3D000): No database selected
mysql> show dababases;
ERROR (): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'dababases' at line
mysql>
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
+--------------------+
rows in set (0.00 sec) mysql> use mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A Database changed
mysql> show tables;
+---------------------------+
| Tables_in_mysql |
+---------------------------+
| columns_priv |
| db |
| event |
| func |
| general_log |
| help_category |
| help_keyword |
| help_relation |
| help_topic |
| innodb_index_stats |
| innodb_table_stats |
| ndb_binlog_index |
| plugin |
| proc |
| procs_priv |
| proxies_priv |
| servers |
| slave_master_info |
| slave_relay_log_info |
| slave_worker_info |
| slow_log |
| tables_priv |
| time_zone |
| time_zone_leap_second |
| time_zone_name |
| time_zone_transition |
| time_zone_transition_type |
| user |
+---------------------------+
rows in set (0.00 sec) mysql>
mysql>
mysql>

https://yq.aliyun.com/ziliao/132362

https://www.cnblogs.com/thinkingandworkinghard/p/6711255.html

1.下载安装文件

wget http://mirrors.tuna.tsinghua.edu.cn/apache/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz

2.解压安装(当前目录为/opt/build):

tar -zxvf apache-maven-3.3.-bin.tar.gz 

配置环境变量
使用vim编辑/etc/profile文件
命令:vim /etc/profile(提示:vim使用方法)

在/etc/profile文件末尾增加以下配置:

     export M2_HOME=/opt/build/apache-maven-3.3.9 ##注意这里是maven的安装路径
export PATH=${M2_HOME}/bin:${PATH}

3. 重载/etc/profile这个文件

   source /etc/profile    

4. 检验maven是否安装成功:mvn -v

[root@VM_0_15_centos soft]# mvn -version
which: no javac in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/opt/build/apache-maven-3.3./bin)
which: no java in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/opt/build/apache-maven-3.3./bin)
Error: JAVA_HOME is not defined correctly.
We cannot execute

提示需要JDK

5.安装jdk
下载(以下url没有带oracle网站的参数,会下载失败。各位同学下载时,需要使用浏览器,点开开支链接,下载后上传,或copy正在下载的下载链接)
http://download.oracle.com/otn-pub/java/jdk/8u161-b12/2f38c3b165be4555a1fa6e98c45e0808/jdk-8u161-linux-x64.tar.gz?AuthParam=1523346641_bdbdd5a4fe9c0f61245983c83cd6a628

wget http://download.oracle.com/otn-pub/java/jdk/8u161-b12/2f38c3b165be4555a1fa6e98c45e0808/jdk-8u161-linux-x64.tar.gz 
.解压安装(当前目录为/opt/jdk):
tar -zxvf jdk-8u161-linux-x64.tar.gz 配置环境变量
使用vim编辑/etc/profile文件
命令:vim /etc/profile(提示:vim使用方法)
在/etc/profile文件末尾增加以下配置:
export JAVA_HOME=/opt/jdk/jdk1..0_161
export PATH=$PATH:/$JAVA_HOME/bin . 重载/etc/profile这个文件
source /etc/profile . 检验JDK是否安装成功:java -version
[root@VM_0_15_centos jdk1..0_161]# java -version
java version "1.8.0_161"
Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
Java HotSpot(TM) -Bit Server VM (build 25.161-b12, mixed mode) [root@VM_0_15_centos jdk1..0_161]# mvn -v
Apache Maven 3.3. (bb52d8502b132ec0a5a3f4c09453c07478323dc5; --11T00::+:)
Maven home: /opt/build/apache-maven-3.3.
Java version: 1.8.0_161, vendor: Oracle Corporation
Java home: /opt/jdk/jdk1..0_161/jre
Default locale: en_US, platform encoding: UTF-
OS name: "linux", version: "3.10.0-514.26.2.el7.x86_64", arch: "amd64", family: "unix"
[root@VM_0_15_centos jdk1..0_161]#
3.1.3配置jdk环境
为了明确分类 我在 cd/home 目录下创建了一个java目录 在java目录下又创建了 jdk目录
然后使用cp jdk1.8.0. /home/java/jdk/命令 把解压后的jdk1.8.0.121复制到 jdk目录下
如果 cp 命名不行 就采用 mv 命令进行移动mv jdk1.8.0. /home/java/jdk/
3.1.4设置环境变量
注意:在设置环境变量的同时首先要执行该命令 : vi ~/.bashrc
然后以下几行 分步执行:
export JAVA_HOME=/home/java/jdk/jdk1..0_121
export CLASSPATH=${JAVA_HOME}/lib
export PATH=${JAVA_HOME}/bin:$PATH 3.1..使修改立即生效
执行:source ~/.bashrc 3.1..验证
执行java -version

在阿里云的CentOS环境中安装配置MySQL、JDK、Maven的更多相关文章

  1. 在阿里云的CentOS环境中安装django

    购买了一台阿里云主机.操作系统为CentOS 6.5.准备在上面跑Django做Web开发.因为CentOS自带的python版本号较低,安装Django先要安装新版本号python.还是费了点周折. ...

  2. 如何在CentOS系统中安装配置SNMP服务

    CentOS(Community Enterprise Operating System,中文意思是:社区企业操作系统)是Linux发行版之一,现在有一大部分服务器在使用此操作系统:SNMP(简单网络 ...

  3. 在CentOS 6 中安装 Apache,Mysql, PHP

    1.安装Apache 在终端中输入以下的命令就能够安装Apache了: sudo yum install httpd sudo的意思是用root用户做什么操作.要点击y就确认下载安装了,非常方便. 然 ...

  4. 详解在Linux中安装配置MySQL

    最近在整理自己私人服务器上的各种阿猫阿狗,正好就顺手详细记录一下清理之后重装的步骤,今天先写点数据库的内容,关于在Linux中安装配置MySQL 安装环境 CentOS7 + MySQL5.7 下载安 ...

  5. 在阿里云服务器中安装配置mysql数据库完整教程

    阿里云ECS服务器CentOS7上安装MySql服务 (可选)1.确保服务器系统处于最新状态 [root@localhost ~]# yum -y update如果显示以下内容说明已经更新完成 Rep ...

  6. 阿里云万网虚拟主机安装配置Https(SSL)教程

    太多太多的用户咨询阿里云虚拟主机是否可以安装SSL数字证书?万网空间是否可以支持HTTPS协议访问网站?答案只有一个:目前阿里云虚拟主机都不支持安装SSL证书!但是,但是,可以曲线实现目标! 1.为了 ...

  7. 阿里云服务器centos7环境下安装xampp后,mysql有进程,但是却没有监听3306端口

    配置阿里云服务器centos7中xampp环境时出现了一种情况: 在centos中可以使用命令进入mysql 修改后也可以远程用phpmyadmin连接mysql 但是用navicat却无法连接 先修 ...

  8. 阿里云服务器Centos上Apache安装SSL证书配置Https

    首先我们先去阿里云申请一个免费的SSL证书(https://common-buy.aliyun.com/?spm=5176.7968328.1266638..5e971232BzMSp5&co ...

  9. 阿里云入坑指南&&nodejs 安装配置

    买了阿里云1G1核1M的机器(800元,3年) 登录阿里云-实例-选择实例所在地区-重置密码 用公网IP ssh连接 #升级CentOS yum -y update #安装or更新组件 yum -y ...

随机推荐

  1. 【线性代数】标准正交矩阵与Gram-Schmidt正交化

    1.标准正交矩阵 假设矩阵Q有列向量q1,q2,...,qn表示,且其列向量满足下式: 则 若Q为方阵,由上面的式子则有 我们举例说明上述概念: 2.标准正交矩阵的好处     上面我们介绍了标准正交 ...

  2. iOS在GitHub Top 前100 简介

    主要对当前 GitHub 排名前 100 的项目做一个简单的简介, 方便初学者快速了解到当前 Objective-C 在 GitHub 的情况. 项目名称 项目信息 1. AFNetworking 作 ...

  3. 关于linux音频指南

    音频操作是linux系统下必不可少,如您需要设计一个播放器,那么音频就是其中的一部分. 方法/步骤 1 音调: 振动的频率;     音量: 振动的幅度;     音色: 不同介质有不同声音;     ...

  4. solr研磨之性能调优

    作者:战斗民族就是干  转载请注明地址:http://www.cnblogs.com/prayers/p/8982141.html 本篇文章我们来了解一下solr的性能方面的调优,分为Schema优化 ...

  5. Oracle表空间和表的常用操作指令

    查看端口号指令 netstat –a 设置: set pagesize 100; //设置每页显示的行数set linesize 200; //设置每页显示的字符数 空格也算col 列名A for a ...

  6. 三大框架:Struts+Hibernate+Spring

    三大框架:Struts+Hibernate+Spring Java三大框架主要用来做WEN应用. Struts主要负责表示层的显示 Spring利用它的IOC和AOP来处理控制业务(负责对数据库的操作 ...

  7. 线上Django项目python2到3升级日记

    这两天干了一个几斤疯狂的事情,花不到一个工作日的时间把一个线上Django项目语言版本从python2升级到Python31.字典的一个语法变化 Python2.7: if dict1.haskey( ...

  8. XYC2016上半年工作笔记整理

    只要团队在,做那个方向都可能 这个产品的用户群人均价值高 第一次产品介绍会议就介绍了产品的初期全部目标功能 传统互联网人的产品思路比较偏媒体内容服务特性. 产品转化率高说明了其发展势头 任何一个形式变 ...

  9. LruCache的使用及原理

    采用LRU算法实现的话就是将最老的数据删掉.利用LRU缓存,我们能够提高系统的性能.   一,是它本身已经实现了按照访问顺序的存储,也就是说,最近读取的会放在最前面,最不常读取的会放在最后(当然,它也 ...

  10. 用calc()绘制手机图案解锁的九宫格样式

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...