Skip navigation
All People > Patrick-Dussault > Patrick Dussault's Blog > 2017 > March
2017

# mkdir /root/sandbox/samples
# export JBOSS_HOME=/opt/jboss-eap-6.4
# export EAP7_HOME=/opt/jboss-eap-6.4
# cd /root/sandbox/samples
# git clone https://github.com/jboss-developer/jboss-eap-quickstarts.git
# cd jboss-eap-quickstarts/
# ls
# git tag
# git checkout tags/6.4.0.GA

 

  (you need to create the next file. The next steps are to protect the kitchensink application)

 

# nano -w /root/sandbox/samples/jboss-eap-quickstarts/kitchensink-ear/web/src/main/webapp/WEB-INF/web.xml

 

(you need to create the next file)

 

 <web-app>
 <security-constraint>
        <display-name>Constraint1</display-name>
        <web-resource-collection>
                <web-resource-name>admin resource</web-resource-name>
                <description/>
                <url-pattern>/*</url-pattern>
                <http-method>GET</http-method>
                <http-method>POST</http-method>
        </web-resource-collection>
        <auth-constraint>
                <description/>
                <role-name>adminRole</role-name>
        </auth-constraint>
 </security-constraint>
 <security-role>
        <description/>
        <role-name>adminRole</role-name>
 </security-role>
 <login-config>
        <auth-method>BASIC</auth-method>
        <realm-name/>
 </login-config>
 </web-app>

 

 nano -w jboss-web.xml

 

(you need to create the next file)

 

# nano -w /root/sandbox/samples/jboss-eap-quickstarts/kitchensink-ear/web/src/main/webapp/WEB-INF/jboss-web.xml

 

 <jboss-web>
 <valve>
   <class-name>com.ca.soa.agent.appserver.authenticator.jboss.SMJBoss6BasicAuthenticator</class-name>
 </valve>
        <security-domain>java:/jaas/SiteMinderDomain</security-domain>
 </jboss-web>

 

# mvn install -s settings.xml -Dmaven.test.skip=true

 

Now you have the .ear ready to deploy in the JBoss server.

Fast Tracks to installof JBoss 6.4.0.GA with Java jdk1.8.0_92 on RedHat 6 64bit

 

# mv jboss-eap-6.4.0.zip /opt
# cd /opt
# unzip jboss-eap-6.4.0.zip
# cd /opt/jboss-eap-6.4/bin/
# cp -p standalone.conf standalone.conf.orig

 

Now to integrate with Agent for JBoss

 

# nano -w standalone.conf
  at the end of the file, add :

 

  # Agent for JBoss
  SOA_HOME=/opt/CA/JBossAgent
  export SOA_HOME

 

  JAVA_OPTS="$JAVA_OPTS -DNETE_TXM_ROOT=$SOA_HOME -DJAVA_AGENT_ROOT=$SOA_HOME -Dsmasa.home=$SOA_HOME -DSM_AGENT_LOGGING_EXTERNAL_CONFIG=true"

 

# export PATH=/opt/jdk1.8.0_92/jre/bin:${PATH}
# export JAVA_HOME=/opt/jdk1.8.0_92/jre
# ./standalone.sh

 

on your PC in a Dos console :

 

start /B iexplore "http://mymachine.mydomain.com:8888/"

 

You should see in the browser :

 

Your Red Hat JBoss Enterprise Application Platform is running.

 # unzip jboss-eap-5.1.0-GA.zip -d /usr/java/
 # ln -s /usr/java/jboss-eap-5.1 /opt/java/jboss
 # nano -w /etc/profile.d/jboss.sh
   --
   #
   # Java
   #

 

   JBOSS_HOME=/opt/java/jboss
   PATH=$PATH:$JBOSS_HOME/bin

 

   export JBOSS_HOME PATH
   --
   # chmod 755 /etc/profile.d/jboss.sh
   # useradd -m -d /opt/java/jboss jboss
   # chown -Rf jboss.jboss /opt/java/jboss
   # su - jboss
 
   bash-3.2$ /opt/java/jboss/bin/run.sh -b 0.0.0.0
 
     Open a browser on your PC and type :
 
     http://host.domain.com:8080/
 
     You should get the RedHat Jboss page.

# unzip oracle-xe-11.2.0-1.0.x86_64.rpm.zip
# rpm -Uvh Disk1/oracle-xe-11.2.0-1.0.x86_64.rpm
#

 

oracle install

 

# /etc/init.d/oracle-xe configure
# Specify the HTTP port that will be used for Oracle Application Express [8080]: 8181
# Specify a port that will be used for the database listener [1521]:
# Specify a password to be used for database accounts.  Note that the same
  password will be used for SYS and SYSTEM.  Oracle recommends the use of
  different passwords for each database account.  This can be done after
  initial configuration:password
  Confirm the password:password
# Do you want Oracle Database 11g Express Edition to be started on boot (y/n) [y]:y

 

  Starting Oracle Net Listener...Done
  Configuring database...Done
  Starting Oracle Database 11g Express Edition instance...Done
  Installation completed successfully.

 

# source /u01/app/oracle/product/11.2.0/xe/bin/oracle_env.sh
# sqlplus system

 

  SQL*Plus: Release 11.2.0.2.0 Production on Wed Mar 15 04:42:55 2017

 

  Copyright (c) 1982, 2011, Oracle.  All rights reserved.

 

  Enter password: password

 

  Connected to:
  Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production

 

  SQL> EXEC DBMS_XDB.SETLISTENERLOCALACCESS(FALSE);

 

  PL/SQL procedure successfully completed.

 

  SQL>

 

NOTES to create tablespace :
-----

 

SELECT TABLESPACE_NAME, FILE_NAME FROM DBA_DATA_FILES ORDER BY TABLESPACE_NAME;
CREATE SMALLFILE TABLESPACE "PSTORE" DATAFILE 'C:\APP\ORACLE\ORADATA\PSTORE\DATAFILE\my_data01.dbf' SIZE 100M AUTOEXTEND ON NEXT 100M MAXSIZE 8G LOGGING DEFAULT NOCOMPRESS ONLINE EXTENT MANAGEMENT LOCAL AUTOALLOCATE SEGMENT SPACE MANAGEMENT AUTO;
alter user SMUSER  default tablespace PSTORE temporary tablespace temp;
grant connect, resource to SMUSER;

Here are the fast track to install and configure an Active Directory Server 2012 R2
in with a specific Windows Domain.

 

First of all, let's list the machine details :

 

      DNS Domain : training.com
      Machine host name : "MyMachine-3799"
      Active Directory Forest Domain : TRAINING
      machine IP : 192.168.1.2

 

Before installing the Active Directory service, if you run an antivirus, disable it. In my machine
I have the McAfee antivirus running. I'm disabling it that way :

 

    c:\> mvadm disable

 

After having done the installation you enable it again :

 

    c:\> mvadm enable

 

Install all available Microsoft Windows updates, so we don't run a bug on the pieces we want to
install :

 

    Click on "Control Panel"
    Click on "System and Security";
    Click on "Windows Update";
    Click on "Check for updates";
          install all availables update by clicking on "Install updates" if any;
    Click on "Restart now" to reboot the machine;

 

Install DNS server. I like to get this service and use this DNS with the other trusted machines I use.

 

    c:\> mvadm disable

 

    Click on "Server Manager";
    Click on "Add roles and features";
    In "Before you begin" pane, click "Next";
    in "Select installation pane, select "Role-based or feature-based installation";
    Click "Next";
    In "Select destination server", make sure "Select a server from the server pool" and
       that the current machine is selected in "Server Pool" section.
    Click "Next";
    In "Select server roles", check "DNS Server";
    Click "Add Features";
    You can ignore the validation results if it has found that the IP isn't static. No matter. Click "Continue";
    Click "Next";
    Click "Next";
    Click "Next";
    Click "Install";

 

    When you see "Installation succeeded on " then click on "Close";

 

Configure the DNS for the Domain we will use for Active Directory :

 

    Click Start > Administrative Tools;
    Double click on "DNS";
    Expand the "MyMachine-3799" on the left menu;
    Right-click on "Forward Lookup Zones" and select "New Zone...";
    Click "Next";
    Select "Primary zone";
    Click "Next";
    In "Zone name:", write "training.com";
    Click "Next";
    Click "Next";
    Select "Allow both nonsecure and secure dynamic updates";
    Click "Next";
    Click "Finish";

 

Add the current machine resolution in the domain training.com
    
    Click Start > Administrative Tools;
    Double click on "DNS";
    Expand the "MyMachine-3799" on the left menu;
    Click on "Forward Lookup Zones";
    Right-click on "training.com" and select "New Host (A or AAAA)...";
    In "Name", writes "MyMachine-3799";
    In "IP_address:" writes "192.168.1.2";
    Click "Add Host";
    Click "OK";
    Click "Done";

 

    Right-click on "Reverse Lookup Zones";
    Select the "New Zone...";
    Click "Next";
    Select "Primary zone";
    Click "Next";
    Select "IPV4 Reverse Lookup Zone";
    Click "Next";
    Select "Network ID:"
           In the field, writes "192.168.1"
    Click "Next";
    Click "Next";    
    Select "Allow both nonsecure and secure dynamic    updates";
    Click "Next";        
    Click "Finish";

 

    Click on "Forward Lookup Zones";
    Click on "training.com"
    Right-click on "MyMachine-3799" and select "Properties";
    Check "Update associated pointer (PTR) record";
    Click "Apply";
    Click "OK";

 

Install Active Directory

 

    c:\> mvadm disable
    Click Start > Administrative Tools;
    Double click on "Service";
    Right-click Remote Registry and open the "Properties" menu;
    From the *Startup type:" drop-down menu, select "Automatic".
    Under "Service Status", select "Start";

 

    The remote registry service will start.

 

Install then the Active Directory :

 

  Click on "Server Manager";

 

  Click on "Add roles and features";
  In "Before you begin" pane, click "Next";
   in "Select installation pane, select "Role-based or feature-based installation";
  Click "Next";
  In "Select destination server", make sure "Select a server from the server pool" and
   that the current machine is selected in "Server Pool" section.
  Click "Next";
  In "Select server roles", check "Active Directory Domain Services";
  Click "Add Features";
  Click "Next";
  Click "Next";
  Click "Next";
  Click "Install";

 

  When you see the message "Configuration required. Installation succeeded on " then restart the
  machine.

 

  Click "Close";

 

Finally, configure the Active Directory using the Active Directory Domain Services Configuration Wizard :

 

  Click on "Server Manager";

 

  Open the "Notifications" pane by selecting the "Notifications" icon from the
   top of the Server Manager. From the notification regarding configuring AD DS,
   click "Promote this server to a domain controller";
  Select "Add a new forest"
  In "Root domain name" writes "training.com"
  Click Next;
  In "Forest functional level" select "Windows Server 2012 R2"
  In "Domain functional level" select "Windows Server 2012 R2"
  In "Specify domain controller capabilities", select "Domain Name System (DNS) server" and "Global Catalog (GC)"
  In "Type the Directory Service Restore Mode (DSRM) password, type for "Password" : mypassword, and for "Confirm password" : mypassword
  Click Next;
  In DNS Option pane, Click "Next";
  In "Additional Option", verify that you have filled in "The NetBIOS domain name" "TRAINING", Click "Next";
  In "Paths", Click "Next";
  In "Review Options" Click "Next";
  In "Prerequisites Check" Click "Install";

 

  After the installation, the reboot the machine.

 

Login to the machine with TRAINING\administrator or TRAINING.COM\administrator and the password of the machine that you have for this user before installing the Active Directory.
Note that the password you gave during the configuration of the Active Directory is only if you run the machine in "Restore Mode". This password doesn't replace the administrator password.