<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Omiiz Voice</title>
    <description>The latest articles on DEV Community by Omiiz Voice (@theomkarauti).</description>
    <link>https://dev.to/theomkarauti</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2039812%2F058dad6a-8a84-4196-8fbf-7793768c791b.png</url>
      <title>DEV Community: Omiiz Voice</title>
      <link>https://dev.to/theomkarauti</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/theomkarauti"/>
    <language>en</language>
    <item>
      <title>Apache Active MQ</title>
      <dc:creator>Omiiz Voice</dc:creator>
      <pubDate>Thu, 12 Sep 2024 07:28:09 +0000</pubDate>
      <link>https://dev.to/theomkarauti/apache-active-mq-f3b</link>
      <guid>https://dev.to/theomkarauti/apache-active-mq-f3b</guid>
      <description>&lt;p&gt;ActiveMQ and Tomcat Setup&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Launch Instance with Volumes&lt;/li&gt;
&lt;li&gt;Launch an EC2 instance with two EBS volumes.&lt;/li&gt;
&lt;li&gt;Mount the secondary volume to &lt;code&gt;/opt&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Install ActiveMQ and mysql-connector&lt;/li&gt;
&lt;li&gt;Download the ActiveMQ package from the official website:
wget &lt;a href="https://www.apache.org/dyn/closer.cgi?filename=/activemq/6.1.3/apache-activemq-6.1.3-bin.tar.gz&amp;amp;action=download" rel="noopener noreferrer"&gt;https://www.apache.org/dyn/closer.cgi?filename=/activemq/6.1.3/apache-activemq-6.1.3-bin.tar.gz&amp;amp;action=download&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;Extract the tar file into the &lt;code&gt;/opt&lt;/code&gt; directory:
tar -xzf apache-activemq-6.1.3-bin.tar.gz -C /opt&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Download the mysql-connector and extract it.
wget &lt;a href="https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-j-9.0.0.tar.gz" rel="noopener noreferrer"&gt;https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-j-9.0.0.tar.gz&lt;/a&gt;
tar -xzvf mysql-connector-j-9.0.0.tar.gz&lt;/li&gt;
&lt;li&gt;Configure ActiveMQ&lt;/li&gt;
&lt;li&gt;Update the ActiveMQ configuration file:
vim /opt/apache-activemq-6.1.3/conf/activemq.xml

&lt;ul&gt;
&lt;li&gt;Modify the following:
• Change the broker name 

• Change the PersistenceAdapter block with jdbc to use mysql as its database.


  
      
  


• Remove all the transportConnector expect the openwire.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;br&gt;
      &lt;br&gt;
  &lt;br&gt;
• Add this lines at the end of file before &lt;br&gt;
  &lt;br&gt;
      &lt;br&gt;
      &lt;br&gt;
      &lt;br&gt;
      &lt;br&gt;
      &lt;br&gt;
      &lt;br&gt;
      &lt;br&gt;
  &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Update Jetty Configuration

&lt;ul&gt;
&lt;li&gt;Edit the Jetty configuration file and modify the host as follows:
vim /opt/apache-activemq-6.1.3/conf/jetty.xml&lt;/li&gt;
&lt;li&gt;Change the line:
&lt;/li&gt;
&lt;li&gt;Create ActiveMQ Service&lt;/li&gt;
&lt;li&gt;Create a systemd service file for ActiveMQ:
vim /etc/systemd/system/activemq.service&lt;/li&gt;
&lt;li&gt;Content of the service file:
[Unit]
Description=Apache ActiveMQ Message Broker
After=network-online.target&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;[Service]&lt;br&gt;
  Type=forking&lt;br&gt;
  User=activemq&lt;br&gt;
  Group=activemq&lt;br&gt;
  WorkingDirectory=/opt/apache-activemq-6.1.3/bin&lt;br&gt;
  ExecStart=/opt/apache-activemq-6.1.3/bin/activemq start&lt;br&gt;
  ExecStop=/opt/apache-activemq-6.1.3/bin/activemq stop&lt;br&gt;
  Restart=on-abort&lt;/p&gt;

&lt;p&gt;[Install]&lt;br&gt;
  WantedBy=multi-user.target&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Enable and start the ActiveMQ service:
systemctl enable activemq.service
systemctl start activemq.service

&lt;ol&gt;
&lt;li&gt;Install Java &lt;/li&gt;
&lt;li&gt;Install Java 22 and Java 8:
yum install java java-1.8.0 -y&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Create a symbolic link for Java 8:
ln -s /usr/lib/jvm/java-1.8.0-amazon-corretto.aarch64/jre/bin/java /usr/bin/java8

&lt;ol&gt;
&lt;li&gt;Install Tomcat 9&lt;/li&gt;
&lt;li&gt;Download Tomcat 9 from the official website:
wget &lt;a href="https://dlcdn.apache.org/tomcat/tomcat-9/v9.0.93/bin/apache-tomcat-9.0.93.tar.gz" rel="noopener noreferrer"&gt;https://dlcdn.apache.org/tomcat/tomcat-9/v9.0.93/bin/apache-tomcat-9.0.93.tar.gz&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Extract the tar file into the &lt;code&gt;/opt&lt;/code&gt; directory:
tar -xzf apache-tomcat-9.0.93.tar.gz -C /opt

&lt;ul&gt;
&lt;li&gt;Rename the extracted directory:
mv /opt/apache-tomcat-9.0.93 /opt/notification_tomcat&lt;/li&gt;
&lt;li&gt;Configure Tomcat&lt;/li&gt;
&lt;li&gt;Edit the &lt;code&gt;catalina.sh&lt;/code&gt; file:
vim /opt/notification_tomcat/bin/catalina.sh&lt;/li&gt;
&lt;li&gt;Add the following configuration:
JAVA_HOME="/usr/lib/jvm/java-1.8.0-amazon-corretto.aarch64/jre/"
CATALINA_OPTS="-Xmx512m -Xss256m -Xms256m -XX:PermSize=256m -XX:MaxPermSize=512m -XX:NewSize=128m"
JAVA_OPTS="$JVM_OPTS -Dproperties.filepath=$CATALINA_BASE/conf/learningPlatform.properties -Dexclusion.properties=$CATALINA_BASE/conf/exclusion.properties"
CATALINA_OPTS="$CATALINA_OPTS -Dinstance_base=$CATALINA_BASE -Dfile.encoding=UTF-8"&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Clean Up Tomcat

&lt;ul&gt;
&lt;li&gt;Delete the existing files from the &lt;code&gt;webapps&lt;/code&gt; directory:
rm -rf /opt/notification_tomcat/webapps/*&lt;/li&gt;
&lt;li&gt;Migrate Application&lt;/li&gt;
&lt;li&gt;Copy the &lt;code&gt;notification-consumer&lt;/code&gt; directory from the old server to the new server's &lt;code&gt;webapps&lt;/code&gt; directory.&lt;/li&gt;
&lt;li&gt;Update Configuration Files&lt;/li&gt;
&lt;li&gt;Add the &lt;code&gt;learningPlatform.properties&lt;/code&gt; and &lt;code&gt;exclusion.properties&lt;/code&gt; files in the &lt;code&gt;conf&lt;/code&gt; directory:
vim /opt/notification_tomcat/conf/learningPlatform.properties
#Notification Consumer will connect to the below ActiveMQ
notification.broker.url=failover:(tcp://test-activemq1.loudcloudsystems.com:61612,tcp://test-activemq2.loudcloudsystems.com:61612)?initialReconnectDelay=100&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;vim /opt/notification_tomcat/conf/exclusion.properties&lt;/p&gt;

&lt;p&gt;to=@gail.com,&lt;a class="mentioned-user" href="https://dev.to/fake"&gt;@fake&lt;/a&gt;.com,@v.l,&lt;a class="mentioned-user" href="https://dev.to/qq"&gt;@qq&lt;/a&gt;.com&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create Tomcat Service&lt;/li&gt;
&lt;li&gt;Create a systemd service file for Tomcat:
vim /etc/systemd/system/tc_notification.service

&lt;ul&gt;
&lt;li&gt;Content of the service file:
[Unit]
Description=Apache Tomcat 9 Web Application Server
After=network.target&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;[Service]&lt;br&gt;
  Type=forking&lt;br&gt;
  Environment="JAVA_HOME=/usr/bin/java8"&lt;br&gt;
  Environment="CATALINA_PID=/opt/notification_tomcat/temp/tomcat.pid"&lt;br&gt;
  Environment="CATALINA_HOME=/opt/notification_tomcat"&lt;br&gt;
  Environment="CATALINA_OPTS=-Xms512M -Xmx1024M -server -XX:+UseParallelGC"&lt;br&gt;
  ExecStart=/opt/notification_tomcat/bin/startup.sh&lt;br&gt;
  ExecStop=/opt/notification_tomcat/bin/shutdown.sh&lt;br&gt;
  User=root&lt;br&gt;
  Group=root&lt;br&gt;
  RestartSec=10&lt;br&gt;
  Restart=always&lt;/p&gt;

&lt;p&gt;[Install]&lt;br&gt;
  WantedBy=multi-user.target&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Enable and start the Tomcat service:
systemctl enable tc_notification.service
systemctl start tc_notification.service&lt;/li&gt;
&lt;li&gt;Verify Setup

&lt;ul&gt;
&lt;li&gt;Once both services are active, verify the ActiveMQ setup by accessing the web interface:
http://:8161&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>Docker Basic Commands</title>
      <dc:creator>Omiiz Voice</dc:creator>
      <pubDate>Mon, 09 Sep 2024 12:24:44 +0000</pubDate>
      <link>https://dev.to/theomkarauti/docker-basic-commands-1n13</link>
      <guid>https://dev.to/theomkarauti/docker-basic-commands-1n13</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuh00ve6uppfixbgdm1ml.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuh00ve6uppfixbgdm1ml.png" alt="Image description" width="800" height="949"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fundsaftklomdyz6jaltf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fundsaftklomdyz6jaltf.png" alt="Image description" width="800" height="528"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Java Installation on different OS.</title>
      <dc:creator>Omiiz Voice</dc:creator>
      <pubDate>Sat, 07 Sep 2024 14:52:16 +0000</pubDate>
      <link>https://dev.to/theomkarauti/java-installation-on-different-os-6ec</link>
      <guid>https://dev.to/theomkarauti/java-installation-on-different-os-6ec</guid>
      <description>&lt;p&gt;&lt;strong&gt;Amazon Linux:&lt;/strong&gt;&lt;br&gt;
   yum install java java-1.8.0 -y&lt;br&gt;
   yum install java-22-amazon-corretto.aarch64 -y&lt;/p&gt;

&lt;p&gt;sudo dnf install java-17-amazon-corretto&lt;br&gt;
   sudo dnf install java-17-amazon-corretto-devel&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Ubuntu:&lt;/strong&gt;&lt;br&gt;
   sudo apt install fontconfig openjdk-17-jre&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
