Wednesday, April 29, 2015

Chapter 4: Dumping Applications Manager's data to MySQL 5.1


Prerequisites:

It's very important, you have to backup Applications Manager data before you execute this task. We recommended take complete backup of everything in Applications Manager. ( see Chapter 3)

Dumping Applications Manager's data to MySQL 5.1

When starting Applications Manager, MySQL Server 5.0.5, which is bundled with the product, is started. Applications Manager uses this MySQL by default. We strongly recommend you to use this default database itself. If you need to dump data into your own MySQL in that same machine, follow the steps given below.
1. Edit the database_params.conf file located in the <Applications Manager Home>/working/conf directory and change the following URL.
Default URL: jdbc:mysql://localhost:13326/AMDB
Change to: jdbc:mysql://<HOSTNAME>:<PORT>/<DATABASE>
Change the Username and Password to that of the MySQL Server you use.
For example:
[root@poller1 AppManager10]# vim working/conf/database_params.conf
/$Id$


# url is of the form jdbc:subprotocol:DataSourceName for eg.jdbc:odbc:RMEDB


#url jdbc:mysql://localhost:13327/AMDB?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8 AppModules TopoDB-MapDB-EventDB-AlertDB-PollDB-PolicyDB-USERSTORAGEDB-ApplnDB


url jdbc:mysql://localhost:3306/AMDB?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8 AppModules TopoDB-MapDB-EventDB-AlertDB-PollDB-PolicyDB-USERSTORAGEDB-ApplnDB


# driver name


drivername org.gjt.mm.mysql.Driver AppModules TopoDB-MapDB-EventDB-AlertDB-PollDB-PolicyDB-USERSTORAGEDB-ApplnDB






# login username for database if any


username root AppModules TopoDB-MapDB-EventDB-AlertDB-PollDB-PolicyDB-USERSTORAGEDB-ApplnDB






# login password for the database if any


#encryptedpassword eK6q1CJ9697s7O AppModules TopoDB-MapDB-EventDB-AlertDB-PollDB-PolicyDB-USERSTORAGEDB-ApplnDB


password ********* AppModules TopoDB-MapDB-EventDB-AlertDB-PollDB-PolicyDB-USERSTORAGEDB-ApplnDB


# Number of transactional connections. (This number has to be zero for transaction disable mode).


TRANS_CONNECTIONS 0






# Number of non-transactional connections.


NON_TRANS_CONNECTIONS 6






#database name


databasename MYSQL


~


  1. Edit the AppManager_Home/conf/AMServer.properties file, change the port of MySQL from true to false.
[root@poller1 AppManager10]# vim conf/AMServer.properties
#These are the ports that are used by the server.

am.webserver.port=9090

am.ssl.port=8443

am.ssl.enabled=true

am.slasubgroups.enabled=false

am.subgroups.enabled=true

#If installed as service,then on changing am.ssl.enabled=true, Please follow the steps given in the below troubleshooting link before starting the server. http://manageengine.com/products/applications_manager/troubleshoot.html#g7

am.dbserver.type=mysql

am.mysql.port=13327

am.tomcat.shutdown.port=18005

am.webcontainer.port=18009

am.rmiregistry.port=11099

am.shutdown.port=12000

am.traplistener.port=1620

# specify whether these ports need to be checked or not.


am.mysqlport.check=false

am.webserverport.check=true

# This value is used for testing the availability of services.

am.sockettest.timeout=15

am.discover.managed.weblogic=false

am.server.language=en

am.server.country=US

#am.pingtest.command=/bin/ping -c 1 -w 1

#Start up the browser when the serer starts up.

am.browser.startup=true

am.upload.enabled=true

am.cam.mbeanslistsize=250

am.spacecheck.warning=true

am.server.type=NORM

am.edition.type=

am.adminserver.host=N.A

am.adminserver.port=N.A

am.server.startresidrange=10000000

am.adminserver.deletesql=true

am.standalonesdp.enabled=false

am.ssl.truststore=

# These value are used for supporting websites with Windows NTLM authentication.

am.ntlm.securityprovider=cryptix.jce.provider.CryptixCrypto

am.ntlm.hostname=appmanager.vtg

am.ntlm.hostdomainname=

# The drives begining with the characters given below will not be monitored in server monitor.

am.disks.ignore=

am.weblogic78.authenabled=false

am.telnet.loginTimeOut=30000

am.server.command.responsetimeout=40

am.sendmonerrormail.enabled=true

am.errorpoll.count=3

am.mqdelrow.enabled=false

am.alertmsgchange.enabled=false

am.filesize.unit=KB

am.dirsize.unit=MB

am.script.deleterow=true

am.host.deleteDisk=true

am.processinstance.equals=false

am.executeaction.size=400

am.querymonitor.rowcount=50

am.query.timeout=60

am.ftp.filesize=10
am.appmanager.hostname=appmanager.vtg

am.html.dirsize=10485760

am.htmldata.jre.daystoretain=30

am.htmldata.mysql.daystoretain=30

am.oomexception.duration=30

am.oomexception.count=20

am.report.weekStartDay=1

# The below values is used to enable the Monitor Group Status View option in EnterPrise/Professional Edition Admin Tab.

am.admin.mgstatusview.enabled=false

am.log.dir=../logs/

am.createSupportZipFile=true

am.expandWidgets=false

  1. Start the Applications Manager. Note: When starting Applications Manager, you will get a warning message MySQL Port is used by some other Application. You can ignore this message.
[root@poller1 AppManager10]# nohup sh startApplicationsManager.sh &

[root@poller1 AppManager10]# tailf nohup.out
Log handler name : com.adventnet.management.log.Log4jHandler

XML File name : log4j_conf.xml



Starting Applications Manager "Primary" Server Modules, please wait ...





Process : AMScriptProcess [ Started ]

Process : AMExtProdIntegrationProcess [ Started ]

Process : AuthMgr [ Started ]

Process : AMDataCleanupProcess [ Started ]

Process : NmsPolicyMgr [ Started ]

Process : DBUserStorageServer [ Started ]

Process : StartRelatedServices [ Started ]

Process : NMSMServer [ Started ]

Process : AMUrlMonitorProcess [ Started ]

Process : WSMProcess [ Started ]

Process : RunRmiRegistry [ Started ]

Process : NmsAuthenticationManager [ Started ]

Process : APMTracker [ Started ]

Process : NmsConfigurationServer [ Started ]

Process : StandaloneApplnProcess [ Started ]

Process : RunJSPModule [ Started ]

Process : AMRBMProcess [ Started ]

Process : ApplnStandaloneBE [ Started ]

Process : AMDistributionProcess [ Started ]

Process : AMCAMProcess [ Started ]

Process : NMSSAServer [ Started ]

Process : AMServerStartUp [ Started ]

Process : NmsAuthManager [ Started ]

Process : MapServerBE [ Started ]

Process : Collector [ Started ]

Process : DBServer [ Started ]

Process : AMFaultProcess [ Started ]

Process : AMEventProcess [ Started ]

Process : MonitorsAdder [ Started ]

Process : AMServerFramework [ Started ]

Process : AMDataArchiverProcess [ Started ]

Process : EventFE [ Started ]

Process : AlertFE [ Started ]

Process : NmsMainFE [ Started ]



Verifying connection with web server... verified



Applications Manager started successfully.



Please connect your client to the web server on port: 9090





Chapter 2: Installing and Upgrading MySQL 5.0 to MySQL 5.1


Prerequisites:




Check your OS' version:
[root@poller1 ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.5 (Santiago)

Check your existing MySQL that came with the Linux:
[root@poller1 mysql]# rpm -qa | grep -i mysql5.0.95-5.el5_9

perl-DBD-MySQL-3.0007-2.el5

mysql-5.0.95-5.el5_9

mysql-connector-odbc-3.51.30-0

mysql-5.0.95-5.el5_9

Login your existing MySQL and check your database:
[root@PTUDServer3 Desktop]# mysql -u root -p

Enter password:
***********
Welcome to the MySQL monitor. Commands end with ; or \g.

Your MySQL connection id is 63

Server version: 5.0.95-log Source distribution



Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.



Oracle is a registered trademark of Oracle Corporation and/or its

affiliates. Other names may be trademarks of their respective

owners.



Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.



mysql> show databases;

+--------------------+

| Database |

+--------------------+

| information_schema |

| mysql |

| test |
+--------------------+

3 rows in set (0.37 sec)



mysql>
use test;
Database changed
mysql> show tables;
empty in set (0.00 sec)
mysql>

You ensure haven't any application runs your MySQL. I checked no important application use my MySQL. So, I can remove it.

Remove the existing default MySQL that came with the Linux.

[root@poller1 mysql]# rpm -ev perl-DBD-MySQL-3.0007-2.el5
[root@poller1 mysql]# rpm -ev --allmatches mysql-5.0.95-5.el5_9

warning: /etc/my.cnf saved as /etc/my.cnf.rpmsave



[root@poller1 mysql]# rpm -qa | grep -i mysql

mysql-connector-odbc-3.51.30-0

You have new mail in /var/spool/mail/root

Download MySQL 5.1.73 prepare for installation:

You access the internet via address: http://dev.mysql.com/downloads/mysql/5.1.html to download file.

In Generally Available(GA) Releases tab, Select version 5.1.73 and select Platform: your OS'version, I choose Red Hat Enterprise Linux/ Oracle Linux. Here, you see a list file for download, I get file Red Hat Enterprise Linux 5 / Oracle Linux 5 (x86, 64-bit), RPM Bundle (MySQL-community-5.1.73-1.rhel5.x86_64.rpm-bundle.tar), click Download. You have to login with Oracle Account to download.

Prepare installing Directory:
[root@poller1 ~]# mkdir mysql

[root@poller1 ~]# cd mysql

[root@poller1 mysql]# ls

Transfer installing data to installation directory:
Because I access server via command line (ssh), so I need download file from my computer then transfer data to server.
[root@poller1 mysql]# scp root@192.168.2.133:/root/Downloads/MySQL-community-5.1.73-1.rhel5.x86_64.rpm-bundle.tar .
root@192.168.2.133's password:
***********
MySQL-community-5.1.73-1.rhel5.x86_64.rpm-bundle.tar 100% 156MB 11.2MB/s 00:14

Installing MySQL 5.1.73

Extracting downloaded file to your installing directory:
[root@poller1 mysql]# tar -xvpf MySQL-community-5.1.73-1.rhel5.x86_64.rpm-bundle.tar



MySQL-community-debuginfo-5.1.73-1.rhel5.x86_64.rpm



MySQL-embedded-community-5.1.73-1.rhel5.x86_64.rpm



MySQL-client-community-5.1.73-1.rhel5.x86_64.rpm



MySQL-shared-compat-5.1.73-1.rhel5.x86_64.rpm



MySQL-server-community-5.1.73-1.rhel5.x86_64.rpm



MySQL-devel-community-5.1.73-1.rhel5.x86_64.rpm



MySQL-shared-community-5.1.73-1.rhel5.x86_64.rpm



MySQL-test-community-5.1.73-1.rhel5.x86_64.rpm



[root@poller1 mysql]#



Install MySQL client-server:

[root@poller1 mysql]# rpm -ivh MySQL-server-community-5.1.73-1.rhel5.x86_64.rpm MySQL-client-community-5.1.73-1.rhel5.x86_64.rpm

Preparing... ########################################### [100%]

1:MySQL-client-community ########################################### [ 50%]

Giving mysqld 5 seconds to exit nicely

2:MySQL-server-community ########################################### [100%]



PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !

To do so, start the server, then issue the following commands:



/usr/bin/mysqladmin -u root password 'new-password'

/usr/bin/mysqladmin -u root -h poller1 password 'new-password'



Alternatively you can run:

/usr/bin/mysql_secure_installation



which will also give you the option of removing the test

databases and anonymous user created by default. This is

strongly recommended for production servers.



See the manual for more instructions.



Please report any problems with the /usr/bin/mysqlbug script!



Starting MySQL.[ OK ]

Giving mysqld 2 seconds to start



Install the “Header and Libraries” that are part of the MySQL-devel packages.

[root@poller1 mysql]# rpm -ivh MySQL-devel-community-5.1.73-1.rhel5.x86_64.rpm

Preparing... ########################################### [100%]

1:MySQL-devel-community ########################################### [100%]

You have new mail in /var/spool/mail/root

[root@poller1 mysql]#

At a bare minimum you should set a password for the root user as shown below:
[root@poller1 mysql]# /usr/bin/mysqladmin -u root password '***********'

You have new mail in /var/spool/mail/root

Editing the MySQL Server configuration file:
[root@poller1 etc]# cp my.cnf.rpmnew my.cnf

You have new mail in /var/spool/mail/root

[root@poller1 etc]# vim /etc/my.cnf

[mysqld]

port = 3306

datadir=/var/lib/mysql

log-bin=/var/lib/mysql/poller1-bin

max_binlog_size=4096

binlog_format=row

socket=/tmp/mysql.sock

user=mysql

# Default to using old password format for compatibility with mysql 3.x

# clients (those using the mysqlclient10 compatibility package).

old_passwords=1



# Disabling symbolic-links is recommended to prevent assorted security risks;

# to do so, uncomment this line:

# symbolic-links=0



[mysqld_safe]

log-error=/var/log/mysqld.log

pid-file=/var/run/mysqld/mysqld.pid

[client]

port = 3306

socket=/tmp/mysql.sock

Restarting MySQL Server:
[root@poller1 etc]# service mysql restart

Shutting down MySQL... [ OK ]

Starting MySQL. [ OK ]

Login your new MySQL 5.1:
[root@poller1 etc]# mysql -u root -p

Enter password:

Welcome to the MySQL monitor. Commands end with ; or \g.

Your MySQL connection id is 64

Server version: 5.1.73-community-log MySQL Community Server (GPL)



Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.



Oracle is a registered trademark of Oracle Corporation and/or its

affiliates. Other names may be trademarks of their respective

owners.



Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.



mysql> show databases;

+--------------------+

| Database |

+--------------------+

| information_schema |

| mysql |

| test |

+--------------------+

3 rows in set (0.00 sec)






mysql> create database AMDB;

Query OK, 1 row affected (0.02 sec)

Create database AMDB;

mysql> commit;

Query OK, 0 rows affected (0.00 sec)



mysql>

Chapter 3: Backup and Restore Applications Manager data


The following are the methods for backing up Applications Manager, check them and use the one appropriate to you.
  • Via Script File.
    Use the BackupMysqlDB.bat /.sh or BackupPGSQLDB.bat/.sh available in <AppManager Home>/bin directory to take a backup copy inclusive of conf files of Applications Manager and the database backup. In this backup we take configuration files of MySQL or PGSQL DB, Applications Manager tool and data stored in DB. To restore these files back into Applications Manager you can use the RestoreMysqlDB.bat / .sh or RestorePGSQLDB.bat/.sh file in the same directory. Kindly refer the help https://www.manageengine.com/products/applications_manager/help/appendix/data-backup.html. Applications Manager can be running while taking backup, but to restore we have to stop it.
For Example:
[root@poller1 AppManager10]# cd bin


[root@poller1 bin]# ls


BackupMysqlDB.sh ReportMysqlDataMigration.sh


createSupportFile.sh RestoreMysqlDB.sh


exportCertificateToAppManager.sh ServerSSHTroubleshoot.sh


migrateI18Nfor9.sh troubleshooting


optimizeMysqlDB.sh UniqueIDLinux.sh


Recorder.exe updateLicense.sh


reinitialize.sh updateManager.sh


repairMysqlDB.sh


[root@poller1 bin]# sh BackupMysqlDB.sh


Starting mysqld daemon with databases from /home/appmanager/ManageEngine/AppManager10/AppManager10/working/mysql/data


Data successfully backed up in the file /home/appmanager/ManageEngine/AppManager10/AppManager10/working/backup/AM_back_up_2015-04-27_09_41_33.sql


Apr 27, 2015 9:43:18 AM com.adventnet.appmanager.util.MysqlZip main


INFO: length 1


Apr 27, 2015 9:43:18 AM com.adventnet.appmanager.util.MysqlZip main


INFO: backupfile


Apr 27, 2015 9:43:18 AM com.adventnet.appmanager.util.MysqlZip getFileName


INFO: backupfile


Apr 27, 2015 9:43:18 AM com.adventnet.appmanager.util.MysqlZip main


INFO: Zipping the databases


INFO: Data successfully backed up in /home/appmanager/ManageEngine/AppManager10/AppManager10/working/backup/backupzip_Apr_27_2015_9_43_18/backupzip_Apr_27_2015_9_43_18.zip


STOPPING server from pid file /home/appmanager/ManageEngine/AppManager10/AppManager10/working/mysql/data/poller1.pid


150427 09:44:59 mysqld ended






You have new mail in /var/spool/mail/root



  • DB backup alone (for MySQL backend only)
    Applications Manager stores all information of the resources it monitor's in it's database. Hence you can just copy the database folder. The database folder location is<App Manager Home>/working/mysql/data/AMDB. To restore this backup you just need to replace the backup copy in AppManager_home/working/mysql/data/folder (rename the existing folder). Applications Manager must be stopped while copying the AMDB directory.
  • Complete Backup (for MySQL backend only)
    This method takes a complete backup of everything in Applications Manager. Like the DB, Conf files & patches already applied in the build you are using. Here you just need to make a copy of the AppManager_home folder either zip it up or copy and paste it in a different location. To restore just paste the backup copy to the same location (rename the existing folder). Applications Manager must be stopped while copying the <App Manager Home> directory.
  • If the Application Manager build is below 8010 please contact our appmanager-support@manageengine.com team for assistance.
  • Note: These steps are for MySQL / PgSQL backend database. If you are using MSSQL , take backup of the corresponding database in your MSSQL server using steps in this after stopping Applications Manager.
    To take the configuration files alone as backup you can run BackupConfig.bat (sh) /RestoreConfig.bat (sh) available in<
    AppManager Home>/bin directory.



Saturday, April 18, 2015

How to Open Port 3306 on Redhat


Step1: Editing this file directly:
[root@PTUDServer3 MySQL]# vim /etc/sysconfig/iptables
# Generated by iptables-save v1.4.7 on Sat Mar 14 11:38:50 2015
*nat
:PREROUTING ACCEPT [331:34227]
:POSTROUTING ACCEPT [4:240]
:OUTPUT ACCEPT [4:240]
-A POSTROUTING -s 192.168.122.0/24 ! -d 192.168.122.0/24 -p tcp -j MASQUERADE --to-ports 1024-65535
-A POSTROUTING -s 192.168.122.0/24 ! -d 192.168.122.0/24 -p udp -j MASQUERADE --to-ports 1024-65535
-A POSTROUTING -s 192.168.122.0/24 ! -d 192.168.122.0/24 -j MASQUERADE
COMMIT
# Completed on Sat Mar 14 11:38:50 2015
# Generated by iptables-save v1.4.7 on Sat Mar 14 11:38:50 2015
*mangle
:PREROUTING ACCEPT [339:34627]
:INPUT ACCEPT [12:1736]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [8:400]
:POSTROUTING ACCEPT [8:400]
-A POSTROUTING -o virbr0 -p udp -m udp --dport 68 -j CHECKSUM --checksum-fill
COMMIT
# Completed on Sat Mar 14 11:38:50 2015
# Generated by iptables-save v1.4.7 on Sat Mar 14 11:38:50 2015
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
COMMIT
# Completed on Sat Mar 14 11:38:50 2015
To open port 3306 insert this line between *filter and COMMIT:
-A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT
Result, I insert like this:
# Generated by iptables-save v1.4.7 on Sat Mar 14 11:38:50 2015
*nat
:PREROUTING ACCEPT [331:34227]
:POSTROUTING ACCEPT [4:240]
:OUTPUT ACCEPT [4:240]
-A POSTROUTING -s 192.168.122.0/24 ! -d 192.168.122.0/24 -p tcp -j MASQUERADE --to-ports 1024-65535
-A POSTROUTING -s 192.168.122.0/24 ! -d 192.168.122.0/24 -p udp -j MASQUERADE --to-ports 1024-65535
-A POSTROUTING -s 192.168.122.0/24 ! -d 192.168.122.0/24 -j MASQUERADE
COMMIT
# Completed on Sat Mar 14 11:38:50 2015
# Generated by iptables-save v1.4.7 on Sat Mar 14 11:38:50 2015
*mangle
:PREROUTING ACCEPT [339:34627]
:INPUT ACCEPT [12:1736]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [8:400]
:POSTROUTING ACCEPT [8:400]
-A POSTROUTING -o virbr0 -p udp -m udp --dport 68 -j CHECKSUM --checksum-fill
COMMIT
# Completed on Sat Mar 14 11:38:50 2015
# Generated by iptables-save v1.4.7 on Sat Mar 14 11:38:50 2015
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT
COMMIT
# Completed on Sat Mar 14 11:38:50 2015

Save this file via press Esc, type wq

Step 2: Next, you need to restart iptables:
[root@PTUDServer3 MySQL]# service iptables restart
iptables: Setting chains to policy ACCEPT: filter mangle na[ OK ]
iptables: Flushing firewall rules: [ OK ]
iptables: Unloading modules: [ OK ]
iptables: Applying firewall rules: [ OK ]

Finish, Goodluck!

Chapter 1: Applications Manager


# Introduction:

ManageEngine® Applications Manager is a comprehensive application monitoring software used to monitor heterogeneous business applications such as web applications, application servers, web servers, databases, network services, systems, virtual systems, cloud resources, etc. It provides remote business management to the applications or resources in the network. It is a powerful tool for system and network administrators, helping them monitor any number of applications or services running in the network without much manual effort.



Applications Manager offers out-of-the-box discovery, availability, health, performance and fault management, and reporting of multi--vendor applications.



Alarms are generated to notify the faults in the application and are configured to trigger actions, such as notifying the user through e-mail, SMS, trap, executing a command and invoking a MBean operation. Through alarms, you can identify the root cause of any problem in the network with just a few clicks. Additionally, the flexible architecture of the Applications Manager allows you to manage any application (J2EE or J2SE) that exposes management information via JMX or SNMP through custom applications.

# 1. How to install Applications Manager on Linux:

Step 1: Download the product for linux

then you get a file have name: ManageEngine_ApplicationsManager_64bit.bin

Step 2: Execute the downloaded file. The Installation Wizard is displayed. Click Next to continue. Read the license agreement and click Next.

Run the scripts: shell> ./ManageEngine_ApplicationsManager_11_linux.bin -console

Step 3: The next screen prompts for the product edition (Free Edition, Professional Edition, Enterprise Edition). Select the preferred edition to install. If Professional - is selected, follow the below given steps.

Step 4: Select the language in which you wish to install Applications Manager. The options are English, Simplified Chinese, Japanese, Vietnamese, French, German, European Spanish, Korean, Hungarian and Traditional Chinese.

Step 5: Choose whether it is trial or registered. If registered, the next screen will prompt you to select the registered license file from your system.

Step 6: Specify the port at which web server has to be started. By default, it is 9090. This is the port at which you will connect the web client.

Step 7: Select the Database back-end support - PostgreSQL (Bundled with the product. No Setup required) or Microsoft SQL Server (version 2005 and 2008).

Step 8: If you select Microsoft SQL Server, you need to select if it is based on SQL Authentication or Windows Authentication. If it is based on SQL Authentication, enter the Host Name, Port Number, Database Name, User Name, Password of the SQL Server. If it is based on Windows Authentication, enter the Host Name, Port Number, Database Name of the SQL Server and the User Name , Password of the machine in which SQL Server is running. Also provide minimum privileges required : The user account should be the DB_Owner of the created Database.

Step 9: Provide the location where the Applications Manager should be installed in your machine. Click Next.

Step 10: Current Settings is displayed in the next screen. If you need to make changes, click Back, else click Next to continue installation.

Step 11: Click Finish to complete the installation process.

Step 12: If you had selected Free License, follow the steps from 4 to 9 .

Step 13: If you had selected Enterprise Edition, choose if you want install applications manager as Admin server or Managed server.

Step 14: If you had selected Enterprise Edition - Admin Server, next you have to enter the Admin server host name, Port number and SSL Port number. Then follow the steps from 4 to 9.

Step 15: If you had selected Enterprise Edition - Managed Server, enter the associated Admin server Host name and SSL port number. If a proxy server is needed to contact the admin server from the Managed Server machine, click on the proxy server check box. In the next screen, enter the Host name, Port number, User Name and Password of the proxy server. Then follow steps from 4 to 9.

Step 16: You have an option to fill up a registration form for Technical Support.

Step 17: Finally, select if you want to view the ReadMe file or click Finish to launch Applications Manager immediately.



# 2. Shutdown and Start Applications Manager on Linux:

Example:

# Shutdown:

[root@PTUDServer3 AppManager10]# cd /opt/ME/AppManager10

[root@PTUDServer3 AppManager10]# sh shutdownApplicationsManager.sh -force

The Applications Manager on host "localhost" was successfully shutdown

# Start:

[root@PTUDServer3 AppManager10]# nohup sh startApplicationsManager.sh &

[2] 7844

[1] Exit 1 nohup sh startApplicationsManager.sh

[root@PTUDServer3 AppManager10]# nohup: ignoring input and appending output to `nohup.out'



# 3. How to Connect Mysql in Applications Manager:

Example 1:
shell> /opt/ME/AppManager10/working/mysql/bin/mysql --port=13326 --socket=/opt/ME/AppManager10/working/mysql/mysql.sock -uroot -p

Example 2:
shell> /home/appmanager/ManageEngine/AppManager10/working/mysql/bin/mysql --port=13326 –socket=/home/appmanager/ManageEngine/AppManager10/working/mysql/mysql.sock -uroot -p

# 4. How to connect the web client

Access on web browser: http://192.168.2.133:9090


# 5. How to Upgrade MySQL in Applications Manager to the latest version


NOTE:
* You can use your own MySQL Server, but you should have a separate database for Applications Manager. For example, you cannot give the same databasename for the both OpManager and Applications Manager.
* For using your MySQL, the MySQL should be running even before Applications Manager starts. If your MySQL stops, Applications Manager will shut down or data may be lost.
* You have to use MySQL version 5.X only for running Applications Manager and choose MyISAM as the default storage engine for your MySQL installation.
* Stop the Applications Manager server (if the product is already running) and then take backup of the below files & then proceed to make the changes.
* You have to copy the AppManagerHome\working\mysql\data\"AMDB" directory to your own \MySQLHome\data\ directory if you need to retain your existing data in the Applications Manager.
* When starting Applications Manager, you will get a warning message MySQL Port is used by some other Application. You can ignore this message.
Step for Windows,
By default Appmanager - C:\Program Files\ManageEngine\Appmanager
<Appmanager\conf\AMServer.properties> - Change <am.mysql.port> to the MySQL port number
(eg:
<am.mysql.port=3306> )

<Appmanager\conf\AMServer.properties> - Change <am.mysqlport.check> to false
(eg: <am.mysqlport.check=false> )

<Appmanager\working\conf\MySQL\database_params.conf> - Change <jdbc:mysql://localhost:13326/AMDB> to <jdbc:mysql://mysqlhost:mysqlport/databasename> 
( eg: <jdbc:mysql://localhost:3306/AMDB> )
<Appmanager\working\conf\MySQL\database_params.conf> - Change username & password fields as required
<Appmanager\working\bin\startMySQL.bat> - Comment the line starting with <mysqld-nt>
( eg: rem mysqld-nt .. )

<Appmanager\working\bin\stopMySQL.bat> - Comment the line starting with mysqladmin
(eg: rem mysqladmin .. )


Step for Linux,

By default Appmanager - /opt/ManageEngine/Appmanager
<Appmanager/conf/AMServer.properties> - Change <am.mysql.port> to the MySQL port number
(eg: <am.mysql.port=3306> )
<Appmanager/conf/AMServer.properties> - Change <am.mysqlport.check> to false
(<eg: am.mysqlport.check=false> )
<Appmanager/working/conf/MySQL/database_params.conf> - Change <jdbc:mysql://localhost:13326/AMDB> to <jdbc:mysql://mysqlhost:mysqlport/databasename> 
(eg: <jdbc:mysql://localhost:3306/AMDB> )<Appmanager/working/conf/MySQL/database_params.conf> - Change username & password fields as required

<Appmanager/startApplicationsManager.sh> - Comment the 3 lines

if [ $? != 51 ]
. $NMS_HOME/bin/stopMySQL.sh
fi

using # in that file.
After executing the above steps, restart the server.

Sample Files :

<AMServer.properties>
am.mysql.port=3306
am.mysqlport.check=false

<database_params.conf>
url jdbc:mysql://appmanager:3306/AMDB AppModules TopoDB-MapDB-EventDB-alarmDB-PollDB-PolicyDB-USERSTORAGEDB-ApplnDB
username root AppModules TopoDB-MapDB-EventDB-alarmDB-PollDB-PolicyDB-USERSTORAGEDB-ApplnDB
#encryptedpassword eK6q1CJ9697s7O AppModules TopoDB-MapDB-EventDB-AlertDB-PollDB-PolicyDB-USERSTORAGEDB-ApplnDB
password appmanager AppModules TopoDB-MapDB-EventDB-AlertDB-PollDB-PolicyDB-USERSTORAGEDB-ApplnDB
* If your MySQL does not require a password to connect, the password line in <database_params.conf> should be commented as shown in the above example using the #.
* Otherwise instead of commenting the password line in the <database_params.conf> file, just replace the string 'appmanager' with the password of the your MySQL. Change the encryptedpassword to  password and followed by your password of MySQL in the database_params.conf file, while starting it will be automatically encrypted.
* The user should have all the privileges on the AMDB database (Applications Manager database)
startMySQL.bat ( for windows )
rem mysqld-nt --defaults-file=%MYSQL_HOME%\my.ini -u root -b .. --standalone --port=13326

stopMySQL.bat ( for windows )
rem mysqladmin -pappmanager -u root --port=13326 shutdown

startApplicationsManager.sh ( for Linux )
# if [ $? != 51 ]; then
# . $NMS_HOME/bin/stopMySQL.sh
# fi