Apigee Private Cloud Installation: non-root user

It is possible to install and setup Apigee Private Cloud as a non-root user, as long as the pre-requisites are met. If these are not met, then it needs to be setup by root

This article describes some of the common things that are needed to be performed by root before you can proceed with the Apigee installation as non-root user

Note: This article is intended to be just as a cheat sheet for the non-root Installation. All these steps are described in lot more detail in the Apigee Edge Private Cloud Install Cofig Guide and that will be the source of truth
Note: Based on your installation topology and requirements, you would need to perform only subset of these steps. For eg, If you are just playing around and installing a All In One setup, you would need to verify all the steps, while if you are performing a multi-node or multi-data center deployment you just to take care of pre-reqs based on the component you are going to install on each machine [for eg, you need to check openldap prereqs only on machines where you would install ‘ms’, and postgres checks for machines where you would install ‘ps’]

Step 1: Verify hostname and IP Address

> hostname
<hostname>
> hostname –i 
<IP Address>

You should see the IP of the Instance, [In EC2, it would be the private IP]

If you see 127.0.0.1 or multiple IPs or do not see anything at all, then you need to fix this by configuring /etc/hosts and/or/etc/sysconfig/network

Step 2: Verify Packages

Make sure you have all the packages installed that are necessary for openldap, qpid and postgres

Quick Summary of the packages needed

uuid libxslt rsync postgresql93 postgresql93-libs openldap-clients openldap-servers db4-cxx glibc libaio libstdc++ libuuid boost-filesystem boost-program-options boost-system boost-test nspr nss nss-util cyrus-sasl-lib

Step 3: Verify JDK

You need to have Oracle JDK 6 or 7.

> java –version
java version "1.7.x_yy"
Java(TM) SE Runtime Environment (build 1.7.x_yy-bzz)
Java HotSpot(TM) 64-Bit Server VM (build xx.xx-byy, mixed mode)

Step 4: Verify Firewall Settings

Following ports are at the least needed to be opened for external access, if they are not opened - execute the following commands [Based on your installation recipe, you might need to configure other ports as well, consult Edge Private Cloud Install Config Guide]

iptables -A INPUT  -p tcp -m tcp --dport 8080 -j ACCEPT
iptables -A INPUT  -p tcp -m tcp --dport 9000 -j ACCEPT
iptables -A INPUT  -p tcp -m tcp --dport 9001 -j ACCEPT
service iptables save

Step 5: Verify tcp wrappers to allow slapd.

In rare cases, you also might want to check tcp wrappers. This is needed for openldap to function correctly.

In file /etc/hosts.allow , add the following to the first line

slapd: localhost

Step 6: Verify limits

Update /etc/security/limits.conf to include the following entries

apigee            soft    nofile          5000
apigee            hard    nofile          5000
<non-root-user>       soft    nofile          5000
<non-root-user>       hard    nofile          5000

Update /etc/sysctl.conf to include these values

# Controls the maximum shared segment size, in bytes
kernel.shmmax = 68719476736

# Controls the maximum number of shared memory segments, in pages
kernel.shmall = 4294967296
# Set kernel semaphore params
kernel.sem = 500 32000 32 1024

Verification as non-root user

As non-root user, run apigee-install.sh and verify the following , use a directory that has write access for the non-root user. Typically the ~[home] folder

Now run the checks to make sure everything is alright

LDAP Checks

> ~/opt/apigee4/share/installer/apigee-openldap-check-prerequisites.sh

Checking prerequisites

Package openldap-clients: OK
Package openldap-servers: OK

>

QPID Checks

> ~/opt/apigee4/share/installer/apigee-qpid-check-prerequisites.sh

Checking prerequisites

Package db4-cxx: OK
Package glibc: OK
Package libaio: OK
Package libstdc++: OK
Package libuuid: OK
Package boost-filesystem: OK
Package boost-program-options: OK
Package boost-system: OK
Package boost-test: OK
Package nspr: OK
Package nss: OK
Package nss-util: OK
Package cyrus-sasl-lib: OK

nofile soft for user '<localuser>' is 5000: OK
nofile hard for user '<localuser>' is 5000: OK

>

Postgres Checks

> ~/opt/apigee4/share/installer/apigee-postgres-check-prerequisites.sh

Checking prerequisites

Checking if following packages are installed: uuid libxslt rsync postgresql93 postgresql93-libs postgresql93-contrib postgresql93-server
Package uuid: OK
Package libxslt: OK
Package rsync: OK
Package postgresql93: OK
Package postgresql93-libs: OK
Package postgresql93-contrib: OK
Package postgresql93-server: OK

kernel.sem: OK
kernel.shmmax: OK
kernel.shmall: OK

>

All Good!, Now run the apigee-setup.sh as non-root user

Thanks @bernhard1@rajeshmishra @Paul Mibus @marc.s.schreuder for your inputs

Version history
Last update:
‎06-28-2015 05:35 PM
Updated by: