Skip to content

Instantly share code, notes, and snippets.

@gOOvER
Last active June 9, 2017 07:16
Show Gist options
  • Select an option

  • Save gOOvER/907df08d946a7d0d32cad8b3ee5e911d to your computer and use it in GitHub Desktop.

Select an option

Save gOOvER/907df08d946a7d0d32cad8b3ee5e911d to your computer and use it in GitHub Desktop.

Revisions

  1. Torsten Widmann revised this gist Feb 6, 2017. 1 changed file with 119 additions and 0 deletions.
    119 changes: 119 additions & 0 deletions install-ispconfig3-ubuntu.sh
    Original file line number Diff line number Diff line change
    @@ -4,6 +4,9 @@
    ## https://www.howtoforge.com/tutorial/perfect-server-ubuntu-16.04-with-apache-php-myqsl-pureftpd-bind-postfix-doveot-and-ispconfig/
    ## Version 0.5

    ## Variables
    ## Install apache for https/2 Support from unofficial Source
    APACHE=y

    ## Set lang en_US UTF8
    ## echo 'LC_ALL="en_US.utf8"' >>/etc/environment
    @@ -50,6 +53,122 @@ freshclam
    service clamav-daemon start


    sed -i 's|bind-address|#bind-address|' /etc/mysql/mariadb.conf.d/50-server.cnf

    ## Backup Postfix
    mkdir -p /etc/postfix/backup
    cp -aR /etc/postfix/* /etc/postfix/backup/

    ## Config Postfix /etc/postfix/master.cf
    sed -i 's|#submission|submission|' /etc/postfix/master.cf
    sed -i 's|# -o syslog_name=postfix/submission| -o syslog_name=postfix/submission|' /etc/postfix/master.cf
    sed -i 's|# -o smtpd_tls_security_level=encrypt| -o smtpd_tls_security_level=may|' /etc/postfix/master.cf
    sed -i 's|# -o smtpd_sasl_auth_enable=yes| -o smtpd_sasl_auth_enable=yes|' /etc/postfix/master.cf
    sed -i 's|# -o smtpd_reject_unlisted_recipient=no| -o smtpd_client_restrictions=permit_sasl_authenticated,reject|' /etc/postfix/master.cf

    sed -i 's|#smtps|smtps|' /etc/postfix/master.cf
    sed -i 's|# -o syslog_name=postfix/smtps| -o syslog_name=postfix/smtps|' /etc/postfix/master.cf
    sed -i 's|# -o smtpd_tls_wrappermode=yes| -o smtpd_tls_wrappermode=yes|' /etc/postfix/master.cf
    sed -i 's|# -o smtpd_sasl_auth_enable=yes| -o smtpd_sasl_auth_enable=yes|' /etc/postfix/master.cf
    sed -i 's|# -o smtpd_reject_unlisted_recipient=no| -o smtpd_client_restrictions=permit_sasl_authenticated,reject|' /etc/postfix/master.cf

    ## Restart Postfix and Mysql
    service postfix restart

    mysql_secure_installation
    service mysql restart

    if $APACHE = y
    then
    add-apt-repository ppa:ondrej/apache2
    apt-get update
    fi

    ## Install Softwares Web Server

    apt-get install -y apache2 apache2-doc apache2-utils libapache2-mod-php php7.0 php7.0-common
    apt-get install -y php7.0-gd php7.0-mysql php7.0-imap php7.0-cli php7.0-cgi libapache2-mod-fcgid
    apt-get install -y apache2-suexec-pristine php-pear php-auth php7.0-mcrypt libruby
    apt-get install -y libapache2-mod-python php7.0-curl php7.0-intl php7.0-pspell php7.0-recode php-net-sieve
    apt-get install -y php7.0-sqlite3 php7.0-tidy php7.0-xmlrpc php7.0-opcache php-apcu libapache2-mod-fastcgi php7.0-fpm
    apt-get install -y php7.0-xsl memcached php-memcache php-imagick php-gettext php7.0-zip php7.0-mbstring php-redis
    apt-get install - y redis-server memcached tidy tinymce mcrypt imagemagick

    echo "<IfModule mod_headers.c>
    RequestHeader unset Proxy early
    </IfModule>" | tee /etc/apache2/conf-available/httpoxy.conf


    ## Enable Softwares PHP and Apache2 modules
    a2enmod suexec rewrite ssl actions include cgi
    a2enmod dav_fs dav auth_digest headers actions fastcgi alias
    a2enconf httpoxy

    if $APACHE = y
    then
    a2enmod http2
    fi

    apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0x5a16e7281be7a449
    add-apt-repository "deb http://dl.hhvm.com/ubuntu xenial main"
    apt-get update && apt-get install -y hhvm
    echo 'hhvm.mysql.socket = /var/run/mysqld/mysqld.sock' >> /etc/hhvm/php.ini

    service apache2 restart



    ## Install Softwares FTP Server
    apt-get install -y pure-ftpd-common pure-ftpd-mysql quota quotatool libclass-dbi-mysql-perl
    apt-get install -y bind9 dnsutils vlogger webalizer awstats geoip-database haveged ufw
    apt-get install -y build-essential autoconf automake1.9 libtool flex bison debhelper binutils-gold

    rm -f /etc/cron.d/awstats
    sed -i 's|VIRTUALCHROOT=false|VIRTUALCHROOT=true|' /etc/default/pure-ftpd-common
    sed -i 's|application/x-ruby|#application/x-ruby|' /etc/mime.types

    ## echo 1 > /etc/pure-ftpd/conf/TLS
    mkdir -p /etc/ssl/private/
    openssl req -x509 -nodes -days 7300 -newkey rsa:2048 -keyout /etc/ssl/private/pure-ftpd.pem -out /etc/ssl/private/pure-ftpd.pem
    chmod 600 /etc/ssl/private/pure-ftpd.pem
    service pure-ftpd-mysql restart


    ## Adicionando o Quota de forma automatica
    sed -i 's|defaults|defaults,usrjquota=quota.user,grpjquota=quota.group,jqfmt=vfsv0|' /etc/fstab
    mount -o remount /var/www
    quotacheck -avugm
    quotaon -avug

    ## Download and install ISPConfig3 3.1.2
    cd /tmp
    wget http://www.ispconfig.org/downloads/ISPConfig-3.1.2.tar.gz
    tar xvfz ISPConfig-3.1.2.tar.gz
    cd ispconfig3_install/install
    php -q install.php
    apt-get install -y vim-nox ssh openssh-server sudo ntp ntpdate
    service sendmail stop; update-rc.d -f sendmail remove

    ## Install Softwares Mail Server
    apt-get install -y postfix postfix-mysql mariadb-client mariadb-server
    apt-get install -y openssl getmail4 binutils
    apt-get install -y dovecot-pop3d dovecot-mysql dovecot-sieve dovecot-lmtpd dovecot-imapd
    apt-get install -y amavisd-new spamassassin zoo libnet-ldap-perl
    apt-get install -y clamav clamav-base clamav-daemon clamav-freshclam
    apt-get install -y unzip bzip2 arj nomarch lzop cabextract apt-listchanges
    apt-get install -y libauthen-sasl-perl daemon libio-string-perl libjson-perl
    apt-get install -y libio-socket-ssl-perl libnet-ident-perl zip libnet-dns-perl postgrey

    ## Stop Spamassassin
    service spamassassin stop
    update-rc.d -f spamassassin remove
    ## freshclam -v

    sed -i 's|AllowSupplementaryGroups false|AllowSupplementaryGroups true|' /etc/clamav/clamd.conf
    freshclam
    service clamav-daemon start


    sed -i 's|bind-address|#bind-address|' /etc/mysql/mariadb.conf.d/50-server.cnf

    ## Backup Postfix
  2. Torsten Widmann revised this gist Feb 4, 2017. 1 changed file with 3 additions and 4 deletions.
    7 changes: 3 additions & 4 deletions install-ispconfig3-ubuntu.sh
    Original file line number Diff line number Diff line change
    @@ -8,10 +8,9 @@
    ## Set lang en_US UTF8
    ## echo 'LC_ALL="en_US.utf8"' >>/etc/environment

    ## Before running the script, run the following command
    # dpkg-reconfigure dash
    # Use dash as the default system shell (/bin/sh)? <-- No
    # init 6
    ## Reconfigure Dash
    echo "dash dash/sh boolean false" | debconf-set-selections
    dpkg-reconfigure -f noninteractive dash > /dev/null 2>&1


    # Check if user has root privileges
  3. @jniltinho jniltinho revised this gist Jan 26, 2017. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions install-ispconfig3-ubuntu.sh
    Original file line number Diff line number Diff line change
    @@ -130,9 +130,9 @@ mount -o remount /var/www
    quotacheck -avugm
    quotaon -avug

    ## Download and install ISPConfig3 3.1.1
    ## Download and install ISPConfig3 3.1.2
    cd /tmp
    wget http://www.ispconfig.org/downloads/ISPConfig-3.1.1p1.tar.gz
    tar xvfz ISPConfig-3.1.1p1.tar.gz
    wget http://www.ispconfig.org/downloads/ISPConfig-3.1.2.tar.gz
    tar xvfz ISPConfig-3.1.2.tar.gz
    cd ispconfig3_install/install
    php -q install.php
  4. @jniltinho jniltinho revised this gist Jan 7, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion install-ispconfig3-ubuntu.sh
    Original file line number Diff line number Diff line change
    @@ -125,7 +125,7 @@ service pure-ftpd-mysql restart


    ## Adicionando o Quota de forma automatica
    sed -i 's|/var/www ext4 defaults|/var/www ext4 defaults,usrjquota=quota.user,grpjquota=quota.group,jqfmt=vfsv0|' /etc/fstab
    sed -i 's|defaults|defaults,usrjquota=quota.user,grpjquota=quota.group,jqfmt=vfsv0|' /etc/fstab
    mount -o remount /var/www
    quotacheck -avugm
    quotaon -avug
  5. @jniltinho jniltinho revised this gist Jan 7, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion install-ispconfig3-ubuntu.sh
    Original file line number Diff line number Diff line change
    @@ -125,7 +125,7 @@ service pure-ftpd-mysql restart


    ## Adicionando o Quota de forma automatica
    sed -i 's|/var/www ext4 defaults|/var/www ext4 defaults,usrjquota=quota.user,grpjquota=quota.group,jqfmt=vfsv0|' fstab
    sed -i 's|/var/www ext4 defaults|/var/www ext4 defaults,usrjquota=quota.user,grpjquota=quota.group,jqfmt=vfsv0|' /etc/fstab
    mount -o remount /var/www
    quotacheck -avugm
    quotaon -avug
  6. @jniltinho jniltinho revised this gist Jan 7, 2017. 1 changed file with 6 additions and 0 deletions.
    6 changes: 6 additions & 0 deletions install-ispconfig3-ubuntu.sh
    Original file line number Diff line number Diff line change
    @@ -124,6 +124,12 @@ chmod 600 /etc/ssl/private/pure-ftpd.pem
    service pure-ftpd-mysql restart


    ## Adicionando o Quota de forma automatica
    sed -i 's|/var/www ext4 defaults|/var/www ext4 defaults,usrjquota=quota.user,grpjquota=quota.group,jqfmt=vfsv0|' fstab
    mount -o remount /var/www
    quotacheck -avugm
    quotaon -avug

    ## Download and install ISPConfig3 3.1.1
    cd /tmp
    wget http://www.ispconfig.org/downloads/ISPConfig-3.1.1p1.tar.gz
  7. @jniltinho jniltinho revised this gist Jan 7, 2017. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions install-ispconfig3-ubuntu.sh
    Original file line number Diff line number Diff line change
    @@ -102,10 +102,10 @@ echo 'hhvm.mysql.socket = /var/run/mysqld/mysqld.sock' >> /etc/hhvm/php.ini

    service apache2 restart

    mkdir /opt/certbot
    cd /opt/certbot
    wget https://dl.eff.org/certbot-auto
    chmod a+x ./certbot-auto
    #mkdir /opt/certbot
    #cd /opt/certbot
    #wget https://dl.eff.org/certbot-auto
    #chmod a+x ./certbot-auto


    ## Install Softwares FTP Server
  8. @jniltinho jniltinho revised this gist Nov 21, 2016. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions install-ispconfig3-ubuntu.sh
    Original file line number Diff line number Diff line change
    @@ -53,6 +53,10 @@ service clamav-daemon start

    sed -i 's|bind-address|#bind-address|' /etc/mysql/mariadb.conf.d/50-server.cnf

    ## Backup Postfix
    mkdir -p /etc/postfix/backup
    cp -aR /etc/postfix/* /etc/postfix/backup/

    ## Config Postfix /etc/postfix/master.cf
    sed -i 's|#submission|submission|' /etc/postfix/master.cf
    sed -i 's|# -o syslog_name=postfix/submission| -o syslog_name=postfix/submission|' /etc/postfix/master.cf
  9. @jniltinho jniltinho revised this gist Nov 15, 2016. 1 changed file with 0 additions and 13 deletions.
    13 changes: 0 additions & 13 deletions install-ispconfig3-ubuntu.sh
    Original file line number Diff line number Diff line change
    @@ -20,19 +20,6 @@ echo "You must run the script as root or using sudo"
    exit 1
    fi

    echo -e "Set Server Name Ex: server1.domain.com : \c "
    read SERVER_FQDN

    echo -e "Set Server IP (commonly 192.168.100.10 works): \c "
    read SERVER_IP

    echo "" >>/etc/hosts
    echo "$SERVER_IP $SERVER_FQDN" >>/etc/hosts
    echo "$SERVER_FQDN" > /etc/hostname
    service hostname restart

    ## Check Hostname
    hostname && hostname -f

    ## Stop and remove Apparmor, Sendmail
    service apparmor stop
  10. @jniltinho jniltinho revised this gist Nov 15, 2016. 1 changed file with 0 additions and 27 deletions.
    27 changes: 0 additions & 27 deletions install-ispconfig3-ubuntu.sh
    Original file line number Diff line number Diff line change
    @@ -116,33 +116,6 @@ cd /opt/certbot
    wget https://dl.eff.org/certbot-auto
    chmod a+x ./certbot-auto


    ## Configure suphp Apache2 Module
    echo '<IfModule mod_suphp.c>
    #<FilesMatch "\.ph(p3?|tml)$">
    # SetHandler application/x-httpd-suphp
    #</FilesMatch>
    AddType application/x-httpd-suphp .php .php3 .php4 .php5 .phtml
    suPHP_AddHandler application/x-httpd-suphp
    <Directory />
    suPHP_Engine on
    </Directory>
    # By default, disable suPHP for debian packaged web applications as files
    # are owned by root and cannot be executed by suPHP because of min_uid.
    <Directory /usr/share>
    suPHP_Engine off
    </Directory>
    # # Use a specific php config file (a dir which contains a php.ini file)
    # suPHP_ConfigPath /etc/php5/cgi/suphp/
    # # Tells mod_suphp NOT to handle requests with the type <mime-type>.
    # suPHP_RemoveHandler <mime-type>
    </IfModule>' > /etc/apache2/mods-available/suphp.conf

    ## Restart Apache2
    service apache2 restart

    ## Install Softwares FTP Server
    apt-get install -y pure-ftpd-common pure-ftpd-mysql quota quotatool libclass-dbi-mysql-perl
  11. @jniltinho jniltinho revised this gist Nov 15, 2016. No changes.
  12. @jniltinho jniltinho revised this gist Nov 15, 2016. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions install-ispconfig3-ubuntu.sh
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    #!/bin/bash
    ## Install ISPConfig3 on Ubuntu 14.04 64Bits
    ## Install ISPConfig3 on Ubuntu 16.04 64Bits
    ## Author: Nilton OS www.linuxpro.com.br
    ## https://www.howtoforge.com/perfect-server-ubuntu-14.04-apache2-php-mysql-pureftpd-bind-dovecot-ispconfig-3
    ## https://www.howtoforge.com/tutorial/perfect-server-ubuntu-16.04-with-apache-php-myqsl-pureftpd-bind-postfix-doveot-and-ispconfig/
    ## Version 0.5


  13. @jniltinho jniltinho revised this gist Nov 15, 2016. 1 changed file with 27 additions and 12 deletions.
    39 changes: 27 additions & 12 deletions install-ispconfig3-ubuntu.sh
    Original file line number Diff line number Diff line change
    @@ -90,16 +90,31 @@ service mysql restart
    apt-get install -y apache2 apache2-doc apache2-utils libapache2-mod-php php7.0 php7.0-common
    apt-get install -y php7.0-gd php7.0-mysql php7.0-imap php7.0-cli php7.0-cgi libapache2-mod-fcgid
    apt-get install -y apache2-suexec-pristine php-pear php-auth php7.0-mcrypt mcrypt imagemagick libruby
    apt-get install -y libapache2-mod-python php7.0-curl php7.0-intl php7.0-pspell php7.0-recode
    apt-get install -y php7.0-sqlite3 php7.0-tidy php7.0-xmlrpc
    apt-get install -y libapache2-mod-python php7.0-curl php7.0-intl php7.0-pspell php7.0-recode php-net-sieve tinymce
    apt-get install -y php7.0-sqlite3 php7.0-tidy php7.0-xmlrpc php7.0-opcache php-apcu libapache2-mod-fastcgi php7.0-fpm
    apt-get install -y php7.0-xsl memcached php-memcache php-imagick php-gettext php7.0-zip php7.0-mbstring


    echo "<IfModule mod_headers.c>
    RequestHeader unset Proxy early
    </IfModule>" | tee /etc/apache2/conf-available/httpoxy.conf


    ## Enable Softwares PHP and Apache2 modules
    a2enmod suexec rewrite ssl actions include cgi
    a2enmod dav_fs dav auth_digest headers
    a2enmod dav_fs dav auth_digest headers actions fastcgi alias
    a2enconf httpoxy

    apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0x5a16e7281be7a449
    add-apt-repository "deb http://dl.hhvm.com/ubuntu xenial main"
    apt-get update && apt-get install -y hhvm
    echo 'hhvm.mysql.socket = /var/run/mysqld/mysqld.sock' >> /etc/hhvm/php.ini

    service apache2 restart

    mkdir /opt/certbot
    cd /opt/certbot
    wget https://dl.eff.org/certbot-auto
    chmod a+x ./certbot-auto


    ## Configure suphp Apache2 Module
    @@ -131,23 +146,23 @@ service apache2 restart

    ## Install Softwares FTP Server
    apt-get install -y pure-ftpd-common pure-ftpd-mysql quota quotatool libclass-dbi-mysql-perl
    apt-get install -y bind9 dnsutils vlogger webalizer geoip-database
    apt-get install -y bind9 dnsutils vlogger webalizer awstats geoip-database haveged ufw
    apt-get install -y build-essential autoconf automake1.9 libtool flex bison debhelper binutils-gold


    rm -f /etc/cron.d/awstats
    sed -i 's|VIRTUALCHROOT=false|VIRTUALCHROOT=true|' /etc/default/pure-ftpd-common
    ## sed -i 's|application/x-ruby|#application/x-ruby|' /etc/mime.types
    sed -i 's|application/x-ruby|#application/x-ruby|' /etc/mime.types

    echo 1 > /etc/pure-ftpd/conf/TLS
    ## echo 1 > /etc/pure-ftpd/conf/TLS
    mkdir -p /etc/ssl/private/
    openssl req -x509 -nodes -days 7300 -newkey rsa:2048 -keyout /etc/ssl/private/pure-ftpd.pem -out /etc/ssl/private/pure-ftpd.pem
    chmod 600 /etc/ssl/private/pure-ftpd.pem
    service pure-ftpd-mysql restart


    ## Download and install ISPConfig3
    ## Download and install ISPConfig3 3.1.1
    cd /tmp
    wget http://www.ispconfig.org/downloads/ISPConfig-3-stable.tar.gz
    tar xfz ISPConfig-3-stable.tar.gz
    cd ispconfig3_install/install/
    wget http://www.ispconfig.org/downloads/ISPConfig-3.1.1p1.tar.gz
    tar xvfz ISPConfig-3.1.1p1.tar.gz
    cd ispconfig3_install/install
    php -q install.php
  14. @jniltinho jniltinho revised this gist Nov 15, 2016. 1 changed file with 27 additions and 17 deletions.
    44 changes: 27 additions & 17 deletions install-ispconfig3-ubuntu.sh
    Original file line number Diff line number Diff line change
    @@ -10,6 +10,7 @@

    ## Before running the script, run the following command
    # dpkg-reconfigure dash
    # Use dash as the default system shell (/bin/sh)? <-- No
    # init 6


    @@ -41,23 +42,29 @@ service sendmail stop; update-rc.d -f sendmail remove

    ## Install VIM-NOX, SSH Server, Sudo, NTP
    apt-get install -y vim-nox ssh openssh-server sudo ntp ntpdate
    service sendmail stop; update-rc.d -f sendmail remove

    ## Install Softwares Mail Server
    apt-get install -y postfix postfix-mysql mysql-client
    apt-get install -y mysql-server openssl getmail4 binutils dovecot-imapd
    apt-get install -y dovecot-pop3d dovecot-mysql dovecot-sieve
    apt-get install -y postfix postfix-mysql mariadb-client mariadb-server
    apt-get install -y openssl getmail4 binutils
    apt-get install -y dovecot-pop3d dovecot-mysql dovecot-sieve dovecot-lmtpd dovecot-imapd
    apt-get install -y amavisd-new spamassassin zoo libnet-ldap-perl
    apt-get install -y clamav clamav-base clamav-daemon clamav-freshclam
    apt-get install -y unzip bzip2 arj nomarch lzop cabextract apt-listchanges
    apt-get install -y libauthen-sasl-perl daemon libio-string-perl libjson-perl
    apt-get install -y libio-socket-ssl-perl libnet-ident-perl zip libnet-dns-perl
    apt-get install -y libio-socket-ssl-perl libnet-ident-perl zip libnet-dns-perl postgrey

    ## Stop Spamassassin
    service spamassassin stop
    update-rc.d -f spamassassin remove
    freshclam -v
    ## freshclam -v

    sed -i 's|AllowSupplementaryGroups false|AllowSupplementaryGroups true|' /etc/clamav/clamd.conf
    freshclam
    service clamav-daemon start


    ## sed -i 's|bind-address|#bind-address|' /etc/mysql/my.cnf
    sed -i 's|bind-address|#bind-address|' /etc/mysql/mariadb.conf.d/50-server.cnf

    ## Config Postfix /etc/postfix/master.cf
    sed -i 's|#submission|submission|' /etc/postfix/master.cf
    @@ -74,23 +81,26 @@ sed -i 's|# -o smtpd_reject_unlisted_recipient=no| -o smtpd_client_restriction

    ## Restart Postfix and Mysql
    service postfix restart

    mysql_secure_installation
    service mysql restart

    ## Install Softwares Web Server
    apt-get install -y apache2 apache2-utils libapache2-mod-php5 php5 phpmyadmin
    apt-get install -y php5-common php5-gd php5-mysql php5-imap php5-cli
    apt-get install -y php5-cgi libapache2-mod-fcgid apache2-suexec php-pear php-auth
    apt-get install -y php5-mcrypt mcrypt php5-imagick imagemagick libapache2-mod-suphp
    apt-get install -y libruby libapache2-mod-python php5-curl php5-intl php5-memcache
    apt-get install -y php5-memcached php5-ming php5-ps php5-pspell php5-recode php5-snmp
    apt-get install -y php5-sqlite php5-tidy php5-xmlrpc php5-xsl
    apt-get install -y libapache2-mod-fastcgi php5-fpm

    apt-get install -y apache2 apache2-doc apache2-utils libapache2-mod-php php7.0 php7.0-common
    apt-get install -y php7.0-gd php7.0-mysql php7.0-imap php7.0-cli php7.0-cgi libapache2-mod-fcgid
    apt-get install -y apache2-suexec-pristine php-pear php-auth php7.0-mcrypt mcrypt imagemagick libruby
    apt-get install -y libapache2-mod-python php7.0-curl php7.0-intl php7.0-pspell php7.0-recode
    apt-get install -y php7.0-sqlite3 php7.0-tidy php7.0-xmlrpc
    apt-get install -y php7.0-xsl memcached php-memcache php-imagick php-gettext php7.0-zip php7.0-mbstring




    ## Enable Softwares PHP and Apache2 modules
    php5enmod mcrypt
    a2enmod suexec rewrite ssl actions include cgi
    a2enmod dav_fs dav auth_digest
    a2enmod actions fastcgi alias
    a2enmod dav_fs dav auth_digest headers


    ## Configure suphp Apache2 Module
    echo '<IfModule mod_suphp.c>
  15. @jniltinho jniltinho revised this gist Apr 14, 2016. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion install-ispconfig3-ubuntu.sh
    Original file line number Diff line number Diff line change
    @@ -46,14 +46,16 @@ apt-get install -y vim-nox ssh openssh-server sudo ntp ntpdate
    apt-get install -y postfix postfix-mysql mysql-client
    apt-get install -y mysql-server openssl getmail4 binutils dovecot-imapd
    apt-get install -y dovecot-pop3d dovecot-mysql dovecot-sieve
    apt-get install -y amavisd-new spamassassin clamav clamav-daemon zoo libnet-ldap-perl
    apt-get install -y amavisd-new spamassassin zoo libnet-ldap-perl
    apt-get install -y clamav clamav-base clamav-daemon clamav-freshclam
    apt-get install -y unzip bzip2 arj nomarch lzop cabextract apt-listchanges
    apt-get install -y libauthen-sasl-perl daemon libio-string-perl libjson-perl
    apt-get install -y libio-socket-ssl-perl libnet-ident-perl zip libnet-dns-perl

    ## Stop Spamassassin
    service spamassassin stop
    update-rc.d -f spamassassin remove
    freshclam -v

    ## sed -i 's|bind-address|#bind-address|' /etc/mysql/my.cnf

  16. @jniltinho jniltinho revised this gist Mar 27, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion install-ispconfig3-ubuntu.sh
    Original file line number Diff line number Diff line change
    @@ -48,7 +48,7 @@ apt-get install -y mysql-server openssl getmail4 binutils dovecot-imapd
    apt-get install -y dovecot-pop3d dovecot-mysql dovecot-sieve
    apt-get install -y amavisd-new spamassassin clamav clamav-daemon zoo libnet-ldap-perl
    apt-get install -y unzip bzip2 arj nomarch lzop cabextract apt-listchanges
    apt-get install -y libauthen-sasl-perl daemon libio-string-perl
    apt-get install -y libauthen-sasl-perl daemon libio-string-perl libjson-perl
    apt-get install -y libio-socket-ssl-perl libnet-ident-perl zip libnet-dns-perl

    ## Stop Spamassassin
  17. @jniltinho jniltinho revised this gist Mar 26, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion install-ispconfig3-ubuntu.sh
    Original file line number Diff line number Diff line change
    @@ -60,7 +60,7 @@ update-rc.d -f spamassassin remove
    ## Config Postfix /etc/postfix/master.cf
    sed -i 's|#submission|submission|' /etc/postfix/master.cf
    sed -i 's|# -o syslog_name=postfix/submission| -o syslog_name=postfix/submission|' /etc/postfix/master.cf
    sed -i 's|# -o smtpd_tls_security_level=encrypt| -o smtpd_tls_security_level=encrypt|' /etc/postfix/master.cf
    sed -i 's|# -o smtpd_tls_security_level=encrypt| -o smtpd_tls_security_level=may|' /etc/postfix/master.cf
    sed -i 's|# -o smtpd_sasl_auth_enable=yes| -o smtpd_sasl_auth_enable=yes|' /etc/postfix/master.cf
    sed -i 's|# -o smtpd_reject_unlisted_recipient=no| -o smtpd_client_restrictions=permit_sasl_authenticated,reject|' /etc/postfix/master.cf

  18. @jniltinho jniltinho revised this gist Mar 6, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion install-ispconfig3-ubuntu.sh
    Original file line number Diff line number Diff line change
    @@ -5,7 +5,7 @@
    ## Version 0.5


    ## Caso precise
    ## Set lang en_US UTF8
    ## echo 'LC_ALL="en_US.utf8"' >>/etc/environment

    ## Before running the script, run the following command
  19. @jniltinho jniltinho revised this gist Mar 6, 2016. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions install-ispconfig3-ubuntu.sh
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    #!/bin/bash
    ## Install ISPConfig3 on Ubuntu 14.04 64Bits
    ## Author: Nilton OS blog.linuxpro.com.br
    ## http://blog.linuxpro.com.br/2015/06/20/colocando-o-ispconfig-em-producao/
    ## Author: Nilton OS www.linuxpro.com.br
    ## https://www.howtoforge.com/perfect-server-ubuntu-14.04-apache2-php-mysql-pureftpd-bind-dovecot-ispconfig-3
    ## Version 0.5


  20. @jniltinho jniltinho revised this gist Mar 6, 2016. 1 changed file with 1 addition and 2 deletions.
    3 changes: 1 addition & 2 deletions install-ispconfig3-ubuntu.sh
    Original file line number Diff line number Diff line change
    @@ -31,8 +31,7 @@ echo "$SERVER_FQDN" > /etc/hostname
    service hostname restart

    ## Check Hostname
    hostname
    hostname -f
    hostname && hostname -f

    ## Stop and remove Apparmor, Sendmail
    service apparmor stop
  21. @jniltinho jniltinho revised this gist Mar 6, 2016. 1 changed file with 15 additions and 17 deletions.
    32 changes: 15 additions & 17 deletions install-ispconfig3-ubuntu.sh
    Original file line number Diff line number Diff line change
    @@ -90,22 +90,6 @@ php5enmod mcrypt
    a2enmod suexec rewrite ssl actions include cgi
    a2enmod dav_fs dav auth_digest
    a2enmod actions fastcgi alias

    ## Install Softwares FTP Server
    apt-get install -y pure-ftpd-common pure-ftpd-mysql quota quotatool libclass-dbi-mysql-perl
    apt-get install -y bind9 dnsutils vlogger webalizer geoip-database
    apt-get install -y build-essential autoconf automake1.9 libtool flex bison debhelper binutils-gold


    sed -i 's|VIRTUALCHROOT=false|VIRTUALCHROOT=true|' /etc/default/pure-ftpd-common
    ## sed -i 's|application/x-ruby|#application/x-ruby|' /etc/mime.types

    echo 1 > /etc/pure-ftpd/conf/TLS
    mkdir -p /etc/ssl/private/
    openssl req -x509 -nodes -days 7300 -newkey rsa:2048 -keyout /etc/ssl/private/pure-ftpd.pem -out /etc/ssl/private/pure-ftpd.pem
    chmod 600 /etc/ssl/private/pure-ftpd.pem
    service pure-ftpd-mysql restart


    ## Configure suphp Apache2 Module
    echo '<IfModule mod_suphp.c>
    @@ -133,6 +117,21 @@ echo '<IfModule mod_suphp.c>

    ## Restart Apache2
    service apache2 restart

    ## Install Softwares FTP Server
    apt-get install -y pure-ftpd-common pure-ftpd-mysql quota quotatool libclass-dbi-mysql-perl
    apt-get install -y bind9 dnsutils vlogger webalizer geoip-database
    apt-get install -y build-essential autoconf automake1.9 libtool flex bison debhelper binutils-gold


    sed -i 's|VIRTUALCHROOT=false|VIRTUALCHROOT=true|' /etc/default/pure-ftpd-common
    ## sed -i 's|application/x-ruby|#application/x-ruby|' /etc/mime.types

    echo 1 > /etc/pure-ftpd/conf/TLS
    mkdir -p /etc/ssl/private/
    openssl req -x509 -nodes -days 7300 -newkey rsa:2048 -keyout /etc/ssl/private/pure-ftpd.pem -out /etc/ssl/private/pure-ftpd.pem
    chmod 600 /etc/ssl/private/pure-ftpd.pem
    service pure-ftpd-mysql restart


    ## Download and install ISPConfig3
    @@ -141,4 +140,3 @@ wget http://www.ispconfig.org/downloads/ISPConfig-3-stable.tar.gz
    tar xfz ISPConfig-3-stable.tar.gz
    cd ispconfig3_install/install/
    php -q install.php

  22. @jniltinho jniltinho revised this gist Mar 5, 2016. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions install-ispconfig3-ubuntu.sh
    Original file line number Diff line number Diff line change
    @@ -34,11 +34,13 @@ service hostname restart
    hostname
    hostname -f

    ## Stop and remove Apparmor, Sendmail
    service apparmor stop
    update-rc.d -f apparmor remove
    apt-get remove -y apparmor apparmor-utils
    service sendmail stop; update-rc.d -f sendmail remove

    ## Install VIM-NOX, SSH Server, Sudo, NTP
    apt-get install -y vim-nox ssh openssh-server sudo ntp ntpdate

    ## Install Softwares Mail Server
  23. @jniltinho jniltinho revised this gist Mar 5, 2016. 1 changed file with 25 additions and 25 deletions.
    50 changes: 25 additions & 25 deletions install-ispconfig3-ubuntu.sh
    Original file line number Diff line number Diff line change
    @@ -8,7 +8,7 @@
    ## Caso precise
    ## echo 'LC_ALL="en_US.utf8"' >>/etc/environment

    ## Antes de Executar o Script, execute o comando abaixo
    ## Before running the script, run the following command
    # dpkg-reconfigure dash
    # init 6

    @@ -39,16 +39,24 @@ update-rc.d -f apparmor remove
    apt-get remove -y apparmor apparmor-utils
    service sendmail stop; update-rc.d -f sendmail remove

    apt-get install -y vim-nox ssh openssh-server
    apt-get install -y vim-nox ssh openssh-server sudo ntp ntpdate

    ## Install Softwares Mail Server
    apt-get install -y postfix postfix-mysql mysql-client
    apt-get install -y mysql-server openssl getmail4 binutils dovecot-imapd
    apt-get install -y dovecot-pop3d dovecot-mysql dovecot-sieve sudo ntp ntpdate
    apt-get install -y dovecot-pop3d dovecot-mysql dovecot-sieve
    apt-get install -y amavisd-new spamassassin clamav clamav-daemon zoo libnet-ldap-perl
    apt-get install -y unzip bzip2 arj nomarch lzop cabextract apt-listchanges
    apt-get install -y libauthen-sasl-perl daemon libio-string-perl
    apt-get install -y libio-socket-ssl-perl libnet-ident-perl zip libnet-dns-perl

    ## Stop Spamassassin
    service spamassassin stop
    update-rc.d -f spamassassin remove

    ## sed -i 's|bind-address|#bind-address|' /etc/mysql/my.cnf

    ## Ajustando o arquivo /etc/postfix/master.cf do Postfix
    ## Config Postfix /etc/postfix/master.cf
    sed -i 's|#submission|submission|' /etc/postfix/master.cf
    sed -i 's|# -o syslog_name=postfix/submission| -o syslog_name=postfix/submission|' /etc/postfix/master.cf
    sed -i 's|# -o smtpd_tls_security_level=encrypt| -o smtpd_tls_security_level=encrypt|' /etc/postfix/master.cf
    @@ -61,42 +69,33 @@ sed -i 's|# -o smtpd_tls_wrappermode=yes| -o smtpd_tls_wrappermode=yes|' /etc/
    sed -i 's|# -o smtpd_sasl_auth_enable=yes| -o smtpd_sasl_auth_enable=yes|' /etc/postfix/master.cf
    sed -i 's|# -o smtpd_reject_unlisted_recipient=no| -o smtpd_client_restrictions=permit_sasl_authenticated,reject|' /etc/postfix/master.cf

    ## Restart Postfix and Mysql
    service postfix restart
    service mysql restart


    apt-get install -y amavisd-new spamassassin clamav clamav-daemon zoo libnet-ldap-perl
    apt-get install -y unzip bzip2 arj nomarch lzop cabextract apt-listchanges
    apt-get install -y libauthen-sasl-perl daemon libio-string-perl
    apt-get install -y libio-socket-ssl-perl libnet-ident-perl zip libnet-dns-perl


    service spamassassin stop
    update-rc.d -f spamassassin remove

    ## Install Softwares Web Server
    apt-get install -y apache2 apache2-utils libapache2-mod-php5 php5 phpmyadmin
    apt-get install -y php5-common php5-gd php5-mysql php5-imap php5-cli
    apt-get install -y php5-cgi libapache2-mod-fcgid apache2-suexec php-pear php-auth
    apt-get install -y php5-mcrypt mcrypt php5-imagick imagemagick libapache2-mod-suphp
    apt-get install -y libruby libapache2-mod-python php5-curl php5-intl php5-memcache
    apt-get install -y php5-memcached php5-ming php5-ps php5-pspell php5-recode php5-snmp
    apt-get install -y php5-sqlite php5-tidy php5-xmlrpc php5-xsl memcached


    apt-get install -y libapache2-mod-fastcgi php5-fpm php5-xcache
    apt-get install -y pure-ftpd-common pure-ftpd-mysql quota quotatool libclass-dbi-mysql-perl
    apt-get install -y bind9 dnsutils vlogger webalizer geoip-database
    apt-get install -y build-essential autoconf automake1.9 libtool flex bison debhelper binutils-gold
    apt-get install -y php5-sqlite php5-tidy php5-xmlrpc php5-xsl
    apt-get install -y libapache2-mod-fastcgi php5-fpm

    ## Enable Softwares PHP and Apache2 modules
    php5enmod mcrypt

    a2enmod suexec rewrite ssl actions include cgi
    a2enmod dav_fs dav auth_digest
    a2enmod actions fastcgi alias

    ## Install Softwares FTP Server
    apt-get install -y pure-ftpd-common pure-ftpd-mysql quota quotatool libclass-dbi-mysql-perl
    apt-get install -y bind9 dnsutils vlogger webalizer geoip-database
    apt-get install -y build-essential autoconf automake1.9 libtool flex bison debhelper binutils-gold


    sed -i 's|VIRTUALCHROOT=false|VIRTUALCHROOT=true|' /etc/default/pure-ftpd-common

    ## sed -i 's|application/x-ruby|#application/x-ruby|' /etc/mime.types

    echo 1 > /etc/pure-ftpd/conf/TLS
    @@ -106,7 +105,7 @@ chmod 600 /etc/ssl/private/pure-ftpd.pem
    service pure-ftpd-mysql restart



    ## Configure suphp Apache2 Module
    echo '<IfModule mod_suphp.c>
    #<FilesMatch "\.ph(p3?|tml)$">
    # SetHandler application/x-httpd-suphp
    @@ -130,10 +129,11 @@ echo '<IfModule mod_suphp.c>
    # suPHP_RemoveHandler <mime-type>
    </IfModule>' > /etc/apache2/mods-available/suphp.conf


    ## Restart Apache2
    service apache2 restart


    ## Download and install ISPConfig3
    cd /tmp
    wget http://www.ispconfig.org/downloads/ISPConfig-3-stable.tar.gz
    tar xfz ISPConfig-3-stable.tar.gz
  24. @jniltinho jniltinho revised this gist Nov 12, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion install-ispconfig3-ubuntu.sh
    Original file line number Diff line number Diff line change
    @@ -10,7 +10,7 @@

    ## Antes de Executar o Script, execute o comando abaixo
    # dpkg-reconfigure dash
    #init 6
    # init 6


    # Check if user has root privileges
  25. @jniltinho jniltinho revised this gist Nov 12, 2015. 1 changed file with 4 additions and 2 deletions.
    6 changes: 4 additions & 2 deletions install-ispconfig3-ubuntu.sh
    Original file line number Diff line number Diff line change
    @@ -7,8 +7,10 @@

    ## Caso precise
    ## echo 'LC_ALL="en_US.utf8"' >>/etc/environment
    ## dpkg-reconfigure dash
    ## init 6

    ## Antes de Executar o Script, execute o comando abaixo
    # dpkg-reconfigure dash
    #init 6


    # Check if user has root privileges
  26. @jniltinho jniltinho revised this gist Oct 10, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion install-ispconfig3-ubuntu.sh
    Original file line number Diff line number Diff line change
    @@ -72,7 +72,7 @@ apt-get install -y libio-socket-ssl-perl libnet-ident-perl zip libnet-dns-perl
    service spamassassin stop
    update-rc.d -f spamassassin remove

    apt-get install -y apache2 apache2-utils libapache2-mod-php5 php5
    apt-get install -y apache2 apache2-utils libapache2-mod-php5 php5 phpmyadmin
    apt-get install -y php5-common php5-gd php5-mysql php5-imap php5-cli
    apt-get install -y php5-cgi libapache2-mod-fcgid apache2-suexec php-pear php-auth
    apt-get install -y php5-mcrypt mcrypt php5-imagick imagemagick libapache2-mod-suphp
  27. @jniltinho jniltinho revised this gist Aug 17, 2015. 1 changed file with 6 additions and 1 deletion.
    7 changes: 6 additions & 1 deletion install-ispconfig3-ubuntu.sh
    Original file line number Diff line number Diff line change
    @@ -17,15 +17,20 @@ echo "You must run the script as root or using sudo"
    exit 1
    fi

    echo -e "Set Server Name Ex: ispconfig3.domain.com : \c "
    echo -e "Set Server Name Ex: server1.domain.com : \c "
    read SERVER_FQDN

    echo -e "Set Server IP (commonly 192.168.100.10 works): \c "
    read SERVER_IP

    echo "" >>/etc/hosts
    echo "$SERVER_IP $SERVER_FQDN" >>/etc/hosts
    echo "$SERVER_FQDN" > /etc/hostname
    service hostname restart

    ## Check Hostname
    hostname
    hostname -f

    service apparmor stop
    update-rc.d -f apparmor remove
  28. @jniltinho jniltinho revised this gist Aug 17, 2015. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions install-ispconfig3-ubuntu.sh
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,8 @@
    #!/bin/bash
    ## Install ISPConfig3 on Ubuntu 14.04 64Bits
    ## Author: Nilton OS blog.linuxpro.com.br
    ## http://blog.linuxpro.com.br/posts/instalando-ispconfig3-no-ubuntu-1404.html
    ## http://www.howtoforge.com/perfect-server-ubuntu-14.04-apache2-php-mysql-pureftpd-bind-dovecot-ispconfig-3-p2
    ## http://blog.linuxpro.com.br/2015/06/20/colocando-o-ispconfig-em-producao/
    ## Version 0.5


    ## Caso precise
  29. @jniltinho jniltinho revised this gist Aug 17, 2015. 1 changed file with 0 additions and 2 deletions.
    2 changes: 0 additions & 2 deletions install-ispconfig3-ubuntu.sh
    Original file line number Diff line number Diff line change
    @@ -99,8 +99,6 @@ chmod 600 /etc/ssl/private/pure-ftpd.pem
    service pure-ftpd-mysql restart


    rm -f /etc/cron.d/awstats


    echo '<IfModule mod_suphp.c>
    #<FilesMatch "\.ph(p3?|tml)$">
  30. @jniltinho jniltinho revised this gist Aug 17, 2015. 1 changed file with 17 additions and 0 deletions.
    17 changes: 17 additions & 0 deletions install-ispconfig3-ubuntu.sh
    Original file line number Diff line number Diff line change
    @@ -10,6 +10,23 @@
    ## dpkg-reconfigure dash
    ## init 6


    # Check if user has root privileges
    if [[ $EUID -ne 0 ]]; then
    echo "You must run the script as root or using sudo"
    exit 1
    fi

    echo -e "Set Server Name Ex: ispconfig3.domain.com : \c "
    read SERVER_FQDN

    echo -e "Set Server IP (commonly 192.168.100.10 works): \c "
    read SERVER_IP

    echo "" >>/etc/hosts
    echo "$SERVER_IP $SERVER_FQDN" >>/etc/hosts


    service apparmor stop
    update-rc.d -f apparmor remove
    apt-get remove -y apparmor apparmor-utils