tibco api exchange joomla adapter installation...— installing and setting up apache http server,...

59
Adapter Code for TIBCO ® API Exchange and Joomla! Installation Software Release 2.3 September 2016

Upload: others

Post on 22-Jun-2020

9 views

Category:

Documents


0 download

TRANSCRIPT

  • Adapter Code for TIBCO® API Exchange and Joomla!InstallationSoftware Release 2.3September 2016

  • | iii

    Contents

    Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .vRelated Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vi

    Adapter Code for TIBCO® API Exchange and Joomla! Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . viOther Product Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vi

    Chapter 1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1Installation Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2Prerequisite Software for the Joomla Adapter Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

    Chapter 2 Linux Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5Overview of Installing Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6Preparing the Machine. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7Installing and Setting Up Apache HTTP Server. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

    Extracting the File Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8Installing Apache Portable Runtime (APR). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9Installing Apache Portable Runtime Utility Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9Downloading and Install PCRE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9Installing Apache HTTPD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

    Installing and Configuring MySQL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11Installing and Setting Up PHP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

    Downloading PHP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15Extracting the PHP Distribution Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15Installing PHP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15Copying and Editing Configuration Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16Configuring Apache to use PHP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16Validating PHP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17Configuring Firewall Rules for Apache . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18Starting Apache . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18Validating the Apache HTTP and PHP Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

    Installing PHPMyAdmin (Optional). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19Installing the Adapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

    Reviewing the README.txt File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20Editing the httpd.conf File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20Configuring Portal Engine in High Availability (HA) Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21Downloading the Distribution Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

    Copyright © 2016 TIBCO Software Inc. ALL RIGHTS RESERVED

  • iv | Contents

    Restarting Apache . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22Creating a Database for Portal Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

    Chapter 3 Windows Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25Windows Installation Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26Installing Required Software Using WAMP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

    Downloading the Required Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27Installing and Configuring MySQL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

    Starting MySQL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34Connecting to MySQL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

    Installing and Setting Up PHP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36Downloading PHP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36Extracting the Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36Installing PHP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36Configuring Apache to use PHP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37Starting Apache . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37Validating the Apache HTTP /PHP installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37Restarting Apache . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

    Installing the Adapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39Reviewing the README.txt File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39Downloading the Distribution Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39Performing Tasks to Ensure the Portal Is Accessible . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39Restarting Apache . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40Creating a Database for Portal Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

    Chapter 4 Setting Up Joomla . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41Configuring Joomla . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

    Validating the Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43Installing Cobalt Packages from the Adapter Code for TIBCO API Exchange and Joomla! Distribution . . . . . . . 45Setting up the Joomla! Mail Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46Post-Installation Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

    Stopping Apache . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48Importing the MySQL Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48Add Proxies in the httpd.conf File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49Uncommenting LoadModule Items in the httpd.conf File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50Restarting Apache . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50Specifying the ConfigUI for the API Manager Configuration and Email Templates . . . . . . . . . . . . . . . . . . . . 50Validating the Portal Installation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

    Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

    Copyright © 2016 TIBCO Software Inc. ALL RIGHTS RESERVED

  • | v

    Preface

    Adapter Code for TIBCO® API Exchange and Joomla! enables the creation of Joomla!-based API Developer Portals with TIBCO® API Exchange to provide a highly branded and customizable experience to application developers and API providers.

    Topics

    • Related Documentation

    Copyright © 2016 TIBCO Software Inc. ALL RIGHTS RESERVED.

  • vi | Related Documentation

    Related Documentation

    This section lists documentation resources you might find useful.

    Adapter Code for TIBCO® API Exchange and Joomla! DocumentationThe document set for Adapter Code for TIBCO API Exchange and Joomla! includes:

    • Adapter Code for TIBCO® API Exchange and Joomla! Installation

    • Adapter Code for TIBCO® API Exchange and Joomla! User's Guide

    • Adapter Code for TIBCO® API Exchange and Joomla! Administration

    • Release Notes for TIBCO® API Exchange and Joomla! 2.3.0

    Other Product DocumentationYou might find it useful to read the following documentation for other products:

    • TIBCO® API Exchange - See http://docs.tibco.com

    • Joomla! - See http://docs.joomla.org

    Copyright © 2016 TIBCO Software Inc. ALL RIGHTS RESERVED.

    http://docs.tibco.comhttp://docs.joomla.org

  • | 1

    Chapter 1 Overview

    This chapter provides information about installation modes and software requirements that you should be aware of before starting the installation.

    Topics

    • Installation Overview, page 2

    • Prerequisite Software for the Joomla Adapter Code, page 4

    The procedures described in this document are for a new installation of TIBCO API Exchange and Joomla!. If you are upgrading to Release 2.1.1 from Release 2.0.0, see “Migration and Compatibility” on page 6 of the TIBCO API Exchange and Joomla! Release Notes for upgrade instructions.

    Copyright © 2016 TIBCO Software Inc. ALL RIGHTS RESERVED

  • 2 | Chapter 1 Overview

    Installation Overview

    Installing the Adapter Code for TIBCO® API Exchange and Joomla! involves the following main steps:

    1. Installing prerequisite software (MySQL, Apache, PHP).

    See Prerequisite Software for the Joomla Adapter Code, page 4 for a description of the prerequisite software.

    See the following sections for instructions on installing the prerequisite software on Linux:

    — Installing and Setting Up Apache HTTP Server, page 8

    — Installing and Configuring MySQL, page 11

    — Installing and Setting Up PHP, page 15

    See Installing Required Software Using WAMP, page 27 for instructions on using WAMP to install prerequisite software.

    See the following sections for instructions on installing the prerequisite software packages individually on Windows:

    — Installing and Setting Up Apache HTTP Server, page 32

    — Installing and Configuring MySQL, page 34

    — Installing and Setting Up PHP, page 36

    2. Installing the Joomla! package.

    For instructions on installing Joomla! on Linux, see Installing the Adapter, page 20.

    For instructions on installing Joomla! on Windows using WAMP, see Installing Required Software Using WAMP, page 27.

    For instructions on installing Joomla! on Windows directly from the Adapter Code for TIBCO API Exchange and Joomla distribution, see Installing the Adapter, page 39.

    3. Configuring the Joomla! package.

    See Chapter 4, Setting Up Joomla for information on installing and configuring Joomla!

    4. Installing Cobalt packages (included).

    See Installing Cobalt Packages from the Adapter Code for TIBCO API Exchange and Joomla! Distribution, page 45 for information on installing Cobalt.

    There are three possible installation methods for the Adapter Code component:

    • Linux Installation

    Copyright © 2016 TIBCO Software Inc. ALL RIGHTS RESERVED

  • Installation Overview | 3

    • Windows Installation Using WAMP

    • Windows Installation without WAMP

    The basic procedure is the same for each method; however, the location of the installation directory for Joomla! will vary depending on which method you choose.

    Copyright © 2016 TIBCO Software Inc. ALL RIGHTS RESERVED

  • 4 | Chapter 1 Overview

    Prerequisite Software for the Joomla Adapter Code

    For general information on the technical requirements for Joomla, see the Joomla technical requirements page at:

    http://www.joomla.org/about-joomla/technical-requirements.html/

    Table 1 describes the required and optional software products and their purpose.

    Table 1 Prerequisites for Adapter Code for API Exchange and Joomla!

    Software DescriptionMySQL version 5.1 or higher Provides the database used by the Joomla application.

    Apache HTTP Server 2.4.x Required. Refer to the Joomla documentation for the supported versions.

    PHP version 5.5.4 or higher Required.

    Joomla 3.3.6 Joomla is provided with the Adapter Code for TIBCO API Exchange and Joomla! 2.1.1 distribution. The distribution is provided in a .zip file: the /joomla directory in the zip file contains the basic Joomla distribution (Joomla 3.3.0).

    Cobalt packages Install the Cobalt packages provided with the Adapter Code for TIBCO API Exchange and Joomla! distribution after you have installed Joomla.

    Copyright © 2016 TIBCO Software Inc. ALL RIGHTS RESERVED

  • | 5

    Chapter 2 Linux Installation

    You can install the Adapter Code for TIBCO API Exchange and Joomla!. Some prerequistite software is required if you are using a Linux system.

    Topics

    • Overview of Installing Linux, page 6

    • Preparing the Machine, page 7

    • Installing and Setting Up Apache HTTP Server, page 8

    • Installing and Configuring MySQL, page 11

    • Installing and Setting Up PHP, page 15

    • Installing PHPMyAdmin (Optional), page 19

    • Installing the Adapter, page 20

    • Creating a Database for Portal Data, page 23

    The procedures described in this chapter are for a new installation of TIBCO API Exchange and Joomla!. If you are upgrading to release 2.1.1 from release 2.0.0, see the “Migration and Compatibility” section in TIBCO API Exchange and Joomla! Release Notes for upgrade instructions.

    Copyright © 2016 TIBCO Software Inc. ALL RIGHTS RESERVED

  • 6 | Chapter 2 Linux Installation

    Overview of Installing Linux

    1. Installing prerequisite software (Apache, MySQL, PHP).

    See the following sections:

    — For instructions on installing Apache, see the Installing and Setting Up Apache HTTP server section.

    — For instructions on installing MySQL, see the Installing and Configuring MySQL section.

    — For instructions on installing PHP, see the Installing and Setting Up PHP section.

    2. Installing and configuring the Joomla! package.

    See the Installing the Adapter section.

    3. Configuring Joomla!

    See Setting Up Joomla for information on installing and configuring Joomla!

    4. Installing Cobalt packages (included).

    See Installing Cobalt Packages for information on installing the required Cobalt packages.

    Copyright © 2016 TIBCO Software Inc. ALL RIGHTS RESERVED

  • Preparing the Machine | 7

    Preparing the Machine

    To prepare the machine for installing Adapter Code for TIBCO API Exchange and Joomla! on Red Hat-based Linux systems, follow these instructions. You can adapt the instructions for other platforms as well.

    1. As root, update the machine:yum update

    2. Enter the following commands to install the required dependencies:yum install gcc libxml2-devel gcc-c++

    libicu-devel libxslt-devel

    bzip2 bzip2-devel libjpeg-devel

    libpng libpng-devel freetype

    freetype-devel curl curl-devel

    t1lib-devel unixODBC-devel

    3. Update machine limits.

    Here are some recommendations for /etc/security/limits.conf:

    * soft nofile 8192

    * hard nofile 65536

    * soft memlock unlimited

    * hard memlock unlimited

    * soft as unlimited

    * hard as unlimited

    * hard nproc 32768

    * soft nproc 32768

    Here are some recommendations for /etc/security/limits.d/90-nproc.conf:* soft nproc 32768

    root soft nproc unlimited

    4. If selinux is enabled, execute the following commands:setsebool -P httpd_can_sendmail=1

    setsebool -P httpd_can_network_connect=1

    5. Reboot the machine.

    Copyright © 2016 TIBCO Software Inc. ALL RIGHTS RESERVED

    http:///

  • 8 | Chapter 2 Linux Installation

    Installing and Setting Up Apache HTTP Server

    Download Apache HTTP server 2.4.x and required dependencies from the following location:

    http://httpd.apache.org/dist/httpd

    Download the files to the $APACHE_HOME directory.

    Click the following files:

    httpd-2.4.x.tar.gz

    httpd-2.4.x-deps.tar.gz

    Extracting the File Contents All instructions in this section are performed as a non-root user unless specified.

    1. Enter the following commands:

    gunzip httpd*.gz

    mkdir deps

    mv httpd*deps*.tar deps

    mkdir apache

    mv httpd*.tar apache

    cd apache

    2. Enter the following command:tar xvf httpd-2.4.x.tar

    (where x represents the Apache 2.4 version)

    3. Enter:

    cd deps

    tar xvf httpd*deps*.tar

    cd httpd-2.4.x

    (where x represents the Apache 2.4 version)

    Copyright © 2016 TIBCO Software Inc. ALL RIGHTS RESERVED

  • Installing and Setting Up Apache HTTP Server | 9

    Installing Apache Portable Runtime (APR)1. Enter the following commands:

    cd deps/httpd*/srclib

    2. Copy the apr and apr-util directories to the /srclib directory:cp apr -R /home/httpd/apache/httpd-2.4.x/srclib/

    (where x represents the Apache 2.4 version)cp apr-util/ -R /home/httpd/apache/httpd-2.4.x/srclib/

    (where x represents the Apache 2.4 version)cd /home/httpd/apache/

    ls

    3. Enter the following commands to install Apache runtime:

    ./configure --prefix=/opt/products/apache2

    make

    make install

    Installing Apache Portable Runtime Utility LibraryEnter the following commands:cd deps/httpd*/srclib/apr-util

    ./configure --prefix=/opt/products/apache2--with-apr=/opt/products/apache2

    make

    make install

    Downloading and Install PCREYou can download and install Perl Compatible Regular Expressions (PCRE).

    Downloading PCRE

    Download PCRE from the following location:

    http://sourceforge.net/projects/pcre/files/pcre/8.33/pcre-8.33.tar.gz

    Extracting the PCRE Contents

    Enter the following commands:gunzip pcre*.gz

    mkdir pcre

    Copyright © 2016 TIBCO Software Inc. ALL RIGHTS RESERVED

  • 10 | Chapter 2 Linux Installation

    mv pcre*.tar pcre

    cd pcre

    tar xvf pcre*.tar

    Installing PCRE

    Enter the following commands:cd pcre*

    ./configure --prefix=/opt/products/apache2

    make

    make install

    Installing Apache HTTPDEnter the following commands:cd $APACHE_HOME/httpd*

    ./configure --prefix=/opt/products/apache2

    --with-apr=/opt/products/apache2

    --with-apr-util=/opt/products/apache2

    --with-pcre=/opt/products/apache2

    --with-ldap --enable-so --enable-auth-digest

    --enable-authz_owner --enable-log_config

    --enable-logio --enable-ext_filter

    --enable-mime_magic --enable-expires

    --enable-deflate --enable-headers

    --enable-usertrack --enable-dav

    --enable-info --enable-vhost_alias

    --enable-speling --enable-substitute

    --enable-rewrite --enable-proxy

    --enable-proxy_balancer --enable-proxy_ftp

    --enable-proxy_http --enable-proxy_ajp

    --enable-proxy_connect --enable-cache

    --enable-version

    make

    make install

    Copyright © 2016 TIBCO Software Inc. ALL RIGHTS RESERVED

  • Installing and Configuring MySQL | 11

    Installing and Configuring MySQL

    You can install and configure MySQL. Supported databases listed in the readme can be used as an alternative.

    Installing MySQL on Linux

    1. Download MySQL from http://dev.mysql.com/downloads/.

    2. To install MySQL 7.3.6, enter the following commands:tar xvf MySQL-Cluster-gpl-7.3.6-2.rhel5.i386.rpm-bundle.tar

    rpm -ivh *.rpm

    During SQL installation, you can see a message indicating that a random password has been set:A RANDOM PASSWORD HAS BEEN SET FOR THE MySQL root USER !You will find that password in '/root/.mysql_secret'.My password:

    3. Make a note of this password. You must enter this password the first time that you connect to MySQL.

    4. To verify that MySQL installed correctly:

    a. Enter the following command:mysql --version

    If MySQL installed correctly, a message similar to the following appears:mysql Ver 14.14 Distrib 5.6.19-ndb-7.3.6, for Linux (i686) using EditLine wrapper

    b. Go to the /usr/bin directory and verify that SQL files are installed.

    Starting MySQL

    Before starting MySQL, make a note of the random password generated during installation. The only command allowed the first time you connect to a just installed MySQL database is ‘SET PASSWORD’.

    Y The rpm-bundle.tar version installs both the MySQL server and the MYSQL client.

    If If there is not enough memory to install all of the RPM packages contained in the installation bundle, you can install the server and client packages separately.

    Copyright © 2016 TIBCO Software Inc. ALL RIGHTS RESERVED

    http://dev.mysql.com/downloads/

  • 12 | Chapter 2 Linux Installation

    To retrieve the password:

    To retrieve the password (on Linux), enter the following command:cat /root/.mysql_secret

    The cat command returns the password, for example:# The random password set for the root user at Thu Sep 26 15:44:18 2013 (local time): IfXu2QTP

    To run the start command:

    Enter the following command:service mysql start

    The following message appears:Starting MySQL..

    Connecting to MySQL

    1. Enter the following command:mysql –uroot -p

    2. When prompted for password enter the password retrieved from /root/.mysql_secret.

    Setting a New MySQL Password

    Enter the following commands:SET PASSWORD FOR 'root'@'localhost' = PASSWORD('tibco@123');exit

    Setting MySQL to Autostart on Reboot

    Enter the following commands:chkconfig mysql --level 2345 on

    Securing the MySQL Instance

    Enter the following command:mysql_secure_installation

    There is no need to set a new password for root unless you want to.

    Running mysql_secure_installation brings up an interactive configuration. The following example shows the output from the command.

    Example Output for the mysql_secure_installation Script

    Copyright © 2016 TIBCO Software Inc. ALL RIGHTS RESERVED

  • Installing and Configuring MySQL | 13

    In order to log into MySQL to secure it, we'll need the current

    password for the root user. If you've just installed MySQL, andyou haven't set the root password yet, the password will be blank,so you should just press enter here.

    Enter current password for root (enter for none): (Press Enter)

    OK, successfully used password, moving on...

    Setting the root password ensures that nobody can log into the MySQL root user without the proper authorisation.

    You already have a root password set, so you can safely answer 'n'.

    Change the root password? [Y/n] (Enter n) ... skipping.

    By default, a MySQL installation has an anonymous user, allowing anyone to log into MySQL without having to have a user account created for them. This is intended only for testing, and to make the installation go a bit smoother. You should remove them before moving into a production environment.

    Remove anonymous users? [Y/n] (Enter y) ... Success!

    Normally, root should only be allowed to connect from 'localhost'. This ensures that someone cannot guess at the root password from the network.

    Disallow root login remotely? [Y/n] (Press Enter) ... Success!

    By default, MySQL comes with a database named 'test' that anyone can access. This is also intended only for testing, and should be removed before moving into a production environment.

    Remove test database and access to it? [Y/n] (Press Enter) - Dropping test database... - Removing privileges on test database... ... Success!

    Reloading the privilege tables will ensure that all changes made so farwill take effect immediately.

    Reload privilege tables now? [Y/n] (Press Enter) ... Success!

    All done! If you've completed all of the above steps, your MySQLinstallation should now be secure.

    Thanks for using MySQL!

    Running all parts of this recommended for all MySQL servers in production use. Please read each step carefully.

    Copyright © 2016 TIBCO Software Inc. ALL RIGHTS RESERVED

  • 14 | Chapter 2 Linux Installation

    Allowing Access to the MySQL Instance from Outside

    Create a superadmin user who can access the MySQL instance from outside. Access as ‘root’ is allowed only from ‘localhost.’

    To allow outside access to the MySQL instance, run the following command and enter a password when prompted:mysql -u root -p

    CREATE USER 'superadmin'@'%' IDENTIFIED BY 'asg$uper@dmin';

    GRANT ALL ON *.* TO 'superadmin'@'%' WITH GRANT OPTION;

    Enabling Access to MySQL Through a Firewall

    If a firewall is enabled, allow access to MySQL instance by opening the port, as shown in the following command example:iptables -I INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPTservice iptables saveservice iptables restart

    To Restart MySQL

    Enter the following command:service mysql restart

    Use any SQL client to validate that the superadmin user can connect to the remote MySQL instance.

    Copyright © 2016 TIBCO Software Inc. ALL RIGHTS RESERVED

  • Installing and Setting Up PHP | 15

    Installing and Setting Up PHP

    You can install and configure for PHP.

    Downloading PHP Download PHP from the following location:http://us2.php.net/downloads.php

    Extracting the PHP Distribution ContentsEnter the following commands:gunzip php*.gz

    mkdir php

    mv php*.tar php

    cd php

    tar xvf php-5.4.32

    cd php-5.4.32

    Installing PHPEnter the following commands:cd php*

    ./configure --prefix /opt/products/php5

    --with-config-file-path=/opt/products/apache2/conf

    --with-apxs2=/opt/products/apache2/bin/apxs

    --with-kerberos --with-unixODBC=/usr

    --with-gd --with-jpeg-dir --with-png-dir

    --with-freetype-dir --with-t1lib

    --enable-gd-native-ttf --with-bz2

    --enable-calendar --with-mysql --enable-intl

    --enable-mbstring --with-mysqli --enable-soap

    --enable-zip --with-xsl --with-zlib --with-xmlrpc

    --with-curl --enable-ftp --enable-sysvsem

    --enable-sysvshm --enable-shmop --enable-xslt

    --enable-mailparse --with-libdir=lib64

    --enable-xlst

    make

    make install

    Copyright © 2016 TIBCO Software Inc. ALL RIGHTS RESERVED

  • 16 | Chapter 2 Linux Installation

    Copying and Editing Configuration Files1. Enter the following commands to copy the configuration files:

    cp php.ini-production /opt/products/php5

    cd $PHP_HOME

    cp php.ini-production php.ini

    2. Edit the php.ini file and add the following line:magic_quotes_gpc=Off

    3. Locate the line that reads upload_max_filesize = xx.

    4. Change the default value from 2M to 32M (32 MB). The line should read:upload_max_filesize = 32M

    5. Increase max_input_users from 1000 to 5000. The line should read: max_input_vars=5000

    6. Save the php.ini file.

    Configuring Apache to use PHP1. Go to the /opt/products/apache2/conf/ directory.

    2. Edit the httpd.conf file. For example:vi /opt/products/apache2/conf/httpd.conf

    3. Make sure that there is a LoadModule statement to load the php5 module (the PHP installation should insert a LoadModule statement for this):LoadModule php5_module modules/libphp5.so

    4. Go to the end of the file and add the following PHP configuration information:# PHP related configuration - Begin

    SetHandler application/x-httpd-php

  • Installing and Setting Up PHP | 17

    5. Make sure that the following lines are uncommented to ensure the following modules are loaded (the PHP installation will have already enabled the ph5_module to be loaded).LoadModule slotmem_shm_module modules/mod_slotmem_shm.so

    LoadModule rewrite_module modules/mod_rewrite.so

    LoadModule proxy_module modules/mod_proxy.so

    LoadModule proxy_connect_module modules/mod_proxy_connect.so

    LoadModule proxy_http_module modules/mod_proxy_http.so

    6. Add the following lines:# Add API Exchange related proxy info - Begin

    ProxyPass /apiKey http://ec2-instance-public-dns:9122/apiKey

    ProxyPassReverse /apiKey http://$host:9122/apiKey

    ProxyPass /portalEvent http://$host:9122/portalEvent

    ProxyPassReverse /portalEvent http://$host:9122/portalEvent

    ProxyPass /asg/ http://$host:9122/asg/

    ProxyPassReverse /asg/ http://$host:9122/asg/

    ProxyPass /ConfigUI http://$host:9200/ConfigUI

    ProxyPassReverse /ConfigUI http://$host:9200/ConfigUI

    # Add API Exchange related proxy info - End

    7. Save the httpd.conf file.

    Validating PHP1. Go to the /opt/products/apache2/htdocs directory.

    2. Enter the following commands to edit the phpinfo.php file:

    mkdir info

    cd info

    vi phpinfo.php

    3. Add the following lines:

    4. Save the phpinfo.php file and exit the editor.

    5. Restart the Apache server.

    Copyright © 2016 TIBCO Software Inc. ALL RIGHTS RESERVED

  • 18 | Chapter 2 Linux Installation

    Configuring Firewall Rules for ApacheEnter the following commands:iptables -I INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT

    service iptables save

    service iptables restart

    Starting ApacheEnter the following commands:cd /opt/products/apache2/bin

    sudo ./apachectl start

    Validating the Apache HTTP and PHP Installation1. Access http://host/ to obtain a valid response from Apache.

    2. Access http:///info/phpinfo.php to view information about PHP, Apache, and MySQL.

    “sudo” is required only if Apache is running on port 80.

    After you have validated Apache and PHP, you might want to move the phpinfo.php file from the /htdocs directory.

    Copyright © 2016 TIBCO Software Inc. ALL RIGHTS RESERVED

  • Installing PHPMyAdmin (Optional) | 19

    Installing PHPMyAdmin (Optional)

    You can install PHPMyAdmin to manage the MySQL database.

    Downloading PHPMyAdmin

    Download from the following location:

    http://downloads.sourceforge.net/project/phpmyadmin/phpMyAdmin/4.0.7/phpMyAdmin-4.0.7-all-languages.zip?r=http%3A%2F%2Fwww.phpmyadmin.net%2Fhome_page%2Findex.php&ts=1380417664&use_mirror=softlayer-dal

    Setting Up PHPMyAdmin

    1. Extract the downloaded files to the following directory:/opt/products/apache2/htdocs/phpMyAdmin

    2. Create a file called “config.inc.php” from “config.sample.inc.php.”

    Restarting Apache

    Enter the following commands:cd /opt/products/apache2/bin

    sudo ./apachectl start

    Accessing PHPMyAdmin

    1. Go to the following URL:http:///phpMyAdmin

    2. Enter MySQL credentials to get access.

    “sudo” is required only if Apache is running on port 80.

    Copyright © 2016 TIBCO Software Inc. ALL RIGHTS RESERVED

  • 20 | Chapter 2 Linux Installation

    Installing the Adapter

    Installation of Joomla! and the Adapter Code for TIBCO API Exchange and Joomla! are supported for the Linux platform.

    Reviewing the README.txt FileCarefully review the information in the README.txt file for the Adapter Code for API Exchange and Joomla!. It contains important information regarding the software distribution and trademark information that you need to be aware of.

    Editing the httpd.conf File1. Locate the user and group.

    2. Change the values of User and Group to the owner of the /htdocs directory.

    For example:# User/Group: The name (or #number) of the user/group to run httpd as.

    # It is usually good practice to create a dedicated user and group for # running httpd, as with most system services.

    #

    User

    Group

    3. Locate the DirectoryIndex entry and add index.php.

    For example:#

    # DirectoryIndex: sets the file that Apache will serve if a directory # is requested.

    #

    DirectoryIndex index.html index.php

    4. Save the httpd.conf file.

    The procedures described in this section are for a new installation of TIBCO API Exchange and Joomla!. If you are upgrading to Release 2.1.1 from Release 2.0.0, see “Migration and Compatibility” on page 6 of the TIBCO API Exchange and Joomla! Release Notes for upgrade instructions.

    Copyright © 2016 TIBCO Software Inc. ALL RIGHTS RESERVED

  • Installing the Adapter | 21

    Configuring Portal Engine in High Availability (HA) ModeTo run the two portal engines in active and active mode by configuring the load balance in Apache server, complete the following procedure.

    1. Make the following changes in the httpd.conf file:LoadModule lbmethod_byrequests_module modules/mod_lbmethod_byrequests.so

    LoadModule proxy_balancer_module modules/mod_proxy_balancer.so

    LoadModule slotmem_shm_module modules/mod_slotmem_shm.so

    2. Add the following lines of code in the file:

    BalancerMember http://localhost:9122

    BalancerMember http://localhost:9123

    ProxyPass /joomla/apiKey balancer://portalEngineCluster/apiKey

    ProxyPassReverse /joomla/apiKey balancer://portalEngineCluster/apiKey

    ProxyPass /joomla/portalEvent balancer://portalEngineCluster/portalEvent

    ProxyPassReverse /joomla/portalEvent balancer://portalEngineCluster/portalEvent

    ProxyPass /joomla/asg/internal/product balancer://portalEngineCluster/asg/internal/product

    ProxyPassReverse /joomla/asg/internal/product balancer://portalEngineCluster/asg/internal/product

    3. Restart the Apache server.

    4. Start the two portal engine instances in two of the different ports. For example: port 9122 and port 9123.

    5. To verify the request is routing to both the server in a round robin fashion enable the apache debug log (httpd.conf file). You can see it in the following log file:

    balancer://portalEnginecluster: worker (http://localhost:9123) rewritten to http://localhost:9123/asg/internal/product/231

    Downloading the Distribution Files1. Stop Apache if it is running.

    2. Go to the following URL:

    https://github.com/API-Exchange/JoomlaAdapter/wiki

    3. Click 2.2.0.

    4. Click TIB_api-exchange-joomla-adapter_2.2.0.zip.

    5. The distribution zip file is downloaded and opens.

    6. From the distribution file, extract the contents of the .zip file (or .tar file) and copy the /joomla directory to the $APACHE_HOME/htdocs directory.

    Copyright © 2016 TIBCO Software Inc. ALL RIGHTS RESERVED

  • 22 | Chapter 2 Linux Installation

    For example:cp -r ./TIB_api-exchange-joomla-adapter_2.2.0/joomla/* $APACHE_HOME/htdocs/

    7. Start Portal and upload cobalt packages.

    8. Copy the contents of the /adapter/joomla directory in the distribution file, to the $APACHE_HOME/htdocs directory after cobalt packages are installed.

    For example:cp -r ./TIB_api-exchange-joomla-adapter_2.2.0/adapter/joomla/* $APACHE_HOME/htdocs/

    9. Upload the baseline.sql and seeddata to the TIB_api-exchange-joomla-adapter_2.2.0/adapter/sql-scripts directory.

    Restarting Apache After copying the Joomla files, enter the following commands to restart Apache:

    cd /opt/products/apache2/bin

    sudo ./apachectl start

    “sudo” is required on Linux only if Apache is running on port 80.

    Copyright © 2016 TIBCO Software Inc. ALL RIGHTS RESERVED

  • Creating a Database for Portal Data | 23

    Creating a Database for Portal Data

    1. Log in to MySQL:mysql –u root –p

    Securing MySQL has ensured that root cannot access the database remotely—only “superadmin” can access the database remotely.

    You are prompted for the MySQL password.

    2. Enter the MySQL password.

    3. Enter the following command:CREATE DATABASE asg_openapi DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;

    Login as “root” is only allowed from localhost.

    Copyright © 2016 TIBCO Software Inc. ALL RIGHTS RESERVED

  • 24 | Chapter 2 Linux Installation

    Copyright © 2016 TIBCO Software Inc. ALL RIGHTS RESERVED

  • | 25

    Chapter 3 Windows Installation

    You can install the Adapter Code for TIBCO API Exchange and Joomla!. Some prerequisite software is required if you are using a Windows system.

    Topics

    • Windows Installation Overview, page 26

    • Installing Required Software Using WAMP, page 27

    • Installing and Configuring MySQL, page 34

    • Installing and Setting Up PHP, page 36

    • Installing the Adapter, page 39

    The procedures described in this chapter are for a new installation of TIBCO API Exchange and Joomla!. If you are upgrading to Release 2.1.1 from Release 2.0.0, see “Migration and Compatibility” on page 6 of the TIBCO API Exchange and Joomla! Release Notes for upgrade instructions.

    Copyright © 2016 TIBCO Software Inc. ALL RIGHTS RESERVED

  • Windows Installation Overview | 26

    Windows Installation Overview

    Installing the Adapter Code for TIBCO® API Exchange and Joomla! involves the following main steps:

    1. Installing prerequisite software (MySQL, Apache, PHP).

    You can install all of the required prerequisite software packages using WAMP (Windows, Apache, MySQL, PHP) or individually.

    See the Installing Required Software Using WAMP section for instructions on installing the prerequisite software using WAMP.

    See the following sections for information on installing the individual prerequisite software packages.

    — For instructions on installing Apache, see the Installing and Setting Up Apache HTTP Server section.

    — For instructions on installing MySQL, see the Installing and Configuring MySQL section.

    — For instructions on installing PHP, see the Installing and Setting Up PHP section.

    2. Installing and configuring the Joomla! package.

    See the Installing the Adapter section for information on installing and configuring Joomla!.

    3. Installing Cobalt packages (included).

    See the Installing Cobalt Packages section for information on installing Cobalt.

    Copyright © 2016 TIBCO Software Inc. ALL RIGHTS RESERVED

  • Installing Required Software Using WAMP | 27

    Installing Required Software Using WAMP

    To simplify installation on Windows, you can use WAMP. WAMP stands for Windows Apache MySQL PHP, which are required prerequisites for the Developer Portal installation. WAMP provides an easy to use interface for managing all three components.

    In addition, Joomla is required. You can obtain Joomla from the Adapter Code for TIBCO API Exchange and Joomla! download site on GitHub:

    https://github.com/API-Exchange/JoomlaAdapter/releases/tag/v2.1.1

    The following sections describe the steps for downloading WAMP and Joomla.

    Downloading the Required SoftwareComplete these tasks to download WAMP and the Joomla Adapter code.

    Task A Install the WAMP Server

    1. Go to the following URL:

    http://www.wampserver.com/en/

    2. Download WAMP 2.5 or later.

    3. Right-click Wampserver.exe and click Run as administrator.

    4. Install the Wampserver in a location of your choice (for example, c:\PortalServer).

    You are prompted to associate a browser with WAMPserver.

    5. Browse for the browser executable that you will use and then click Open.

    For example, to use Mozilla Firefox, browse to C:/Program Files (X86)/Mozilla Firefox, and select firefox.exe.

    The installer extracts and requires the WAMPserver files.

    You are prompted for PHP mail parameters.

    6. Enter the SMTP server name (for example, mail.tibco.com) and your email address, as shown in the following figure.

    Alternatively, you can leave the default values and choose Next.

    Copyright © 2016 TIBCO Software Inc. ALL RIGHTS RESERVED

  • Installing Required Software Using WAMP | 28

    Figure Specifying PHP Mail Parameters

    7. Complete the following steps to update the server name from localhost to your hostname for future access:

    a. Browse to the C:\wamp\bin\apache\apache2.x.x\conf folder and open the httpd.conf file.

    b. Locate the line that reads ServerName localhost:80.

    c. If you want to change your server name from localhost, change the server name.

    d. Navigate to C:\Windows\System32\drivers\etc.

    e. Edit the hosts file and change the entries to point to the hostname for the local host.

    Each entry consists of two items:

    - The IP address of a host

    - The hostname associated with the IP address

    Change the entries to point to the hostname for your local host. For examples

    — 127.0.0.1 Change from “localhost” to the name of your local host

    — 127.0.0.1 Change from “localhost” to the fully-qualified-hostname for the local host.

    f. Save the hosts file.

    Copyright © 2016 TIBCO Software Inc. ALL RIGHTS RESERVED

  • Installing Required Software Using WAMP | 29

    8. Start the WAMP Server and validate that connecting to http://< hostname > lists the PHP index page with all the modules loaded.

    The WAMP Server icon appears on our task bar. When the server is online, the icon is green.

    9. Click the icon to bring up the WAMP server menu, shown in the following figure.

    Figure WAMPserver Menu

    Task B Configure MySQL for WAMP

    1. Click the WAMP Server icon on the task bar, on the WAMPServer menu, select MySQL, and click MySQL console.

    2. When prompted for a password press Enter.

    The password is empty. The mysql prompt appears.

    3. Enter the following command to set the password for root: SET PASSWORD FOR 'root'@'localhost' = PASSWORD('tibco@123');

    4. Enter the following command to create a database for portal data:CREATE DATABASE asg_openapi DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;

    5. Enter exit to exit the MySQL console.

    6. Browse to the C:\wamp\bin\php\php5.x.x folder and open the php.ini file.

    7. Locate the line that reads upload_max_filesize and check if the value is the minimum value (8M).

    8. Click the WAMP server icon on the task bar and choose Restart All Services.

    Copyright © 2016 TIBCO Software Inc. ALL RIGHTS RESERVED

  • Installing Required Software Using WAMP | 30

    Task C Download and Install the Joomla Adapter Code

    The Adapter Code for TIBCO API Exchange and Joomla package is used to install the TIBCO API Exchange Developer Portal.

    1. Download TIB_api-exchange-joomla-adapter_2.1.1.zip from the GitHub repository at the following location:

    https://github.com/API-Exchange/JoomlaAdapter/releases/tag/v2.1.1

    2. Extract the contents of the zip file to a temporary folder.

    3. Copy the contents of both folders:

    • Copy the contents of /joomla to C:\WAMP\www.

    • Copy the contents of /joomla/adapter to C:\WAMP\www.

    4. To connect to MySQL, start the MySQL console, and then enter the following:

    use asg_openapi

    5. To run the asg-openapi.sql script, entersource /adapter/sqlscripts/asg_openapi.sql

    where tmp_directory is the path to the temp directory to which you unzipped the Adapter Code for TIBCO API Exchange and Joomla distribution.

    MySQL updates the PHP tables with customizations for the API Exchange Adapter code.

    Task D Configure Apache

    1. Edit the C:\wamp\bin\apache\apache\conf\httpd.conf file and add the following lines at the end of the file:

    # Add API Exchange related proxy info - BeginProxyPass /apiKey http://ec2-instance-public-dns:9122/apiKeyProxyPassReverse /apiKey http://$host:9122/apiKeyProxyPass /portalEvent http://$host:9122/portalEventProxyPassReverse /portalEvent http://$host:9122/portalEventProxyPass /asg/ http://$host:9122/asg/ProxyPassReverse /asg/ http://$host:9122/asg/ProxyPass /ConfigUI http://$host:9200/ConfigUIProxyPassReverse /ConfigUI http://$host:9200/ConfigUI

    # Add API Exchange related proxy info - End

    #Oauth related proxyProxyPass /oauthClient/ http://:9122/oauthClient/

    Do not copy the entire folder. Copy the contents of the folders and overwrite files when prompted.

    Copyright © 2016 TIBCO Software Inc. ALL RIGHTS RESERVED

  • Installing Required Software Using WAMP | 31

    ProxyPassReverse /oauthClient/ http://:9122/oauthClient/ProxyPass /asg/oauth2/ http://:9322/asg/oauth2/ProxyPassReverse /asg/oauth2/ http://:9322/asg/oauth2/

    #Analytics related proxyProxyPass /Analytics http://:9122/APIXAnalyticsProxyPassReverse /Analytics http://:9122/APIXAnalyticsProxyPass /APIXAnalytics http://:9122/APIXAnalyticsProxyPassReverse /APIXAnalytics http://:9122/APIXAnalytics# TIBCO API Exchange Proxy Settings - End

    2. Uncomment the following LoadModule entries.LoadModule proxy_module modules/mod_proxy.soLoadModule proxy_http_module modules/mod_proxy_http.so

    3. Set display of PHP errors to off as indicated in the following figure.

    Figure Setting PHP Display Errors to Off

    4. Click the WAMPserver icon on the task bar and choose Restart All Services.

    5. Access http://localhost to access the portal.

    6. Access http://hostname/adminstrator to access the portal administrator.

    Copyright © 2016 TIBCO Software Inc. ALL RIGHTS RESERVED

  • Installing Required Software Using WAMP | 32

    Task E Edit the asg-portal.properties File

    Before starting the portal engine, complete these steps:

    1. Edit the asg-portal.properties, file.

    2. Search for joomla and remove it from the URL.

    3. Check the asg_portal.properties file and verify the value of the Swagger URL.

    Task F Configure Joomla

    For information on configuring Joomla, see Setting Up Joomla.

    Installing and Setting Up Apache HTTP Server

    Obtain the 64-bit Apache HTTP Server for Windows.

    For information on obtaining Apache for Windows, see the following URL:

    http://httpd.apache.org/docs/2.4/platform/windows.html

    1. Go to the following URL:

    http://httpd.apache.org/docs/2.4/platform/windows.html

    2. Download the zip file containing the binary version of HTTP server and required dependencies from one of the sites listed on the Apache website.

    3. Unzip the zip file to C:\.

    This creates a folder named Apache24 and extracts all the folders in the zip file to that folder.

    4. Go to the $APACHE_HOME/bin folder (normally Apache24/bin).

    5. Enter the following command to start Apache:httpd.exe -k start

    6. Go to the following URL to verify that Apache started: http://localhost.

    If you see the following message:The program can’t start because MSVCR110.dll is missing from your computer. Try reinstalling the program to fix this problem

    Then complete these steps:

    • Download Visual C++ from http://www.microsoft.com/en-us/download/details.aspx?id=30679

    • Enter the following command to restart Apache:

    httpd.exe -k restart

    Copyright © 2016 TIBCO Software Inc. ALL RIGHTS RESERVED

  • Installing Required Software Using WAMP | 33

    7. Enter the following command to stop Apache:httpd.exe -k stop

    Copyright © 2016 TIBCO Software Inc. ALL RIGHTS RESERVED

  • Installing and Configuring MySQL | 34

    Installing and Configuring MySQL

    You can install and configure MySQL.

    1. Download MySQL from the following URL:http://dev.mysql.com/downloads/windows/installer/

    Download the Windows (x86, 32-bit) MSI installer. This installs both 32- and 64-bit binaries.

    2. Run the installation executable.

    3. If you see the following error:This application requires.NET Framework 4.0. Please install the .NET Framework then run the installer again. For more information, please see http://go.microsoft.com/fwlink/?LinkId=181012

    Then complete these steps:

    a. Go to the link indicated in the error message.

    You are redirected to another URL.

    b. Follow the instructions on the web page that appears to download the .NET executable.

    4. Re-run the MySQL executable.

    a. Install MySQL into the c:/mysql directory.

    b. When prompted for a user ID and password, provide root for the user ID and provide the root password.

    c. Specify the service name for MySQL.

    The default name is MySQL56.

    d. Choose the “Start the MySQL Server at System Startup” option.

    Starting MySQLDuring installation, we chose to start the MySQL service at system startup.

    If you need to restart MySQL, go to the services dialog and right-click MySQL56-restart.

    Connecting to MySQLOn Windows, you connect to MySQL using MySQL workbench. The default user ID is root and the default password is no password.

    Copyright © 2016 TIBCO Software Inc. ALL RIGHTS RESERVED

  • Installing and Configuring MySQL | 35

    Setting a New Password

    1. Navigate to mysql/bin.

    2. Enter the following command:mysql.exe -u root -p

    3. When prompted for a password, press .

    4. In the MySQL command line, enter:mysql >CREATE USER 'superadmin'@'%' IDENTIFIED BY 'asg$uper@dmin';

    mysql >GRANT ALL ON *.* TO 'superadmin'@'%' WITH GRANT OPTION;

    Setting MySQL to Autostart on Reboot

    Go to the MySQL service in services.msc and select auto for the MySQL service.

    Allowing Access to the MySQL Instance from Outside

    Create a superadmin who can access the MySQL instance from outside. Access as ‘root’ is allowed only from ‘localhost.’

    To allow outside access to the MySQL instance, run the following command and enter a password when prompted:mysql -u root -p

    CREATE USER 'superadmin'@'%' IDENTIFIED BY 'asg$uper@dmin';

    GRANT ALL ON *.* TO 'superadmin'@'%' WITH GRANT OPTION;

    To Restart MySQL

    If you need to restart MySQL, go to the services dialog and right-click MySQL56-restart.

    Copyright © 2016 TIBCO Software Inc. ALL RIGHTS RESERVED

  • Installing and Setting Up PHP | 36

    Installing and Setting Up PHP

    You can install and configure for PHP.

    Downloading PHP Download PHP from the following location:http://windows.php.net/download/#php-5.5-ts-VC11-x64

    Install the Windows binaries.

    Extracting the Contents Extract the archive files for PHP and place them in the $PHP_HOME directory (for example, C:\php-5.5.4).

    Installing PHP

    Copy Configuration Files

    Complete these steps to copy the required configuration files:

    1. Change directory to the $PHP_HOME directory.cd $PHP_HOME

    2. Copy the php.ini-production file to php.ini.

    3. Increase max_input_vars from 1000 to 5000. The line should read: max_input_vars=5000

    Verify That the php_gd2.dll Extension Is Enabled and There is Sufficient Upload Memory

    To ensure that GD images are displayed correctly in the Management Portal, open the php.ini file and make sure that the php_gd2.dll extension is enabled:

    1. Go the directory where the php.ini file is located.

    If you installed PHP in the C:/PHP folder, it is located there. It might also be located in the C:\Program Files (x86)\PHP\ folder.

    2. Open the file in a text editor and locate the line that reads extension=php_gd2.dll.

    3. Make sure that this line is not commented out (if there is a semicolon (;) at the beginning of the line, delete the semicolon).

    Copyright © 2016 TIBCO Software Inc. ALL RIGHTS RESERVED

  • Installing and Setting Up PHP | 37

    4. Locate the line that reads upload_max_filesize = xx.

    5. Change the default value from 2M to 32M (32 MB). The line should read:upload_max_filesize = 32M

    6. Save the php.ini file.

    Configuring Apache to use PHP1. Go to the $APACHE_HOME/conf/ directory.

    2. Edit the httpd.conf file.

    3. Insert the following lines to ensure the PHP module for Apache 2.x is loaded:LoadModule php5_module "C:/php-5.5.4/php5apache2_4.dll"

    AddHandler application x-httpd-php .php

    4. Insert the following lines into the file:# configure the path to php.ini

    PHPIniDir "C:/php-5.5.4"

    5. Save the httpd.conf file.

    6. In the C:\Apache24\htdocs\ directory, create a file named info.php that contains the following line:

    7. Restart Apache—Stop and start Apache from Windows.

    Starting ApacheEnter the following commands:cd $APACHE_HOME/bin

    httpd.exe

    To restart Apache, enter:httpd.exe -k restart

    Validating the Apache HTTP /PHP installation1. Access http://host/ to obtain a valid response from Apache.

    2. Access http:///info/phpinfo.php to view information about PHP, Apache, and MySQL.

    After you have validated Apache and PHP, you might want to move the phpinfo.php file from the /htdocs directory.

    Copyright © 2016 TIBCO Software Inc. ALL RIGHTS RESERVED

  • Installing and Setting Up PHP | 38

    Restarting ApacheEnter the following commands:cd $APACHE_HOME/bin

    httpd.exe -k restart

    Copyright © 2016 TIBCO Software Inc. ALL RIGHTS RESERVED

  • Installing the Adapter | 39

    Installing the Adapter

    Complete the tasks described in this section to install the adapter on Windows.

    Reviewing the README.txt FileCarefully review the information in the README.txt file for the Adapter Code for API Exchange and Joomla!. It contains important information regarding the software distribution and trademark information that you need to be aware of.

    Downloading the Distribution Files1. Stop Apache if it is running.

    2. Go to the following URL:

    https://github.com/API-Exchange/JoomlaAdapter/releases/tag/v2.2.0

    3. Click TIB_api-exchange-joomla-adapter_2.2.0.zip.

    4. The distribution zip file is downloaded and opens.

    5. From the distribution file, extract the contents of the /joomla directory to the $APACHE_HOME/htdocs directory.

    6. Start Portal and upload cobalt packages.

    7. From the distribution file, merge the contents of the /adapter/joomla directory on top of the $APACHE_HOME/htdocs directory after uploading cobalt packages.

    8. Upload the baseline.sql and seed data to the TIB_api-exchange-joomla-adapter_2.2.0\adapter\sql-scripts directory.

    Performing Tasks to Ensure the Portal Is Accessible1. Make sure that you have all permissions on the /htdocs folder.

    2. Go to the $APACHE_HOME\htdocs\libraries\joomla\filter directory.

    3. In the input.php file, change “mei” to “mi.”

    The procedures described in this section are for a new installation of TIBCO API Exchange and Joomla!. If you are upgrading to Release 2.1.1 from Release 2.0.0, see “Migration and Compatibility” on page 6 of the TIBCO API Exchange and Joomla! Release Notes for upgrade instructions.

    Copyright © 2016 TIBCO Software Inc. ALL RIGHTS RESERVED

    https://github.com/API-Exchange/JoomlaAdapter/releases/tag/v2.2.0

  • Installing the Adapter | 40

    4. In the php.ini file, locate the line that reads ;extension=php_mysql.dll and uncomment it (remove the semicolon - ;).

    Restarting Apache Enter the following commands:

    cd $APACHE_HOME/bin

    httpd.exe -k restart

    Creating a Database for Portal Data1. Log in to MySQL:

    mysql –u root –p

    Securing MySQL has ensured that root cannot access the database remotely—only “superadmin” can access the database remotely.

    You are prompted for the MySQL password.

    2. Press (initially the password is blank).

    3. Enter the following command to change the password:SET PASSWORD FOR 'root'@'localhost'=PASSWORD('tibco@123');

    Login as “root” is only allowed from localhost.

    Copyright © 2016 TIBCO Software Inc. ALL RIGHTS RESERVED

  • | 41

    Chapter 4 Setting Up Joomla

    This chapter mainly describes how to set up Joomla.

    Topics

    • Configuring Joomla, page 42

    • Installing Cobalt Packages from the Adapter Code for TIBCO API Exchange and Joomla! Distribution, page 45

    • Setting up the Joomla! Mail Server, page 46

    • Post-Installation Tasks, page 48

    Copyright © 2016 TIBCO Software Inc. ALL RIGHTS RESERVED

  • 42 | Chapter 4 Setting Up Joomla

    Configuring Joomla

    1. To access Joomla, go to the following URL:

    http://.

    The main Joomla screen appears:

    2. Enter the following information:

    — Site Name Enter the site name for the portal.

    — Admin email Enter the email for the site administrator.

    — Admin Password Enter the admin password, and then confirm it in the Confirm Admin Password field.

    3. Scroll down to the Database configuration area.

    4. In the Database Type field, from the pull-down list, choose MySql.

    5. In the Host Name field, enter localhost.

    6. Enter a username and password for the database user.

    7. In the Database Name field, enter asg_openapi.

    Copyright © 2016 TIBCO Software Inc. ALL RIGHTS RESERVED

  • Configuring Joomla | 43

    8. Make sure that the value in the Table Prefix field is openapi_ .

    9. Click Next.

    10. Review the information on the Finalisation window.

    11. Click the Remove installation folder button.

    The installation is now complete.

    Validating the Installation1. Access the API management portal landing page at

    http://..

    You might run into some troubleshooting for step 1 listed in the Configuring Joomla task. In order to overcome the blocker and continue with proper installation, complete the following steps:

    1. Go to libraries\joomla\filter\input.php.

    2. Search for:$source = preg_replace('/(\d+);/me', "utf8_encode(chr(

    1))", $source); // decimal notation

    $source = preg_replace('/([a-f0-9]+);/mei', "utf8_encode(chr(0x

    1))", $source); // hex notation

    3. Replace the lines you found with the following text:$source = preg_replace_callback('/(\d+);/mi', function($m)

    {return utf8_encode(chr('0x'.$m[1]));}, $source); // decimal notation

    $source = preg_replace_callback('/([a-f0-9]+);/mi', function($m){return utf8_encode(chr('0x'.$m[1]));}

    , $source); // hex notation.

    Copyright © 2016 TIBCO Software Inc. ALL RIGHTS RESERVED

  • 44 | Chapter 4 Setting Up Joomla

    2. Access the Joomla! Administrator user interface at http://hostname>./administrator and validate that Joomla can write to all directories.

    Copyright © 2016 TIBCO Software Inc. ALL RIGHTS RESERVED

  • Installing Cobalt Packages from the Adapter Code for TIBCO API Exchange and Joomla! Distribution | 45

    Installing Cobalt Packages from the Adapter Code for TIBCO API Exchange and Joomla! Distribution

    1. Log into the Joomla Administrator utility as administrator.

    2. From the submenu at the left of the start window, choose Install Extensions.

    The Upload Package window appears.

    3. Click Choose File.

    4. Browse to the directory where you unzipped the TIB_api-exchange-joomla-adapter_2.1.0.zip file and select the Cobalt packages.

    5. Choose the pkg_cobalt.j3.everything.v.8.359_patch02 file and then click Upload & Install.

    The package installs and a message appears indicating that the installation was successful.

    6. From the Upload Package window, repeat steps 3-4, choose the pkg_cobalt.j3.media.v.8.70.zip file, and click Upload & Install.

    The package installs and a message appears indicating that the installation was successful.

    Copyright © 2016 TIBCO Software Inc. ALL RIGHTS RESERVED

  • 46 | Chapter 4 Setting Up Joomla

    Setting up the Joomla! Mail Server

    1. Log into the Joomla! Administrator user interface.

    2. Click the Global Configuration tab.

    3. Click the Server tab.

    4. Locate the Mail Settings configuration area and set the mail settings as shown in the following figure.

    Copyright © 2016 TIBCO Software Inc. ALL RIGHTS RESERVED

  • Setting up the Joomla! Mail Server | 47

    Figure Joomla! Administrator Mail Settings Interface

    Copyright © 2016 TIBCO Software Inc. ALL RIGHTS RESERVED

  • 48 | Chapter 4 Setting Up Joomla

    Post-Installation Tasks

    After you have installed Joomla! and Cobalt, there are some tasks to peform on the host that is running Joomla!.

    This section assumes that you have installed the TIBCO API Exchange Manager and TIBCO API Exchange Gateway components of TIBCO API Exchange on the target host.

    For information on installing TIBCO API Exchange Gateway, see the TIBCO® API Exchange Gateway Installation guide.

    For information on installing TIBCO API Exchange Manager, see the TIBCO® API Exchange Manager Installation guide.

    Stopping ApacheEnter the following commands:

    Linuxcd /opt/products/apache2/bin

    sudo ./apachectl stop

    Windowscd $APACHE_HOME/bin

    httpd.exe -k stop

    Importing the MySQL ScriptsThe Adapter Code for TIBCO API Exchange and Joomla! distribution contains an SQL installation utility that allows you to update the database contents.

    1. Import the scripts from the directory where you unzipped the TIB_api-exchange-joomla-adapter_2.1.1.zip file (the TIB_api-exchange-joomla-adapter_2.0.0/adapter/sql-scripts/asg_openapi.sql directory) into the asg_openapi database.

    2. Connect to MySQL.

    3. At the MySQL prompt, enter:

    “sudo” is required only if Apache is running on port 80.

    Copyright © 2016 TIBCO Software Inc. ALL RIGHTS RESERVED

  • Post-Installation Tasks | 49

    use asg_openapi

    4. Run the source /adapter/sqlscripts/asg_openapi.sql script.

    Add Proxies in the httpd.conf File

    Add the following lines to the httpd.conf file:

    ProxyPass /apiKey http://developer.company.com :9122/apiKey

    ProxyPassReverse /apiKey http://developer.company.com :9122/apiKey

    ProxyPass/portalEvent http://developer.company.com :9122/portalEvent

    ProxyPassReverse /portalEvent http://developer.company.com :9122/portalEvent

    ProxyPass /asg/internal/product|http://developer.company.com :9122/asg/internal/product

    ProxyPassReverse /asg/internal/product http://developer.company.com :9122/asg/internal/product

    ProxyPass /ConfigUI http://developer.company.com :9200/ConfigUI

    ProxyPassreverse /ConfigUI http://developer.company.com :9200/ConfigUI

    #Oauth related proxy

    ProxyPass /oauthClient/ http://developer.company.com :9122/oauthClient/

    ProxyPassReverse /oauthClient/ http://developer.company.com :9122/oauthClient/

    ProxyPass /asg/oauth2/ http://developer.company.com :9322/asg/oauth2/

    ProxyPassReverse /asg/oauth2/ http://developer.company.com :9322/asg/oauth2/

    #Analytics related proxy

    ProxyPass /Analytics http://developer.company.com :9122/SpotfireWeb

    ProxyPassReverse /Analytics http://developer.company.com :9122/SpotfireWeb

    ProxyPass /SpotfireWeb http://developer.company.com :9122/SpotfireWeb

    ProxyPassReverse /

    SpotfireWeb http://developer.company.com :9122/SpotfireWeb

    where developer.company.com represents the URL used by your company.

    The host running the portal might be a load balancer when multiple instances of portal engine are running.

    The default port, 9122, is for the portal engine and 9322 is the OAuth HTTP port. Both of these can be changed in the asg-portal.properties file and the asg.properties file, respectively.

    Replace developer.company.com with the appropriate host name.

    Copyright © 2016 TIBCO Software Inc. ALL RIGHTS RESERVED

  • 50 | Chapter 4 Setting Up Joomla

    Uncommenting LoadModule Items in the httpd.conf FileUncomment the following lines in the httpd.conf file:LoadModule proxy_module modules/mod_proxy.so

    LoadModule proxy_connect_module modules/mod_proxy_connect.so

    LoadModule proxy_http_module modules/mod_proxy_http.so

    Restarting ApacheGo to the $APACHE_HOME/bin folder, and enter:httpd.exe -k restart

    Specifying the ConfigUI for the API Manager Configuration and Email Templates

    In the Joomla administrator, go to http://System>Global Configuration>API Manager Configuration and Email Templates and specify the following URL in the ConfigUI field:http://developer.company.com :9200

    Validating the Portal Installation1. Go to the URL where the portal is installed, for example:

    http://.

    If you see warning messages in the portal, go to administrator (user:admin, pwd:admin) and in Global Configuration -> Server, change Error Reporting to “None.”

    Copyright © 2016 TIBCO Software Inc. ALL RIGHTS RESERVED

  • Post-Installation Tasks | 51

    2. Verify that you see the Getting Started window. This window should be similar to the following:

    Copyright © 2016 TIBCO Software Inc. ALL RIGHTS RESERVED

  • 52 | Chapter 4 Setting Up Joomla

    Copyright © 2016 TIBCO Software Inc. ALL RIGHTS RESERVED

  • Copyright © 2016 TIBCO Software Inc. ALL RIGHTS RESERVED

    | 53

    Index

    I

    Installing the adapter code 20

    P

    Prerequisite software for adapter code 4

    Adapter Code for TIBCO® API Exchange and Joomla!ContentsPrefaceRelated DocumentationAdapter Code for TIBCO® API Exchange and Joomla! DocumentationOther Product Documentation

    Chapter 1 OverviewInstallation OverviewPrerequisite Software for the Joomla Adapter Code

    Chapter 2 Linux InstallationOverview of Installing LinuxPreparing the MachineInstalling and Setting Up Apache HTTP ServerExtracting the File ContentsInstalling Apache Portable Runtime (APR)Installing Apache Portable Runtime Utility LibraryDownloading and Install PCREInstalling Apache HTTPD

    Installing and Configuring MySQLInstalling and Setting Up PHPDownloading PHPExtracting the PHP Distribution ContentsInstalling PHPCopying and Editing Configuration FilesConfiguring Apache to use PHPValidating PHPConfiguring Firewall Rules for ApacheStarting ApacheValidating the Apache HTTP and PHP Installation

    Installing PHPMyAdmin (Optional)Installing the AdapterReviewing the README.txt FileEditing the httpd.conf FileConfiguring Portal Engine in High Availability (HA) ModeDownloading the Distribution FilesRestarting Apache

    Creating a Database for Portal Data

    Chapter 3 Windows InstallationWindows Installation OverviewInstalling Required Software Using WAMPDownloading the Required Software

    Installing and Configuring MySQLStarting MySQLConnecting to MySQL

    Installing and Setting Up PHPDownloading PHPExtracting the ContentsInstalling PHPConfiguring Apache to use PHPStarting ApacheValidating the Apache HTTP /PHP installationRestarting Apache

    Installing the AdapterReviewing the README.txt FileDownloading the Distribution FilesPerforming Tasks to Ensure the Portal Is AccessibleRestarting ApacheCreating a Database for Portal Data

    Chapter 4 Setting Up JoomlaConfiguring JoomlaValidating the Installation

    Installing Cobalt Packages from the Adapter Code for TIBCO API Exchange and Joomla! DistributionSetting up the Joomla! Mail ServerPost-Installation TasksStopping ApacheImporting the MySQL ScriptsAdd Proxies in the httpd.conf FileUncommenting LoadModule Items in the httpd.conf FileRestarting ApacheSpecifying the ConfigUI for the API Manager Configuration and Email TemplatesValidating the Portal Installation

    Index