LiNUX Lab

Ad Hoc Commands Lab 2

We deploy the real environment, you take the scenario-based labs on us. Hands-on, from anywhere, at any time.

Time required: 2 Hours

Scope

Use several commands to install software on your lab server.  Then use the commands to remove them again.

Suggested Pre Requisites

 

Standard tasks for all lab servers to set them up for self-use.

 

Log into the lab server as user then sudo to the root user.

 

sudo su -

 

Install ansible with

 

yum install ansible

 

Add the local server as a local group.

 

Edit the /etc/ansible/hosts file.  Put the following at the top.

 

[local]
localhost

[single]
localhost

[databases]
localhost

[other]
localhost

[temp]
localhost

 

Save the /etc/ansible/hosts file.

 

Create an ansible user to use with the labs. 

 sudo useradd -G wheel ansible

Log out and log in as the ansible user.

Create an ssh key for your user.

 

ssh-keygen

Use the ssh-copy-id command to copy your own ssh key to your own user's authority file.

 


ssh-copy-id localhost

Use the ansible all -m ping command to test connectivity to the localhost.   You should now be ready to use the lab server.

 

 

 

Objectives

Use several commands to install software on your lab server.  Then use the commands to remove them again.

Overview

Use several commands to install software on your lab server.  Then use the commands to remove them again.

Scenarios

1. Setup Lab server as per Pre-requisites.
2. Use several commands to install software on the server.
3. Install yum using ad-hoc commands.
4. remove yum using ad-hoc commands
5. Install php using ad-hoc commands
6. Remove php using ad-hoc commands
7. Select software of your own choice to add to the server.
8. Remove software of your own choice from the server.
9. Use modules from ansible module page using the ad-hoc command.

Share our Labs
Start Your Free Trial

We have the longest and most in depth courses about cloud and engineering topics on the web. All of our training content is included with every membership.