Perfect server on Ubuntu 18.04 Nginx, MySQL, PHP, Postfix, BIND, Dovecot, Pure-FTPD z panelem ISPConfig 3.1

In today's tutorial I will describe the process of preparing a fully functioning web server along with free panel for managing the ISPConfig.
Guidance has been prepared under the latest version of Ubuntu 18.04

For starters make changes in the system hostname. This step was describing in this guide.

We log on as root command:

I enter the password. Then install our favorite text file editor, for example, nano:

The next step is to set repositories in /etc/apt/sources.list

we command them:

The file should look like this:

Then we make an update repositories and system updates:

To be sure proper operation of the system and save all the changes make the system reboot command:

reboot

After the restart, re-log in to the root account on the system and make changes in the system shell.
We can make this command:

The Communication select the option that is not well:

Turn off AppArmor

AppArmor is a security extension (Similar to SELinux), which should provide enhanced security. check, is installed, and, if necessary, remove it. I do not think we need it to set up a secure system and usually causes more problems than benefits.

Deactivation will be done by issuing the command:

We synchronize the time on a server with the NTP server

Install Postfix, Dovecot, MariaDB, phpMyAdmin, rkhunter, Binutils

Minor point here to install the necessary posfixa uninstall sendmail. We can make this command:

Then install all packages:

The installer will ask you for an 2 options you select as below:

Run TLS / SSL postfix

edit file:

And since we comment section smtpd_client_restrictions=permit_sasl_authenticated,reject

The whole should look like this:

After making changes to make to restart posfixa

We want to, aby MariaDB / MySQL is not only on localhost. Therefore we edit the file /etc/mysql/mariadb.conf.d/50-server.cnf (for MariaDB or /etc/mysql/my.cnf (for MySQL) and comment out the line bind-address = 127.0.0.1:

We add # przy bind-address

Set the root password mysql server and pass the basic configuration with the command:

We answer questions like:

We set the password authentication method for native, so that we can later PHPMyAdmin to connect as the root user:

echo “update mysql.user set plugin = ‘mysql_native_password’ where user=’root’;” | mysql -u root

File Modification /etc/mysql/debian.cnf and set the root password

Below the modified file looks like this:

Edit your /etc/mysql/my.cnf and monitoring local MySQL Hashing

The file should look like this:

We make a server restart mysql command:

Installation Amavisd-new, SpamAssassin, And ClamAV

To update antivirus signatures ClamAV and start the clamd spend the following commands:

Virus database update can take a while, please be patient to wait.

You can ignore the following error when you first start freshclam.

Amavisd-new program now contains an error in Ubuntu 18.04, which prevents proper signing e-mails with DKIM. Run the following command, to attach amavisd-new.

We make install Nginx, PHP 7.2 (PHP-FPM), and Fcgiwrap

Nginx install command:

We remove the Apache web server:

Start the server Nginx

install PHP

Then we are retrieving PHP modules and their installation will be done.

Edit the php.ini file

we make changes 2 lines

And change:

And

We do php reload command:

Install the package FCIWRAP thanks to him ISPConfig will take care of the correct configuration vhost.

We install and configure phpMyAdmin

and configure

Installation Let's Encrypt

ISPConfig also allows you to manage (create / modify / delete) Mailman mailing lists. If you want to use this feature, Mailman install as follows:

Select at least one language, for example, .:

We command and answer questions

root@server1:~#

edit / etc / aliases and add:

reload, restatartujemy run postfix and mailman

Install pure-ftpd and Quota

Edit / etc / default / pure-ftpd-common and set in the following manner

Run TLS and SSL for FTP Server:

We give your details as below:

We give chmod and restart the FTP server

Installing a DNS server BIND

Installation Vlogger, Webalizer, and AWStats

We do /etc/cron.d/awstats editing a file and comment on it in the manner described below:

Installation Jailkit

The current version Jailkit 2.19 It has a syntax error, which makes it impossible to compile. To fix this, open debian / changelog using nano:

And add the following line in the 5, followed by a blank line:

We make recompilation

UFW and install fail2ban

Then create a file:/etc / fail2ban / jail.local with the following content:

We make reloading services

s

Installing Roundcube Webmail

When you choose the configuration as follows:

/Etc/roundcube/config.inc.php edit the file and change the default host

Installing ISPConfig 3.1

To be sure, we stop Apache, We remove it and restart Nginx

We grab the latest version of the pedal and it unpack ISPConfig.

Run the installation script:

We answer questions like:

Finished script has been installed and is available at https://ipserwera:8080

The default data to the panel admin login password is admin

In this way we have a fully operational and configured web server once the mail server databases and ftp.

Source: https://www.howtoforge.com/tutorial/perfect-server-ubuntu-18.04-with-apache-php-myqsl-pureftpd-bind-postfix-doveot-and-ispconfig/

How useful this post was?

Click on the star, to evaluate it!

Average grade / 5. number of votes:

So far, no votes! Be the first to rate this post.