DirectAdmin Installed #5

Closed
opened 2023-10-23 18:18:05 -04:00 by sickprodigy · 4 comments
Owner

Install directadmin documentation.

Install directadmin documentation.
sickprodigy added this to the Website move from Lux to NY project 2023-10-23 18:18:17 -04:00
Author
Owner

rhost.online Needs brought up.
https://rhost.online:2096/evo/

Can't remember what the last issue was. Something with SSL not working right i believe.


SSL without cloudflare not working
SSL not working @ all on rhost.online:2096

Edit*

Last notes i've taken written.

The link above is working right now though, maybe need to clear cache. # not what it was

http://rhost.online/
Isn't working correctly.

nor
https://rhost.online

Why tho? Cloudflare not setup correctly?

Edit**

DirectAdmin Panel working correctly, just not showing website correctly. Maybe permissions need refreshed on file system, for whatever reason. Editing file as root for example, will leave file with root permissions instead of user: admin permissions.

Note: $ signifies command line for linux. Also known as terminal command, bash command, etc.

$/usr/local/directadmin/scripts/set_permissions.sh all

$/usr/local/directadmin/scripts/set_permissions.sh
$/usr/local/directadmin/scripts/fix_da_user.sh

I'm sure I tried these last time but taking documentation it's tried this time. before i restart the server.

rhost.online Needs brought up. https://rhost.online:2096/evo/ Can't remember what the last issue was. Something with SSL not working right i believe. ``` SSL without cloudflare not working SSL not working @ all on rhost.online:2096 ``` Edit* Last notes i've taken written. The link above is working right now though, maybe need to clear cache. # not what it was `http://rhost.online/` Isn't working correctly. nor `https://rhost.online` Why tho? Cloudflare not setup correctly? Edit** DirectAdmin Panel working correctly, just not showing website correctly. Maybe permissions need refreshed on file system, for whatever reason. Editing file as root for example, will leave file with root permissions instead of user: admin permissions. Note: $ signifies command line for linux. Also known as terminal command, bash command, etc. `$/usr/local/directadmin/scripts/set_permissions.sh all` `$/usr/local/directadmin/scripts/set_permissions.sh` `$/usr/local/directadmin/scripts/fix_da_user.sh` I'm sure I tried these last time but taking documentation it's tried this time. before i restart the server.
Author
Owner

My install documentation

frantech-ca-NY-install

Main IP: 198.98.52.239
Username: root 
Password: REDACTED

ssh-keygen
touch ~/.ssh/authorized_keys
nano ~/.ssh/authorized_keys
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFHumJX24LXSGrkOK0jc0s+SkY33bbZScYSk1oOejaY0 ed25519-key-20230523

First things first, check to make sure 256gb drive is mounted as home
mkfs.ext4 -F /dev/sda    # This creates/formats a file system on device sda
mount /dev/sda /home
echo '/dev/sda /home ext4 defaults,nofail,discard 0 0' | tee -a /etc/fstab

df -h       # see updates done so far

apt update
apt upgrade
#Had to install curl
apt install curl

With php a larger swapfile is needed if using 1gb server.

free -m			# will show swap output size if 0 run next
swapon -s		# will show output if swap is on
dd if=/dev/zero of=/swapfile count=2048 bs=1M
ls / | grep swapfile		# proceed if you see swap file
chmod 600 /swapfile
ls -lh /swapfile			# verify the permission change
mkswap /swapfile			# tell server to setup swap at location
swapon /swapfile			# enable swap
echo '/swapfile   none    swap    sw    0   0' | tee -a /etc/fstab

Login as root to your server, download the installation script, and run it:
cd /root/
wget -O setup.sh https://download.directadmin.com/setup.sh
chmod 755 setup.sh
export DA_HOSTNAME=server.rhost.online \
export DA_EMAIL=webmaster@rhost.online \
export DA_NS1=ns1.rhost.online \
export DA_NS2=ns2.rhost.online

./setup.sh auto

[setup.sh] You will receive a message in the DirectAdmin panel when background installation finalizes.

The following information has been set:
Admin username: admin
Admin password: REDACTED
Admin email: webmaster@rhost.online


Server Hostname: server.rhost.online

[setup.sh] To login now, follow this URL: 
http://server.rhost.online:2222/api/login/url?key=REDACTED

admin
REDACTED

Cloudflare doesn't allow port 2222 need port 2096 as directadmin port. Cloudflare has it open for cpanel and auto proxies it.

/usr/local/directadmin/directadmin c | grep port      # Shows which ports are being used currently, run again to see updates
Then explicitly set it if you want something different.
Code:
/usr/local/directadmin/directadmin set port 2096

^ Command updates the below document
/usr/local/directadmin/conf/directadmin.conf
port=2096

systemctl restart directadmin

CSF isn't updated, not sure if it will be rebuilt later or something also which could be issues..
/etc/csf/csf.conf
Change 2222 to 2096 in the following lines:

TCP_IN=
TCP6_IN=
PORTS_directadmin=
---
2nd try more found
TCP_OUT=
TCP6_OUT=
PORTS_directadmin
MESSENGER_HTTPS_IN
---

save, exit and restart csf:
systemctl restart csf

/etc/csf
Add ip to
csf.ignore
So you don't get blocked
and also
csf.allow
to allow through iptables

136.54.83.215
198.98.52.239

http://server.rhost.online:2096/api/login/url?key=REDACTED

cd /home
mkdir mysql
chown mysql:mysql mysql
cd mysql

perl -pi -e 's/mysqld=ON/mysqld=OFF/' /usr/local/directadmin/data/admin/services.status
service mysqld stop
cp -Rp /var/lib/mysql/* .
cd /var/lib
mv mysql mysql_old
ln -s /home/mysql ./mysql

[Warning] Can't create test file /home/mysql/server.lower-test

check the /etc/systemd/system/mariadb.service or mysqld.service file for:

ProtectHome=true

change to false

systemctl daemon-reload
/sbin/service mysqld start

Wasn't using cloudflare but moved there anyways..

No default domain for admin account
add rhost.online for LUX

Force SSL in directadmin settings for rhost.online
Get ssl cert automatically from lets encrypt
Let it do it's thing check to make sure working

Install
DAFlare to sync with cloudflare
must add NS records for each domain that will be updated on cloudflare:
ram.ns.cloudflare.com
melody.ns.cloudflare.com
Also needed A records
server.secureservers.top # not there second time, but I don't think it should be technically but cloudflare needs it
ns1.secureservers.top # already created second time
ns2.secureservers.top
Then sync to cloudflare

Cloudflare api token: REDACTED

Cloudflare daflare, disable mail.domain.com from being proxied
they don't forward port 587 which is smtp and prolly 993 which is imap. annoying af
autdiscover probably needs to be setup for easy email setup in outlook and similar software

mail, pop, smtp not proxied through daflare admin settings

Some reason ssl cert giving issues
/usr/local/directadmin/data/users/USER/user.conf
/usr/local/directadmin/data/users/admin

ssl=ON
ssl=OFF

If disabled for the domain, change in file /usr/local/directadmin/data/users/USER/domains/DOMAIN.TLD.conf
/usr/local/directadmin/data/users/admin/domains
rhost.online.conf
ssl=ON
ssl=OFF
My install documentation ``` frantech-ca-NY-install Main IP: 198.98.52.239 Username: root Password: REDACTED ssh-keygen touch ~/.ssh/authorized_keys nano ~/.ssh/authorized_keys ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFHumJX24LXSGrkOK0jc0s+SkY33bbZScYSk1oOejaY0 ed25519-key-20230523 First things first, check to make sure 256gb drive is mounted as home mkfs.ext4 -F /dev/sda # This creates/formats a file system on device sda mount /dev/sda /home echo '/dev/sda /home ext4 defaults,nofail,discard 0 0' | tee -a /etc/fstab df -h # see updates done so far apt update apt upgrade #Had to install curl apt install curl With php a larger swapfile is needed if using 1gb server. free -m # will show swap output size if 0 run next swapon -s # will show output if swap is on dd if=/dev/zero of=/swapfile count=2048 bs=1M ls / | grep swapfile # proceed if you see swap file chmod 600 /swapfile ls -lh /swapfile # verify the permission change mkswap /swapfile # tell server to setup swap at location swapon /swapfile # enable swap echo '/swapfile none swap sw 0 0' | tee -a /etc/fstab Login as root to your server, download the installation script, and run it: cd /root/ wget -O setup.sh https://download.directadmin.com/setup.sh chmod 755 setup.sh export DA_HOSTNAME=server.rhost.online \ export DA_EMAIL=webmaster@rhost.online \ export DA_NS1=ns1.rhost.online \ export DA_NS2=ns2.rhost.online ./setup.sh auto [setup.sh] You will receive a message in the DirectAdmin panel when background installation finalizes. The following information has been set: Admin username: admin Admin password: REDACTED Admin email: webmaster@rhost.online Server Hostname: server.rhost.online [setup.sh] To login now, follow this URL: http://server.rhost.online:2222/api/login/url?key=REDACTED admin REDACTED Cloudflare doesn't allow port 2222 need port 2096 as directadmin port. Cloudflare has it open for cpanel and auto proxies it. /usr/local/directadmin/directadmin c | grep port # Shows which ports are being used currently, run again to see updates Then explicitly set it if you want something different. Code: /usr/local/directadmin/directadmin set port 2096 ^ Command updates the below document /usr/local/directadmin/conf/directadmin.conf port=2096 systemctl restart directadmin CSF isn't updated, not sure if it will be rebuilt later or something also which could be issues.. /etc/csf/csf.conf Change 2222 to 2096 in the following lines: TCP_IN= TCP6_IN= PORTS_directadmin= --- 2nd try more found TCP_OUT= TCP6_OUT= PORTS_directadmin MESSENGER_HTTPS_IN --- save, exit and restart csf: systemctl restart csf /etc/csf Add ip to csf.ignore So you don't get blocked and also csf.allow to allow through iptables 136.54.83.215 198.98.52.239 http://server.rhost.online:2096/api/login/url?key=REDACTED cd /home mkdir mysql chown mysql:mysql mysql cd mysql perl -pi -e 's/mysqld=ON/mysqld=OFF/' /usr/local/directadmin/data/admin/services.status service mysqld stop cp -Rp /var/lib/mysql/* . cd /var/lib mv mysql mysql_old ln -s /home/mysql ./mysql [Warning] Can't create test file /home/mysql/server.lower-test check the /etc/systemd/system/mariadb.service or mysqld.service file for: ProtectHome=true change to false systemctl daemon-reload /sbin/service mysqld start Wasn't using cloudflare but moved there anyways.. No default domain for admin account add rhost.online for LUX Force SSL in directadmin settings for rhost.online Get ssl cert automatically from lets encrypt Let it do it's thing check to make sure working Install DAFlare to sync with cloudflare must add NS records for each domain that will be updated on cloudflare: ram.ns.cloudflare.com melody.ns.cloudflare.com Also needed A records server.secureservers.top # not there second time, but I don't think it should be technically but cloudflare needs it ns1.secureservers.top # already created second time ns2.secureservers.top Then sync to cloudflare Cloudflare api token: REDACTED Cloudflare daflare, disable mail.domain.com from being proxied they don't forward port 587 which is smtp and prolly 993 which is imap. annoying af autdiscover probably needs to be setup for easy email setup in outlook and similar software mail, pop, smtp not proxied through daflare admin settings Some reason ssl cert giving issues /usr/local/directadmin/data/users/USER/user.conf /usr/local/directadmin/data/users/admin ssl=ON ssl=OFF If disabled for the domain, change in file /usr/local/directadmin/data/users/USER/domains/DOMAIN.TLD.conf /usr/local/directadmin/data/users/admin/domains rhost.online.conf ssl=ON ssl=OFF ```
Author
Owner

Da build all from command line, see if that fixes the issue.

think it might relate to type rhost.onlin instead of rhost.online somewhere.

Probably just redo the install now. And see if it don't start working.

Da build all from command line, see if that fixes the issue. think it might relate to type rhost.onlin instead of rhost.online somewhere. Probably just redo the install now. And see if it don't start working.
Author
Owner

Not having any issues with directadmin anymore. finally got it working but new domains.

https://hostpro.top
https://secureservers.top

Not having any issues with directadmin anymore. finally got it working but new domains. https://hostpro.top https://secureservers.top
Sign in to join this conversation.
No description provided.