sudo mysql -u root -p

CREATE DATABASE concrete_db;

CREATE USER 'concrete_user'@'localhost' IDENTIFIED BY 'ChangeME';

GRANT ALL PRIVILEGES ON concrete_db.* TO 'concrete_user'@'localhost'; 


Install PHP-mods

sudo apt install -y php8.2-curl php8.2-xml php8.2-gd php8.2-mbstring php8.2-mysql php8.2-cli php8.2-zip

Install CMS

Get Downlod Link:

cd /var/www

sudo wget -O
sudo unzip

sudo rm -rfv

sudo vim /etc/apache2/sites-available/000-default.conf

<VirtualHost *:80>
	# The ServerName directive sets the request scheme, hostname and port that
	# the server uses to identify itself. This is used when creating
	# redirection URLs. In the context of virtual hosts, the ServerName
	# specifies what hostname must appear in the request's Host: header to
	# match this virtual host. For the default virtual host (this file) this
	# value is not decisive as it is used as a last resort host regardless.
	# However, you must set it for any further virtual host explicitly.

	ServerAdmin webmaster@localhost
	DocumentRoot /var/www/concrete-cms-9.2.1/

	<Directory /var/www/concrete-cms-9.2.1/>
    		Options Indexes FollowSymLinks MultiViews
    		AllowOverride All
    		Order allow,deny
    		allow from all

	# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
	# error, crit, alert, emerg.
	# It is also possible to configure the loglevel for particular
	# modules, e.g.
	#LogLevel info ssl:warn

	ErrorLog ${APACHE_LOG_DIR}/error.log
	CustomLog ${APACHE_LOG_DIR}/access.log combined

	# For most configuration files from conf-available/, which are
	# enabled or disabled at a global level, it is possible to
	# include a line for only one particular virtual host. For example the
	# following line enables the CGI configuration for this host only
	# after it has been globally disabled with "a2disconf".
	#Include conf-available/serve-cgi-bin.conf
sudo chown -R www-data:www-data /var/www/

sudo systemctl restart apache2.service




# Setzen Sie die Variablen

# Generieren Sie den Dateinamen mit Datum und Uhrzeit
echo "Generate data name...."
DATE=$(date +%Y%m%d_%H%M%S)

# Erstellen Sie die Unterordner, falls sie nicht existieren
echo "checking folders...."
mkdir -p $BACKUP_DIR/web
mkdir -p $BACKUP_DIR/DB

# Erstellen Sie das tar.gz-Archiv
echo "compressing...."

# Erstellen Sie den Datenbank-Dump
echo "dumping...."

# Funktion zum Löschen der ältesten Backups, wenn mehr als 30 vorhanden sind
cleanup() {
  echo "Checking if cleanup is necessary..."
  while [ $(ls -1qA $BACKUP_DIR/web | wc -l) -gt 30 ]
    OLDEST_BACKUP=$(ls -tr $BACKUP_DIR/web | head -1)
    echo "Deleting oldest backup: $OLDEST_BACKUP"
  while [ $(ls -1qA $BACKUP_DIR/DB | wc -l) -gt 30 ]
    OLDEST_BACKUP=$(ls -tr $BACKUP_DIR/DB | head -1)
    echo "Deleting oldest backup: $OLDEST_BACKUP"

# Führen Sie die Bereinigungsfunktion aus

echo "Backup erfolgreich erstellt in $BACKUP_DIR/web/$FILE_NAME und $BACKUP_DIR/DB/$DB_DUMP_NAME"


# Edit this file to introduce tasks to be run by cron.
# Each task to run has to be defined through a single line
# indicating with different fields when the task will be run
# and what command to run for the task
# To define the time you can provide concrete values for
# minute (m), hour (h), day of month (dom), month (mon),
# and day of week (dow) or use '*' in these fields (for 'any').
# Notice that tasks will be started based on the cron's system
# daemon's notion of time and timezones.
# Output of the crontab jobs (including errors) is sent through
# email to the user the crontab file belongs to (unless redirected).
# For example, you can run a backup of all your user accounts
# at 5 a.m every week with:
# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
# For more information see the manual pages of crontab(5) and cron(8)
# m h  dom mon dow   command

0 2 * * * /opt/scripts/

Docker and Docker-compose

# Add Docker's official GPG key:
sudo apt update; \
sudo apt install -y ca-certificates curl gnupg; \
sudo install -m 0755 -d /etc/apt/keyrings; \
curl -fsSL | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg; \
sudo chmod a+r /etc/apt/keyrings/docker.gpg; \

# Add the repository to Apt sources:
echo \
  "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] \
  "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update
sudo apt install -y docker-ce docker-ce-cli docker-buildx-plugin docker-compose-plugin

If Failure like this:

failed to register layer: lsetxattr user.overlay.impure /etc: operation not supported

Do on vhost:

vim /etc/pve/lxc/xxx.conf

and add:

unprivileged: 0 # only change value
lxc.apparmor.profile: unconfined
lxc.cgroup.devices.allow: a