ollae Member since 2013 3 posts
Posted: September 24, 2019
Last activity: September 24, 2019

Some useful commands to navigate to tomcat installation in the LSA App Build 7.31 VM

Hello All,

Below i share some useful commands, as aliases that can help you to jump directly to the main directories of tomcat.

For example the command "log" automatically navigate to the tomcat's logs directory and do the tail on PegaRULES.log. Typing the alias automatically perform the command.

TO NOTE: People with Unix experience administration might be familiar with these commands. For who that has not an experience i suggest to perform these steps with care.

The steps to perform are:

  1. Login into the vm as architect, at startup you should be automatically logged
  2. Open a shell terminal, you are positioned to the architect's home directory /home/architect. If not type cd and you are automatically to this directory.
  3. Type command ls -la to list the hidden configuration files that initiate for "." example: .profile.
  4. Locate the file .bashrc, which is the start up file that initiate the bash shell of the terminal
  5. Launch the command vi .bashrc to open the file with vi.
  6. Go to the end of the file and type letter "o" (without double quotes), this will add a new line, in this case the file shall be opened in editing mode
  7. Position the cursor on this line, and copy then paste the lines below (use right click and select paste)

export TOMCAT_HOME=/opt/tomcat
alias cdapp='cd $TOMCAT_HOME/webapps'
alias cdconf='cd $TOMCAT_HOME/conf'
alias cdlog='cd $TOMCAT_HOME/work/Catalina/localhost/prweb'
alias cdsta='cd $TOMCAT_HOME'
alias log='cd $TOMCAT_HOME/work/Catalina/localhost/prweb; tail -300f PegaRULES.log'

  1. Type the following commands (without double quotes) on the keyboard the ":" and then write wq. This will open the vi editor for commands then save the file and exit the editor
  2. to enable the alias on the current shell type the following command (note the use of "." command to re-launch the script). Next time you launch the terminal the alias will be automatically loaded.

. .bashrc

See in attachment an example of configuration in .bashrc

Available for any support.

Hope it helps,

Eliseo Olla

Low-Code App Development Installation and Deployment
Moderation Team has archived post
Share this page LinkedIn