- get LTS version from https://nodejs.org/en/download/ and install it
- you can check where node.js was installed with
which node
or check it's version withnode --version
- copy or create package.js to proper directory and run
npm install
there
brew install kafka
will install kafka (in my case it was in/usr/local/etc/kafka
)- go to kafka directory and start zookeeper server in background with proper log directory:
zookeeper-server-start zookeeper.properties > ~/zookeeper.log &
- check if it works correctly:
telnet localhost 2181
and thenruok
(which stands for "are you ok?"). service should reply "imok" and close telnet session note: if you're on High Sierra or higher you may be missing telnet. simply:brew install telnet
- start up our Kafka message broker:
kafka-server-start server.properties > ~/kafka_server.log &
--- testing if kafka is working fine --- - create test topic:
kafka-topics --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic test
- list topics:
kafka-topics --list --zookeeper localhost:2181
- start console producer and write some msgs:
kafka-console-producer --broker-list localhost:9092 --topic test
- in different terminal start consuming msgs:
kafka-console-consumer --bootstrap-server localhost:9092 --topic test --from-beginning
- download image from https://dev.mysql.com/downloads/mysql/ (btw, you do not need to sign-up)
- follow wizard to install and get temp. password, in my case it was - host: root@localhost, pwd: TzqA)a9BRD7P
- start mysql (you can use MySQL preference pane)
cd /usr/local/mysql/bin
./mysql -u root -p
and pass password you got during installation- create reset tmp pwd, create new user, pwd and db:
ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass';
GRANT ALL PRIVILEGES ON *.* TO 'slaw'@'localhost' IDENTIFIED BY 'slaw123';
\q
to exit and./mysql -u slaw -p
to enter client againCREATE DATABASE call_center;
- run sql scripts with data:
mysql -u slaw -p call_center < '<path-to-script>/create_init_records.sql'
- also its useful to get better tool to interact with your db, I'm using e.g. dbvizualizer