在阿里云的CentOS环境中安装配置MySQL、JDK、Maven
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的更多相关文章
- 在阿里云的CentOS环境中安装django
购买了一台阿里云主机.操作系统为CentOS 6.5.准备在上面跑Django做Web开发.因为CentOS自带的python版本号较低,安装Django先要安装新版本号python.还是费了点周折. ...
- 如何在CentOS系统中安装配置SNMP服务
CentOS(Community Enterprise Operating System,中文意思是:社区企业操作系统)是Linux发行版之一,现在有一大部分服务器在使用此操作系统:SNMP(简单网络 ...
- 在CentOS 6 中安装 Apache,Mysql, PHP
1.安装Apache 在终端中输入以下的命令就能够安装Apache了: sudo yum install httpd sudo的意思是用root用户做什么操作.要点击y就确认下载安装了,非常方便. 然 ...
- 详解在Linux中安装配置MySQL
最近在整理自己私人服务器上的各种阿猫阿狗,正好就顺手详细记录一下清理之后重装的步骤,今天先写点数据库的内容,关于在Linux中安装配置MySQL 安装环境 CentOS7 + MySQL5.7 下载安 ...
- 在阿里云服务器中安装配置mysql数据库完整教程
阿里云ECS服务器CentOS7上安装MySql服务 (可选)1.确保服务器系统处于最新状态 [root@localhost ~]# yum -y update如果显示以下内容说明已经更新完成 Rep ...
- 阿里云万网虚拟主机安装配置Https(SSL)教程
太多太多的用户咨询阿里云虚拟主机是否可以安装SSL数字证书?万网空间是否可以支持HTTPS协议访问网站?答案只有一个:目前阿里云虚拟主机都不支持安装SSL证书!但是,但是,可以曲线实现目标! 1.为了 ...
- 阿里云服务器centos7环境下安装xampp后,mysql有进程,但是却没有监听3306端口
配置阿里云服务器centos7中xampp环境时出现了一种情况: 在centos中可以使用命令进入mysql 修改后也可以远程用phpmyadmin连接mysql 但是用navicat却无法连接 先修 ...
- 阿里云服务器Centos上Apache安装SSL证书配置Https
首先我们先去阿里云申请一个免费的SSL证书(https://common-buy.aliyun.com/?spm=5176.7968328.1266638..5e971232BzMSp5&co ...
- 阿里云入坑指南&&nodejs 安装配置
买了阿里云1G1核1M的机器(800元,3年) 登录阿里云-实例-选择实例所在地区-重置密码 用公网IP ssh连接 #升级CentOS yum -y update #安装or更新组件 yum -y ...
随机推荐
- Erlang Rebar 使用指南之二:制作发布版本
Erlang Rebar 使用指南之二:制作发布版本 全文目录: https://github.com/rebar/rebar/wiki 本章位置: https://github.com/rebar/ ...
- FFMPEG类库打开流媒体的方法(需要传参数的时候)
使用ffmpeg类库进行开发的时候,打开流媒体(或本地文件)的函数是avformat_open_input(). 其中打开网络流的话,前面要加上函数avformat_network_init(). 一 ...
- 操作系统 - 死锁(Deadlock)的概述、条件、对策
资源 可抢占资源(preemptable resource)可以从拥有它的进程中抢占而不会产生任何副作用,存储器就是一类可抢占的资源.可抢占资源有时有潜在的死锁危险,通常可以通过在进程之间重新分配资源 ...
- Google官方网络框架-Volley的使用解析Json以及加载网络图片方法
Google官方网络框架-Volley的使用解析Json以及加载网络图片方法 Volley是什么? Google I/O 大会上,Google 推出 Volley的一个网络框架 Volley适合什么场 ...
- 安卓系统启动脚本init.rc说明文件readme.txt翻译
本说明文件位于system/core/init/readme.txt 本文参考深入解析安卓系统一书,进行翻译,版权部分归书的作者 刘超,资深Android专家,系统架构师. 博客地址:http:// ...
- MurmurHash
public int hash(byte[] data, int length, int seed) { int m = 0x5bd1e995; int r = 24; int ...
- 属性动画基础之ValueAnimator
概述 属性动画是谷歌在android3.0(API level 11)时候给我们带来了属性动画,真正意义上带来了"动画",以前的帧动画也就4中效果的组合(旋转.淡入淡出.放大缩小. ...
- ruby如何查找一个方法属于哪个类
这是一个看似简单,实际不那么直接的问题.一种方法是先直接看当前对象的类是神马东东: puts self.class 或者 self.class.name 不过在某些情况下上述代码返回不了具体的名称,前 ...
- convert sorted list to binary search tree(将有序链表转成平衡二叉搜索树)
Given a singly linked list where elements are sorted in ascending order, convert it to a height bala ...
- Memcache架构新思考
2011年初Marc Kwiatkowski通过Memecache@Facebook介绍了Facebook的Memcache架构,现在重新审视这个架构,仍有很多方面在业界保持先进性.作为weibo内部 ...