一、配置本地yum源
1. 将iso文件mount到linux某个目录下,把iso文件拷贝的linux某个文件夹,使用命令:
1
|
mount
-o loop
/home/monitor/cdrom/rhel-server-6
.3-x86_64-dvd.iso
/mnt/cdrom
|
2. 在/etc/yum.repos.d目录cp一份rhel-iso.repo文件,将配置文件改成如下内容:
1
2
3
4
5
6
|
[rhel-iso]
name=rhel-iso
baseurl=
file
:
///mnt/cdrom
enabled=1
gpgcheck=1
gpgkey=
file
:
///mnt/cdrom/RPM-GPG-KEY-redhat-release
|
3. 使用命令:yum clean all和yum list,刷新出软件列表。
二、下载storm的安装包:storm-0.9.0.1.zip,Python-3.4.0a1.tgz,zeromq-4.0.3.tar.gz,jzmq-master.zip,所有的安装包最好到官网下载。
1.zeromq和jzmq依赖很多包,所以先把依赖包安装了,执行命令:
1
|
sudo
yum -y
install
gcc
gcc
-c++ automake autoconf libtool
make
libuuid-devel
|
2.先装zeromq,
1
2
3
4
5
6
7
|
#安装zeromq
tar
-zxvf zeromq-4.0.3.
tar
.gz
cd
zeromq-4.0.3
sudo
.
/configure
sudo
make
sudo
make
install
sudo
ldconfig
#更新LD_LIBRARY_PATH
|
3.再装jzmq ,使用jar -xvf jzmq-master.zip可以解压zip包,如果没有权限,执行chmod 755 ./autogen.sh,就行了。
1
2
3
4
5
6
7
|
#安装jzmq
sudo
unzip jzmq-master.zip
sudo
cd
jzmq-master
sudo
.
/autogen
.sh
sudo
.
/configure
sudo
make
sudo
make
install
|
4安装storm,
1
2
3
|
#安装storm
sudo
unzip storm-0.9.0.1.zip
sudo
cd
storm-0.9.0.1
|
将storm添加到系统环境变量:vi ~/.bashrc,然后追加如下内容:
1
2
|
export
STORM_HOME=
/home/xuer/storm-0
.9.0.1
export
PATH=$PATH:$STORM_HOME
/bin
|
执行命令:source ~/.bashrc
修改storm的配置文件:vi ./conf/storm.yaml,特别注意yaml文件的格式,注意“-”前后必须要有空格,内容如下:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
########### These MUST be filled in for a storm configuration
storm.zookeeper.servers:
- "host1"
# - "host2"
# - "192.168.0.88"
nimbus.host: "host1"
storm.zookeeper.port: 2181
storm.local.dir: "/home/xuer/apps/storm-0.9.0.1/data/"
supervisor.slots.ports:
- 6700
- 6701
- 6702
- 6703
- 6704
# storm.messaging.transport: "backtype.storm.messaging.netty.Context"
# storm.messaging.netty.server_worker_threads: 1
# storm.messaging.netty.client_worker_threads: 1
# storm.messaging.netty.buffer_size: 5242880
# storm.messaging.netty.max_retries: 100
# storm.messaging.netty.max_wait_ms: 1000
# storm.messaging.netty.min_wait_ms: 100
#
#
# ##### These may optionally be filled in:
#
## List of custom serializations
# topology.kryo.register:
# - org.mycompany.MyType
# - org.mycompany.MyType2: org.mycompany.MyType2Serializer
#
## List of custom kryo decorators
# topology.kryo.decorators:
# - org.mycompany.MyDecorator
#
## Locations of the drpc servers
# drpc.servers:
# - "server1"
# - "server2"
## Metrics Consumers
# topology.metrics.consumer.register:
# - class: "backtype.storm.metrics.LoggingMetricsConsumer"
# parallelism.hint: 1
# - class: "org.mycompany.MyMetricsConsumer"
# parallelism.hint: 1
# argument:
# - endpoint: "metrics-collector.mycompany.org"
|
三、问题汇总
1.no acceptable C compiler found,缺少c编译器
执行命令:sudo yum install gcc
2.unable to find a working C++ compiler,缺少c++编译器
执行命令:sudo yum install gcc-c++
3.提示缺uuid
执行命令:sudo yum install libuuid-devel
4.bash: unzip: command not found,缺少unzip
执行命令:sudo yum install unzip
5.could not find libtool is required to run autogen.sh,缺libtool
执行命令:sudo yum install libtool
8./make: command not found,没有安装make,先安装gcc,再安装make
执行命令:sudo yum install make