From e0bbda718251eee37d64dee9740609bcfe30fb29 Mon Sep 17 00:00:00 2001 From: Daniel Winzen Date: Sat, 2 Jul 2022 21:05:48 +0200 Subject: [PATCH] Move some installation steps from readme to instll script --- README.md | 14 ++++---------- install_binaries.sh | 23 ++++++++++++++++++++++- 2 files changed, 26 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 2641014..cd9c27d 100644 --- a/README.md +++ b/README.md @@ -111,13 +111,7 @@ Install sodium_compat for v3 hidden_service support cd /var/www && composer install ``` -For web base database administration, check out the latest phpmyadmin and adminer: -``` -cd /var/www/html/ && git clone -b STABLE https://github.com/phpmyadmin/phpmyadmin/ && cd phpmyadmin && composer install --no-dev && yarn -cd /var/www/html/ && git clone https://github.com/vrana/adminer/ && cd adminer && git submodule update --init -``` - -Once installed create a mysql user for phpmyadmin and cofigure it in `/var/www/html/phpmyadmin/config.inc.php` and fill `$cfg['blowfish_secret']` with random characters: +Create a mysql user for phpmyadmin and cofigure it in `/var/www/html/phpmyadmin/config.inc.php` and fill `$cfg['blowfish_secret']` with random characters: ``` mysql CREATE USER 'phpmyadmin'@'%' IDENTIFIED BY 'MY_PASSWORD'; @@ -128,12 +122,12 @@ quit mysql phpmyadmin < /var/www/html/phpmyadmin/sql/create_tables.sql ``` -For web based mail management grab the latest squirrelmail and install it in `/var/www/html/squirrelmail`: +For web based mail management configure squirrelmail: ``` -cd /var/www/html/ && git clone https://github.com/RealityRipple/squirrelmail && cd squirrelmail && mkdir -p /var/www/data/squirrelmail/data /var/www/data/squirrelmail/attach && chown www-data:www-data -R /var/www/data && ./configure +cd /var/www/html/squirrelmail && ./configure ``` -Once it is downloaded, it will ask you for configuration. Things to change are: +Configuration options to change are: ``` D. > select dovecot 2. Server Settings > 1. Domain > Set your own .onion domain here diff --git a/install_binaries.sh b/install_binaries.sh index 6862383..61e95de 100755 --- a/install_binaries.sh +++ b/install_binaries.sh @@ -13,7 +13,6 @@ DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends install -y autoco curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm -[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion # install nodejs nvm install node @@ -1836,3 +1835,25 @@ if [ ! -e /etc/mysql/encryption/keyfile.enc ]; then openssl rand -hex 128 > /etc/mysql/encryption/keyfile.key echo "1;"$(openssl rand -hex 32) | openssl enc -aes-256-cbc -md sha1 -pass file:/etc/mysql/encryption/keyfile.key -out /etc/mysql/encryption/keyfile.enc fi + +# install php applications +if [ ! -e /var/www/html/phpmyadmin ]; then + mkdir -p /var/www/html/phpmyadmin + cd /var/www/html/phpmyadmin + git clone -b STABLE https://github.com/phpmyadmin/phpmyadmin/ . + composer install --no-dev + yarn +fi +if [ ! -e /var/www/html/adminer ]; then + mkdir -p /var/www/html/adminer + cd /var/www/html/adminer + git clone https://github.com/vrana/adminer/ . + git submodule update --init +fi +if [ ! -e /var/www/html/squirrelmail ]; then + mkdir -p /var/www/html/squirrelmail + cd /var/www/html/squirrelmail + git clone https://github.com/RealityRipple/squirrelmail . + mkdir -p /var/www/data/squirrelmail/data /var/www/data/squirrelmail/attach + chown www-data:www-data -R /var/www/data +fi