Skip to content

Instantly share code, notes, and snippets.

View kenmoini's full-sized avatar
⚙️
OPENSHIFTING IT INTO HIGH GEAR

Ken Moini kenmoini

⚙️
OPENSHIFTING IT INTO HIGH GEAR
View GitHub Profile
@kenmoini
kenmoini / nginx.conf
Created January 13, 2019 20:07
Nginx Config on Ubuntu 18 LTS
user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;
events {
worker_connections 1024;
multi_accept on;
}
@kenmoini
kenmoini / php.ini
Created January 13, 2019 19:58
PHP 7.2 FPM Config
[PHP]
engine = On
short_open_tag = Off
precision = 14
output_buffering = 4096
zlib.output_compression = Off
implicit_flush = Off
unserialize_callback_func =
serialize_precision = -1
disable_functions = pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
@kenmoini
kenmoini / installLaravelOnUbuntu18LTS.sh
Last active September 2, 2019 07:40
Set up an Ubuntu 18.04 LTS system as close to as possible to a base Laravel Homestead configuration (no go/wp-cli/etc just stuff for Laravel)
#!/bin/bash
# Install...
## Git
## nginx
## composer
## Redis
## MariaDB
## Memcached
sudo apt-get install git nginx mariadb-server mariadb-client composer curl ufw redis-server memcached -y
@kenmoini
kenmoini / installLaravelOnFedora.sh
Last active January 12, 2019 21:35
installLaravelOnFedora.sh
#!/bin/bash
DOMAIN="dev.denovo.press"
TEST_DOMAIN="dev.denovo.test"
USERNAME=$(whoami)
sudo dnf install composer php-openssl php-pdo php-mbstring php-xml php-json php-bcmath php-ctype php-tokenizer mariadb-server mariadb nginx
sudo mkdir -p /var/www/$DOMAIN
sudo chown $USERNAME:$USERNAME /var/www/$DOMAIN
@kenmoini
kenmoini / fix-wordpress-permissions.sh
Created November 25, 2018 05:28 — forked from Adirael/fix-wordpress-permissions.sh
Fix wordpress file permissions
#!/bin/bash
#
# This script configures WordPress file permissions based on recommendations
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions
#
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org>
#
WP_OWNER=www-data # <-- wordpress owner
WP_GROUP=www-data # <-- wordpress group
WP_ROOT=$1 # <-- wordpress root directory
@kenmoini
kenmoini / 1_dmz-provisioner.sh
Last active October 12, 2018 21:15
Disconnected DevSecOps with Red Hat OpenShift Container Platform
#!/bin/bash
LOCAL_REPO_PATH="/opt/repos"
# This script enables the needed RHEL, OpenShift, Gluster, Ansible, HA, and additional repos needed to mirror them locally.
# The locally created mirror can then be used to deploy OCP into a disconnected environment.
#===== PRE-RUN NOTES:
# This assumes you've already registered and subscribed to the needed OpenShift, Gluster, Ansible, and RHEL subscriptions.
@kenmoini
kenmoini / kemo-ose.repo.example
Created October 12, 2018 00:57
Disconnected DevSecOps with Red Hat OpenShift Container Platform - Repo Host config
[rhel-7-server-rpms]
name=rhel-7-server-rpms
baseurl=http://SERVER_IP_HERE/repos/rhel-7-server-rpms
enabled=1
gpgcheck=0
[rhel-7-server-extras-rpms]
name=rhel-7-server-extras-rpms
baseurl=http://SERVER_IP_HERE/repos/rhel-7-server-extras-rpms
enabled=1
@kenmoini
kenmoini / 1_dmz-provisioner.sh
Last active March 18, 2019 14:52
Disconnected DevSecOps with Red Hat OpenShift Container Platform - DMZ Repo Mirror Provisioner
#!/bin/bash
LOCAL_REPO_PATH="/opt/repos"
# This script enables the needed RHEL, OpenShift, Gluster, Ansible, HA, and additional repos needed to mirror them locally.
# The locally created mirror can then be used to deploy OCP into a disconnected environment.
#===== PRE-RUN NOTES:
# This assumes you've already registered and subscribed to the needed OpenShift, Gluster, Ansible, and RHEL subscriptions.
@kenmoini
kenmoini / sync_all_repos.sh
Created September 29, 2018 19:39
Sync all Satellite Repos via hammer CLI
#!/bin/bash
#Syncs all the repos for a given organization-id
SAT_ORG_ID=1
while read f line; do
for X in $line
do
hammer repository synchronize --async --organization-id 1 --id $X
done
@kenmoini
kenmoini / Install_VNC_AWS_Centos
Created September 28, 2018 22:01 — forked from mikaelMortensenADI/Install_VNC_AWS_Centos
How to Install VNC on an Amazon EC2 Centos 7.2 AMI
How to Install VNC on an AWS EC2 Centos 7.2 AMI
Reference: http://devopscube.com/how-to-setup-gui-for-amazon-ec2-rhel-7-instance/
1. Update the server using the following command.
sudo yum -y update
2. Install the gnome GUI components using the following command.
sudo yum groupinstall -y "Server with GUI"