I. Machine preparation
1. Three host names: server202 server203 server204
In addition, server201 is used to build the repos of the local yum and does not participate in the cluster.
2. Configure server202 ssh password-free login to other machines (including yourself)
3. Add/etc/hosts of the three machine nodes
192.168.2.201 archive.cloudera.com
192.168.2.202 server202
192.168.2.203 server203
192.168.2.204 server204
4. Other related operations:
Disable firewall
Chkconfig iptables off
Service iptables stop
You must set selinux = disabled in/etc/SELINUX/config through Cloudera Manager installer. You need to restart the machine.
Sed-I "s/SELINUX = enforcing/SELINUX = disabled/g"/etc/selinux/config
Configure sohu source 163
Cd/etc/yum. repos. d/
# Centos5
Wget http://mirrors.163.com/.help/CentOS5-Base-163.repo
# Wget http://mirrors.sohu.com/help/CentOS-Base-sohu.repo
# Centos6
Wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
Yum makecache
Synchronization time
Ntpdate-u pool.ntp.org
To install CDH5.2, you must install Python 26 using yum.
Python yum-y install python26 python26-devel
Zlib errors may be prompted, and python will be re-configured through the following compilation.
Yum install zlib
Vi Modules/Setup. dist
Search for zlib and remove the comments before # zlib zlibmodule. c-I $ (prefix)/include-L $ (exec_prefix)/lib-lz.
./Configure
Make
Make install
2. Build a local repos (server201 machine)
Download the tarball installation package of CDH5.2, and the subsequent manager will install it through the tarball.
Http://archive.cloudera.com/cdh5/repo-as-tarball/5.2.0/cdh5.2.0-centos5.tar.gz
Http://archive.cloudera.com/cdh5/repo-as-tarball/5.2.0/cdh5.2.0-centos6.tar.gz
Http://archive.cloudera.com/cm5/repo-as-tarball/5.2.0/cm5.2.0-centos5.tar.gz
Http://archive.cloudera.com/cm5/repo-as-tarball/5.2.0/cm5.2.0-centos6.tar.gz
Note that for centos6 OS, you also need to download the navigator-keytrustee5 Directory through wget
Wget -- mirror-p -- convert-links-P/disk/cloudera/t http://archive-primary.cloudera.com/navigator-keytrustee5/
Here, we use nginx in server201 to proxy local repos and specify archive.cloudera.com to 192.168.2.201, so that you do not need to modify the yum repos URL. Otherwise, you must manually specify your own repos address.
By default, nginx does not display all files in the directory. You can enable nginx. conf using the following configuration.
Autoindex on; # automatically display directories
Autoindex_exact_size off; # display the file size in a user-friendly manner; otherwise, the file size is displayed in bytes.
Autoindex_localtime on; # display by server time; otherwise, display by gmt time
Configure local repos commands
# Centos5
Mkdir-p/disk/cloudera/cdh5/redhat/5/x86_64
Cd/disk/cloudera/cdh5/redhat/5/x86_64
Tar-xzvf/disk/cloudera/download/cdh5.2.0-centos5.tar.gz
Mkdir-p/disk/cloudera/cm5/redhat/5/x86_64
Cd/disk/cloudera/cm5/redhat/5/x86_64
Tar-xzvf/disk/cloudera/download/cm5.2.0-centos5.tar.gz
# Centos6
Mkdir-p/disk/cloudera/cdh5/redhat/6/x86_64
Cd/disk/cloudera/cdh5/redhat/6/x86_64
Tar-xzvf/disk/cloudera/download/cdh5.2.0-centos6.tar.gz
Mkdir-p/disk/cloudera/cm5/redhat/6/x86_64
Cd/disk/cloudera/cm5/redhat/6/x86_64
Tar-xzvf/disk/cloudera/download/cm5.2.0-centos6.tar.gz
Mkdir-p/disk/cloudera/redhat/cdh/
Cd/disk/cloudera/redhat/cdh
Cp/disk/cloudera/cdh5/redhat/5/x86_64/cdh/RPM-GPG-KEY-cloudera.
After the configuration is successful, make sure the http://archive.cloudera.com is able to access your local repos.
3. Install cloudera manager
1. Download cloudera-manager-installer.bin: http://archive.cloudera.com/cm5/installer/latest/cloudera-manager-installer.bin
2, execute the cloudera-manager-installer.bin, install the above steps to install. It usually takes several minutes. Because it is a local repos source. Disable SELINUX = disabled. You can view the installation error logs in/var/log/cloudera-manager-installer.
3. Access http: // server202: 7180 after installation. Default account and password: admin
4. Install clusters through cloudera manager
Follow the interface navigation process.
1. Select the Cloudera Express version.
2. List installable packages and services
3. Specify the CDH host:
Server202
Server203
Server204
4. Select a repository. Method of selection: use data packets. Select 5.2 for the CDH version. Do not modify others.
5. Install oracle JDK by default.
6. Set the ssh Logon key and upload the private key of server202.
7. Enter the installation process. You can view the installation status of each node in detail. Error logs, etc. You can roll back and reinstall it. Generally, it takes 10 minutes. If any error occurs, follow the prompts to fix it. I encountered the python26 dependency problem.
8. After the installation is successful, some service environments of the cluster machines are automatically checked and repaired based on the check results. Generally, the check is passed.
9. Select the service to be installed. Here, select all for installation.
10. Configure the cluster role. Generally, use the default setting. Note that some roles do not have the default host configuration. You need to configure the host location to be installed. Databases and configuration files are all set by default. It may take 10 minutes for the first configuration.
11. After everything is normal, go to the management panel and you can see the installed services.