Install the Hive metastore somewhere in your cluster, see hive installation.
As part of this process, you configure the Hive metastore to use an external database as a metastore. Impala uses this same database for its own table metadata. You can choose either a MySQL or PostgreSQL database as the metastore.
It is recommends setting up a Hive metastore service rather than connecting directly to the metastore database; this configuration is required when running Impala under CDH 4.1. Make sure the /etc/impala/conf/hive-site.xml file contains the following setting, substituting the appropriate hostname for metastore_server_host:
<property>
<name>hive.metastore.uris</name>
<value>thrift://metastore_server_host:9083</value>
</property>
<property>
<name>hive.metastore.client.socket.timeout</name>
<value>3600</value>
<description>MetaStore Client socket timeout in seconds</description>
</property>
By default Hadoop HTTP web-consoles (JobTracker, NameNode, TaskTrackers and DataNodes) allow access without any form of authentication.
The next section describes how to configure Hadoop HTTP web-consoles to require user authentication.
The following properties should be in the core-site.xml
of all the nodes in the cluster.
<property>
<name>hadoop.http.filter.initializers</name>
<value>org.apache.hadoop.security.AuthenticationFilterInitializer</value>
<description>
Authentication for Hadoop HTTP web-consoles
add to this property the org.apache.hadoop.security.AuthenticationFilterInitializer initializer class.
</description>
</property>
<property>
<name>hadoop.http.authentication.type</name>
<value>pers.louyj.utils.hadoop.auth.ext.StandardAuthenticationHandler</value>
<description>
Defines authentic
wget http://mirror.bit.edu.cn/apache/hive/hive-2.1.0/apache-hive-2.1.0-bin.tar.gz
tar zxvf apache-hive-2.1.0-bin.tar.gz
mv apache-hive-2.1.0-bin hive-2.1.0
sudo -u postgres psql
CREATE ROLE hive LOGIN PASSWORD 'hive_password';
CREATE DATABASE metastore OWNER hive ENCODING 'UTF8';
GRANT ALL PRIVILEGES ON DATABASE metastore TO hive;
cd /home/hadoop/hive-2.1.0/lib
wget http://central.maven.org/maven2/org/postgresql/postgresql/9.4.1211.jre7/postgresql-9.4.1211.jre7.jar
cd /home/hadoop/hive-2.1.0/conf
vi hive-site.xml
<configuration>
<property>
<name>hive.exec.scratchdir</name>
<value>hdfs://linode01.touchworld.link:9000/hive/scratchdir</value>
</property>
<property>
<name>hive.metastore.warehouse.dir</name>
<value>hdfs://linode01.touchworld.link:9000/hive/warehousedir</value>
</property>
<property>
<name>javax.jdo.option.ConnectionURL</name>
<val
sudo yum install postgresql-server postgresql
sudo su - postgres
initdb -D /var/lib/pgsql/data
systemctl status postgresql.service
systemctl start postgresql.service
systemctl stop postgresql.service
vi /var/lib/pgsql/data/postgresql.conf
listen_addresses ='*'
vi /var/lib/pgsql/data/pg_hba.conf
host all all 0.0.0.0/0 trust
systemctl restart postgresql.service
su - postgres
psql
\password postgres
xxxpgxxx
Connect to PostgreSQL:
sudo -u postgres psql
If you are not using the Cloudera Manager installer, create a database for the Cloudera Manager Server. The database name, user name, and password can be any value. Record the names chosen because you will need them later when running the scm_prepare_database.sh script.
CREATE ROLE scm LOGIN PASSWORD 'scm';
CREATE DATABA
由于单台redis服务器的计算和内存管理能力有限,使用过大内存redis服务器的性能急剧下降。为了获取更好的缓存性能及扩展型,我们需要搭建redis集群来满足需求。因redis 3.0 beta支持的集群功能不适合生产环境的使用,所以我们采用twitter的twemproxy来搭建redis缓存服务器集群.
Twemproxy是memcached和redis协议的代理服务器,并能有效减少大量连接对redis服务器的性能影响.
安装步骤:
推荐版本2.8及以上
修改端口(可在启动时指定)
port 6379
采用纯内存模式,注释掉save指令.
#save 900 1 #save 300 10 #save 60 10000 #save 900 1000
调整内存大小
maxmemory 8g
设置密码(可在启动时指定)
requirepass foobared
redis-server ../conf/masters/redis.conf --logfile ../logs/masters/master-01.log --requirepass 'stream!23$' --port 6301
推荐使用 0.4.1 release
修改监听端口
listen: 0.0.0.0:6401
禁用自动剔除,保持hash一致性
auto_eject_hosts: false
设置redis超时
timeout: 2000 redis: true
设置redis密码
redis_auth: stream!23$
配置redis服务地址(集群中所有redis都要添加上)
servers: - 10.221.247.5:6301:1 server01 - 10.221.247.5:6302:1 server02 - 10.221.247.5:6303:1 server03 - 10.221.247.5:6304:1 server04 - 10.221.247.5:6305:1 server05 - 10.221.247.5:6306:1 server06 - 10.221.247.5:6307:1 server07 - 10.221.247.5
curl -O https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-3.2.9.tgz
tar -zxvf mongodb-linux-x86_64-3.2.9.tgz
mkdir -p ~/mongodb-3.2.9
mv mongodb-linux-x86_64-3.2.9 ~/mongodb-3.2.9
export PATH=<mongodb-install-directory>/bin:$PATH
Before you start MongoDB for the first time, create the directory to which the mongod process will write data.
By default, the mongod process uses the /data/db directory.
If you create a directory other than this one, you must specify that directory in the dbpath option when starting the mongod process later in this procedure.
mkdir -p /data/mongodb
https://github.com/eleme/corvus/archive/0.2.5.1.zip
unzip corvus-0.2.5.1
https://github.com/jemalloc/jemalloc/archive/4.5.0.tar.gz
tar zxvf jemalloc-4.5.0.tar.gz
rm -r corvus-0.2.5.1/deps/jemalloc
mv jemalloc-4.5.0 corvus-0.2.5.1/deps/jemalloc
cd corvus-0.2.5.1/deps/jemalloc
autoconf
cd ../../
make
bind 5101
node 192.168.1.202:5001,192.168.1.202:5002,192.168.1.203:5001,192.168.1.203:5002,192.168.1.204:5001,192.168.1.202:5002
thread 4
/root/upload/corvus-0.2.5.1/src/corvus /root/upload/corvus-0.2.5.1/corvus.conf > corvus.log 2>&1 &
/root/upload/redis-3.2.8/src/redis-benchmark -p 5101 -q -t get,set -r 1000000 -n 2000000 -P 16 -c 10
Certbot is packaged in EPEL (Extra Packages for Enterprise Linux). To use Certbot, you must first enable the EPEL repository.
After doing this, you can install Certbot by running:
sudo yum install certbot
Certbot supports a number of different “plugins” that can be used to obtain and/or install certificates.
Since your server architecture doesn’t yet support automatic installation you should probably use the certonly command to obtain your certificate.
certbot certonly --webroot -w /var/www/example -d example.com -d www.example.com -w /var/www/thing -d thing.is -d m.thing.is
This command will obtain a single cert for example.com, www.example.com, thing.is, and m.thing.is; it will place files below /var/www/example to prove control of the first two domains, and under /var/www/thing for the second pair.
Currently it is possible to perform a DNS validation also with the certbot LetsEncrypt client