Herramientas de usuario

Herramientas del sitio


para_configurar_ispconfig

Diferencias

Muestra las diferencias entre dos versiones de la página.

Enlace a la vista de comparación

Ambos lados, revisión anteriorRevisión previa
Próxima revisión
Revisión previa
Próxima revisiónAmbos lados, revisión siguiente
para_configurar_ispconfig [2015/07/13 18:21] jlameiropara_configurar_ispconfig [2015/07/15 22:17] jlameiro
Línea 9: Línea 9:
 Contenido: Contenido:
      
-  1. Change The Default Shell. +[[para_configurar_ispconfig#1. Change The Default Shell.|1. Change The Default Shell.]] 
-  2. Synchronize the System Clock.+ 
 +[[para_configurar_ispconfig#1. Change The Default Shell.|2. Synchronize the System Clock.]] 
 +  
   3. Install Postfix, Dovecot, MySQL, phpMyAdmin, rkhunter, binutils.    3. Install Postfix, Dovecot, MySQL, phpMyAdmin, rkhunter, binutils. 
   4. Install Apache2, PHP5, phpMyAdmin, FCGI, suExec, Pear, And mcrypt.   4. Install Apache2, PHP5, phpMyAdmin, FCGI, suExec, Pear, And mcrypt.
    4.1. Xcache.    4.1. Xcache.
    4.2. PHP-FPM.    4.2. PHP-FPM.
 +  5. Install PureFTPd And Quota.
 +  6. Install Vlogger, Webalizer, And AWstats.
 +  7. Install fail2ban.
 +  8. Install ISPConfig 3.
 +  9. ISPConfig 3 Manual.
 +  10. Warning.
      
-**1. Change The Default Shell.**+=== 1. Change The Default Shell. ===
  
 /bin/sh is a symlink to /bin/dash, however we need /bin/bash, not /bin/dash. Therefore we do this: /bin/sh is a symlink to /bin/dash, however we need /bin/bash, not /bin/dash. Therefore we do this:
Línea 26: Línea 34:
 If you don't do this, the ISPConfig installation will fail. If you don't do this, the ISPConfig installation will fail.
  
-**2. Synchronize the System Clock.**+=== 2. Synchronize the System Clock. ===
  
 Como es un contenedor para establecer el uso horario y demás empleamos el siguiente comando: Como es un contenedor para establecer el uso horario y demás empleamos el siguiente comando:
Línea 163: Línea 171:
 </code> </code>
 **4.2. PHP-FPM.** **4.2. PHP-FPM.**
 +
 +Starting with ISPConfig 3.0.5, there is an additional PHP mode that you can select for usage with Apache: PHP-FPM.
 +
 +To use PHP-FPM with Apache, we need the mod_fastcgi Apache module (please don't mix this up with mod_fcgid - they are very similar, but you cannot use PHP-FPM with mod_fcgid). We can install PHP-FPM and mod_fastcgi as follows:
 +<code>
 +apt-get install libapache2-mod-fastcgi php5-fpm
 +</code>
 +Make sure you enable the module and restart Apache:
 +<code>
 +a2enmod actions fastcgi alias
 +/etc/init.d/apache2 restart
 +</code>
 +**5. Install PureFTPd And Quota.**
 +
 +PureFTPd and quota can be installed with the following command:
 +<code>
 +apt-get install pure-ftpd-common pure-ftpd-mysql quota quotatool
 +</code>
 +Edit the file /etc/default/pure-ftpd-common...
 +<code>
 +nano /etc/default/pure-ftpd-common
 +</code>
 +... and make sure that the start mode is set to standalone and set VIRTUALCHROOT=true:
 +<file>
 +[...]
 +STANDALONE_OR_INETD=standalone
 +[...]
 +VIRTUALCHROOT=true
 +[...]
 +</file>
 +Now we configure PureFTPd to allow FTP and TLS sessions. FTP is a very insecure protocol because all passwords and all data are transferred in clear text. By using TLS, the whole communication can be encrypted, thus making FTP much more secure.
 +
 +If you want to allow FTP and TLS sessions, run:
 +<code>
 +echo 1 > /etc/pure-ftpd/conf/TLS
 +</code>
 +In order to use TLS, we must create an SSL certificate. I create it in /etc/ssl/private/, therefore I create that directory first:
 +<code>
 +mkdir -p /etc/ssl/private/
 +</code>
 +Afterwards, we can generate the SSL certificate as follows:
 +<code>
 +openssl req -x509 -nodes -days 7300 -newkey rsa:2048 -keyout /etc/ssl/private/pure-ftpd.pem 
 +-out /etc/ssl/private/pure-ftpd.pem
 +</code>
 +Country Name (2 letter code) [AU]: <-- Enter your Country Name (e.g., "DE").
 +
 +State or Province Name (full name) [Some-State]: <-- Enter your State or Province Name.
 +
 +Locality Name (eg, city) []: <-- Enter your City.
 +
 +Organization Name (eg, company) [Internet Widgits Pty Ltd]: <-- Enter your Organization Name (e.g., the name of your company).
 +
 +Organizational Unit Name (eg, section) []: <-- Enter your Organizational Unit Name (e.g. "IT Department").
 +
 +Common Name (eg, YOUR name) []: <-- Enter the Fully Qualified Domain Name of the system (e.g. "server1.example.com").
 +
 +Email Address []: <-- Enter your Email Address.
 +
 +Change the permissions of the SSL certificate:
 +<code>
 +chmod 600 /etc/ssl/private/pure-ftpd.pem
 +</code>
 +Then restart PureFTPd:
 +<code>
 +/etc/init.d/pure-ftpd-mysql restart
 +</code>
 +Edit /etc/fstab. Mine looks like this (I added ,usrjquota=quota.user,grpjquota=quota.group,jqfmt=vfsv0 to the partition with the mount point /):
 +<code>
 +nano /etc/fstab
 +</code>
 +<file>
 +# /etc/fstab: static file system information.
 +#
 +# Use 'blkid' to print the universally unique identifier for a
 +# device; this may be used with UUID= as a more robust way to name devices
 +# that works even if disks are added and removed. See fstab(5).
 +#
 +#                
 +/dev/mapper/server1-root /               ext4    errors=remount-ro,usrjquota=quota.user,grpjquota=quota.group,jqfmt=vfsv0 0       1
 +# /boot was on /dev/sda1 during installation
 +UUID=46d1bd79-d761-4b23-80b8-ad20cb18e049 /boot           ext2    defaults        0       2
 +/dev/mapper/server1-swap_1 none            swap    sw              0       0
 +/dev/sr0        /media/cdrom0   udf,iso9660 user,noauto           0
 +</file>
 +**6. Install Vlogger, Webalizer, And AWstats.**
 +
 +Vlogger, webalizer, and AWstats can be installed as follows:
 +<code>
 +apt-get install vlogger webalizer awstats geoip-database libclass-dbi-mysql-perl
 +</code>
 +Open /etc/cron.d/awstats afterwards...
 +<code>
 +nano /etc/cron.d/awstats
 +</code>
 +... and comment out everything in that file:
 +<file>
 +#MAILTO=root
 +
 +#*/10 * * * * www-data [ -x /usr/share/awstats/tools/update.sh ] && /usr/share/awstats/tools/update.sh
 +
 +# Generate static reports:
 +#10 03 * * * www-data [ -x /usr/share/awstats/tools/buildstatic.sh ] && /usr/share/awstats/tools/buildstatic.sh
 +</file>
 +**7. Install fail2ban.**
 +
 +This is optional but recommended, because the ISPConfig monitor tries to show the log:
 +<code>
 +apt-get install fail2ban
 +</code>
 +To make fail2ban monitor PureFTPd and Dovecot, create the file /etc/fail2ban/jail.local:
 +<code>
 +nano /etc/fail2ban/jail.local
 +</code>
 +<file>
 +[pureftpd]
 +enabled  = true
 +port     = ftp
 +filter   = pureftpd
 +logpath  = /var/log/syslog
 +maxretry = 3
 +
 +[dovecot-pop3imap]
 +enabled = true
 +filter = dovecot-pop3imap
 +action = iptables-multiport[name=dovecot-pop3imap, port="pop3,pop3s,imap,imaps", protocol=tcp]
 +logpath = /var/log/mail.log
 +maxretry = 5
 +
 +[sasl]
 +enabled  = true
 +port     = smtp
 +filter   = sasl
 +logpath  = /var/log/mail.log
 +maxretry = 3
 +</file>
 +Then create the following two filter files:
 +<code>
 +nano /etc/fail2ban/filter.d/pureftpd.conf
 +</code>
 +<file>
 +[Definition]
 +failregex = .*pure-ftpd: \(.*@<HOST>\) \[WARNING\] Authentication failed for user.*
 +ignoreregex =
 +</file>
 +<code>
 +nano /etc/fail2ban/filter.d/dovecot-pop3imap.conf
 +</code>
 +<file>
 +[Definition]
 +failregex = (?: pop3-login|imap-login): .*(?:Authentication failure|Aborted login \(auth failed|Aborted login \(tried to use disabled|Disconnected \(auth failed|Aborted login \(\d+ authentication attempts).*rip=(?P<host>\S*),.*
 +ignoreregex =
 +</file>
 +Restart fail2ban afterwards:
 +<code>
 +/etc/init.d/fail2ban restart
 +</code>
 +**8. Install ISPConfig 3.**
 +
 +To install ISPConfig 3 from the latest released version, do this:
 +<code>
 +cd /tmp
 +wget http://www.ispconfig.org/downloads/ISPConfig-3-stable.tar.gz
 +tar xfz ISPConfig-3-stable.tar.gz
 +cd ispconfig3_install/install/
 +</code>
 +The next step is to run
 +<code>
 +php -q install.php
 +</code>
 +This will start the ISPConfig 3 installer. The installer will configure all services like Postfix, Dovecot, etc. for you. A manual setup as required for ISPConfig 2 (perfect setup guides) is not necessary.
 +<file>
 +--------------------------------------------------------------------------------
 + _____ ___________   _____              __ _         ____
 +|_   _/  ___| ___ \ /  __ \            / _(_)       /__  \
 +  | | \ `--.| |_/ / | /  \/ ___  _ __ | |_ _  __ _    _/ /
 +  | |  `--. \  __/  | |    / _ \| '_ \|  _| |/ _` |  |_ |
 + _| |_/\__/ / |     | \__/\ (_) | | | | | | | (_| | ___\ \
 + \___/\____/\_|      \____/\___/|_| |_|_| |_|\__, | \____/
 +                                              __/ |
 +                                             |___/
 +--------------------------------------------------------------------------------
 +
 +>> Initial configuration
 +
 +Operating System: Debian or compatible, unknown version.
 +</file>
 +Following will be a few questions for primary configuration so be careful.
 +
 +Default values are in [brackets] and can be accepted with .
 +
 +Tap in "quit" (without the quotes) to stop the installer.
 +
 +Select language (en,de) [en]: <-- ENTER
 +
 +Installation mode (standard,expert) [standard]: <-- ENTER
 +
 +Full qualified hostname (FQDN) of the server, eg server1.domain.tld  [server1.example.com]: <-- ENTER
 +
 +MySQL server hostname [localhost]: <-- ENTER
 +
 +MySQL root username [root]: <-- ENTER
 +
 +MySQL root password []: <-- yourrootsqlpassword
 +
 +MySQL database to create [dbispconfig]: <-- ENTER
 +
 +MySQL charset [utf8]: <-- ENTER
 +
 +Country Name (2 letter code) [AU]: <-- ENTER
 +
 +State or Province Name (full name) [Some-State]: <-- ENTER
 +
 +Locality Name (eg, city) []: <-- ENTER
 +
 +Organization Name (eg, company) [Internet Widgits Pty Ltd]: <-- ENTER
 +
 +Organizational Unit Name (eg, section) []: <-- ENTER
 +
 +Common Name (e.g. server FQDN or YOUR name) []: <-- ENTER
 +
 +Email Address []: <-- ENTER
 +
 +ISPConfig Port [8080]: <-- ENTER
 +
 +Do you want a secure (SSL) connection to the ISPConfig web interface (y,n) [y]: <-- ENTER
 +
 +The installer automatically configures all underlying services, so no manual configuration is needed.
 +
 +Afterwards you can access ISPConfig 3 under http(s)://server1.example.com:8080/ or http(s)://192.168.0.100:8080/ ( http or https depends on what you chose during installation). Log in with the username admin and the password admin (you should change the default password after your first login):
 +
 +**9. ISPConfig 3 Manual.**
 +In order to learn how to use ISPConfig 3, I strongly recommend to https://www.howtoforge.com/download-the-ispconfig-3-manual
 +
 +**10. Warning.**
 +
 +En algunas ocasiones, el enlace entre el ISPConfig y la aplicación phpMyadmin, no es creado por el proceso de instalación, para lo cual se requiere crear de manera manual, dicho enlace:
 +
 +En etc/apache2/conf.d agregar enlace simbolico a etc/phpmyadmin/apache.conf
 +
      
 Tomado de: https://www.howtoforge.com/perfect-server-debian-wheezy-apache2-bind-dovecot-ispconfig-3 Tomado de: https://www.howtoforge.com/perfect-server-debian-wheezy-apache2-bind-dovecot-ispconfig-3
para_configurar_ispconfig.txt · Última modificación: 2022/11/02 17:58 por 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki