Basic installation and partitioning Installing Debian Jessie is easy. Get a boot medium from the. The smaller network installer is sufficient – it will download all required packages directly from the internet. Make sure you choose ‘English’ as the installation language. If you have trouble with the server you will more likely find help when google’ing for english error messages.
The only part that takes some patience is when it comes to partitioning your disk. When the installation asks how to partition choose “Manual”. Throughout this tutorial you will store your users’ emails in the /var/vmail partition where the actual emails are stored. The MySQL database will live in /var/lib/mysql and is usually pretty small even for a large number of email accounts. Log files live in /var/log.
So my recommendation is:. / (10 GB, ext4). /tmp (1 GB, ext4, optional but recommended). swap (1 GB).
/var/vmail (the remaining space – the more the better, ext4, mounted with the noatime option) (If you have worked with LVM – the logical volume manager – I would recommend you use it. You will gain extra flexibility later if you want to move or enlarge your mail partition.) Step-by-step installation guide If you feel uneasy installing Debian then just follow these steps and your installation will be done in a few minutes. After booting from the installation medium you will be greeted by Always choose ‘English’ as your installation language. As I said it will be easier to get help on the internet if you get stuck. Choose your geographical location. This is mostly important for the time zone setting. Choose the keymap that matches the layout of your keyboard.
The installer prepares further packages that are needed for the installation process: Some system administrators consider this the most complicated step. Choosing a host name. ? The domain of the server is independent from your mail domains. Just choose any of your domains. You should create a DNS record for that name later. Think of a good password for the “root” user. You do not have to fear that someone from the internet will be able to access that account.
Installing Debian Jessie is easy. Get a boot medium from the Debian website. The smaller network installer is sufficient – it will download all required packages directly from the internet.
SSH is by default configured to only allow root access from the console or using public key authentication. Debian has adopted Ubuntu’s habit to avoid direct SSH logins as “root”. So you are asked for the realname, username and password of an aditional user.
I will call this user “johndoe” in this guide but of course you can call it anything you like. Depending on the country you chose you may get asked which time zone you are in.
Now it is time to partition your disk. Choose “Manual”. Select the disk you want to use.
In my example I just have one disk called “sda”: On a fresh system there are no partitions. So the installer will ask you to create a new partition table: Select the line reading “FREE SPACE” and press Enter: Create a new partition: The first partition is used for the actual operating system. Make it 10 GB: The type is “Primary”.
(Historically you can have four primary partitions. If you need more then the first three are primary and further partitions are logical. We just need four partitions so you can create all of type “primary”.) The new partition will be created at the beginning of the free space: Make sure that the root (“/”) partition is set to bootable. Your first partition is created. Now choose “FREE SPACE” again: Create another new partition This is the “/tmp” partition. Make it 1 GB large: It is of type “Primary” as usual: at the beginning of the free space There are no special settings required. Just choose “/tmp” as themount point and you are done Again choose “FREE SPACE” Create another partition for swap space 1 GB is more than enough The type is “Primary” as usual at the beginning of the remaining space As type choose “swap area”: Now for the final partition in /var/vmail that will later contain the actual emails.
We will grant it all the remaining space. So choose “FREE SPACE” one last time Create a new partition The installer suggests to use all the remaining space. So press Enter to confirm that “Primary” Set the mount point to “/var/vmail” and add the mount option “noatime”.
Noatime means “no access time”. Without this option a file system will record any access to a file. This is not necessary to operate a mail server and will spare one file system access per email which slightly speeds up the disk access That’s it.
All partitions are now created. Finish the partitioning The installer shows an overview again. If it looks similar on your screen then choose “Yes” After the installer created the partitions it will install basic packages and install the base system. Depending on your geographical location you will get asked which download server you would like to use. Usually you can just confirm the suggested default Unless you need a proxy to access the download servers on the internet you can leave this blank The installer will get information from the Debian download server and download further packages Participating in the package survey (also known as popcon) is purely voluntary. It records which packages you install to help Debian developers assess which packages are commonly used and deserver special attention Now you are getting asked which groups of packages to install. All you need is an “SSH server” (to be able to log in to the system later) and the “standard utilities” Your selected packages are getting downloaded and installed To make your system bootable the installer will write a boot loader into the beginning of your first disk The choice depends on your system.
Usually it is the first disk that you use to install the boot loader Nearly done That is it. The installation is done and by selecting “Continue” your system will reboot. 2015-10-26 at 09:46 Thanks. The /boot partition was required ages ago when boot loaders were not capable of dealing with newer file systems (e.g.
Ext4) or with complicated setups like encrypted root partitions or LVM (logical volume manager). Nowadays the initrd (initial RAMdisk) contains everything that is required to mount the root partition and boot from it. In my experience the /boot partition was often too small. And when automatic updates installed new kernels it sometimes happened that the old kernels were not removed from /boot and caused the partition to run full.
2017-04-23 at 13:01 I was reading this article on Server Fault and immediately thought about this tutorial and what you would recommend. I must say I’m a bit disappointed with you chosing ext4 for all partitions without explaining why these would be better than Reiser4 (old) or XFS. But then again, perhaps that’s also not the goal of this tutorial.
It would be nice though to elaborate on which filesystem would be best or whether or not to use external storage and redundancy (i.e. Several mail servers requiring access to the same storage). 2017-04-23 at 15:38 @Tom: I wouldn’t say that I have chosen the best components in every case. But in fact ext4 would be my favorite choice. The future of ReiserFS is a bit uncertain in my opinion. And people started using it because former ext file systems did not have usable journaling.
I was indeed using XFS for a while and users did not really notice a big difference. But when it came to purging large directories (IMAP folders) it took significantly longer. That was when I learned that XFS is horribly slow at deleting files. Besides there were some details you had to consider like explicitly defining UUIDs when taking snapshots – but I honestly don’t remember all the details. In the end it turned out that ext4 was a solid choice.
The most important piece of software to consider here is Dovecot because it has to deal with millions of small and large files. So you might also want to read what the Dovecot developers say: External storage is fine but be aware that the large number of files require a lot of IOPS.
For many reasons NFS is a bad choice here (locking, latency, authentication). ISCSI may be okay. FibreChannel is really good. If you want to scale horizontally I would suggest using different servers and just use their local disks. So users would have to access a certain mail server – or the load balancer knows where to forward them.
If you are worried about redundancy I would probably prefer DRBD and mirror the data to another disk. Or maybe VMware (even the free ESXi hypervisor) may be good so that you have a fast local (or FibreChannel) disk storage and can use snapshots for backups or mount a virtual disk to another mail server if one crashes. If you are looking for such large-style ISP scenarios then I can also recommend the #postfix IRC channel where a couple of sysadmins are living. One of them manages a very large environment at an indian ISP.
The Debian 8 default repositories contain MySQL packages. You can simply install MySQL on Debian 8 Jessie machine with few simple commands. But the default repositories don’t contain the latest MySQL version. So this tutorial will help to install MySQL on Debian 8 Jessie system with the latest version.
Go through the step by step tutorial for the MySQL installation. Step 1 – Prerequisites Login to your Debian 8 system using shell access. For remote systems connect with SSH. The Windows desktop users can use Putty any other SSH client to connect their server. Ssh Run below commands to upgrade the current packages to the latest version. Sudo apt update sudo apt upgrade Step 2 – Setup MySQL PPA on Debian 8 Download the MySQL PPA configuration package from the official website of MySQL. The below commands will do the MySQL PPA setup on Debian 8 automatically.
Wget sudo dpkg -i mysql-apt-config0.8.9-1all.deb With the installation of above package, this will prompt to select MySQL version to install on your system. Select the MySQL 5.7 or 5.6 to install on your system. Step 3 – Install MySQL on Debian 8 You are ready now for the MySQL installation on a Debian 8 Jessie machine. Execute the following commands to install MySQL on a Debian 8 machine. Sudo apt update sudo apt install mysql-server The installation process will prompt for the root password to set as default. Input a secure password and same to confirm password window. This will be MySQL root user password required to log in to MySQL server.
![]()
Step 4 – Secure MySQL Installation Execute the below command on your system to make security changes on your Database server. This will prompt some questions. The do the high security provide all answers to yes. Sudo mysqlsecureinstallation Step 5 – Connect MySQL Your system is ready with the MySQL database server.
Simply connect to the MySQL using command line client. This will require the root password configured in step 3 to connect database server. Mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with; or g.
Your MySQL connection id is 5 Server version: 5.7.21 MySQL Community Server (GPL) Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or ' h' for help. Type ' c' to clear the current input statement.
Comments are closed.
|
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |