CrossDM Cloud
Setup users and host
Ionos Cloud Server - CentOS 8 - XS /etc/hostname
cloud.crossdm.com
dnf install vim
groupadd admin
usermod -a -G admin chris
echo "%admin ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/admin
vim /etc/ssh/sshd_config
Change to
PermitRootLogin no
useradd app
usermod -a -G nginx app
Time
timedatectl set-timezone America/Chicago
Install Nginx and php-fpm
yum install nginx
yum install php php-fpm php-opcache php-cli php-zip -y
vim /etc/php-fpm.d/www.conf
listen = /run/php-fpm/www.sock
listen.owner = nginx
listen.group = nginx
listen.mode = 0660
user = nginx
group = nginx
systemctl enable nginx
systemctl enable php-fpm
systemctl start nginx
systemctl start php-fpm
Setup Firewalld
# dnf install firewalld
systemctl enable firewalld
systemctl startfirewalld
firewall-cmd --permanent --zone=public --add-service=http
firewall-cmd --permanent --zone=public --add-service=https
firewall-cmd --reload
yum install epel-release
yum install fail2ban
systemctl enable fail2ban
systemctl start fail2ban
Install PostgreSQL
yum install postgresql postgresql-server postgresql-contrib
postgresql-setup initdb
systemctl enable postgresql
systemctl start postgresql
su - postgres
psql -c "create user app with password 'v2QzAC63EqA53Twc' CREATEDB CREATEROLE SUPERUSER;"
su - app
psql template1 -c "create database partner"
Install Wordpress
yum -y install php-mysqlnd php-pgsql
Install Laravel
dnf install php-mbstring php-dom php-pgsql php-json -y
yum install -y unzip
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
su - app
cd /srv/www/laravel/
composer create-project --prefer-dist laravel/laravel partner
Install wordpress (Setup postgres)
grep md5 data/pg_hba.conf
# METHOD can be "trust", "reject", "md5", "password", "scram-sha-256",
# Note that "password" sends passwords in clear text; "md5" or
local all all md5
host all all 127.0.0.1/32 md5
host all all ::1/128 md5
su - postgres
psql -c "create user wpuser with password 'isWBGX4DXF11eL2x' CREATEDB CREATEROLE SUPERUSER;"
psql template1 -U wpuser -c "create database wpdb" -W
cd
Setup wordpress to work with pgsql
https://www.enterprisedb.com/postgres-tutorials/how-deploy-wordpress-highly-available-postgresql