Skip to content

Instantly share code, notes, and snippets.

Avatar
🏦
Working from home

Showeb Arif Siddiquie DevSecOpsGuy

🏦
Working from home
View GitHub Profile
View mysql.sh
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;
View ubuntumirror.sh
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
@DevSecOpsGuy
DevSecOpsGuy / CentOS-Stream.sh
Created Apr 2, 2022
Upgrade CentOS 8 to CentOS Stream
View CentOS-Stream.sh
dnf update -y
cat /etc/redhat-release
dnf install centos-release-stream -y --allowerasing
dnf distro-sync -y
cat /etc/redhat-release
@DevSecOpsGuy
DevSecOpsGuy / CentOS-EOL.sh
Last active Apr 2, 2022
Fix Failed to download metadata for CentOS Linux 8 End Of Life (EOL) repo
View CentOS-EOL.sh
[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
View nginx-virtualhost.sh
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>
View Lemp-wordperss.sh
wget https://wordpress.org/latest.tar.gz
tar -zxvf latest.tar.gz
cp -rfv wordpress/ /var/www/html/
cd /var/www/html/
ls -l
chown www-data:www-data wordpress/
View lemp.sh
apt update
ufw status
apt install nginx
systemctl status nginx
ufw app list
ufw allow "nginx full"
View LEMP_Stack_Ubuntu_Focal.md

How to Install Nginx with PHP and MySQL (LEMP Stack) on Ubuntu 20.04 LTS

Nginx (pronounced "engine x") is a free, open-source, high-performance HTTP server. Nginx is known for its high speed, stability, rich feature set, simple configuration, and low resource consumption. This tutorial shows how you can install Nginx on an Ubuntu 20.04 LTS server with PHP 7.4 support (through PHP-FPM) and MySQL support (LEMP = Linux + Nginx (pronounced "engine x") + MySQL + PHP).

Prerequisites
Ubuntu 20.04 LTS Server
View RHCE8-EX294-Practice-Exam.md

Requirements

There are 18 questions in total. You will need five RHEL 8 (or CentOS 😎 virtual machines to be able to successfully complete all questions.

Optional Automatic Exam Setup Available

Here is an automated exam environment deployment for Mac/Linux/Windows that deploys the practice exam environment for you, including IPA server/client installation and configuration. You can also use your own lab environment. Navigate to the respective repo you wish to use for this practice exam and follow the README instructions:

https://github.com/rdbreak/rhce8env, https://github.com/rdbreak/ansible27env, https://github.com/rdbreak/ansible8env.

@DevSecOpsGuy
DevSecOpsGuy / RH415.md
Created Sep 15, 2021 — forked from luckylittle/RH415.md
Red Hat RH415 Notes
View RH415.md

Red Hat Security: Linux in Physical, Virtual and Cloud (RH415)

Last update: Mon Nov 18 05:32:46 UTC 2019 by @luckylittle


1. Managing Security & Risk

# USING YUM TO MANAGE SECURITY ERRATA: