Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env bash
# Usage:
# $(curl -sSL https://gist.githubusercontent.com/kookxiang/2fb6d9e3f811f59f0b3c2c4353161f64/raw/centos7_init.sh | bash)
if [[ -e /etc/redhat-release ]]; then
RELEASE_RPM=$(rpm -qf /etc/centos-release)
RELEASE=$(rpm -q --qf '%{VERSION}' ${RELEASE_RPM})
if [ ${RELEASE} != "7" ]; then
echo "CentOS release is not 7."
@enesdir
enesdir / cnmp.sh
Created October 5, 2016 05:25 — forked from kookxiang/cnmp.sh
CNMP (Centos 7 + Nginx + MariaDB + PHP7) Install Script
#!env bash
installCNMP(){
if [[ -e /etc/redhat-release ]]; then
RELEASE_RPM=$(rpm -qf /etc/centos-release)
RELEASE=$(rpm -q --qf '%{VERSION}' ${RELEASE_RPM})
if [ ${RELEASE} != "7" ]; then
echo "Not CentOS release 7."
exit 1
fi
else