Getting Started with Scripting
- Create an ubuntu server.
- We need the following softwares to be installed
- nano:
sudo apt install nano
- tree:
sudo apt install tree
- git:
sudo apt install git
- nano:
- Create a
utils.sh
sudo apt update
sudo apt install nano
sudo apt install tree
sudo apt install git
- now lets try to add java installation
sudo apt update
sudo apt install nano -y
sudo apt install tree -y
sudo apt install git -y
sudo apt install openjdk-11-jdk -y
- directly executing the utils.sh gives the following error
- While writing scripting areas to consider
-
Assumptions for the activity:
- Aware of basic commands to copy the files etc.
- Knowledge of environmental variables and especially importance of PATH variable.
- On the ubuntu instance we have installed apache, mysql server and we have installed java and downloaded the spring petclinic and executed it.
- Activity 1:
- Write a shell script to
- install apache server
- install mysql server
- install openjdk 11
- download the spring petclinic
- run the spring petclinic application in the background
- Write a shell script to
- Activity 2:
- Try doing activity 1 on a redhat server.
- Activity 3:
- Review your work and find out areas of improvement.