para_configurar_ispconfig
Diferencias
Muestra las diferencias entre dos versiones de la página.
Ambos lados, revisión anteriorRevisión previaPróxima revisión | Revisión previa | ||
para_configurar_ispconfig [2015/07/13 18:19] – jlameiro | para_configurar_ispconfig [2022/11/02 17:58] (actual) – editor externo 127.0.0.1 | ||
---|---|---|---|
Línea 9: | Línea 9: | ||
Contenido: | Contenido: | ||
| | ||
- | | + | [[para_configurar_ispconfig# |
- | 2. Synchronize the System Clock. | + | |
- | 3. Install Postfix, Dovecot, MySQL, phpMyAdmin, rkhunter, binutils. | + | [[para_configurar_ispconfig# |
- | 4. Install Apache2, PHP5, phpMyAdmin, FCGI, suExec, Pear, And mcrypt. | + | |
- | | + | [[para_configurar_ispconfig# |
+ | |||
+ | [[para_configurar_ispconfig# | ||
+ | |||
+ | [[para_configurar_ispconfig# | ||
+ | |||
+ | [[para_configurar_ispconfig# | ||
+ | |||
+ | [[para_configurar_ispconfig# | ||
+ | |||
+ | [[para_configurar_ispconfig# | ||
+ | |||
+ | [[para_configurar_ispconfig# | ||
+ | |||
+ | [[para_configurar_ispconfig# | ||
+ | |||
+ | [[para_configurar_ispconfig# | ||
+ | |||
+ | [[para_configurar_ispconfig# | ||
| | ||
- | **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 25: | Línea 43: | ||
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 31: | Línea 49: | ||
dpkg-reconfigure tzdata | dpkg-reconfigure tzdata | ||
| | ||
- | **3. Install Postfix, Dovecot, MySQL, phpMyAdmin, rkhunter, binutils.** | + | === 3. Install Postfix, Dovecot, MySQL, phpMyAdmin, rkhunter, binutils. |
We can install Postfix, Dovecot, MySQL, rkhunter, and binutils with a single command: | We can install Postfix, Dovecot, MySQL, rkhunter, and binutils with a single command: | ||
Línea 92: | Línea 110: | ||
netstat -tap | grep mysql | netstat -tap | grep mysql | ||
</ | </ | ||
- | **4. Install Apache2, PHP5, phpMyAdmin, FCGI, suExec, Pear, And mcrypt.** | + | === 4. Install Apache2, PHP5, phpMyAdmin, FCGI, suExec, Pear, And mcrypt. |
Apache2, PHP5, phpMyAdmin, FCGI, suExec, Pear, and mcrypt can be installed as follows: | Apache2, PHP5, phpMyAdmin, FCGI, suExec, Pear, and mcrypt can be installed as follows: | ||
Línea 149: | Línea 167: | ||
/ | / | ||
</ | </ | ||
- | **4.1. Xcache.** | + | === 4.1. Xcache. |
Xcache is a free and open PHP opcode cacher for caching and optimizing PHP intermediate code. It's similar to other PHP opcode cachers, such as eAccelerator and APC. It is strongly recommended to have one of these installed to speed up your PHP page. | Xcache is a free and open PHP opcode cacher for caching and optimizing PHP intermediate code. It's similar to other PHP opcode cachers, such as eAccelerator and APC. It is strongly recommended to have one of these installed to speed up your PHP page. | ||
+ | |||
+ | Xcache can be installed as follows: | ||
+ | < | ||
+ | apt-get install php5-xcache | ||
+ | </ | ||
+ | Now restart Apache: | ||
+ | < | ||
+ | / | ||
+ | </ | ||
+ | === 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: | ||
+ | < | ||
+ | apt-get install libapache2-mod-fastcgi php5-fpm | ||
+ | </ | ||
+ | Make sure you enable the module and restart Apache: | ||
+ | < | ||
+ | a2enmod actions fastcgi alias | ||
+ | / | ||
+ | </ | ||
+ | === 5. Install PureFTPd And Quota. === | ||
+ | |||
+ | PureFTPd and quota can be installed with the following command: | ||
+ | < | ||
+ | apt-get install pure-ftpd-common pure-ftpd-mysql quota quotatool | ||
+ | </ | ||
+ | Edit the file / | ||
+ | < | ||
+ | nano / | ||
+ | </ | ||
+ | ... and make sure that the start mode is set to standalone and set VIRTUALCHROOT=true: | ||
+ | < | ||
+ | [...] | ||
+ | STANDALONE_OR_INETD=standalone | ||
+ | [...] | ||
+ | VIRTUALCHROOT=true | ||
+ | [...] | ||
+ | </ | ||
+ | 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: | ||
+ | < | ||
+ | echo 1 > / | ||
+ | </ | ||
+ | In order to use TLS, we must create an SSL certificate. I create it in / | ||
+ | < | ||
+ | mkdir -p / | ||
+ | </ | ||
+ | Afterwards, we can generate the SSL certificate as follows: | ||
+ | < | ||
+ | openssl req -x509 -nodes -days 7300 -newkey rsa:2048 -keyout / | ||
+ | -out / | ||
+ | </ | ||
+ | Country Name (2 letter code) [AU]: <-- Enter your Country Name (e.g., " | ||
+ | |||
+ | State or Province Name (full name) [Some-State]: | ||
+ | |||
+ | 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. " | ||
+ | |||
+ | Email Address []: <-- Enter your Email Address. | ||
+ | |||
+ | Change the permissions of the SSL certificate: | ||
+ | < | ||
+ | chmod 600 / | ||
+ | </ | ||
+ | Then restart PureFTPd: | ||
+ | < | ||
+ | / | ||
+ | </ | ||
+ | Edit /etc/fstab. Mine looks like this (I added , | ||
+ | < | ||
+ | nano /etc/fstab | ||
+ | </ | ||
+ | < | ||
+ | # /etc/fstab: static file system information. | ||
+ | # | ||
+ | # Use ' | ||
+ | # 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). | ||
+ | # | ||
+ | # | ||
+ | / | ||
+ | # /boot was on /dev/sda1 during installation | ||
+ | UUID=46d1bd79-d761-4b23-80b8-ad20cb18e049 /boot | ||
+ | / | ||
+ | / | ||
+ | </ | ||
+ | === 6. Install Vlogger, Webalizer, And AWstats. === | ||
+ | |||
+ | Vlogger, webalizer, and AWstats can be installed as follows: | ||
+ | < | ||
+ | apt-get install vlogger webalizer awstats geoip-database libclass-dbi-mysql-perl | ||
+ | </ | ||
+ | Open / | ||
+ | < | ||
+ | nano / | ||
+ | </ | ||
+ | ... and comment out everything in that file: | ||
+ | < | ||
+ | # | ||
+ | |||
+ | #*/10 * * * * www-data [ -x / | ||
+ | |||
+ | # Generate static reports: | ||
+ | #10 03 * * * www-data [ -x / | ||
+ | </ | ||
+ | === 7. Install fail2ban. === | ||
+ | |||
+ | This is optional but recommended, | ||
+ | < | ||
+ | apt-get install fail2ban | ||
+ | </ | ||
+ | To make fail2ban monitor PureFTPd and Dovecot, create the file / | ||
+ | < | ||
+ | nano / | ||
+ | </ | ||
+ | < | ||
+ | [pureftpd] | ||
+ | enabled | ||
+ | port = ftp | ||
+ | filter | ||
+ | logpath | ||
+ | maxretry = 3 | ||
+ | |||
+ | [dovecot-pop3imap] | ||
+ | enabled = true | ||
+ | filter = dovecot-pop3imap | ||
+ | action = iptables-multiport[name=dovecot-pop3imap, | ||
+ | logpath = / | ||
+ | maxretry = 5 | ||
+ | |||
+ | [sasl] | ||
+ | enabled | ||
+ | port = smtp | ||
+ | filter | ||
+ | logpath | ||
+ | maxretry = 3 | ||
+ | </ | ||
+ | Then create the following two filter files: | ||
+ | < | ||
+ | nano / | ||
+ | </ | ||
+ | < | ||
+ | [Definition] | ||
+ | failregex = .*pure-ftpd: | ||
+ | ignoreregex = | ||
+ | </ | ||
+ | < | ||
+ | nano / | ||
+ | </ | ||
+ | < | ||
+ | [Definition] | ||
+ | failregex = (?: pop3-login|imap-login): | ||
+ | ignoreregex = | ||
+ | </ | ||
+ | Restart fail2ban afterwards: | ||
+ | < | ||
+ | / | ||
+ | </ | ||
+ | === 8. Install ISPConfig 3. === | ||
+ | |||
+ | To install ISPConfig 3 from the latest released version, do this: | ||
+ | < | ||
+ | cd /tmp | ||
+ | wget http:// | ||
+ | tar xfz ISPConfig-3-stable.tar.gz | ||
+ | cd ispconfig3_install/ | ||
+ | </ | ||
+ | The next step is to run | ||
+ | < | ||
+ | php -q install.php | ||
+ | </ | ||
+ | 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. | ||
+ | < | ||
+ | -------------------------------------------------------------------------------- | ||
+ | _____ ___________ | ||
+ | |_ | ||
+ | | | \ `--.| |_/ / | / \/ ___ _ __ | |_ _ __ _ _/ / | ||
+ | | | `--. \ __/ | | / _ \| '_ \| _| |/ _` | |_ | | ||
+ | _| |_/\__/ / | | \__/\ (_) | | | | | | | (_| | ___\ \ | ||
+ | | ||
+ | __/ | | ||
+ | |___/ | ||
+ | -------------------------------------------------------------------------------- | ||
+ | |||
+ | >> Initial configuration | ||
+ | |||
+ | Operating System: Debian or compatible, unknown version. | ||
+ | </ | ||
+ | Following will be a few questions for primary configuration so be careful. | ||
+ | |||
+ | Default values are in [brackets] and can be accepted with . | ||
+ | |||
+ | Tap in " | ||
+ | |||
+ | Select language (en,de) [en]: <-- ENTER | ||
+ | |||
+ | Installation mode (standard, | ||
+ | |||
+ | Full qualified hostname (FQDN) of the server, eg server1.domain.tld | ||
+ | |||
+ | MySQL server hostname [localhost]: | ||
+ | |||
+ | MySQL root username [root]: <-- ENTER | ||
+ | |||
+ | MySQL root password []: <-- yourrootsqlpassword | ||
+ | |||
+ | MySQL database to create [dbispconfig]: | ||
+ | |||
+ | MySQL charset [utf8]: <-- ENTER | ||
+ | |||
+ | Country Name (2 letter code) [AU]: <-- ENTER | ||
+ | |||
+ | State or Province Name (full name) [Some-State]: | ||
+ | |||
+ | 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):// | ||
+ | |||
+ | === 9. ISPConfig 3 Manual. === | ||
+ | In order to learn how to use ISPConfig 3, I strongly recommend to https:// | ||
+ | |||
+ | === 10. Warning. === | ||
+ | |||
+ | En algunas ocasiones, el enlace entre el ISPConfig y la aplicación phpMyadmin, no es creado por el proceso de instalación, | ||
+ | |||
+ | En etc/ | ||
+ | |||
| | ||
Tomado de: https:// | Tomado de: https:// |
para_configurar_ispconfig.txt · Última modificación: 2022/11/02 17:58 por 127.0.0.1