Скипт инсталяции для Debian 8

#!/bin/sh echo -e "## Automatic installation servers apps ##" distrib="jessie" echo " deb http://ftp.pl.debian.org/debian ${distrib} main contrib deb-src http://ftp.pl.debian.org/debian ${distrib} main contrib deb http://ftp.debian.org/debian/ ${distrib}-updates main contrib deb-src http://ftp.debian.org/debian/ ${distrib}-updates main contrib deb http://security.debian.org/ ${distrib}/updates main contrib deb-src http://security.debian.org/ ${distrib}/updates main contrib # erlyvideo.org #deb http://debian.erlyvideo.org binary/ # php-fpm dotdeb deb http://packages.dotdeb.org ${distrib} all deb-src http://packages.dotdeb.org ${distrib} all # nginx deb http://nginx.org/packages/debian ${distrib} nginx deb-src http://nginx.org/packages/debian ${distrib} nginx " > /etc/apt/sources.list wget -q http://www.dotdeb.org/dotdeb.gpg -O- | apt-key add - wget -q http://nginx.org/keys/nginx_signing.key -O- | apt-key add - echo -e "## Update OS ##" sleep 1 apt-get update && apt-get upgrade -y echo -e "## Install my app list ##" sleep 1 apt-get install apt apt-utils chkconfig mc htop git mercurial checkinstall iptraf jnettop iftop -y apt-get install nano -y echo -e "## Install PHP-FPM ##" sleep 1 apt-get install -u -t stable php5 php5-dev php5-sqlite php5-mcrypt php5-xsl php5-cli php5-common php5-mysql php5-gd php5-fpm \ php5-cgi php-pear php5-curl php5-xcache php5-redis -y echo "cgi.fix_pathinfo = 0" >> /etc/php5/fpm/php.ini echo -e "## Install Nginx ##" sleep 1 apt-get install nginx -y echo -e "## Install Redis ##" sleep 1 apt-get install redis-server -y echo -e "## Install MySQL ##" sleep 1 apt-get install mariadb-server mariadb-client mariadb-common -y chkconfig --levels 235 mysql on echo -e "## Install development soft ##" apt-get install gcc build-essential g++ libboost-dev libboost-program-options-dev libboost-all-dev libevent-dev uuid-dev -y service php5-fpm restart #echo -e "## Install DNS Server ##" # apt-get install bind9 bind9utils bind9-libs -y #apt-get install pdns-server pdns-backend-mysql pdns-recursor -y echo -e "## Install SMTP Server ##" apt-get install exim4 dpkg-reconfigure exim4-config echo -e "## Start APPs ##" service nginx restart service php5-fpm restart service mysql restart service redis-server restart #echo " *Clearing downloaded packages after install!*" #rm /var/cache/apt/archives/*.deb -f echo -e "## Base system configure ##" echo ' # # My config # alias nano="nano -u -w " alias ls="ls --color=always" alias grep='grep --color=auto' alias fgrep='fgrep --color=auto' alias egrep='egrep --color=auto' HISTSIZE=50000 HISTFILESIZE=50000 export HISTCONTROL=ignoreboth shopt -s cmdhist shopt -s histappend shopt -s checkwinsize shopt -s extglob ulimit -c 0 # # Functions # #----------------------------------- # Функции работы с историей комманд #----------------------------------- function h(){ history| grep "$@"; } #----------------------------------- # Функции для работы с файлами и строками: #----------------------------------- # Поиск файла по шаблону: function ff() { find . -type f -iname '*'$*'*' -ls ; } # Поиск файла по шаблону в $1 и запуск команды в $2 с ним: function fe() { find . -type f -iname '*'$1'*' -exec "${2:-file}" {} \; ; } # поиск строки по файлам: function fstr() { OPTIND=1 local case="" local usage="fstr: поиск строки в файлах. Порядок использования: fstr [-i] \"шаблон\" [\"шаблон_имени_файла\"] " while getopts :it opt do case "$opt" in i) case="-i " ;; *) echo "$usage"; return;; esac done shift $(( $OPTIND - 1 )) if [ "$#" -lt 1 ]; then echo "$usage" return; fi local SMSO=$(tput smso) local RMSO=$(tput rmso) find . -type f -name "${2:-*}" -print0 | xargs -0 grep -sn ${case} "$1" 2>&- | \ sed "s/$1/${SMSO}\0${RMSO}/gI" | more } ' >> ~/.bashrc source ~/.bashrc echo ' set tabsize "2" ' >> ~/.nanorc