21 Aralık 2017 Perşembe

ActiveMQ Artemis Installation on Debian 9

This is a base installation of ActiveMQ Artemis.
I am checking cluster and fail over configuration of Artemis. When it is ready I will share on my blog.

OpenJDK of Zulu For JAVA:

$sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0x219BD9C9
$sudo apt-add-repository 'deb http://repos.azulsystems.com/debian stable main'
$sudo apt-get update
$sudo apt-get install zulu-8

More about Zulu;
https://www.azul.com/

Artemis Installation :
$wget http://ftp.itu.edu.tr/Mirror/Apache/activemq/activemq-artemis/2.4.0/apache-artemis-2.4.0-bin.tar.gz
$ sudo tar -zxvf apache-artemis-2.4.0-bin.tar.gz -C /opt/
$cd /opt

The most commonly used artemis commands are:
    address     Address tools group (create|delete|update|show) (example ./artemis address create)
    browser     It will browse messages on an instance
    consumer    It will consume messages from an instance
    create      creates a new broker instance
    data        data tools group (print) (example ./artemis data print)
    help        Display help information
    mask        mask a password and print it out
    migrate1x   Migrates the configuration of a 1.x Artemis Broker
    producer    It will send messages to an instance
    queue       Queue tools group (create|delete|update|stat) (example ./artemis queue create)

sudo ./bin/artemis create /opt/broker-name
You can now start the broker by executing:

   "/opt/broker-name/bin/artemis" run

Or you can run the broker in the background using:

   "/opt/broker-name/bin/artemis-service" start

Base Configuration of Artemis:
If you want access the web-ui from any where ,you have to change as below of the "web bind" in the <broker>/etc/bootstrap.xml.

<web bind="http://0.0.0.0:8161" path="web">
       <app url="activemq-branding" war="activemq-branding.war"/>
       <app url="artemis-plugin" war="artemis-plugin.war"/>
       <app url="console" war="console.war"/>
   </web>
If you do not set the jolokia, you can not reach the stats of artemis.
Below configuration that is enough for your access..
Jolokia settings:
<broker>/etc/jolokia-access.xml

<allow-origin>*://<ipaddressorfqdnofartemis>*</allow-origin>

Create a Systemd File for Artemis:
$sudo nano /etc/systemd/system/artemis.service

#############################################
[Unit]
Description=Apache ActiveMQ Artemis
After=network-online.target

[Service]
Type=forking
WorkingDirectory=/opt/broker-name/bin
ExecStart=/opt/broker-name/bin/artemis-service start
ExecStop=/opt/broker-name/bin/artemis-service stop
Restart=on-abort
User=root
Group=root

[Install]
WantedBy=multi-user.target
################################################

$sudo systemctl daemon-reload

Now you can start via systemd as a be service of Artemis.
$sudo systemctl start artemis.service

You can reach the web admin panel:
http://ipaddressorfqdnofartemis:8161

28 Eylül 2017 Perşembe

PowerDNS Amazon Linux Installation

Standalone PowerDns & Poweradmin sqlite Installation notes;

Repository Configuration for Amazon Linux;


$ sudo curl -o /etc/yum.repos.d/powerdns-auth-40.repo https://repo.powerdns.com/repo-files/centos-auth-40.repo
$ sudo curl -o /etc/yum.repos.d/powerdns-rec-40.repo https://repo.powerdns.com/repo-files/centos-rec-40.repo
$ sudo vi /etc/yum.repos.d/powerdns-auth-40.repo
#baseurl=http://repo.powerdns.com/centos/$basearch/$releasever/auth-40
Replace  above to bottom url
baseurl=https://repo.powerdns.com/centos/x86_64/6Server/auth-40/
$ sudo vi /etc/yum.repos.d/powerdns-rec-40.repo
#baseurl=http://repo.powerdns.com/centos/$basearch/$releasever/rec-40
Replace  above to bottom url
baseurl=https://repo.powerdns.com/centos/x86_64/6Server/rec-40/
$sudo yum update

PowerDns Installation for Amazon Linux;

$sudo yum install pdns pdns-recursor pdns-tools pdns-backend-sqlite
$sudo mv /etc/pdns/pdns.conf /etc/pdns/pdns.conf.orig
$sudo mv /etc/pdns-recursor/recursor.conf /etc/pdns-recursor/recursor.conf.orig
$sudo vi /etc/pdns/pdns.conf
launch=gsqlite3
gsqlite3-database=/etc/pdns/pdns.sqlite3
allow-axfr-ips=0.0.0.0/0
disable-axfr=no
allow-recursion=0.0.0.0/0
recursor=127.0.0.1:5353

local-address=0.0.0.0
local-port=53

$sudo vi /etc/pdns-recursor/recursor.conf
local-address=127.0.0.1
local-port=5353
allow-from=0.0.0.0/0

$sudo sqlite3 /etc/pdns/pdns.sqlite3 < /usr/share/doc/pdns/schema.sqlite3.sql
$sudo chmod 0777 /etc/pdns/
$sudo chmod 0666 /etc/pdns/pdns.sqlite3
$sudo service pdns start
$sudo service pdns-recursor start

PowerAdmin Installation for Amazon Linux;

$sudo yum install httpd php php-pdo php-mcrypt
$ tar xvfz poweradmin-2.1.7.tgz
$sudo mv poweradmin-2.1.7 /var/www/html/poweradmin
$sudo chown -R apache:apache /var/www/html/poweradmin/
$sudo service httpd start

Installation will complete via web browser

Add to startup configuration;


$sudo chkconfig pdns on
$sudo chkconfig pdns-recursor on
$sudo chkconfig httpd on
$sudo chkconfig --list