I have done the same steps for all of my servers for years but this time I held off on setting up SSL for hostname until after a restart and apparently revealed to myself that maybe i've been doing it wrong all these years? Here is what i've been doing:
1. Connect via SSH.
2. Issue commands to create a swap file:
sudo dd if=/dev/zero of=/swap count=8192 bs=1MiB
sudo chmod 600 /swap
sudo mkswap /swap
sudo swapon /swap
sudo echo "/swap swap swap sw 0 0" >> /etc/fstab
3. For centos 8 I do:
yum install iptables wget tar gcc gcc-c++ flex bison make bind bind-libs bind-utils openssl openssl-devel perl quota libaio \
libcom_err-devel libcurl-devel gd zlib-devel zip unzip libcap-devel cronie bzip2 cyrus-sasl-devel perl-ExtUtils-Embed \
autoconf automake libtool which patch mailx bzip2-devel lsof glibc-headers kernel-devel expat-devel \
psmisc net-tools systemd-devel libdb-devel perl-DBI perl-libwww-perl xfsprogs rsyslog logrotate crontabs file \
kernel-headers hostname
4. Issue commands for directadmin setup:
wget -O setup.sh https://www.directadmin.com/setup.sh
chmod 755 setup.sh
./setup.sh auto
5. Login to directadmin and create the subdomain for the servers hostname like host.domain.com in the subdomain management.
Is step 5 incorrect? I realized this time since I had restarted the server before trying to setup SSL for the hostname that it will no longer place the SSL certs in /usr/local/directadmin/conf/ , I assume this is because it is trying to place them in whatever the location is for the normal domains? What is the proper way to setup your hostname in directadmin? Do i simply just go into administrator settings and type in the server hostname in the "Server's Hostname" and thats it?
1. Connect via SSH.
2. Issue commands to create a swap file:
sudo dd if=/dev/zero of=/swap count=8192 bs=1MiB
sudo chmod 600 /swap
sudo mkswap /swap
sudo swapon /swap
sudo echo "/swap swap swap sw 0 0" >> /etc/fstab
3. For centos 8 I do:
yum install iptables wget tar gcc gcc-c++ flex bison make bind bind-libs bind-utils openssl openssl-devel perl quota libaio \
libcom_err-devel libcurl-devel gd zlib-devel zip unzip libcap-devel cronie bzip2 cyrus-sasl-devel perl-ExtUtils-Embed \
autoconf automake libtool which patch mailx bzip2-devel lsof glibc-headers kernel-devel expat-devel \
psmisc net-tools systemd-devel libdb-devel perl-DBI perl-libwww-perl xfsprogs rsyslog logrotate crontabs file \
kernel-headers hostname
4. Issue commands for directadmin setup:
wget -O setup.sh https://www.directadmin.com/setup.sh
chmod 755 setup.sh
./setup.sh auto
5. Login to directadmin and create the subdomain for the servers hostname like host.domain.com in the subdomain management.
Is step 5 incorrect? I realized this time since I had restarted the server before trying to setup SSL for the hostname that it will no longer place the SSL certs in /usr/local/directadmin/conf/ , I assume this is because it is trying to place them in whatever the location is for the normal domains? What is the proper way to setup your hostname in directadmin? Do i simply just go into administrator settings and type in the server hostname in the "Server's Hostname" and thats it?