GN Latest News

Run the EHCP force Pre-install Script. (Important)

Configure your router.
Install software on your PC to remotely access your server.
Run the EHCP force Pre-install Script. (Important)
Install EHCP Force.
Run the EHCP force Post-install Scripts. (Important)
Post Reply
Rob Swan
Site Admin
Posts: 75
Joined: Tue Oct 31, 2017 3:03 pm
Location: UK
Contact:

Run the EHCP force Pre-install Script. (Important)

Post by Rob Swan »

Before we install the main webserver software (EHCP force), we need run a script to pre-install some applications (for email), this is only because EHCP force has not yet been updated for Ubuntu 24.04.

For whatever reason some of the email packages have been removed from the Ubuntu software repository for 24.04, even though they were included in the pre-release beta version.

I personally cannot see any good reason why they were removed.

Once EHCP force has been updated for Ubuntu 24.04, this topic will probably be removed from the site.

What does the script do?
Under normal circumstances when you install an application on Ubuntu server, you use the Ubuntu software repository, this is done using one simple command (sudo ap-get install package-name), Ubuntu will then install the requested application and also install anything else that the package needs to run automatically (dependencies).

First off, the script downloads the missing packages, it then checks to make sure the downloaded files are present and correct. In the unlikely event that a download has failed, it will delete the downloaded files, and try to download the packages from another location.

Image

There is a 95% chance, that the first download attempt will not fail.

I would estimate, that with both the download locations the chances of a successful download are around 99% or more.

If both download attempts fail, the script will fail and report the failure to the user.

Image

Next, the script installs Postfix. (main mail server core software).

The script checks as it goes that each of the applications have been installed correctly, again the chances of any application failing to install are very low.

For example, if Postfix fails to install, the script will fail and report the failure to the user.

Image

It then installs each of the following applications, checking each install as it goes: -
libcourier-unicode4, libidn12, libpcre3, libgamin0, gamin, courier-authdaemon, courier-authlib-userdb, gnutls-bin, libevent-2.1-7t64, libgnutls-dane0t64, libunbound8, courier-base, courier-imap and courier-pop.

Finally, it deletes the downloaded files, and (assuming there was no failures) it reports to the user that the script has completed successfully.

So, let’s get right to it.
Logon to your server using your PC and PuTTY.

Enter this command to download the script.

wget https://downloads.ghostnetwork.co.uk/scripts/ehcpforce/2404/ehcpfpre.sh

Image

Image

Next, give the script permission to execute by entering this command.

sudo chmod +x ehcpfpre.sh

You may need to re-enter your password.

Image

Image

Next, using your mouse make the PuTTY window about double the size so you can see what is going on better.

Next, run the script using this command, and wait for it to finish, do not attempt to stop the script from running or restart it, it needs to run in full.

sudo bash ehcpfpre.sh

Image

Image

Image

Note: It is very important that you see the green script successful prompt on screen. If you see the red script fail prompt, you are not done. You must not install EHCP force until the script completes successfully, otherwise you will have no email on your server.

Where it is very unlikely that the script will fail, if it does fail it will give you some on screen prompts to help you fix things.

Its fine to run the script multiple times until you see the green script successful prompt.

Finally, close the PuTTY window by entering this command.

exit

Thats it, we are done here.


Last bumped by Rob Swan on Sun May 12, 2024 1:17 pm.
Post Reply