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:
- Login into the vm as architect, at startup you should be automatically logged
- 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.
- Type command ls -la to list the hidden configuration files that initiate for "." example: .profile.
- Locate the file .bashrc, which is the start up file that initiate the bash shell of the terminal
- Launch the command vi .bashrc to open the file with vi.
- 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
- 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'
- 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
- 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,
Regards
Eliseo Olla