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
- hosts: localhost | |
vars: | |
- loadbalancer_port: 8080 | |
tasks: | |
- name: Install HAProxy Software | |
package: | |
name: "haproxy" | |
state: present | |
register: haproxyinstall |
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
sudo apt update | |
sudo apt-get install apt-transport-https | |
udo apt-get upgrade | |
sudo apt install virtualbox virtualbox-ext-pack | |
wget https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 | |
chmod +x minikube-linux-amd64 | |
sudo mv minikube-linux-amd64 /usr/local/bin/minikube | |
minikube version | |
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - | |
sudo apt install curl |
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
# Ansible Sample Exam for RHCE EX294 | |
This is a sample Ansible exam that I’ve created to prepare for the new RHCE exam EX294. As with the real exam, no perfect answers to the sample exam questions will be provided, but more or less correct and accurate. | |
## Requirements | |
There are 18 questions in total could be more or less. | |
You will need five RHEL 8 virtual machines to be able to successfully complete all questions. | |
One VM will be configured as an Ansible control node. Other four VMs will be used to apply playbooks to solve the sample exam questions. The following FQDNs will be used throughout the sample exam. |
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
4.A Use the RHEL system role (NEW) | |
Using RHEL system roles | |
Install the RHEL system role package and create a playbook that meets the following conditions /home/student/ansible/selinux.yml: | |
- run on all managed nodes | |
- use the selinux role | |
- To configure this role, configure the selinux of the managed node as enforcing mode. |
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
Metasploit Framework on Ubuntu 18.04 LTS | |
##Install Oracle Java 8 | |
sudo add-apt-repository -y ppa:webupd8team/java | |
sudo apt-get update | |
sudo apt-get -y install oracle-java8-installer | |
##Installing Dependencies |
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
mysql -u root -p | |
CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password'; | |
SELECT user(); | |
SELECT user FROM mysql.user; | |
SELECT user,host FROM mysql.user; | |
SELECT host,user,authentication_string FROM mysql.user; |
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
apt update | |
cp /etc/apt/sources.list /etc/apt/sources.list.old | |
sed -i 's|http://archive.ubuntu.com/ubuntu|http://mirror.xeonbd.com/ubuntu-archive/|g' /etc/apt/sources.list | |
apt update |
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
dnf update -y | |
cat /etc/redhat-release | |
dnf install centos-release-stream -y --allowerasing | |
dnf distro-sync -y | |
cat /etc/redhat-release |
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
[root@localhost ~]# yum update | |
CentOS-8 - AppStream 70 B/s | 38 B 00:00 | |
Error: Failed to download metadata for repo 'AppStream': Cannot prepare internal mirrorlist: No URLs in mirrorlist | |
cd /etc/yum.repos.d/ | |
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* | |
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* | |
yum clean all |
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
mkdir /var/www/example.com/html -pv | |
mkdir /var/www/test.com/html -pv | |
chown -R www-data /var/www/example.com/html/ | |
chown -R www-data /var/www/test.com/html/ | |
chmod -R 755 /var/www | |
ll /var/www/ | |
vim /var/www/example.com/html/index.html | |
<html> | |
<head> |
NewerOlder