Skip to content

Instantly share code, notes, and snippets.

@luisgagocasas
Last active October 4, 2015 04:07
Show Gist options
  • Save luisgagocasas/e9f2c153bc1ac76f1ed8 to your computer and use it in GitHub Desktop.
Save luisgagocasas/e9f2c153bc1ac76f1ed8 to your computer and use it in GitHub Desktop.
Install ISPConfig3 Ubuntu 14.04 64Bits
#!/bin/bash
## Install ISPConfig3 on Ubuntu 14.04 64Bits
## Author Original: Nilton OS blog.linuxpro.com.br
## Modificado Español: Luis Gago Casas luisgagocasas.com
## Version 0.6
## Caso precise
## echo 'LC_ALL="en_US.utf8"' >>/etc/environment
## dpkg-reconfigure dash
## init 6
# Check if user has root privileges
if [[ $EUID -ne 0 ]]; then
echo "Ejecute el Script con root para cambiar use sudo"
exit 1
fi
echo -e "Nombre del servidor: servidor1.dominio.com : \c "
read SERVER_FQDN
echo -e "IP del servidor (comunmente 192.168.100.10): \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
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 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
## sed -i 's|bind-address|#bind-address|' /etc/mysql/my.cnf
## Ajustando o arquivo /etc/postfix/master.cf do Postfix
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_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
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
apt-get install -y apache2 apache2-utils libapache2-mod-php5 php5
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
php5enmod mcrypt
a2enmod suexec rewrite ssl actions include cgi
a2enmod dav_fs dav auth_digest
a2enmod actions fastcgi alias
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
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
service apache2 restart
cd /tmp
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
@luisgagocasas
Copy link
Author

Para instalar ejecutar lo siguiente

echo 'LC_ALL="es_ES.utf8"' >>/etc/environment
dpkg-reconfigure dash
init 6

locale
locale-gen "en_US.UTF-8"
locale-gen "es_PE.UTF-8"

wget --no-check-certificate https://gist.githubusercontent.com/luisgagocasas/e9f2c153bc1ac76f1ed8/raw/d5ba8e7378322221927e591ff1688029cd370f7c/install-ispconfig3-ubuntu.sh
4)
chmod +x install-ispconfig3-ubuntu.sh
5)
./install-ispconfig3-ubuntu.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment