This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: This sets up an httpd webserver | |
hosts: all | |
tasks: | |
- name: Install apache packages | |
yum: | |
name: httpd | |
state: present | |
- name: ensure httpd is running | |
service: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Command Structure for use this script, | |
# Command: | |
# ./nagios-port-monitoring.sh -p 5999 -w 3 -c 5 | |
# Result: | |
# CRITICAL- 0 Established connection on PORT 5999 | 'Usage'=0;3;5;0;10 | |
# Status Code | |
# STATE_OK=0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
============================================================================================ | |
Step1) Creating a Prometheus user and group | |
============================================================================================ | |
useradd -m -s /bin/false prometheus | |
id prometheus | |
============================================================================================ | |
Step 2) Creating configuration directories for Prometheus | |
============================================================================================ | |
mkdir /etc/prometheus |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. sudo useradd -m -s /bin/bash test | |
2. sudo usermod -a -G sudo test | |
3. pwd (If the direcotry is on /home/test) | |
touch .ssh | |
4. cd .ssh/ | |
touch id_rsa | |
5. chgrp test /home/test/.ssh/id_rsa | |
chmod 640 /home/test/.ssh/id_rsa | |
6. sudo chown test -R /home |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. sudo useradd -m -s /bin/bash test | |
2. sudo usermod -a -G sudo test | |
3. pwd (If the direcotry is on /home/test) | |
touch .ssh | |
4. cd .ssh/ | |
touch id_rsa | |
5. chgrp test /home/test/.ssh/id_rsa | |
chmod 640 /home/test/.ssh/id_rsa | |
6. sudo chown test -R /home |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:16.04 | |
RUN apt-get update | |
RUN apt-get install -y nginx | |
RUN apt-get update | |
COPY nginx.conf /etc/nginx/nginx.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Select Stdt.name | |
FROM Students Stdt, | |
Friends Frnd,Packages Pkg1,Packages Pkg2 | |
Where Pkg2.Salary > Pkg1.Salary | |
and Pkg2.ID = Frnd.Friend_ID and Pkg1.ID = Stdt.ID and Stdt.ID = Frnd.ID | |
Order by Pkg2.Salary; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. sudo useradd -m -s /bin/bash test | |
2. sudo usermod -a -G sudo test | |
3. pwd (If the direcotry is on /home/test) | |
touch .ssh | |
4. cd .ssh/ | |
touch id_rsa | |
5. chgrp test /home/test/.ssh/id_rsa | |
chmod 640 /home/test/.ssh/id_rsa | |
6. sudo chown test -R /home |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Document</title> | |
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> | |
<title>Document</title> | |
</head> |
NewerOlder