Script-v0.1

by goshev
4 deployments · 1 still active · last rev. 11 months ago

Compatible with: CentOS 6.5
						#!/bin/bash

###########################################################
# System
###########################################################

function system_update {
  yum -y update
}

function install_basics {
  yum update -y
  yum install -y jwhois libssh2-devel.x86_64 rsync unzip zip openssh-clients wget screen pure-ftpd ftp bc yum-plugin-fastestmirror
  wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
  rpm -Uvh epel-release-6*.rpm
  cd /usr/local/src
  wget --no-check-certificate https://github.com/centminmod/centminmod/archive/master.zip
  mv master master.zip
  unzip master.zip
  ln -s /usr/local/src/centminmod-master centmin
  cd /usr/local/src/centminmod-master
  chmod +x centmin.sh
  sed -i 's/5.4.45/5.6.13/g' centmin.sh
  echo -e '1' | ./centmin.sh
  echo "############################################################
#       ! This server is running CSF Firewall !            #
#         DO NOT run the below command or you              #
#        will lock yourself out of the server:             #
#                                                          #
#                     iptables -F                          #
#                                                          #
############################################################
# USE OF THIS COMPUTER SYSTEM, AUTHORIZED OR UNAUTHORIZED, #
#    CONSTITUTES CONSENT TO MONITORING OF THIS SYSTEM.     #
# UNAUTHORIZED USE MAY SUBJECT YOU TO CRIMINAL PROSECUTION.#
# EVIDENCE OF UNAUTHORIZED USE COLLECTED DURING MONITORING #
#    MAY BE USED FOR ADMINISTRATIVE, CRIMINAL, OR OTHER    #
#  ADVERSE ACTION. USE OF THIS SYSTEM CONSTITUTES CONSENT  #
#          TO MONITORING FOR THESE PURPOSES.               #
############################################################" > /etc/motd
  chattr +ia /etc/motd
  sed -i 's/PUREFTPD_DISABLED=n/PUREFTPD_DISABLED=y/g' /usr/local/src/centmin/centmin.sh
  mv /etc/centminmod/php.d/geoip.ini /etc/centminmod/php.d/geoip.ini_old
  mv /etc/centminmod/php.d/memcache.ini /etc/centminmod/php.d/memcache.ini_old
  mv /etc/centminmod/php.d/mongodb.ini /etc/centminmod/php.d/mongodb.ini_old
  mv /etc/centminmod/php.d/redis.ini /etc/centminmod/php.d/redis.ini_old
  mv /etc/centminmod/php.d/mongodb.ini /etc/centminmod/php.d/mongodb.ini_old
  cd /usr/local/src/centminmod-master/addons
  ./ioncube.sh
}