From d2890b00ae9821327dc5873fd866ab9c6f5f3eb0 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sun, 3 Feb 2019 09:46:42 -0600 Subject: [PATCH] update --- install-multicraft.sh | 134 +++++++----------------------------------- install-nodemgmt.sh | 3 - 2 files changed, 22 insertions(+), 115 deletions(-) mode change 100644 => 100755 install-multicraft.sh diff --git a/install-multicraft.sh b/install-multicraft.sh old mode 100644 new mode 100755 index 76facda..ffac12a --- a/install-multicraft.sh +++ b/install-multicraft.sh @@ -1,43 +1,11 @@ -#!/bin/bash -# The MIT License (MIT) +#!/usr/bin/env bash -# Copyright (c) 2016-2017 Cory Gillenkirk +source /dev/stdin <<< "$(curl -sL https://scity.xyz/colorsinc)" +source /dev/stdin <<< "$(curl -sL https://scity.xyz/defaultinc)" -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: - -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. - -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. - -# Supported Versions: Ubuntu, Debian and CentOS 6 and 7. - -# Update Resolve Servers -echo "nameserver 8.8.8.8" > /etc/resolv.conf -echo "nameserver 8.8.4.4" >> /etc/resolv.conf -# File Check -if [ -f /etc/network/interfaces ]; then -sed -i 's/dns-nameservers \(.*\)/\Edns-nameservers 8.8.8.8 8.8.4.4/g' /etc/network/interfaces -fi - -# Update -apt-get -y update -yum -y update # Install: lsb-release -apt-get -y install lsb-release curl sudo ntpdate -yum -y install redhat-lsb curl ntpdate +${APTFUNC} -y install lsb-release curl ntpdate /usr/sbin/ntpdate -u pool.ntp.org # Get Public Interface @@ -55,64 +23,23 @@ export DaemonPassword=`cat /dev/urandom | tr -dc A-Za-z0-9 | dd bs=25 count=1 2> export AdminPassword=`cat /dev/urandom | tr -dc A-Za-z0-9 | dd bs=25 count=1 2>/dev/null` export BlowFish=`cat /dev/urandom | tr -dc A-Za-z0-9 | dd bs=32 count=1 2>/dev/null` -# Detecting Distrubution of Linux -# Ubuntu, Debian and CentOS -DISTRO="$(lsb_release -si)" -VERSION="$(lsb_release -sr | cut -d. -f1)" -OS="$DISTRO$VERSION" -# Begin Ubuntu -if [ "${DISTRO}" = "Ubuntu" ] ; then + apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8507EFA5 -echo "deb http://repo.percona.com/apt "$(lsb_release -sc)" main" | sudo tee /etc/apt/sources.list.d/percona.list -echo "deb-src http://repo.percona.com/apt "$(lsb_release -sc)" main" | sudo tee -a /etc/apt/sources.list.d/percona.list -apt-get -y purge `dpkg -l | grep php| awk '{print $2}' |tr "\n" " "` -apt-get install -y language-pack-en-base +echo "deb http://repo.percona.com/apt "$(lsb_release -sc)" main" | tee /etc/apt/sources.list.d/percona.list +echo "deb-src http://repo.percona.com/apt "$(lsb_release -sc)" main" | tee -a /etc/apt/sources.list.d/percona.list +${APTFUNC} -y purge `dpkg -l | grep php| awk '{print $2}' |tr "\n" " "` +${APTFUNC} install -y language-pack-en-base export LC_ALL=en_US.UTF-8 export LANG=en_US.UTF-8 -apt-get install -y software-properties-common +${APTFUNC} install -y software-properties-common add-apt-repository -y ppa:ondrej/php -apt-get update -apt-get -y upgrade +${APTFUNC} update +${APTFUNC} -y upgrade export DEBIAN_FRONTEND="noninteractive" -apt-get -y install apache2 php5.6 php5.6-mysqlnd sqlite php5.6-gd php5.6-mbstring php5.6-xml php5.6-curl php5.6-sqlite wget nano zip unzip percona-server-server-5.6 git dos2unix -# Begin Debian -elif [ "${DISTRO}" = "Debian" ] ; then -apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8507EFA5 -wget https://repo.percona.com/apt/percona-release_0.1-4.$(lsb_release -sc)_all.deb -O percona-release.deb -dpkg -i percona-release.deb -apt-get update -apt-get -y purge `dpkg -l | grep php| awk '{print $2}' |tr "\n" " "` -export DEBIAN_FRONTEND="noninteractive" -apt-get -y install apache2 php5 php5-mysql php5-gd php-xml-parser php5-curl php5-sqlite wget nano zip unzip percona-server-server-5.6 git dos2unix -# Begin CentOS -elif [ "${DISTRO}" = "CentOS" ] ; then -yum -y install dos2unix -sed -i 's/DNS1=\(.*\)/\EDNS1=8.8.8.8/g' /etc/sysconfig/network-scripts/ifcfg-${IFACE} -sed -i 's/DNS2=\(.*\)/\EDNS2=8.8.4.4/g' /etc/sysconfig/network-scripts/ifcfg-${IFACE} -# Begin CentOS6 -if [ "${OS}" = "CentOS6" ] ; then -yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm -yum -y install https://mirror.webtatic.com/yum/el6/latest.rpm -echo 0 >/selinux/enforce -# Begin CentOS7 -elif [ "${OS}" = "CentOS7" ] ; then -yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm -yum -y install https://mirror.webtatic.com/yum/el7/webtatic-release.rpm -echo 0 > /sys/fs/selinux/enforce -yum -y install net-tools -fi -# Begin CentOS6 and CentOS7 File Install -yum -y install http://www.percona.com/downloads/percona-release/redhat/0.1-3/percona-release-0.1-3.noarch.rpm -yum -y remove *mysql* *mariadb* php-* -mv /var/lib/mysql /var/lib/mysql-old -yum -y update -yum -y install wget nano zip unzip httpd Percona-Server-client-56.x86_64 Percona-Server-devel-56.x86_64 Percona-Server-server-56.x86_64 Percona-Server-shared-56.x86_64 php56w php56w-pdo php56w-mysqlnd php56w-mbstring php56w-gd php56w-xml sqlite freetype curl mlocate git sudo -/sbin/chkconfig --level 2345 httpd on; -sed -i 's/SELINUX=enforcing/\ESELINUX=disabled/g' /etc/selinux/config -fi +${APTFUNC} -y install apache2 php5.6 php5.6-mysqlnd sqlite php5.6-gd php5.6-mbstring php5.6-xml php5.6-curl php5.6-sqlite wget nano zip unzip percona-server-server-5.6 git dos2unix + -# Set MySQL Password /sbin/service mysql start service mysql start mysql -e "SET PASSWORD FOR 'root'@'localhost' = PASSWORD('${MySQLRoot}');" @@ -282,31 +209,14 @@ return array ( ); eof -# Auto Java Installer -if [ "${DISTRO}" = "Ubuntu" ] ; then -sudo apt-get -y install software-properties-common python-software-properties debconf-utils -sudo apt-get -y update -sudo add-apt-repository ppa:webupd8team/java -y -sudo apt-get -y update -sudo echo "oracle-java8-installer shared/accepted-oracle-license-v1-1 select true" | debconf-set-selections -sudo echo "oracle-java8-installer shared/accepted-oracle-license-v1-1 seen true" | debconf-set-selections -sudo apt-get -y install oracle-java8-installer -elif [ "${DISTRO}" = "Debian" ] ; then -echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | sudo tee /etc/apt/sources.list.d/java-8-debian.list -apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EEA14886 -sudo apt-get -y update -sudo apt-get -y install debconf-utils -sudo apt-get -y update -sudo echo "oracle-java8-installer shared/accepted-oracle-license-v1-1 select true" | debconf-set-selections -sudo echo "oracle-java8-installer shared/accepted-oracle-license-v1-1 seen true" | debconf-set-selections -sudo apt-get -y install oracle-java8-installer -elif [ "${DISTRO}" = "CentOS" ] ; then -# Author: Mike G. aka metalcated and partially forked from n0ts (https://github.com/metalcated/) -wget https://raw.githubusercontent.com/JustOneMoreBlock/shell-scripts/master/install_java.sh -O install_java.sh -chmod +x install_java.sh -sh install_java.sh jre8 rpm -rm -fv install_java.sh -fi + +${APTFUNC} -y install software-properties-common python-software-properties debconf-utils +${APTFUNC} -y update +add-apt-repository ppa:webupd8team/java -y +${APTFUNC} -y update +echo "oracle-java8-installer shared/accepted-oracle-license-v1-1 select true" | debconf-set-selections +echo "oracle-java8-installer shared/accepted-oracle-license-v1-1 seen true" | debconf-set-selections +${APTFUNC} -y install oracle-java8-installer java -version diff --git a/install-nodemgmt.sh b/install-nodemgmt.sh index 60f4832..506b5ba 100755 --- a/install-nodemgmt.sh +++ b/install-nodemgmt.sh @@ -5,9 +5,6 @@ source /dev/stdin <<< "$(curl -sL http://scity.xyz/colorsinc)" source /dev/stdin <<< "$(curl -sL http://scity.xyz/defaultinc)" -if [ "$EUID" -ne 0 ]; then APTFUNC="sudo ${ATYPE}" -else APTFUNC="${ATYPE}" -fi echo "" echo -e "${idsCL[LightGreen]}NodeMgmt Installation Script${idsCL[Default]}"