1.安装MySQL

[root@ip---- mysql]# rpm -ivh MySQL-server-5.6.-.el6.x86_64.rpm MySQL-client-5.6.-.el6.x86_64.rpm
warning: MySQL-server-5.6.-.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing... ########################################### [%]
file /usr/share/mysql/czech/errmsg.sys from install of MySQL-server-5.6.-.el6.x86_64 conflicts with file from package mysql-libs-5.1.-.el6_5.x86_64
file /usr/share/mysql/danish/errmsg.sys from install of MySQL-server-5.6.-.el6.x86_64 conflicts with file from package mysql-libs-5.1.-.el6_5.x86_64
file /usr/share/mysql/dutch/errmsg.sys from install of MySQL-server-5.6.-.el6.x86_64 conflicts with file from package mysql-libs-5.1.-.el6_5.x86_64
file /usr/share/mysql/english/errmsg.sys from install of MySQL-server-5.6.-.el6.x86_64 conflicts with file from package mysql-libs-5.1.-.el6_5.x86_64
file /usr/share/mysql/estonian/errmsg.sys from install of MySQL-server-5.6.-.el6.x86_64 conflicts with file from package mysql-libs-5.1.-.el6_5.x86_64
file /usr/share/mysql/french/errmsg.sys from install of MySQL-server-5.6.-.el6.x86_64 conflicts with file from package mysql-libs-5.1.-.el6_5.x86_64
file /usr/share/mysql/german/errmsg.sys from install of MySQL-server-5.6.-.el6.x86_64 conflicts with file from package mysql-libs-5.1.-.el6_5.x86_64
file /usr/share/mysql/greek/errmsg.sys from install of MySQL-server-5.6.-.el6.x86_64 conflicts with file from package mysql-libs-5.1.-.el6_5.x86_64
file /usr/share/mysql/hungarian/errmsg.sys from install of MySQL-server-5.6.-.el6.x86_64 conflicts with file from package mysql-libs-5.1.-.el6_5.x86_64
file /usr/share/mysql/italian/errmsg.sys from install of MySQL-server-5.6.-.el6.x86_64 conflicts with file from package mysql-libs-5.1.-.el6_5.x86_64
file /usr/share/mysql/japanese/errmsg.sys from install of MySQL-server-5.6.-.el6.x86_64 conflicts with file from package mysql-libs-5.1.-.el6_5.x86_64
file /usr/share/mysql/korean/errmsg.sys from install of MySQL-server-5.6.-.el6.x86_64 conflicts with file from package mysql-libs-5.1.-.el6_5.x86_64
file /usr/share/mysql/norwegian-ny/errmsg.sys from install of MySQL-server-5.6.-.el6.x86_64 conflicts with file from package mysql-libs-5.1.-.el6_5.x86_64
file /usr/share/mysql/norwegian/errmsg.sys from install of MySQL-server-5.6.-.el6.x86_64 conflicts with file from package mysql-libs-5.1.-.el6_5.x86_64
file /usr/share/mysql/polish/errmsg.sys from install of MySQL-server-5.6.-.el6.x86_64 conflicts with file from package mysql-libs-5.1.-.el6_5.x86_64
file /usr/share/mysql/portuguese/errmsg.sys from install of MySQL-server-5.6.-.el6.x86_64 conflicts with file from package mysql-libs-5.1.-.el6_5.x86_64
file /usr/share/mysql/romanian/errmsg.sys from install of MySQL-server-5.6.-.el6.x86_64 conflicts with file from package mysql-libs-5.1.-.el6_5.x86_64
file /usr/share/mysql/russian/errmsg.sys from install of MySQL-server-5.6.-.el6.x86_64 conflicts with file from package mysql-libs-5.1.-.el6_5.x86_64
file /usr/share/mysql/serbian/errmsg.sys from install of MySQL-server-5.6.-.el6.x86_64 conflicts with file from package mysql-libs-5.1.-.el6_5.x86_64
file /usr/share/mysql/slovak/errmsg.sys from install of MySQL-server-5.6.-.el6.x86_64 conflicts with file from package mysql-libs-5.1.-.el6_5.x86_64
file /usr/share/mysql/spanish/errmsg.sys from install of MySQL-server-5.6.-.el6.x86_64 conflicts with file from package mysql-libs-5.1.-.el6_5.x86_64
file /usr/share/mysql/swedish/errmsg.sys from install of MySQL-server-5.6.-.el6.x86_64 conflicts with file from package mysql-libs-5.1.-.el6_5.x86_64
file /usr/share/mysql/ukrainian/errmsg.sys from install of MySQL-server-5.6.-.el6.x86_64 conflicts with file from package mysql-libs-5.1.-.el6_5.x86_64
file /usr/share/mysql/charsets/Index.xml from install of MySQL-server-5.6.-.el6.x86_64 conflicts with file from package mysql-libs-5.1.-.el6_5.x86_64
file /usr/share/mysql/charsets/armscii8.xml from install of MySQL-server-5.6.-.el6.x86_64 conflicts with file from package mysql-libs-5.1.-.el6_5.x86_64
file /usr/share/mysql/charsets/ascii.xml from install of MySQL-server-5.6.-.el6.x86_64 conflicts with file from package mysql-libs-5.1.-.el6_5.x86_64
file /usr/share/mysql/charsets/cp1250.xml from install of MySQL-server-5.6.-.el6.x86_64 conflicts with file from package mysql-libs-5.1.-.el6_5.x86_64
file /usr/share/mysql/charsets/cp1256.xml from install of MySQL-server-5.6.-.el6.x86_64 conflicts with file from package mysql-libs-5.1.-.el6_5.x86_64
file /usr/share/mysql/charsets/cp1257.xml from install of MySQL-server-5.6.-.el6.x86_64 conflicts with file from package mysql-libs-5.1.-.el6_5.x86_64
file /usr/share/mysql/charsets/cp850.xml from install of MySQL-server-5.6.-.el6.x86_64 conflicts with file from package mysql-libs-5.1.-.el6_5.x86_64
file /usr/share/mysql/charsets/cp852.xml from install of MySQL-server-5.6.-.el6.x86_64 conflicts with file from package mysql-libs-5.1.-.el6_5.x86_64
file /usr/share/mysql/charsets/cp866.xml from install of MySQL-server-5.6.-.el6.x86_64 conflicts with file from package mysql-libs-5.1.-.el6_5.x86_64
file /usr/share/mysql/charsets/dec8.xml from install of MySQL-server-5.6.-.el6.x86_64 conflicts with file from package mysql-libs-5.1.-.el6_5.x86_64
file /usr/share/mysql/charsets/geostd8.xml from install of MySQL-server-5.6.-.el6.x86_64 conflicts with file from package mysql-libs-5.1.-.el6_5.x86_64
file /usr/share/mysql/charsets/greek.xml from install of MySQL-server-5.6.-.el6.x86_64 conflicts with file from package mysql-libs-5.1.-.el6_5.x86_64
file /usr/share/mysql/charsets/hebrew.xml from install of MySQL-server-5.6.-.el6.x86_64 conflicts with file from package mysql-libs-5.1.-.el6_5.x86_64
file /usr/share/mysql/charsets/hp8.xml from install of MySQL-server-5.6.-.el6.x86_64 conflicts with file from package mysql-libs-5.1.-.el6_5.x86_64
file /usr/share/mysql/charsets/keybcs2.xml from install of MySQL-server-5.6.-.el6.x86_64 conflicts with file from package mysql-libs-5.1.-.el6_5.x86_64
file /usr/share/mysql/charsets/koi8r.xml from install of MySQL-server-5.6.-.el6.x86_64 conflicts with file from package mysql-libs-5.1.-.el6_5.x86_64
file /usr/share/mysql/charsets/koi8u.xml from install of MySQL-server-5.6.-.el6.x86_64 conflicts with file from package mysql-libs-5.1.-.el6_5.x86_64
file /usr/share/mysql/charsets/latin1.xml from install of MySQL-server-5.6.-.el6.x86_64 conflicts with file from package mysql-libs-5.1.-.el6_5.x86_64
file /usr/share/mysql/charsets/latin2.xml from install of MySQL-server-5.6.-.el6.x86_64 conflicts with file from package mysql-libs-5.1.-.el6_5.x86_64
file /usr/share/mysql/charsets/latin5.xml from install of MySQL-server-5.6.-.el6.x86_64 conflicts with file from package mysql-libs-5.1.-.el6_5.x86_64
file /usr/share/mysql/charsets/latin7.xml from install of MySQL-server-5.6.-.el6.x86_64 conflicts with file from package mysql-libs-5.1.-.el6_5.x86_64
file /usr/share/mysql/charsets/macce.xml from install of MySQL-server-5.6.-.el6.x86_64 conflicts with file from package mysql-libs-5.1.-.el6_5.x86_64
file /usr/share/mysql/charsets/macroman.xml from install of MySQL-server-5.6.-.el6.x86_64 conflicts with file from package mysql-libs-5.1.-.el6_5.x86_64
file /usr/share/mysql/charsets/swe7.xml from install of MySQL-server-5.6.-.el6.x86_64 conflicts with file from package mysql-libs-5.1.-.el6_5.x86_64

发生错误,原因在于之前的版本与要安装的版本有冲突,

[root@ip---- mysql]# yum -y remove mysql-libs-5.1.*
Loaded plugins: fastestmirror, security
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package mysql-libs.x86_64 :5.1.-.el6_5 will be erased
--> Processing Dependency: libmysqlclient.so.()(64bit) for package: :postfix-2.6.-.el6_5.x86_64
--> Processing Dependency: libmysqlclient.so.(libmysqlclient_16)(64bit) for package: :postfix-2.6.-.el6_5.x86_64
--> Processing Dependency: mysql-libs for package: :postfix-2.6.-.el6_5.x86_64
--> Running transaction check
---> Package postfix.x86_64 :2.6.-.el6_5 will be erased
--> Processing Dependency: /usr/sbin/sendmail for package: redhat-lsb-core-4.0-.el6.centos.x86_64
--> Processing Dependency: /usr/sbin/sendmail for package: cronie-1.4.-.el6.x86_64
--> Running transaction check
---> Package cronie.x86_64 :1.4.-.el6 will be erased
--> Processing Dependency: cronie = 1.4.-.el6 for package: cronie-anacron-1.4.-.el6.x86_64
---> Package redhat-lsb-core.x86_64 :4.0-.el6.centos will be erased
--> Processing Dependency: redhat-lsb-core(x86-) = 4.0 for package: redhat-lsb-printing-4.0-.el6.centos.x86_64
--> Processing Dependency: redhat-lsb-core(x86-) = 4.0-.el6.centos for package: redhat-lsb-4.0-.el6.centos.x86_64
--> Processing Dependency: redhat-lsb-core(x86-) = 4.0 for package: redhat-lsb-graphics-4.0-.el6.centos.x86_64
--> Running transaction check
---> Package cronie-anacron.x86_64 :1.4.-.el6 will be erased
---> Package redhat-lsb.x86_64 :4.0-.el6.centos will be erased
--> Processing Dependency: redhat-lsb(x86-) = 4.0-.el6.centos for package: redhat-lsb-compat-4.0-.el6.centos.x86_64
---> Package redhat-lsb-graphics.x86_64 :4.0-.el6.centos will be erased
---> Package redhat-lsb-printing.x86_64 :4.0-.el6.centos will be erased
--> Running transaction check
---> Package redhat-lsb-compat.x86_64 :4.0-.el6.centos will be erased
--> Processing Dependency: /etc/cron.d for package: crontabs-1.10-.el6.noarch
--> Processing Dependency: /etc/cron.d for package: sysstat-9.0.-.el6.x86_64
--> Restarting Dependency Resolution with new changes.
--> Running transaction check
---> Package crontabs.noarch :1.10-.el6 will be erased
---> Package sysstat.x86_64 :9.0.-.el6 will be erased
--> Processing Dependency: /usr/bin/run-parts for package: cloud-init-0.7.-.el6.noarch
--> Restarting Dependency Resolution with new changes.
--> Running transaction check
---> Package cloud-init.noarch :0.7.-.el6 will be erased
--> Finished Dependency Resolution Dependencies Resolved ===============================================================================================================================================================================================================
Package Arch Version Repository Size
===============================================================================================================================================================================================================
Removing:
mysql-libs x86_64 5.1.-.el6_5 @updates 4.0 M
Removing for dependencies:
cloud-init noarch 0.7.-.el6 installed 1.7 M
cronie x86_64 1.4.-.el6 @anaconda-CentOS-.x86_64/6.5 k
cronie-anacron x86_64 1.4.-.el6 @anaconda-CentOS-.x86_64/6.5 k
crontabs noarch 1.10-.el6 @anaconda-CentOS-.x86_64/6.5 2.4 k
postfix x86_64 :2.6.-.el6_5 @updates 9.7 M
redhat-lsb x86_64 4.0-.el6.centos @base 0.0
redhat-lsb-compat x86_64 4.0-.el6.centos @base 0.0
redhat-lsb-core x86_64 4.0-.el6.centos @base k
redhat-lsb-graphics x86_64 4.0-.el6.centos @base 0.0
redhat-lsb-printing x86_64 4.0-.el6.centos @base 0.0
sysstat x86_64 9.0.-.el6 @base k Transaction Summary
===============================================================================================================================================================================================================
Remove Package(s) Installed size: M
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Erasing : redhat-lsb-compat-4.0-.el6.centos.x86_64 /
Erasing : redhat-lsb-4.0-.el6.centos.x86_64 /
Erasing : redhat-lsb-graphics-4.0-.el6.centos.x86_64 /
Erasing : redhat-lsb-printing-4.0-.el6.centos.x86_64 /
Erasing : redhat-lsb-core-4.0-.el6.centos.x86_64 /
Erasing : cloud-init-0.7.-.el6.noarch /
/var/tmp/rpm-tmp.VN9AWo: line : lsb_release: command not found
warning: /etc/cloud/cloud.cfg.d/05_logging.cfg saved as /etc/cloud/cloud.cfg.d/05_logging.cfg.rpmsave
warning: /etc/cloud/cloud.cfg saved as /etc/cloud/cloud.cfg.rpmsave
Erasing : sysstat-9.0.-.el6.x86_64 /
Erasing : crontabs-1.10-.el6.noarch /
Erasing : cronie-anacron-1.4.-.el6.x86_64 /
Erasing : cronie-1.4.-.el6.x86_64 /
Erasing : :postfix-2.6.-.el6_5.x86_64 /
Erasing : mysql-libs-5.1.-.el6_5.x86_64 /
Verifying : redhat-lsb-printing-4.0-.el6.centos.x86_64 /
Verifying : cronie-anacron-1.4.-.el6.x86_64 /
Verifying : mysql-libs-5.1.-.el6_5.x86_64 /
Verifying : redhat-lsb-4.0-.el6.centos.x86_64 /
Verifying : redhat-lsb-core-4.0-.el6.centos.x86_64 /
Verifying : sysstat-9.0.-.el6.x86_64 /
Verifying : cloud-init-0.7.-.el6.noarch /
Verifying : crontabs-1.10-.el6.noarch /
Verifying : redhat-lsb-compat-4.0-.el6.centos.x86_64 /
Verifying : cronie-1.4.-.el6.x86_64 /
Verifying : :postfix-2.6.-.el6_5.x86_64 /
Verifying : redhat-lsb-graphics-4.0-.el6.centos.x86_64 / Removed:
mysql-libs.x86_64 :5.1.-.el6_5 Dependency Removed:
cloud-init.noarch :0.7.-.el6 cronie.x86_64 :1.4.-.el6 cronie-anacron.x86_64 :1.4.-.el6 crontabs.noarch :1.10-.el6
postfix.x86_64 :2.6.-.el6_5 redhat-lsb.x86_64 :4.0-.el6.centos redhat-lsb-compat.x86_64 :4.0-.el6.centos redhat-lsb-core.x86_64 :4.0-.el6.centos
redhat-lsb-graphics.x86_64 :4.0-.el6.centos redhat-lsb-printing.x86_64 :4.0-.el6.centos sysstat.x86_64 :9.0.-.el6 Complete!
[root@ip---- mysql]#

再次安装就没有问题了:

[root@ip---- mysql]# rpm -ivh MySQL-server-5.6.-.el6.x86_64.rpm MySQL-client-5.6.-.el6.x86_64.rpm
warning: MySQL-server-5.6.-.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing... ########################################### [%]
:MySQL-client ########################################### [ %]
:MySQL-server ########################################### [%]
warning: user mysql does not exist - using root
warning: group mysql does not exist - using root
-- :: [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
-- :: [Note] /usr/sbin/mysqld (mysqld 5.6.) starting as process ...
-- :: [Note] InnoDB: Using atomics to ref count buffer pool pages
-- :: [Note] InnoDB: The InnoDB memory heap is disabled
-- :: [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
-- :: [Note] InnoDB: Memory barrier is not used
-- :: [Note] InnoDB: Compressed tables use zlib 1.2.
-- :: [Note] InnoDB: Using Linux native AIO
-- :: [Note] InnoDB: Using CPU crc32 instructions
-- :: [Note] InnoDB: Initializing buffer pool, size = 128.0M
-- :: [Note] InnoDB: Completed initialization of buffer pool
-- :: [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!
-- :: [Note] InnoDB: Setting file ./ibdata1 size to MB
-- :: [Note] InnoDB: Database physically writes the file full: wait...
-- :: [Note] InnoDB: Setting log file ./ib_logfile101 size to MB
-- :: [Note] InnoDB: Setting log file ./ib_logfile1 size to MB
-- :: [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
-- :: [Warning] InnoDB: New log files created, LSN=
-- :: [Note] InnoDB: Doublewrite buffer not found: creating new
-- :: [Note] InnoDB: Doublewrite buffer created
-- :: [Note] InnoDB: rollback segment(s) are active.
-- :: [Warning] InnoDB: Creating foreign key constraint system tables.
-- :: [Note] InnoDB: Foreign key constraint system tables created
-- :: [Note] InnoDB: Creating tablespace and datafile system tables.
-- :: [Note] InnoDB: Tablespace and datafile system tables created.
-- :: [Note] InnoDB: Waiting for purge to start
-- :: [Note] InnoDB: 5.6. started; log sequence number
A random root password has been set. You will find it in '/root/.mysql_secret'.
-- :: [Note] Binlog end
-- :: [Note] InnoDB: FTS optimize thread exiting.
-- :: [Note] InnoDB: Starting shutdown...
-- :: [Note] InnoDB: Shutdown completed; log sequence number -- :: [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
-- :: [Note] /usr/sbin/mysqld (mysqld 5.6.) starting as process ...
-- :: [Note] InnoDB: Using atomics to ref count buffer pool pages
-- :: [Note] InnoDB: The InnoDB memory heap is disabled
-- :: [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
-- :: [Note] InnoDB: Memory barrier is not used
-- :: [Note] InnoDB: Compressed tables use zlib 1.2.
-- :: [Note] InnoDB: Using Linux native AIO
-- :: [Note] InnoDB: Using CPU crc32 instructions
-- :: [Note] InnoDB: Initializing buffer pool, size = 128.0M
-- :: [Note] InnoDB: Completed initialization of buffer pool
-- :: [Note] InnoDB: Highest supported file format is Barracuda.
-- :: [Note] InnoDB: rollback segment(s) are active.
-- :: [Note] InnoDB: Waiting for purge to start
-- :: [Note] InnoDB: 5.6. started; log sequence number
-- :: [Note] Binlog end
-- :: [Note] InnoDB: FTS optimize thread exiting.
-- :: [Note] InnoDB: Starting shutdown...
-- :: [Note] InnoDB: Shutdown completed; log sequence number A RANDOM PASSWORD HAS BEEN SET FOR THE MySQL root USER !
You will find that password in '/root/.mysql_secret'. You must change that password on your first connect,
no other statement but 'SET PASSWORD' will be accepted.
See the manual for the semantics of the 'password expired' flag. Also, the account for the anonymous user has been removed. In addition, you can run: /usr/bin/mysql_secure_installation which will also give you the option of removing the test database.
This is strongly recommended for production servers. See the manual for more instructions. Please report any problems at http://bugs.mysql.com/ The latest information about MySQL is available on the web at http://www.mysql.com Support MySQL by buying support/licenses at http://shop.mysql.com New default config file was created as /usr/my.cnf and
will be used by default by the server when you start it.
You may edit this file to change server settings [root@ip---- mysql]#

mysql5.6对为root用户生产了一个随机密码,这个随机密码存放在/root/.mysql_secret中

[root@ip---- mysql]# cat /root/.mysql_secret
# The random password set for the root user at Tue Dec :: (local time): 6yoMKdmnzyIfvZA3
[root@ip---- mysql]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is
Server version: 5.6. 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并修改掉这个随机生产的密码,上面的提示符后面应该输入/root/.mysql_secret中的随机密码,登录后,用SET PASSWORD修改密码:

mysql> SET PASSWORD = PASSWORD('');
Query OK, rows affected (0.00 sec) mysql>

注意命令的大小写!

2.设置开机启动mysql并启动服务:

[root@ip---- mysql]# chkconfig mysql on
[root@ip---- mysql]# service mysql start
Starting MySQL. SUCCESS!
[root@ip---- mysql]#

3.安装MySQL JDBC Driver

在需要访问MySQL的机器上(比如CMS,MGMT角色)安装jdbc driver

[root@ip---- mysql]# unzip mysql-connector-java-5.1..zip
[root@ip---- mysql]# cp mysql-connector-java-5.1./mysql-connector-java-5.1.-bin.jar /usr/share/java
[root@ip-172-31-30-175 java]# ln -s mysql-connector-java-5.1.37-bin.jar mysql-connector-java.jar 
[root@ip---- mysql]# cd /usr/share/java [root@ip---- java]# pwd /usr/share/java [root@ip---- java]# ls gcj-endorsed jline-0.9..jar jline.jar js-1.7.jar js.jar libgcj-4.4..jar libgcj-4.4..jar mysql-connector-java-5.1.-bin.jar rhino-1.7.jar rhino-examples-1.7.jar rhino-examples.jar rhino.jar [root@ip---- java]# ln -s mysql-connector-java-5.1..jar mysql-connector-java.jar [root@ip---- java]# ll total  drwxr-xr-x  root root  Oct   gcj-endorsed -rw-r--r--  root root  Aug   jline-0.9..jar lrwxrwxrwx  root root  Feb   jline.jar -> jline-0.9..jar lrwxrwxrwx  root root  Feb   js-1.7.jar -> rhino-1.7.jar lrwxrwxrwx  root root  Feb   js.jar -> js-1.7.jar -rw-r--r--  root root  Oct   libgcj-4.4..jar lrwxrwxrwx  root root  Dec   libgcj-4.4..jar -> libgcj-4.4..jar -rw-r--r--  root root  Dec  : mysql-connector-java-5.1.-bin.jar lrwxrwxrwx  root root  Dec  : mysql-connector-java.jar -> mysql-connector-java-5.1..jar -rw-r--r--  root root  Aug   rhino-1.7.jar -rw-r--r--  root root  Aug   rhino-examples-1.7.jar lrwxrwxrwx  root root  Feb   rhino-examples.jar -> rhino-examples-1.7.jar lrwxrwxrwx  root root  Feb   rhino.jar -> rhino-1.7.jar [root@ip---- java]#

3.为Cloudera管理器配置外部数据库

为了保证在生产环境的安全,禁止远程机器以root用户登录,禁止匿名登录。这步在POC环境下可选。注意root的密码为上一步中设置的123456

[root@ip---- ec2-user]# /usr/bin/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. You already have a root password set, so you can safely answer 'n'. Change the root password? [Y/n] n
... skipping. 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] n
... skipping. 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] Y
- Dropping test database...
... Success!
- Removing privileges on test database...
... Success! 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@ip---- ec2-user]#

建立CDH各组件需要的数据库:

mysql -u root --password=123456 -e "create user 'hive'@'%' identified by '123456'"
mysql -u root --password=123456 -e 'create database metastore default character set utf8'
mysql -u root --password='123456' -e "grant all privileges on metastore.* to 'hive'@'%'"

mysql -u root --password='123456' -e "create user 'amon'@'%' identified by '123456'"
mysql -u root --password='123456' -e 'create database amon default character set utf8'
mysql -u root --password='123456' -e "grant all privileges on amon.* to 'amon'@'%'"

mysql -u root --password='123456' -e "create user 'rman'@'%' identified by '123456'"
mysql -u root --password='123456' -e 'create database rman default character set utf8'
mysql -u root --password='123456' -e "grant all privileges on rman.* to 'rman'@'%'"

mysql -u root --password='123456' -e "create user 'sentry'@'%' identified by '123456'"
mysql -u root --password='123456' -e 'create database sentry default character set utf8'
mysql -u root --password='123456' -e "grant all privileges on sentry.* to 'sentry'@'%'"

mysql -u root --password='123456' -e "create user 'nav'@'%' identified by '123456'"
mysql -u root --password='123456' -e 'create database nav default character set utf8'
mysql -u root --password='123456' -e "grant all privileges on nav.* to 'nav'@'%'"

mysql -u root --password='123456' -e "create user 'navms'@'%' identified by '123456'"
mysql -u root --password='123456' -e 'create database navms default character set utf8'
mysql -u root --password='123456' -e "grant all privileges on navms.* to 'navms'@'%'"

mysql -u root --password='123456' -e "create user 'cm'@'%' identified by '123456'"
mysql -u root --password='123456' -e 'create database cm default character set utf8'
mysql -u root --password='123456' -e "grant all privileges on cm.* to 'cm'@'%'"

mysql -u root --password='123456' -e "create user 'oozie'@'%' identified by '123456'"
mysql -u root --password='123456' -e 'create database oozie default character set utf8'
mysql -u root --password='123456' -e "grant all privileges on oozie.* to 'oozie'@'%'"

执行结果如下:

[root@ip---- ec2-user]# mysql -u root --password= -e "create user 'hive'@'%' identified by '123456'"
Warning: Using a password on the command line interface can be insecure.
[root@ip---- ec2-user]# mysql -u root --password= -e 'create database metastore default character set utf8'
Warning: Using a password on the command line interface can be insecure.
[root@ip---- ec2-user]# mysql -u root --password='' -e "grant all privileges on metastore.* to 'amon'@'%'"
Warning: Using a password on the command line interface can be insecure.
[root@ip---- ec2-user]# mysql -u root --password='' -e "create user 'amon'@'%' identified by '123456'"
Warning: Using a password on the command line interface can be insecure.
ERROR (HY000) at line : Operation CREATE USER failed for 'amon'@'%'
[root@ip---- ec2-user]# mysql -u root --password='' -e 'create database amon default character set utf8'
Warning: Using a password on the command line interface can be insecure.
[root@ip---- ec2-user]# mysql -u root --password='' -e "grant all privileges on amon.* to 'amon'@'%'"
Warning: Using a password on the command line interface can be insecure.
[root@ip---- ec2-user]# mysql -u root --password='' -e "create user 'rman'@'%' identified by '123456'"
Warning: Using a password on the command line interface can be insecure.
[root@ip---- ec2-user]# mysql -u root --password='' -e 'create database rman default character set utf8'
Warning: Using a password on the command line interface can be insecure.
[root@ip---- ec2-user]# mysql -u root --password='' -e "grant all privileges on rman.* to 'rman'@'%'"
Warning: Using a password on the command line interface can be insecure.
[root@ip---- ec2-user]# mysql -u root --password='' -e "create user 'sentry'@'%' identified by '123456'"
Warning: Using a password on the command line interface can be insecure.
[root@ip---- ec2-user]# mysql -u root --password='' -e 'create database sentry default character set utf8'
Warning: Using a password on the command line interface can be insecure.
[root@ip---- ec2-user]# mysql -u root --password='' -e "grant all privileges on sentry.* to 'sentry'@'%'"
Warning: Using a password on the command line interface can be insecure.
[root@ip---- ec2-user]# mysql -u root --password='' -e "create user 'nav'@'%' identified by '123456'"
Warning: Using a password on the command line interface can be insecure.
[root@ip---- ec2-user]# mysql -u root --password='' -e 'create database nav default character set utf8'
Warning: Using a password on the command line interface can be insecure.
[root@ip---- ec2-user]# mysql -u root --password='' -e "grant all privileges on nav.* to 'nav'@'%'"
Warning: Using a password on the command line interface can be insecure.
[root@ip---- ec2-user]#
[root@ip---- ec2-user]# mysql -u root --password='' -e "create user 'navms'@'%' identified by '123456'"
Warning: Using a password on the command line interface can be insecure.
[root@ip---- ec2-user]# mysql -u root --password='' -e 'create database navms default character set utf8'
Warning: Using a password on the command line interface can be insecure.
[root@ip---- ec2-user]# mysql -u root --password='' -e "grant all privileges on navms.* to 'navms'@'%'"
Warning: Using a password on the command line interface can be insecure.
[root@ip---- ec2-user]#
[root@ip---- ec2-user]# mysql -u root --password='' -e "create user 'cm'@'%' identified by '123456'"
Warning: Using a password on the command line interface can be insecure.
[root@ip---- ec2-user]# mysql -u root --password='' -e 'create database cm default character set utf8'
Warning: Using a password on the command line interface can be insecure.
[root@ip---- ec2-user]# mysql -u root --password='' -e "grant all privileges on cm.* to 'cm'@'%'"
Warning: Using a password on the command line interface can be insecure.
[root@ip---- ec2-user]#
[root@ip---- ec2-user]# mysql -u root --password='' -e "create user 'oozie'@'%' identified by '123456'"
Warning: Using a password on the command line interface can be insecure.
[root@ip---- ec2-user]# mysql -u root --password='' -e 'create database oozie default character set utf8'
Warning: Using a password on the command line interface can be insecure.
[root@ip---- ec2-user]# mysql -u root --password='' -e "grant all privileges on cm.* to 'oozie'@'%'"
Warning: Using a password on the command line interface can be insecure.

最后还需要运行如下脚本:

[root@ip---- ec2-user]# /usr/share/cmf/schema/scm_prepare_database.sh -h localhost mysql cm cm
JAVA_HOME=/usr/java/jdk1..0_67-cloudera
Verifying that we can write to /etc/cloudera-scm-server
Creating SCM configuration file in /etc/cloudera-scm-server
Executing: /usr/java/jdk1..0_67-cloudera/bin/java -cp /usr/share/java/mysql-connector-java.jar:/usr/share/java/oracle-connector-java.jar:/usr/share/cmf/schema/../lib/* com.cloudera.enterprise.dbutil.DbCommandExecutor /etc/cloudera-scm-server/db.properties com.cloudera.cmf.db.
log4j:ERROR Could not find value for key log4j.appender.A
log4j:ERROR Could not instantiate appender named "A".
[2015-12-01 13:00:03,471] INFO 0[main] - com.cloudera.enterprise.dbutil.DbCommandExecutor.testDbConnection(DbCommandExecutor.java:247) - Successfully connected to database.
All done, your SCM database is configured correctly!

4.搭建内部的http源服务器,将下载的介质上传

先安装createrepo这个工具:

[root@ip---- cloudera]# yum install createrepo
Loaded plugins: fastestmirror, security
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: centos.sonn.com
* extras: mirror.web-ster.com
* updates: mirror.supremebytes.com
Resolving Dependencies
--> Running transaction check
---> Package createrepo.noarch :0.9.-.el6 will be installed
--> Processing Dependency: python-deltarpm for package: createrepo-0.9.-.el6.noarch
--> Running transaction check
---> Package python-deltarpm.x86_64 :3.5-0.5.20090913git.el6 will be installed
--> Processing Dependency: deltarpm = 3.5-0.5.20090913git.el6 for package: python-deltarpm-3.5-0.5.20090913git.el6.x86_64
--> Running transaction check
---> Package deltarpm.x86_64 :3.5-0.5.20090913git.el6 will be installed
--> Finished Dependency Resolution Dependencies Resolved ===============================================================================================================================================================================================================
Package Arch Version Repository Size
===============================================================================================================================================================================================================
Installing:
createrepo noarch 0.9.-.el6 base k
Installing for dependencies:
deltarpm x86_64 3.5-0.5.20090913git.el6 base k
python-deltarpm x86_64 3.5-0.5.20090913git.el6 base k Transaction Summary
===============================================================================================================================================================================================================
Install Package(s) Total download size: k
Installed size: k
Is this ok [y/N]: y
Downloading Packages:
(/): createrepo-0.9.-.el6.noarch.rpm | kB :
(/): deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm | kB :
(/): python-deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm | kB :
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total kB/s | kB :
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : deltarpm-3.5-0.5.20090913git.el6.x86_64 /
Installing : python-deltarpm-3.5-0.5.20090913git.el6.x86_64 /
Installing : createrepo-0.9.-.el6.noarch /
Verifying : python-deltarpm-3.5-0.5.20090913git.el6.x86_64 /
Verifying : createrepo-0.9.-.el6.noarch /
Verifying : deltarpm-3.5-0.5.20090913git.el6.x86_64 / Installed:
createrepo.noarch :0.9.-.el6 Dependency Installed:
deltarpm.x86_64 :3.5-0.5.20090913git.el6 python-deltarpm.x86_64 :3.5-0.5.20090913git.el6 Complete!
[root@ip---- cloudera]#

在安装http服务器:

[root@ip---- cloudera]# yum install httpd
Loaded plugins: fastestmirror, security
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: centos.sonn.com
* extras: mirror.web-ster.com
* updates: mirror.supremebytes.com
Resolving Dependencies
--> Running transaction check
---> Package httpd.x86_64 :2.2.-.el6.centos will be updated
---> Package httpd.x86_64 :2.2.-.el6.centos will be an update
--> Processing Dependency: httpd-tools = 2.2.-.el6.centos for package: httpd-2.2.-.el6.centos.x86_64
--> Running transaction check
---> Package httpd-tools.x86_64 :2.2.-.el6.centos will be updated
---> Package httpd-tools.x86_64 :2.2.-.el6.centos will be an update
--> Finished Dependency Resolution Dependencies Resolved ===============================================================================================================================================================================================================
Package Arch Version Repository Size
===============================================================================================================================================================================================================
Updating:
httpd x86_64 2.2.-.el6.centos updates k
Updating for dependencies:
httpd-tools x86_64 2.2.-.el6.centos updates k Transaction Summary
===============================================================================================================================================================================================================
Upgrade Package(s) Total download size: k
Is this ok [y/N]: y
Downloading Packages:
(/): httpd-2.2.-.el6.centos.x86_64.rpm | kB :
(/): httpd-tools-2.2.-.el6.centos.x86_64.rpm | kB :
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 1.8 MB/s | kB :
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : httpd-tools-2.2.-.el6.centos.x86_64 /
Updating : httpd-2.2.-.el6.centos.x86_64 /
Cleanup : httpd-2.2.-.el6.centos.x86_64 /
Cleanup : httpd-tools-2.2.-.el6.centos.x86_64 /
Verifying : httpd-tools-2.2.-.el6.centos.x86_64 /
Verifying : httpd-2.2.-.el6.centos.x86_64 /
Verifying : httpd-2.2.-.el6.centos.x86_64 /
Verifying : httpd-tools-2.2.-.el6.centos.x86_64 / Updated:
httpd.x86_64 :2.2.-.el6.centos Dependency Updated:
httpd-tools.x86_64 :2.2.-.el6.centos Complete!
[root@ip---- cloudera]#

把安装文件拷贝到源服务器上并建立repo:

[root@ip---- cloudera]# pwd
/root/cloudera
[root@ip---- cloudera]# ll
total
drwxr-xr-x root root Dec : cdh5.5.0
drwxr-xr-x root root Dec : cm5.5.0
drwxr-xr-x root root Dec : mysql
[root@ip---- cloudera]# cp -r cdh5.5.0 /var/www/html/
[root@ip---- cloudera]# cp -r cm5.5.0 /var/www/html/
[root@ip---- cloudera]# createrepo /var/www/html/cm5.5.0/
Spawning worker with pkgs
Workers Finished
Gathering worker results Saving Primary metadata
Saving file lists metadata
Saving other metadata
Generating sqlite DBs
Sqlite DBs complete
[root@ip-172-31-30-175 cloudera]#  chmod -R ugo+rX /var/www/html

启动服务器:

[root@ip---- cloudera]# service httpd status
httpd is stopped
[root@ip---- cloudera]# service httpd start
Starting httpd: [ OK ]
[root@ip---- cloudera]# service httpd status
httpd (pid ) is running...

最后到http://172.31.30.175/cm5.5.0和http://172.31.30.175/cdh5.5.0上检查一下文件是否可以反问。

Index of /cm5.5.0

Name Last modified Size Description

Parent Directory   -  
cloudera-manager-agent-5.5.0-1.cm550.p0.61.el6.x86_64.rpm 01-Dec-2015 11:53 4.7M  
cloudera-manager-daemons-5.5.0-1.cm550.p0.61.el6.x86_64.rpm 01-Dec-2015 11:53 509M  
cloudera-manager-server-5.5.0-1.cm550.p0.61.el6.x86_64.rpm 01-Dec-2015 11:53 8.2K  
cloudera-manager-server-db-2-5.5.0-1.cm550.p0.61.el6.x86_64.rpm 01-Dec-2015 11:53 9.9K  
enterprise-debuginfo-5.5.0-1.cm550.p0.61.el6.x86_64.rpm 01-Dec-2015 11:53 957K  
jdk-6u31-linux-amd64.rpm 01-Dec-2015 11:53 68M  
oracle-j2sdk1.7-1.7.0+update67-1.x86_64.rpm 01-Dec-2015 11:53 135M  
repodata/ 01-Dec-2015 11:53 -  

Apache/2.2.15 (CentOS) Server at 52.11.56.155 Port 80

Index of /cdh5.5.0

Name Last modified Size Description

Parent Directory   -  
CDH-5.5.0-1.cdh5.5.0.p0.8-el6.parcel 01-Dec-2015 11:52 1.4G  
manifest.json 01-Dec-2015 11:52 49K  

Apache/2.2.15 (CentOS) Server at 52.11.56.155 Port 80

如果访问不了,检查一下目录/var/www/html的权限和http服务器的状态

5.安装JDK

[root@ip---- cloudera]# yum install oracle-j2sdk1.

6.安装cm server

[root@ip---- cloudera]# yum install cloudera-manager-daemons cloudera-manager-server
Loaded plugins: fastestmirror, security
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: centos.sonn.com
* extras: mirror.web-ster.com
* updates: mirror.supremebytes.com
Resolving Dependencies
--> Running transaction check
---> Package cloudera-manager-daemons.x86_64 :5.5.-.cm550.p0..el6 will be installed
---> Package cloudera-manager-server.x86_64 :5.5.-.cm550.p0..el6 will be installed
--> Finished Dependency Resolution Dependencies Resolved ===============================================================================================================================================================================================================
Package Arch Version Repository Size
===============================================================================================================================================================================================================
Installing:
cloudera-manager-daemons x86_64 5.5.-.cm550.p0..el6 bootstrap M
cloudera-manager-server x86_64 5.5.-.cm550.p0..el6 bootstrap 8.2 k Transaction Summary
===============================================================================================================================================================================================================
Install Package(s) Total download size: M
Installed size: M
Is this ok [y/N]: y
Downloading Packages:
(/): cloudera-manager-daemons-5.5.-.cm550.p0..el6.x86_64.rpm | MB :
(/): cloudera-manager-server-5.5.-.cm550.p0..el6.x86_64.rpm | 8.2 kB :
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total MB/s | MB :
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : cloudera-manager-daemons-5.5.-.cm550.p0..el6.x86_64 /
Installing : cloudera-manager-server-5.5.-.cm550.p0..el6.x86_64 /
Verifying : cloudera-manager-server-5.5.-.cm550.p0..el6.x86_64 /
Verifying : cloudera-manager-daemons-5.5.-.cm550.p0..el6.x86_64 / Installed:
cloudera-manager-daemons.x86_64 :5.5.-.cm550.p0..el6 cloudera-manager-server.x86_64 :5.5.-.cm550.p0..el6 Complete!
[root@ip---- cloudera]#

启动CM:

[root@ip---- cloudera]# service cloudera-scm-server start
Starting cloudera-scm-server: [FAILED]
[root@ip---- cloudera]# vi /var/log/cloudera-scm-server/
cloudera-scm-server.log cloudera-scm-server.out db.log
[root@ip---- cloudera]# vi /var/log/cloudera-scm-server/cloudera-scm-server.log
[root@ip---- cloudera]#

发现启动出差,日志中信息如下:

-- ::, ERROR main:com.cloudera.server.cmf.Main: Server failed.
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.cloudera.server.cmf.TrialState': Cannot resolve reference to bean 'entityManagerFactoryBean' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactoryBean': FactoryBean threw exception on object creation; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: cmf.server] Unable to build EntityManagerFactory
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:)
at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:)
at org.springframework.beans.factory.support.AbstractBeanFactory$.getObject(AbstractBeanFactory.java:)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:)
at com.cloudera.server.cmf.Main.bootstrapSpringContext(Main.java:)
at com.cloudera.server.cmf.Main.<init>(Main.java:)
at com.cloudera.server.cmf.Main.main(Main.java:)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactoryBean': FactoryBean threw exception on object creation; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: cmf.server] Unable to build EntityManagerFactory
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:)
at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:)
... more
Caused by: javax.persistence.PersistenceException: [PersistenceUnit: cmf.server] Unable to build EntityManagerFactory
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:)
at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:)
at com.cloudera.enterprise.CommonMain.setupHibernate(CommonMain.java:)
at com.cloudera.server.cmf.bootstrap.EntityManagerFactoryBean.getObject(EntityManagerFactoryBean.java:)
at com.cloudera.server.cmf.bootstrap.EntityManagerFactoryBean.getObject(EntityManagerFactoryBean.java:)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:)
... more
Caused by: org.hibernate.service.classloading.spi.ClassLoadingException: HHH010003: JDBC Driver class not found: com.mysql.jdbc.Driver
at org.hibernate.service.jdbc.connections.internal.C3P0ConnectionProvider.configure(C3P0ConnectionProvider.java:)
at org.hibernate.service.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:)

原因在于jdbc driver找不到。检查jdbc driver

[root@ip---- cloudera]# cd /usr/share/java
[root@ip---- java]# ll
total
drwxr-xr-x root root Oct gcj-endorsed
-rw-r--r-- root root Aug jline-0.9..jar
lrwxrwxrwx root root Feb jline.jar -> jline-0.9..jar
lrwxrwxrwx root root Feb js-1.7.jar -> rhino-1.7.jar
lrwxrwxrwx root root Feb js.jar -> js-1.7.jar
-rw-r--r-- root root Oct libgcj-4.4..jar
lrwxrwxrwx root root Dec libgcj-4.4..jar -> libgcj-4.4..jar
-rw-r--r-- root root Dec : mysql-connector-java-5.1.-bin.jar
lrwxrwxrwx root root Dec : mysql-connector-java.jar -> mysql-connector-java-5.1..jar
-rw-r--r-- root root Aug rhino-1.7.jar
-rw-r--r-- root root Aug rhino-examples-1.7.jar
lrwxrwxrwx root root Feb rhino-examples.jar -> rhino-examples-1.7.jar
lrwxrwxrwx root root Feb rhino.jar -> rhino-1.7.jar

发现是由于书写错误mysql-connector-java.jar -> mysql-connector-java-5.1.37.jar,应该是mysql-connector-java-5.1.37-bin.jar

更正错误并重启CM服务:

[root@ip---- java]# unlink mysql-connector-java.jar
[root@ip---- java]# ll
total
drwxr-xr-x root root Oct gcj-endorsed
-rw-r--r-- root root Aug jline-0.9..jar
lrwxrwxrwx root root Feb jline.jar -> jline-0.9..jar
lrwxrwxrwx root root Feb js-1.7.jar -> rhino-1.7.jar
lrwxrwxrwx root root Feb js.jar -> js-1.7.jar
-rw-r--r-- root root Oct libgcj-4.4..jar
lrwxrwxrwx root root Dec libgcj-4.4..jar -> libgcj-4.4..jar
-rw-r--r-- root root Dec : mysql-connector-java-5.1.-bin.jar
lrwxrwxrwx root root Dec : mysql-connector-java.jar -> mysql-connector-java-5.1.-bin.jar
-rw-r--r-- root root Aug rhino-1.7.jar
-rw-r--r-- root root Aug rhino-examples-1.7.jar
lrwxrwxrwx root root Feb rhino-examples.jar -> rhino-examples-1.7.jar
lrwxrwxrwx root root Feb rhino.jar -> rhino-1.7.jar
[root@ip---- java]# service cloudera-scm-server start
Starting cloudera-scm-server: [ OK ]

AWS-CDH5.5安装-安装的更多相关文章

  1. Cloudera Manager和CDH5.8离线安装

    https://blog.csdn.net/zzq900503/article/details/52982828 简介 我们在上篇文章中已经了解了CDH,为了后续的学习,我们本章就来安装CDH5.8. ...

  2. CentOS7+CDH5.14.0安装全流程记录,图文详解全程实测-8CDH5安装和集群配置

    Cloudera Manager Server和Agent都启动以后,就可以进行CDH5的安装配置了.      准备文件 从 http://archive.cloudera.com/cdh5/par ...

  3. [转]Cloudera Manager和CDH5.8离线安装

    https://blog.csdn.net/zzq900503/article/details/52982828 https://www.cnblogs.com/felixzh/p/9082344.h ...

  4. CentOS7+CDH5.14.0安装全流程记录,图文详解全程实测-总目录

    CentOS7+CDH5.14.0安装全流程记录,图文详解全程实测-总目录: 0.Windows 10本机下载Xshell,以方便往Linux主机上上传大文件 1.CentOS7+CDH5.14.0安 ...

  5. hadoop基础----hadoop实战(七)-----hadoop管理工具---使用Cloudera Manager安装Hadoop---Cloudera Manager和CDH5.8离线安装

    hadoop基础----hadoop实战(六)-----hadoop管理工具---Cloudera Manager---CDH介绍 简介 我们在上篇文章中已经了解了CDH,为了后续的学习,我们本章就来 ...

  6. CDH5.13.3安装手册

    Server端需要打开端口 7180 7182 选址正确的版本,cdh版本不要高于cm版本 CM下载地址 http://archive.cloudera.com/cm5/cm/5/cloudera-m ...

  7. 二进制文件安装安装flannel

    二进制文件安装安装flannel overlay网络简介 覆盖网络就是应用层网络,它是面向应用层的,不考虑或很少考虑网络层,物理层的问题. 详细说来,覆盖网络是指建立在另一个网络上的网络.该网络中的结 ...

  8. linux下安装安装pcre-8.32

    linux下安装安装pcre-8.32 ./configure --prefix=/usr/local/pcre 出现以下错误 configure: error: You need a C++ com ...

  9. linux下安装安装pcre-8.32 configure: error: You need a C++ compiler for C++ support

    linux下安装安装pcre-8.32./configure --prefix=/usr/local/pcre 出现以下错误configure: error: You need a C++ compi ...

  10. 逐步在Windows上结合CopSSH + msysGit安装安装Git Server同时集成Git使用Visual Studio

    v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VM ...

随机推荐

  1. 远程执行shellcode

    #include "Windows.h" #include <WinSock2.h> #include <stdio.h> #pragma comment( ...

  2. NSJSONSerialization(json序列化)

    //通过调用isValidJSONObject来判断Foundation对象是否可以转换为JSON数据 NSJSONSerialization isValidJSONObject:obj 我们能利用N ...

  3. 参考__MySql

    博客 三范式 事务隔离级别 列表

  4. red hat安装mysql二进制包

    数据包命名格式解释 mysql-5.7.15-linux-glibc2.5-x86_64.tar.gz 黑色粗体表示为包名称 蓝色表示linux系统二进制包 红色表示构架     1.上传mysql- ...

  5. 误删除libc.so.6 恢复

    一.我是怎样一步一步毁掉系统的 最近在centos 7上进行开发.由于需要使用高版本linux内核的特性,需要将linux内核升级.按照教程:centos 7升级内核 进行升级的时候发现在安装elre ...

  6. ApplicationContextAware 接口

    一.这个接口有什么用? 当一个类实现了这个接口(ApplicationContextAware)之后,这个类就可以方便获得ApplicationContext中的所有bean.换句话说,就是这个类可以 ...

  7. web自学网站

    coursera 网站很多新的技术,都是大牛和牛大学的,和外国新技术.   我要自学网 有好也有不怎么样的,一般般的.但是dome多.   中国教程网  一般.   CSDN   技术相关    站长 ...

  8. first Automation

    //创建一个容器    CEmbWordCntrItem * pItem = NULL;    CEmbWordDoc * pDoc = GetDocument();    pItem = new C ...

  9. 简述alert和console.log的区别

    生活中还是得有发现美好和差别的眼睛~~ 学习前端那么久既然还不知道alert和console.log的差别~~~~ 蓝瘦,香菇~~~ 本菜鸟一直以为alert和console.log其实是一样的用法, ...

  10. php知识案列1

    用PHP,在1-20间随机产生5个不重复的值,如何做 复制代码 代码如下: <?php function NoRand($begin=0,$end=20,$limit=5){ $rand_arr ...