¿ù°£ Àα⠰Խù°

°Ô½Ã¹° 708°Ç
   
How to install and setup Monasca - 1
±Û¾´ÀÌ : ÃÖ°í°ü¸®ÀÚ ³¯Â¥ : 2015-07-02 (¸ñ) 15:14 Á¶È¸ : 5245
                                
http://blog.zhaw.ch/icclab/how-to-install-and-setup-monasca-1-3/

How to install and setup Monasca - 1
:: MYSQL ½ºÅ°¸¶ ´Ù¿î·Îµå
# wget https://raw.githubusercontent.com/stackforge/cookbook-monasca-schema/master/files/default/mysql/mon.sql

# mysql -uroot -p < mon.sql 
Enter password: xxxxxxxxxx
# rm -rf mon.sql

# apt-get install zookeeper zookeeperd zookeeper-bin
service zookeeper start
# apt-get install -y scala
# wget http://mirror.switch.ch/mirror/apache/dist/kafka/0.8.1.1/kafka_2.9.2-0.8.1.1.tgz
tar xvf kafka_2.9.2-0.8.1.1.tgz
kafka_2.9.2-0.8.1.1 kafka
rm kafka_2.9.2-0.8.1.1.tgz


# sed -i.bak 's/#host.name=localhost/host.name=monasca/g' kafka/config/server.properties
# sed -i.bak 's/zookeeper.connect=localhost:2181/zookeeper.connect=monasca:2181/g' kafka/config/server.properties
# nohup ./kafka/bin/kafka-server-start.sh ./kafka/config/server.properties &

# ./kafka/bin/kafka-topics.sh --create --topic metrics --partitions 4 --zookeeper monasca:2181 --replication-factor 1
Created topic "metrics".
# ./kafka/bin/kafka-topics.sh --create --topic events --partitions 4 --zookeeper monasca:2181 --replication-factor 1
Created topic "events".
# ./kafka/bin/kafka-topics.sh --create --topic raw-events --partitions 4 --zookeeper monasca:2181 --replication-factor 1
Created topic "raw-events".
# ./kafka/bin/kafka-topics.sh --create --topic transformed-events --partitions 4 --zookeeper monasca:2181 --replication-factor 1
Created topic "transformed-events".
# ./kafka/bin/kafka-topics.sh --create --topic alarm-state-transitions --partitions 4 --zookeeper monasca:2181 --replication-factor 1
Created topic "alarm-state-transitions".
# ./kafka/bin/kafka-topics.sh --create --topic alarm-notifications --partitions 4 --zookeeper monasca:2181 --replication-factor 1
Created topic "alarm-notifications".
# ./kafka/bin/kafka-topics.sh --create --topic retry-notifications --partitions 4 --zookeeper monasca:2181 --replication-factor 1
Created topic "retry-notifications".


# debconf-set-selections <<< "postfix postfix/mailname string monasca"
# debconf-set-selections <<< "postfix postfix/main_mailer_type string 'Internet Site'"
# apt-get install -y postfix

# wget http://s3.amazonaws.com/influxdb/influxdb_latest_amd64.deb
# dpkg -i influxdb_latest_amd64.deb
# rm influxdb_latest_amd64.deb
  :: 2015-07-03ÀÏ ÇöÀç 0.9.0 ¹öÀüÀÌ ´Ù¿î·Îµå µÇ³ª...openstack ¿¬°áÇÏ°í ¹®Á¦°¡ À־.. 0.8.8 ¹öÀüÀ¸·Î ´Ù¿î·Îµå
wget https://s3.amazonaws.com/influxdb/influxdb_0.8.8_amd64.deb
# dpkg -i influxdb_0.8.8_amd64.deb
# rm influxdb_0.8.8_amd64.deb


# sed -i.bak 's/port = 8090/port = 9090/g' /opt/influxdb/shared/config.toml
# service influxdb restart
# netstat -anlp |grep influxd
tcp6       0      0 :::8083                 :::*                    LISTEN      17406/influxdb  
tcp6       0      0 :::8086                 :::*                    LISTEN      17406/influxdb  
tcp6       0      0 :::9090                 :::*                    LISTEN      17406/influxdb  
tcp6       0      0 :::8099                 :::*                    LISTEN      17406/influxdb  


# curl -X POST 'http://monasca:8086/db?u=root&p=root' -d '{"name": "mon"}'
# curl -X POST 'http://monasca:8086/db/mon/users?u=root&p=root' -d '{"name": "mon_api", "password": "password"}'
# curl -X POST 'http://monasca:8086/db/mon/users?u=root&p=root' -d '{"name": "mon_persister", "password": "password"}'

# apt-get install -y python-pip default-jre default-jdk maven
# wget http://mirror.switch.ch/mirror/apache/dist/storm/apache-storm-0.9.3/apache-storm-0.9.3.tar.gz
# tar xvf apache-storm-0.9.3.tar.gz
# rm apache-storm-0.9.3.tar.gz
# mkdir -p /opt/storm/
# mv apache-storm-0.9.3/ /opt/storm/
# mv /opt/storm/apache-storm-0.9.3/ /opt/storm/current

# sed -i.bak '/"nimbus"/a\
nimbus.host: "monasca"\
storm.zookeeper.servers:\
  - monasca\
\
ui.port: 60888' /opt/storm/current/conf/storm.yaml

# /opt/storm/current/bin/storm nimbus &
# /opt/storm/current/bin/storm supervisor &


À̸§ Æнº¿öµå
ºñ¹Ð±Û (üũÇÏ¸é ±Û¾´À̸¸ ³»¿ëÀ» È®ÀÎÇÒ ¼ö ÀÖ½À´Ï´Ù.)
¿ÞÂÊÀÇ ±ÛÀÚ¸¦ ÀÔ·ÂÇϼ¼¿ä.
   

 



 
»çÀÌÆ®¸í : ¸ðÁö¸®³× | ´ëÇ¥ : ÀÌ°æÇö | °³ÀÎÄ¿¹Â´ÏƼ : ·©Å°´åÄÄ ¿î¿µÃ¼Á¦(OS) | °æ±âµµ ¼º³²½Ã ºÐ´ç±¸ | ÀüÀÚ¿ìÆí : mojily°ñ¹ðÀÌchonnom.com Copyright ¨Ï www.chonnom.com www.kyunghyun.net www.mojily.net. All rights reserved.