Installing LEMP

Jon12345

New member
Joined
Apr 25, 2024
Messages
9
I want to install a LEMP stack. I've found in the docs how to install nginx: https://docs.directadmin.com/webservices/nginx/general.html

It say to use this:

Code:
da build set webserver nginx
da build set php1_mode php-fpm
da build nginx
da build php
da build rewrite_confs

Do I ssh to my server and type that in?

Also, I know how to install LEMP using SSH. Is doing it that way mean I miss out something compared to the way shown in the docs?
 
you might need to cd into the DA directory /usr/local/directadmin befor typing the commands.
 
No that is not necessary nowadays anymore.

Used to be cd into /usr/local/directadmin/custombuild to use ./build commands. But when using da build commands it can be done from any directory if all is well.
 
Is there any reason
Yes there is. Because if I'm not mistaken, some things including apache (and most likely also nginx) are not installed from packege but compiled from source by DA.
Also in most cases, everything is done by a panel (so also by DA) will in most cases already be pre-configured to work correctly with the panel.

Which is why it's best practice, to not use the package manager to install applications which DA can install for you.
If you work with Centos, those applications are excluded in the package manager for that reason, something which has never been done in Debian an deratives by DA for some unknown reason.
This is what is excluded:
exclude=apache* nginx* httpd* mod_* mysql* MySQL* mariadb* da_* *ftpd exim* sendmail* php* bind-chroot* dovecot*
so it's best to not install any of these via the apt package manager either to prevent running into issues.
 
Oh wow, had no idea about that. So, am I right in thinking that all I have to do to get my complete LEMP stack is to type each of those lines in my first post into a ssh login and it will give me nginx, php and mariadb?
 
Well... I don't know why you still would need that.
If you just run the setup from Directadmin, it will install everything already by default for you. And you can adjust or add extra things you want later on like php modules and maybe spamassassin for example.
 
I must be misunderstanding something here. I'm not sure what you mean by run the setup from Directadmin. Do you mean that I can install nginx, php and mariadb from the DirectAdmin GUI and without needing to run those SSH commands?
 
When you install DirectAdmin everything else will be installed for you. If you are not the one installing DirectAdmin then you should contact whoever is managing your server.
 
Back
Top