├── .gitignore ├── LICENSE ├── LOGO.svg ├── README.md ├── common ├── cf-remoteip.sh ├── get.sh └── new.sh ├── debian └── 12 │ └── prepare.sh └── ubuntu ├── 20.04 └── prepare.sh ├── 22.04 └── prepare.sh └── 24.04 └── prepare.sh /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Chevereto 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /LOGO.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 102 | 103 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Chevereto VPS 2 | 3 | > 🔔 [Subscribe](https://chevereto.com/go/newsletter) to don't miss any update regarding Chevereto. 4 | 5 | Chevereto 6 | 7 | [![Chevereto Docs](https://img.shields.io/badge/chevereto-docs-50C878?style=flat-square)](https://v4-docs.chevereto.com/) 8 | [![Chevereto Community](https://img.shields.io/badge/chevereto-community-blue?style=flat-square)](https://chevereto.com/community) 9 | [![Chevereto Discord](https://img.shields.io/badge/chevereto-discord-5865F2?style=flat-square)](https://chevereto.com/go/discord) 10 | [![Chevereto Demo](https://img.shields.io/badge/chevereto-demo-d4af37?style=flat-square)](https://demo.chevereto.com) 11 | 12 | Collection of bash scripts to install Chevereto in any VPS (Virtual Private Server). 13 | 14 | ## Stack 15 | 16 | * PHP 17 | * Apache HTTP Web server 18 | * MySQL Server 19 | * Composer 20 | * FFmpeg 21 | * Certbot 22 | * ExifTool 23 | * exiftran 24 | 25 | ## Instructions 26 | 27 | * Root login to your VPS 28 | * Run the following script(s) 29 | 30 | ## Ubuntu 31 | 32 | > **Note**: Ubuntu LTS 24.04 is recommended. If you run other system you may need to alter the scripts. Feel free to contribute. 33 | 34 | ### Prepare Ubuntu 35 | 36 | The [prepare.sh](ubuntu/24.04/prepare.sh) script install the system stack on Ubuntu. 37 | 38 | Reboot the VPS to make sure to apply any pending kernel updates: 39 | 40 | ```sh 41 | systemctl reboot 42 | ``` 43 | 44 | Make sure to change `24.04` to match your Ubuntu LTS: 45 | 46 | ```sh 47 | bash <(curl -s https://raw.githubusercontent.com/chevereto/vps/4.3/ubuntu/24.04/prepare.sh) 48 | ``` 49 | 50 | > Available 20.04, 22.04 and 24.04 51 | 52 | This message will be shown on success: 53 | 54 | ```plain 55 | [OK] Stack ready for Chevereto! 56 | ``` 57 | 58 | ## Debian 59 | 60 | > **Note**: Debian 12 is recommended. 61 | > **Note**: Debian uses MariaDB. 62 | 63 | ### Prepare Debian 64 | 65 | The [prepare.sh](debian/12/prepare.sh) script install the system stack on Debian. 66 | 67 | Reboot the VPS to make sure to apply any pending kernel updates: 68 | 69 | ```sh 70 | systemctl reboot 71 | ``` 72 | 73 | Make sure to change `12` to match your Debian (available 12). 74 | 75 | ```sh 76 | bash <(curl -s https://raw.githubusercontent.com/chevereto/vps/4.3/debian/12/prepare.sh) 77 | ``` 78 | 79 | This message will be shown on success: 80 | 81 | ```plain 82 | [OK] Stack ready for Chevereto! 83 | ``` 84 | 85 | 86 | ## Common 87 | 88 | * The scripts at `common/` will work under any unix-like system 89 | * Requires `curl` and `unzip` 90 | 91 | ### New 92 | 93 | The [new.sh](common/new.sh) script downloads Chevereto and configures Apache HTTP Web server, MySQL and CRON. Its purpose is to prepare for [Chevereto Installation](https://v4-docs.chevereto.com/application/installing/installation.html). 94 | 95 | This is intended to brand new installations and it should run after [prepare](#prepare) as it assumes that the system stack is ready. 96 | 97 | ```sh 98 | bash <(curl -s https://raw.githubusercontent.com/chevereto/vps/4.3/common/new.sh) 99 | ``` 100 | 101 | #### Notes 102 | 103 | On the server: 104 | 105 | * The web root is located at `/var/www/html` 106 | * The MySQL root password is saved at `/root/.mysql_password` 107 | * Logs are at `/var/log/apache2` 108 | 109 | IMPORTANT: 110 | 111 | * Secure your database by running `mysql_secure_installation` 112 | 113 | ### Get 114 | 115 | The [get.sh](common/get.sh) script download and extracts Chevereto in the **current working folder**. 116 | 117 | * `cd` into the website project folder (for example `/var/www/html`) 118 | * Run the following command 119 | 120 | ```sh 121 | bash <(curl -s https://raw.githubusercontent.com/chevereto/vps/4.3/common/get.sh) 122 | ``` 123 | 124 | ### Cloudflare remote IP 125 | 126 | The [cf-remoteip.sh](common/cf-remoteip.sh) script syncs the known IPs for CloudFlare remote IP. This **must** be used if you are using CloudFlare. 127 | 128 | > **Warning**: If you use CloudFlare and not complete this setup your Chevereto installation won't be able to retrieve real visitors IP. 129 | 130 | ```sh 131 | bash <(curl -s https://raw.githubusercontent.com/chevereto/vps/4.3/common/cf-remoteip.sh) 132 | ``` 133 | 134 | * To save the above script in your VPS: 135 | 136 | ```sh 137 | curl -f -SOJL \ 138 | --output-dir /etc/apache2 \ 139 | https://raw.githubusercontent.com/chevereto/vps/4.3/common/cf-remoteip.sh 140 | ``` 141 | 142 | * To add the above script to CRON (cron.d) to keep these IP ranges auto updated: 143 | 144 | ```sh 145 | cat >/etc/cron.d/cf-remoteip </dev/null 2>&1 147 | EOM 148 | ``` 149 | 150 | ## HTTPS setup 151 | 152 | Run the following command to get automatic renewable HTTPS thanks to certbot. Mind to change `example.com` with the target domain(s). 153 | 154 | ```sh 155 | certbot --apache -d example.com 156 | ``` 157 | 158 | If you are using `www.` subdomain you can add it like this: 159 | 160 | ```sh 161 | certbot --apache -d example.com -d www.example.com 162 | ``` 163 | -------------------------------------------------------------------------------- /common/cf-remoteip.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | CLOUDFLARE_FILE_PATH=${1:-/etc/apache2/conf-enabled/remoteip.conf} 6 | echo "# Cloudflare" >$CLOUDFLARE_FILE_PATH 7 | echo "RemoteIPHeader CF-Connecting-IP" >>$CLOUDFLARE_FILE_PATH 8 | echo "# IPV4" >>$CLOUDFLARE_FILE_PATH 9 | for i in $(curl -s -L https://www.cloudflare.com/ips-v4); do 10 | echo "RemoteIPTrustedProxy $i" >>$CLOUDFLARE_FILE_PATH 11 | done 12 | echo "# IPV6" >>$CLOUDFLARE_FILE_PATH 13 | for i in $(curl -s -L https://www.cloudflare.com/ips-v6); do 14 | echo "RemoteIPTrustedProxy $i" >>$CLOUDFLARE_FILE_PATH 15 | done 16 | 17 | apachectl configtest && systemctl restart apache2 18 | -------------------------------------------------------------------------------- /common/get.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | # init.sh (start) 6 | PROJECT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)" 7 | WORKING_DIR="$(pwd)" 8 | 9 | # Flags 10 | while getopts ":t:" opt; do 11 | case $opt in 12 | t) 13 | CHEVERETO_TAG=$OPTARG 14 | echo "Using tag $OPTARG" >&2 15 | ;; 16 | \?) 17 | echo "Invalid option: -$OPTARG" >&2 18 | exit 1 19 | ;; 20 | :) 21 | echo "Option -$OPTARG requires an argument." >&2 22 | exit 1 23 | ;; 24 | esac 25 | done 26 | 27 | # Tags 28 | CHEVERETO_SOFTWARE="chevereto" 29 | CHEVERETO_VERSION="4" 30 | CHEVERETO_TAG=${CHEVERETO_TAG:-${CHEVERETO_VERSION}} 31 | CHEVERETO_PACKAGE=$CHEVERETO_TAG 32 | CHEVERETO_API_DOWNLOAD="https://chevereto.com/api/download/" 33 | CHEVERETO_LABEL="Chevereto V$CHEVERETO_VERSION" 34 | 35 | # Header 36 | cat </dev/null; then 67 | chown -R www-data: $WORKING_DIR 68 | else 69 | echo '[NOTICE] www-data user not found, skipping ownership change' 70 | fi 71 | 72 | echo "[OK] $CHEVERETO_LABEL files provisioned!" 73 | -------------------------------------------------------------------------------- /common/new.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | # init.sh (start) 6 | PROJECT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)" 7 | WORKING_DIR="/var/www/html" 8 | PROJECT_IP=$(hostname -I | awk '{ print $1 }') 9 | 10 | # Flags 11 | while getopts ":t:" opt; do 12 | case $opt in 13 | t) 14 | CHEVERETO_TAG=$OPTARG 15 | echo "Using tag $OPTARG" >&2 16 | ;; 17 | \?) 18 | echo "Invalid option: -$OPTARG" >&2 19 | exit 1 20 | ;; 21 | :) 22 | echo "Option -$OPTARG requires an argument." >&2 23 | exit 1 24 | ;; 25 | esac 26 | done 27 | 28 | # Tags 29 | CHEVERETO_SOFTWARE="chevereto" 30 | CHEVERETO_VERSION="4" 31 | CHEVERETO_TAG=${CHEVERETO_TAG:-${CHEVERETO_VERSION}} 32 | CHEVERETO_PACKAGE=$CHEVERETO_TAG 33 | CHEVERETO_API_DOWNLOAD="https://chevereto.com/api/download/" 34 | CHEVERETO_LABEL="Chevereto V$CHEVERETO_VERSION" 35 | 36 | # Header 37 | cat </dev/null; then 66 | chown -R www-data: $WORKING_DIR 67 | else 68 | echo '[NOTICE] www-data user not found, skipping ownership change' 69 | fi 70 | 71 | # scripts/01-fs.sh 72 | cat >/etc/apache2/sites-available/000-default.conf < 74 | 75 | Options Indexes FollowSymLinks 76 | AllowOverride All 77 | Require all granted 78 | 79 | ServerAdmin webmaster@localhost 80 | DocumentRoot /var/www/html 81 | ErrorLog \${APACHE_LOG_DIR}/error.log 82 | CustomLog \${APACHE_LOG_DIR}/access.log combined 83 | 84 | EOM 85 | cat >/etc/update-motd.d/99-one-click < certbot --apache -d example.com -d www.example.com 109 | 110 | IMPORTANT: 111 | * After connecting to the server for the first time, immediately install 112 | Chevereto at http://\$myip/ 113 | * Secure your database by running: 114 | > mysql_secure_installation 115 | * Setup email delivery at http://\$myip/dashboard/settings/email 116 | 117 | For help and more information visit https://chevereto.com 118 | 119 | ******************************************************************************** 120 | To delete this message of the day: rm -rf \$(readlink -f \${0}) 121 | EOF 122 | EOM 123 | chmod +x /etc/update-motd.d/99-one-click 124 | cat >/etc/cron.d/chevereto <$CHEVERETO_PHP_INI <>/var/log/per-instance.log 143 | MYSQL_ROOT_PASS=$(openssl rand -hex 16) 144 | DEBIAN_SYS_MAINT_MYSQL_PASS=$(openssl rand -hex 16) 145 | CHEVERETO_DB_HOST=localhost 146 | CHEVERETO_DB_PORT=3306 147 | CHEVERETO_DB_NAME=chevereto 148 | CHEVERETO_DB_USER=chevereto 149 | CHEVERETO_DB_PASS=$(openssl rand -hex 16) 150 | cat >/root/.mysql_password </etc/mysql/debian.cnf <"$WORKING_DIR/app/env.php" < '${CHEVERETO_DB_HOST}', 181 | 'CHEVERETO_DB_NAME' => '${CHEVERETO_DB_NAME}', 182 | 'CHEVERETO_DB_PASS' => '${CHEVERETO_DB_PASS}', 183 | 'CHEVERETO_DB_PORT' => '${CHEVERETO_DB_PORT}', 184 | 'CHEVERETO_DB_USER' => '${CHEVERETO_DB_USER}', 185 | 'CHEVERETO_DB_TABLE_PREFIX' => 'chv_', 186 | 'CHEVERETO_ENCRYPTION_KEY' => '${CHEVERETO_ENCRYPTION_KEY}', 187 | ]; 188 | EOM 189 | 190 | # scripts/12-apache.sh 191 | chown -R www-data: /var/log/apache2 192 | chown -R www-data: /etc/apache2 193 | chown -R www-data: $WORKING_DIR 194 | a2enmod rewrite 195 | a2enmod remoteip 196 | 197 | # files/var/lib/cloud/scripts/per-instance/provision.sh (*) 198 | echo "Restarting apache2" 199 | systemctl restart apache2 200 | 201 | # common/scripts/14-ufw-apache.sh 202 | ufw limit ssh 203 | ufw allow http 204 | ufw allow https 205 | ufw --force enable 206 | 207 | # files/var/lib/cloud/scripts/per-instance/provision.sh (*) 208 | echo $(date -u) ": System provisioning script is complete." >>/var/log/per-instance.log 209 | echo "[OK] $CHEVERETO_LABEL server and files provisioned!" 210 | echo "Proceed with installation http://$PROJECT_IP" 211 | -------------------------------------------------------------------------------- /debian/12/prepare.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | if [ "$(id -u)" -ne 0 ]; then 6 | if ! command -v sudo &>/dev/null; then 7 | echo "sudo package is not installed. Please install sudo first." 8 | exit 1 9 | fi 10 | echo "Running with sudo privileges..." 11 | SUDO='sudo' 12 | else 13 | SUDO='' 14 | fi 15 | 16 | cat </dev/null; then 23 | echo "curl is not installed. Installing curl..." 24 | $SUDO apt-get update -qq && $SUDO apt-get install -qq -y curl 25 | fi 26 | if ! command -v lsb_release &>/dev/null; then 27 | echo "installing lsb_release" 28 | $SUDO apt-get update -qq && $SUDO apt-get install -qq -y lsb-release 29 | fi 30 | $SUDO curl -sSLo /usr/share/keyrings/deb.sury.org-php.gpg https://packages.sury.org/php/apt.gpg 31 | $SUDO sh -c 'echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list' 32 | } 33 | 34 | if ! dpkg -l | grep -q apt-transport-https; then 35 | echo "apt-transport-https is not installed" 36 | $SUDO apt-get update -qq && $SUDO apt-get install -qq -y apt-transport-https 37 | install_php_repo 38 | else 39 | echo "apt-transport-https is already installed" 40 | install_php_repo 41 | fi 42 | 43 | update() { 44 | DEBIAN_FRONTEND=noninteractive $SUDO apt-get update -y -qq >/dev/null 45 | $SUDO apt-get upgrade -qq -y >/dev/null 46 | } 47 | 48 | update 49 | read -p "Do you want to install nginx or apache? (nginx/apache): " webserver_choice 50 | if [ "$webserver_choice" = "apache" ]; then 51 | $SUDO apt-get install -qq -y apache2 libapache2-mod-php8.3 certbot python3-certbot-apache 52 | else 53 | $SUDO apt-get install -qq -y nginx-full php8.3-fpm certbot python3-certbot-nginx 54 | fi 55 | 56 | $SUDO apt-get install -qq -y ca-certificates software-properties-common unzip ffmpeg cron libimage-exiftool-perl exiftran 57 | $SUDO apt-get install -qq -y mariadb-server 58 | $SUDO apt-get install -qq -y php8.3 php8.3-{bcmath,common,cli,curl,fileinfo,gd,imagick,intl,mbstring,mysql,opcache,pdo,pdo-mysql,xml,xmlrpc,zip} 59 | 60 | # composer 61 | if ! command -v composer &>/dev/null; then 62 | echo "Installing composer" 63 | COMPOSER_CHECKSUM_VERIFY="$(php -r 'copy("https://composer.github.io/installer.sig", "php://stdout");')" 64 | php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" 65 | COMPOSER_HASH_FILE="$(php -r "echo hash_file('sha384', 'composer-setup.php');")" 66 | if [ "$COMPOSER_CHECKSUM_VERIFY" != "$COMPOSER_HASH_FILE" ]; then 67 | echo >&2 'ERROR: Invalid Composer installer checksum' 68 | rm composer-setup.php 69 | exit 1 70 | fi 71 | php composer-setup.php --install-dir=/usr/local/bin --filename=composer 72 | rm composer-setup.php 73 | $SUDO chmod +x /usr/local/bin/composer 74 | else 75 | composer selfupdate 76 | fi 77 | 78 | # safe update 79 | update 80 | 81 | echo "[OK] Stack ready for Chevereto!" 82 | -------------------------------------------------------------------------------- /ubuntu/20.04/prepare.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | # scripts/00-update.sh 6 | cat </dev/null 14 | apt-get upgrade -qq -y >/dev/null 15 | } 16 | update 17 | apt-get install -qq -y ca-certificates apt-transport-https software-properties-common 18 | add-apt-repository -y ppa:ondrej/php 19 | add-apt-repository -y ppa:ondrej/apache2 20 | apt-get install -qq -y apache2 libapache2-mod-php8.2 21 | apt-get install -qq -y mysql-server 22 | apt-get install -qq -y ffmpeg 23 | apt-get install -qq -y libimage-exiftool-perl 24 | apt-get install -qq -y exiftran 25 | apt-get install -qq -y php8.2 26 | apt-get install -qq -y php8.2-{bcmath,common,cli,curl,fileinfo,gd,imagick,intl,mbstring,mysql,opcache,pdo,pdo-mysql,xml,xmlrpc,zip} 27 | apt-get install -qq -y python3-certbot-apache unzip 28 | 29 | # composer 30 | if ! command -v composer &>/dev/null; then 31 | echo "Installing composer" 32 | COMPOSER_CHECKSUM_VERIFY="$(php -r 'copy("https://composer.github.io/installer.sig", "php://stdout");')" 33 | php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" 34 | COMPOSER_HASH_FILE="$(php -r "echo hash_file('sha384', 'composer-setup.php');")" 35 | if [ "$COMPOSER_CHECKSUM_VERIFY" != "$COMPOSER_HASH_FILE" ]; then 36 | echo >&2 'ERROR: Invalid Composer installer checksum' 37 | rm composer-setup.php 38 | exit 1 39 | fi 40 | php composer-setup.php --install-dir=/usr/local/bin --filename=composer 41 | rm composer-setup.php 42 | chmod +x /usr/local/bin/composer 43 | else 44 | composer selfupdate 45 | fi 46 | 47 | # safe update 48 | update 49 | 50 | systemctl restart apache2 51 | 52 | echo "[OK] Stack ready for Chevereto!" 53 | -------------------------------------------------------------------------------- /ubuntu/22.04/prepare.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | # scripts/00-update.sh 6 | cat </dev/null 17 | apt-get upgrade -qq -y >/dev/null 18 | } 19 | update 20 | apt-get install -qq -y ca-certificates apt-transport-https software-properties-common 21 | add-apt-repository -y ppa:ondrej/php 22 | add-apt-repository -y ppa:ondrej/apache2 23 | apt-get install -qq -y apache2 libapache2-mod-php8.2 24 | apt-get install -qq -y mysql-server 25 | apt-get install -qq -y ffmpeg 26 | apt-get install -qq -y libimage-exiftool-perl 27 | apt-get install -qq -y exiftran 28 | apt-get install -qq -y php8.2 29 | apt-get install -qq -y php8.2-{common,bcmath,cli,curl,fileinfo,gd,imagick,intl,mbstring,mysql,opcache,pdo,pdo-mysql,xml,xmlrpc,zip} 30 | apt-get install -qq -y python3-certbot-apache unzip 31 | 32 | # composer 33 | if ! command -v composer &>/dev/null; then 34 | echo "Installing composer" 35 | COMPOSER_CHECKSUM_VERIFY="$(php -r 'copy("https://composer.github.io/installer.sig", "php://stdout");')" 36 | php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" 37 | COMPOSER_HASH_FILE="$(php -r "echo hash_file('sha384', 'composer-setup.php');")" 38 | if [ "$COMPOSER_CHECKSUM_VERIFY" != "$COMPOSER_HASH_FILE" ]; then 39 | echo >&2 'ERROR: Invalid Composer installer checksum' 40 | rm composer-setup.php 41 | exit 1 42 | fi 43 | php composer-setup.php --install-dir=/usr/local/bin --filename=composer 44 | rm composer-setup.php 45 | chmod +x /usr/local/bin/composer 46 | else 47 | composer selfupdate 48 | fi 49 | 50 | # safe update 51 | update 52 | 53 | systemctl restart apache2 54 | echo "[OK] Stack ready for Chevereto!" 55 | -------------------------------------------------------------------------------- /ubuntu/24.04/prepare.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | # scripts/00-update.sh 6 | cat </dev/null 17 | apt-get upgrade -qq -y >/dev/null 18 | } 19 | update 20 | apt-get install -qq -y ca-certificates apt-transport-https software-properties-common 21 | apt-get install -qq -y mysql-server 22 | apt-get install -qq -y ffmpeg 23 | apt-get install -qq -y libimage-exiftool-perl 24 | apt-get install -qq -y exiftran 25 | apt-get install -qq -y python3-certbot-apache unzip 26 | add-apt-repository -y ppa:ondrej/php 27 | add-apt-repository -y ppa:ondrej/apache2 28 | apt-get install -qq -y apache2 libapache2-mod-php8.3 29 | apt-get install -qq -y php8.3 30 | apt-get install -qq -y php8.3-bcmath 31 | apt-get install -qq -y php8.3-common 32 | apt-get install -qq -y php8.3-cli 33 | apt-get install -qq -y php8.3-curl 34 | apt-get install -qq -y php8.3-fileinfo 35 | apt-get install -qq -y php8.3-gd 36 | apt-get install -qq -y php8.3-imagick 37 | apt-get install -qq -y php8.3-intl 38 | apt-get install -qq -y php8.3-mbstring 39 | apt-get install -qq -y php8.3-mysql 40 | apt-get install -qq -y php8.3-opcache 41 | apt-get install -qq -y php8.3-pdo 42 | apt-get install -qq -y php8.3-pdo-mysql 43 | apt-get install -qq -y php8.3-xml 44 | apt-get install -qq -y php8.3-xmlrpc 45 | apt-get install -qq -y php8.3-zip 46 | 47 | # composer 48 | if ! command -v composer &>/dev/null; then 49 | echo "Installing composer" 50 | COMPOSER_CHECKSUM_VERIFY="$(php -r 'copy("https://composer.github.io/installer.sig", "php://stdout");')" 51 | php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" 52 | COMPOSER_HASH_FILE="$(php -r "echo hash_file('sha384', 'composer-setup.php');")" 53 | if [ "$COMPOSER_CHECKSUM_VERIFY" != "$COMPOSER_HASH_FILE" ]; then 54 | echo >&2 'ERROR: Invalid Composer installer checksum' 55 | rm composer-setup.php 56 | exit 1 57 | fi 58 | php composer-setup.php --install-dir=/usr/local/bin --filename=composer 59 | rm composer-setup.php 60 | chmod +x /usr/local/bin/composer 61 | else 62 | composer selfupdate 63 | fi 64 | 65 | # safe update 66 | update 67 | 68 | systemctl restart apache2 69 | echo "[OK] Stack ready for Chevereto!" 70 | --------------------------------------------------------------------------------