DirectAdmin First Timer: How To Install DirectAdmin On CentOS 7 Guide

eva2000

Verified User
Joined
Jul 1, 2019
Messages
122
I managed to play with DirectAdmin for the first time learning the ropes so I thought I'd document a DirectAdmin CentOS 7 install guide on a new site I built just for reviewing/test cPanel alternatives like DirectAdmin https://servermanager.guide/162/how-to-install-directadmin-control-panel-on-centos-7/.

Comments, suggestions and corrections are welcome :)

I’d like to thank @smtalk and @bdacus01 for their answers to my questions and wonderful and insightful replies and knowledge provided by @zEitEr on the DirectAdmin forums and his Poralik site.

edit: Extended and added to my DirectAdmin installation guide:

edit 2: I also did benchmarks with dovecot compile, so here's combined times https://servermanager.guide/162/how-to-install-directadmin-control-panel-on-centos-7/#step14

for DirectAdmin Apache + PHP 7.3/7.2/5.6 + Dovecot recompile builds via CustomBuild 2.0 called from my directadmin-compiler-bench.sh wrapper script resulted in total compile times as follows:

  • total without ccache compiler cache = Compile time = 200.293 + 4509.820 + 879.963 = 5590.076seconds
  • total run 1 with ccache compiler cache 1st run which is uncached and populates the cache ready for 2nd run use = Compile time = 231.493 + 5141.003 + 976.800 = 6349.296 seconds which is ~13.6% slower than without ccache for 1st uncached compile run.
  • total run 2 with ccache compiler cache 2nd run which can use ccache’s cache to speed up subsequent recompiles of same versions = Compile time = 1439.342 + 159.888 + 363.582 = 1962.812 seconds which is ~64.9% faster than without ccache and ~69.1% faster than with ccache’s uncached 1st run.
Huge improvements in CustomBuild recompile times :)

cheers

George
 
Last edited:
Hello George,

Thank you for the article. It's really useful, I've found many interesting things for myself as well.

You can install beta versions of PECL extensions the following way (geoip 1.1.1 will be installed):

Code:
./php-extension.sh install geoip --beta

;)
 
You're welcome @texo :)

Thanks @zEitEr updated my article with beta install runs for geoip = works and memcache = failed as 3.0.8 still doesn't support PHP 7. Need memcache 4.0.4 php extension for PHP 7+ :)
 
Great post. Maybe you can consider writing an initial hardening steps for DA
 
WOW thanks

The DKIM copy part to external DNS is only working if you have DNS options on in DA.

It is possible not using DNS on DA servers so less work if DKIM and some other parts mail and so on are updated somehow in GUI or so?

See what you writing
https://servermanager.guide/162/how-to-install-directadmin-control-panel-on-centos-7/#step9

And :
https://forum.directadmin.com/showthread.php?t=58018

https://forum.directadmin.com/showthread.php?t=58206&p=297645#post297645

Also fixed IP isn't needed see for platforms where you don't have external fixed ip on your server config itself: ( but on the router/gateway ports, and forwarding in some configs for having more ip's)
https://forum.directadmin.com/showthread.php?t=57772
 
Last edited:
Wow George, a lot of hours implementing your CentOS 7 install guide for DA, well done.:)

thanks @Eureka

@ikkebn

The DKIM copy part to external DNS is only working if you have DNS options on in DA.
Which DNS options on in DA ? my install has working DKIM from my outlined instructions in my guide - I just had to manually set them up in my Cloudflare DNS dashboard for DKIM/SPF records copied over from DA DNS zone management section. Do you mean to say DA has an option to disable DNS which won't allow display of DNS zone management section at all ? Or you mean DA end user domain setting No DNS ? I haven't gotten as far in my learning for end user domains yet - that's next up :D

From my guide for hostname DKIM it's working using Cloudflare DNS instead
Code:
cd /usr/local/directadmin/scripts
./dkim_create.sh hostname.yourdomain.com
Then just get the DKIM record from generated /etc/virtual/hostname.yourdomain.com/dkim.public.key
Code:
ls -lah /etc/virtual/hostname.yourdomain.com/
total 16K
drwxr-xr-x 2 mail mail 4.0K Jul 19 02:35 .
drwxr-xr-x 5 mail mail 4.0K Jul 19 02:38 ..
-rw------- 1 mail mail 1.7K Jul 19 02:35 dkim.private.key
-rw------- 1 mail mail  451 Jul 19 02:35 dkim.public.key
Code:
dkim_domain=hostname.yourdomain.com
dkim_prefix="v=DKIM1; k=rsa; p=$(grep -v 'PUBLIC KEY' /etc/virtual/$dkim_domain/dkim.public.key | tr -d \\n)"
echo $dkim_prefix
Put outputted $dkim_prefix formatted DKIM TXT record into Cloudflare DNS TXT record with x._domainkey.hostname as the record.

No experience with openstack floating IP so can't comment on that yet.
 
I managed to play with DirectAdmin for the first time learning the ropes so I thought I'd document a DirectAdmin CentOS 7 install guide on a new site I built just for reviewing/test cPanel alternatives like DirectAdmin https://servermanager.guide/162/how-to-install-directadmin-control-panel-on-centos-7/.

Comments, suggestions and corrections are welcome :)

I’d like to thank @smtalk and @bdacus01 for their answers to my questions and wonderful and insightful replies and knowledge provided by @zEitEr on the DirectAdmin forums and his Poralik site.

cheers

George

George
Thanks for mentioning me in the article. Thank for making me sound smarter than I am. The article is well written and detailed.
 
@eva2000

No i don't mean youre guide is wrong.

I mean if you not use DNS entries at all in DA. ( that is also possible if DNS control is disabled for an user
Then you should have less work if using external DNS provider.

ONLY not working while DKIM PART isn't solved then for the mailserver if using the host DA for that.

For pointing out not a fixed (external) ip in DA server Config , that that part you are writing about pre requirements a fixed external IP on the DA box/instance itself isn't needed.

More platform so some, AWS , Openstack and some more don't have that option if needing more external IP's there is the a kind of workarround for now, maybe later on some more possible options.

Sorry not so good in explaining.
At a bare minimum your server must have one static IPv4 IP address.

It is not needed to have this as a external static ip on the DA instance itself. But the DA box/instance should be reachable on the web for license.
 
I see regarding static IPv4 IP requirement. So behind NAT works via instructions at https://www.directadmin.com/lan.shtml ? If so i'll update my article with such note. I don't have much experience with non-public IP servers for such - always used servers with public IP accessible for DKIM/SPF/DMARC/PTR etc

Next up is learning DirectAdmin end user/domain site side of things :)
 
Last edited:
I see regarding static IPv4 IP requirement. So behind NAT works via instructions at https://www.directadmin.com/lan.shtml ? If so i'll update my article with such note. I don't have much experience with non-public IP servers for such - always used servers with public IP accessible for DKIM/SPF/DMARC/PTR etc

Next up is learning DirectAdmin end user/domain site side of things :)

I didn't test for now, while no support / not enough support, so i need much more spare time to tryout such.
But expecting hoping to do so within 1 year from now, also waiting then for the new licensing while testing then with the upcomming lite license ofcourse. ;)
 
I didn't test for now, while no support / not enough support, so i need much more spare time to tryout such.
But expecting hoping to do so within 1 year from now, also waiting then for the new licensing while testing then with the upcomming lite license ofcourse. ;)

new licensing you mean for DA Lite ?

George
Thanks for mentioning me in the article. Thank for making me sound smarter than I am. The article is well written and detailed.

Thanks. You're welcome :)
 
YUp testing makes more sense for me not with a full license i suppose.

https://forum.directadmin.com/showthread.php?t=58091
A new "Lite" license is being introducted on August 15 that can be installed on any type of server. It will be heavily discounted and intended for the personal user, hobbyist, etc. for those who need a few users/domains.

ON most such config's (behind NAT and co) the per month option from hosting company don't work or have no support from them.

Therefore while not knowing how much time for testing and setup, and so on better to do with a lite licens only , yup BUT don't know supprt for that when needed from DA at the installation / startup configs.
 
YUp testing makes more sense for me not with a full license i suppose.

https://forum.directadmin.com/showthread.php?t=58091


ON most such config's (behind NAT and co) the per month option from hosting company don't work or have no support from them.

Therefore while not knowing how much time for testing and setup, and so on better to do with a lite licens only , yup BUT don't know supprt for that when needed from DA at the installation / startup configs.

Or you can use a web host who provides free DirectAdmin licenses, that's what I did for my guide testing write up :)
 
No can't for openstack, and there they don't support or don't have DA, if using more external ip's floating for example.
Don't want to test on such where we aren't going to use.

FREE DA from hosters , don't have normally support from DA itself.

I think it is important to have such support options not only this forum and SMTALK and co who are doing good jobs.
 
FREE DA from hosters , don't have normally support from DA itself.

I think it is important to have such support options not only this forum and SMTALK and co who are doing good jobs.

Ah yes DirectAdmin technical support - overlooked that part. I haven't used a control panels technical support in nearly over a decade LOL. But who knows with DirectAdmin - so much to learn and experience ^_^
 
Ah yes DirectAdmin technical support - overlooked that part. I haven't used a control panels technical support in nearly over a decade LOL. But who knows with DirectAdmin - so much to learn and experience ^_^

The technical support isn't the only thing. ;)

Also you can then use Beta's (acces)if needed for faster solving something.!

We needed support once SMTALK solved against a litle payment while no direct license.
 
Last edited:
YeM98g

Wonderful! I really appreciate the work you have put into this.

Also great for starters. Keep up the good work. Cheers!
 
Wonderful! I really appreciate the work you have put into this.

Also great for starters. Keep up the good work. Cheers!
 
Back
Top