diff --git a/install/2fauth-install.sh b/install/2fauth-install.sh index 57bed91fc..43a3feed9 100644 --- a/install/2fauth-install.sh +++ b/install/2fauth-install.sh @@ -14,11 +14,8 @@ network_check update_os msg_info "Installing Dependencies" - $STD apt-get install -y \ - lsb-release \ - gpg - + lsb-release curl -fsSL https://packages.sury.org/php/apt.gpg | gpg --dearmor -o /usr/share/keyrings/deb.sury.org-php.gpg 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 $STD apt-get update @@ -26,10 +23,11 @@ $STD apt-get update $STD apt-get install -y \ nginx \ composer \ - php8.3-{bcmath,common,ctype,curl,fileinfo,fpm,gd,intl,mbstring,mysql,xml,cli} \ - mariadb-server + php8.3-{bcmath,common,ctype,curl,fileinfo,fpm,gd,intl,mbstring,mysql,xml,cli} msg_ok "Installed Dependencies" +install_mariadb + msg_info "Setting up Database" DB_NAME=2fauth_db DB_USER=2fauth diff --git a/install/apache-guacamole-install.sh b/install/apache-guacamole-install.sh index 54283fdbd..fa5d27cc9 100644 --- a/install/apache-guacamole-install.sh +++ b/install/apache-guacamole-install.sh @@ -14,31 +14,32 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ - build-essential \ - jq \ - libcairo2-dev \ - libturbojpeg0 \ - libpng-dev \ - libtool-bin \ - libossp-uuid-dev \ - libvncserver-dev \ - freerdp2-dev \ - libssh2-1-dev \ - libtelnet-dev \ - libwebsockets-dev \ - libpulse-dev \ - libvorbis-dev \ - libwebp-dev \ - libssl-dev \ - libpango1.0-dev \ - libswscale-dev \ - libavcodec-dev \ - libavutil-dev \ - libavformat-dev \ - mariadb-server \ - default-jdk + build-essential \ + jq \ + libcairo2-dev \ + libturbojpeg0 \ + libpng-dev \ + libtool-bin \ + libossp-uuid-dev \ + libvncserver-dev \ + freerdp2-dev \ + libssh2-1-dev \ + libtelnet-dev \ + libwebsockets-dev \ + libpulse-dev \ + libvorbis-dev \ + libwebp-dev \ + libssl-dev \ + libpango1.0-dev \ + libswscale-dev \ + libavcodec-dev \ + libavutil-dev \ + libavformat-dev \ + default-jdk msg_ok "Installed Dependencies" +install_mariadb + msg_info "Setup Apache Tomcat" RELEASE=$(curl -fsSL https://dlcdn.apache.org/tomcat/tomcat-9/ | grep -oP '(?<=href=")v[^"/]+(?=/")' | sed 's/^v//' | sort -V | tail -n1) mkdir -p /opt/apache-guacamole/tomcat9 @@ -79,19 +80,19 @@ mysql -u root -e "CREATE DATABASE $DB_NAME;" mysql -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED WITH mysql_native_password AS PASSWORD('$DB_PASS');" mysql -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;" { - echo "Guacamole-Credentials" - echo "Database User: $DB_USER" - echo "Database Password: $DB_PASS" - echo "Database Name: $DB_NAME" + echo "Guacamole-Credentials" + echo "Database User: $DB_USER" + echo "Database Password: $DB_PASS" + echo "Database Name: $DB_NAME" } >>~/guacamole.creds cd guacamole-auth-jdbc-1.5.5/mysql/schema cat *.sql | mysql -u root ${DB_NAME} { - echo "mysql-hostname: 127.0.0.1" - echo "mysql-port: 3306" - echo "mysql-database: $DB_NAME" - echo "mysql-username: $DB_USER" - echo "mysql-password: $DB_PASS" + echo "mysql-hostname: 127.0.0.1" + echo "mysql-port: 3306" + echo "mysql-database: $DB_NAME" + echo "mysql-username: $DB_USER" + echo "mysql-password: $DB_PASS" } >>/etc/guacamole/guacamole.properties msg_ok "Setup Database" diff --git a/install/bookstack-install.sh b/install/bookstack-install.sh index 4756a0868..7df4d0e8f 100644 --- a/install/bookstack-install.sh +++ b/install/bookstack-install.sh @@ -15,15 +15,16 @@ update_os msg_info "Installing Dependencies (Patience)" $STD apt-get install -y \ - unzip \ - mariadb-server \ - apache2 \ - php8.2-{mbstring,gd,fpm,curl,intl,ldap,tidy,bz2,mysql,zip,xml} \ - composer \ - libapache2-mod-php \ - make + unzip \ + apache2 \ + php8.2-{mbstring,gd,fpm,curl,intl,ldap,tidy,bz2,mysql,zip,xml} \ + composer \ + libapache2-mod-php \ + make msg_ok "Installed Dependencies" +install_mariadb + msg_info "Setting up Database" DB_NAME=bookstack DB_USER=bookstack @@ -32,10 +33,10 @@ $STD sudo mysql -u root -e "CREATE DATABASE $DB_NAME;" $STD sudo mysql -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED WITH mysql_native_password AS PASSWORD('$DB_PASS');" $STD sudo mysql -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;" { - echo "Bookstack-Credentials" - echo "Bookstack Database User: $DB_USER" - echo "Bookstack Database Password: $DB_PASS" - echo "Bookstack Database Name: $DB_NAME" + echo "Bookstack-Credentials" + echo "Bookstack Database User: $DB_USER" + echo "Bookstack Database Password: $DB_PASS" + echo "Bookstack Database Name: $DB_NAME" } >>~/bookstack.creds msg_ok "Set up database" diff --git a/install/dolibarr-install.sh b/install/dolibarr-install.sh index d629ce284..712fc060e 100644 --- a/install/dolibarr-install.sh +++ b/install/dolibarr-install.sh @@ -16,10 +16,11 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ php-imap \ - debconf-utils \ - mariadb-server + debconf-utils msg_ok "Installed Dependencies" +install_mariadb + msg_info "Setting up Database" ROOT_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13) $STD sudo mysql -u root -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password AS PASSWORD('$ROOT_PASS'); flush privileges;" diff --git a/install/firefly-install.sh b/install/firefly-install.sh index ed9f89a33..917e6d0fc 100644 --- a/install/firefly-install.sh +++ b/install/firefly-install.sh @@ -18,13 +18,14 @@ curl -fsSLo /usr/share/keyrings/deb.sury.org-php.gpg https://packages.sury.org/p echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ bookworm main" >/etc/apt/sources.list.d/php.list $STD apt-get update $STD apt-get install -y \ - apache2 \ - libapache2-mod-php8.4 \ - php8.4-{bcmath,cli,intl,curl,zip,gd,xml,mbstring,mysql} \ - mariadb-server \ - composer + apache2 \ + libapache2-mod-php8.4 \ + php8.4-{bcmath,cli,intl,curl,zip,gd,xml,mbstring,mysql} \ + composer msg_ok "Installed Dependencies" +install_mariadb + msg_info "Setting up database" DB_NAME=firefly DB_USER=firefly @@ -34,10 +35,10 @@ mysql -u root -e "CREATE DATABASE $DB_NAME;" mysql -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED WITH mysql_native_password AS PASSWORD('$DB_PASS');" mysql -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;" { - echo "Firefly-Credentials" - echo "Firefly Database User: $DB_USER" - echo "Firefly Database Password: $DB_PASS" - echo "Firefly Database Name: $DB_NAME" + echo "Firefly-Credentials" + echo "Firefly Database User: $DB_USER" + echo "Firefly Database Password: $DB_PASS" + echo "Firefly Database Name: $DB_NAME" } >>~/firefly.creds msg_ok "Set up database" diff --git a/install/ghost-install.sh b/install/ghost-install.sh index 92c887d25..a3160dcec 100644 --- a/install/ghost-install.sh +++ b/install/ghost-install.sh @@ -16,10 +16,11 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ nginx \ - mariadb-server \ ca-certificates msg_ok "Installed Dependencies" +install_mariadb + msg_info "Configuring Database" DB_NAME=ghost DB_USER=ghostuser diff --git a/install/glpi-install.sh b/install/glpi-install.sh index b157100d8..02e2db94f 100644 --- a/install/glpi-install.sh +++ b/install/glpi-install.sh @@ -15,14 +15,15 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ - git \ - apache2 \ - php8.2-{apcu,cli,common,curl,gd,imap,ldap,mysql,xmlrpc,xml,mbstring,bcmath,intl,zip,redis,bz2,soap} \ - php-cas \ - libapache2-mod-php \ - mariadb-server + git \ + apache2 \ + php8.2-{apcu,cli,common,curl,gd,imap,ldap,mysql,xmlrpc,xml,mbstring,bcmath,intl,zip,redis,bz2,soap} \ + php-cas \ + libapache2-mod-php msg_ok "Installed Dependencies" +install_mariadb + msg_info "Setting up database" DB_NAME=glpi_db DB_USER=glpi @@ -33,10 +34,10 @@ mysql -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED BY '$DB_PASS';" mysql -u root -e "GRANT ALL PRIVILEGES ON $DB_NAME.* TO '$DB_USER'@'localhost';" mysql -u root -e "GRANT SELECT ON \`mysql\`.\`time_zone_name\` TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;" { - echo "GLPI Database Credentials" - echo "Database: $DB_NAME" - echo "Username: $DB_USER" - echo "Password: $DB_PASS" + echo "GLPI Database Credentials" + echo "Database: $DB_NAME" + echo "Username: $DB_USER" + echo "Password: $DB_PASS" } >>~/glpi_db.creds msg_ok "Set up database" diff --git a/install/kimai-install.sh b/install/kimai-install.sh index a65789f36..7bef81646 100644 --- a/install/kimai-install.sh +++ b/install/kimai-install.sh @@ -20,10 +20,11 @@ $STD apt-get install -y \ git \ expect \ composer \ - mariadb-server \ lsb-release msg_ok "Installed Dependencies" +install_mariadb + msg_info "Adding PHP8.4 Repository" $STD curl -sSLo /tmp/debsuryorg-archive-keyring.deb https://packages.sury.org/debsuryorg-archive-keyring.deb $STD dpkg -i /tmp/debsuryorg-archive-keyring.deb diff --git a/install/mariadb-install.sh b/install/mariadb-install.sh index 3aa1444a1..ace993240 100644 --- a/install/mariadb-install.sh +++ b/install/mariadb-install.sh @@ -13,11 +13,12 @@ setting_up_container network_check update_os -msg_info "Installing MariaDB" -$STD apt-get install -y mariadb-server +install_mariadb + +msg_info "Setup MariaDB" sed -i 's/^# *\(port *=.*\)/\1/' /etc/mysql/my.cnf sed -i 's/^bind-address/#bind-address/g' /etc/mysql/mariadb.conf.d/50-server.cnf -msg_ok "Installed MariaDB" +msg_ok "Setup MariaDB" read -r -p "${TAB3}Would you like to add PhpMyAdmin? " prompt if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then diff --git a/install/monica-install.sh b/install/monica-install.sh index c0911dbda..02b015982 100644 --- a/install/monica-install.sh +++ b/install/monica-install.sh @@ -15,13 +15,13 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ - mariadb-server \ apache2 \ libapache2-mod-php \ php-{bcmath,curl,dom,gd,gmp,iconv,intl,json,mbstring,mysqli,opcache,pdo-mysql,redis,tokenizer,xml,zip} \ composer msg_ok "Installed Dependencies" +install_mariadb NODE_VERSION="22" NODE_MODULE="yarn@latest" install_node_and_modules msg_info "Setting up MariaDB" diff --git a/install/paymenter-install.sh b/install/paymenter-install.sh index d2d17f857..cbde29d51 100644 --- a/install/paymenter-install.sh +++ b/install/paymenter-install.sh @@ -15,16 +15,16 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ - git \ - software-properties-common \ - apt-transport-https \ - ca-certificates \ - gnupg2 \ - mariadb-server \ - nginx \ - redis-server + git \ + software-properties-common \ + apt-transport-https \ + ca-certificates \ + nginx \ + redis-server msg_ok "Installed Dependencies" +install_mariadb + msg_info "Adding PHP Repository" $STD curl -sSLo /tmp/debsuryorg-archive-keyring.deb https://packages.sury.org/debsuryorg-archive-keyring.deb $STD dpkg -i /tmp/debsuryorg-archive-keyring.deb @@ -35,8 +35,8 @@ msg_ok "Added PHP Repository" msg_info "Installing PHP" $STD apt-get remove -y php8.2* $STD apt-get install -y \ - php8.3 \ - php8.3-{common,cli,gd,mysql,mbstring,bcmath,xml,curl,zip,intl,fpm,redis} + php8.3 \ + php8.3-{common,cli,gd,mysql,mbstring,bcmath,xml,curl,zip,intl,fpm,redis} msg_info "Installed PHP" msg_info "Installing Composer" @@ -62,10 +62,10 @@ mysql -u root -e "CREATE DATABASE $DB_NAME;" mysql -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED BY '$DB_PASS';" mysql -u root -e "GRANT ALL PRIVILEGES ON $DB_NAME.* TO '$DB_USER'@'localhost' WITH GRANT OPTION;" { - echo "Paymenter Database Credentials" - echo "Database: $DB_NAME" - echo "Username: $DB_USER" - echo "Password: $DB_PASS" + echo "Paymenter Database Credentials" + echo "Database: $DB_NAME" + echo "Username: $DB_USER" + echo "Password: $DB_PASS" } >>~/paymenter_db.creds cp .env.example .env $STD composer install --no-dev --optimize-autoloader --no-interaction diff --git a/install/pelican-panel-install.sh b/install/pelican-panel-install.sh index 2ddea5993..169523c6b 100644 --- a/install/pelican-panel-install.sh +++ b/install/pelican-panel-install.sh @@ -16,12 +16,12 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ lsb-release \ - mariadb-server \ - mariadb-client \ apache2 \ composer msg_ok "Installed Dependencies" +install_mariadb + msg_info "Adding PHP8.4 Repository" $STD curl -sSLo /tmp/debsuryorg-archive-keyring.deb https://packages.sury.org/debsuryorg-archive-keyring.deb $STD dpkg -i /tmp/debsuryorg-archive-keyring.deb diff --git a/install/phpipam-install.sh b/install/phpipam-install.sh index 3950ff88d..e6d4b9ad4 100644 --- a/install/phpipam-install.sh +++ b/install/phpipam-install.sh @@ -15,13 +15,14 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ - mariadb-server \ - apache2 \ - libapache2-mod-php \ - php8.2 php8.2-{fpm,curl,cli,mysql,gd,intl,imap,apcu,pspell,tidy,xmlrpc,mbstring,gmp,xml,ldap,common,snmp} \ - php-pear + apache2 \ + libapache2-mod-php \ + php8.2 php8.2-{fpm,curl,cli,mysql,gd,intl,imap,apcu,pspell,tidy,xmlrpc,mbstring,gmp,xml,ldap,common,snmp} \ + php-pear msg_ok "Installed Dependencies" +install_mariadb + msg_info "Setting up MariaDB" DB_NAME=phpipam DB_USER=phpipam @@ -30,10 +31,10 @@ $STD mysql -u root -e "CREATE DATABASE $DB_NAME;" $STD mysql -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED WITH mysql_native_password AS PASSWORD('$DB_PASS');" $STD mysql -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;" { - echo "phpIPAM-Credentials" - echo "phpIPAM Database User: $DB_USER" - echo "phpIPAM Database Password: $DB_PASS" - echo "phpIPAM Database Name: $DB_NAME" + echo "phpIPAM-Credentials" + echo "phpIPAM Database User: $DB_USER" + echo "phpIPAM Database Password: $DB_PASS" + echo "phpIPAM Database Name: $DB_NAME" } >>~/phpipam.creds msg_ok "Set up MariaDB" @@ -45,10 +46,10 @@ unzip -q "phpipam-v${RELEASE}.zip" mysql -u root "${DB_NAME}" /opt/${APPLICATION}_version.txt msg_ok "Installed phpIPAM" diff --git a/install/plant-it-install.sh b/install/plant-it-install.sh index 21fda4fad..87df2c51b 100644 --- a/install/plant-it-install.sh +++ b/install/plant-it-install.sh @@ -15,12 +15,12 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ - gnupg2 \ - mariadb-server \ - redis \ - nginx + redis \ + nginx msg_ok "Installed Dependencies" +install_mariadb + msg_info "Setting up Adoptium Repository" mkdir -p /etc/apt/keyrings curl -fsSL "https://packages.adoptium.net/artifactory/api/gpg/key/public" | gpg --dearmor >/etc/apt/trusted.gpg.d/adoptium.gpg @@ -41,10 +41,10 @@ $STD mysql -u root -e "CREATE DATABASE $DB_NAME;" $STD mysql -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED WITH mysql_native_password AS PASSWORD('$DB_PASS');" $STD mysql -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;" { - echo "Plant-it Credentials" - echo "Plant-it Database User: $DB_USER" - echo "Plant-it Database Password: $DB_PASS" - echo "Plant-it Database Name: $DB_NAME" + echo "Plant-it Credentials" + echo "Plant-it Database User: $DB_USER" + echo "Plant-it Database Password: $DB_PASS" + echo "Plant-it Database Name: $DB_NAME" } >>~/plant-it.creds msg_ok "Set up MariaDB" diff --git a/install/projectsend-install.sh b/install/projectsend-install.sh index 8dc819b9a..51e5a19b0 100644 --- a/install/projectsend-install.sh +++ b/install/projectsend-install.sh @@ -15,12 +15,13 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ - mariadb-server \ - apache2 \ - libapache2-mod-php \ - php8.2-{pdo,mysql,mbstring,gettext,fileinfo,gd,xml,zip} + apache2 \ + libapache2-mod-php \ + php8.2-{pdo,mysql,mbstring,gettext,fileinfo,gd,xml,zip} msg_ok "Installed Dependencies" +install_mariadb + msg_info "Setting up MariaDB" DB_NAME=projectsend DB_USER=projectsend @@ -29,10 +30,10 @@ $STD mysql -u root -e "CREATE DATABASE $DB_NAME;" $STD mysql -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED WITH mysql_native_password AS PASSWORD('$DB_PASS');" $STD mysql -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;" { - echo "projectsend-Credentials" - echo "projectsend Database User: $DB_USER" - echo "projectsend Database Password: $DB_PASS" - echo "projectsend Database Name: $DB_NAME" + echo "projectsend-Credentials" + echo "projectsend Database User: $DB_USER" + echo "projectsend Database Password: $DB_PASS" + echo "projectsend Database Name: $DB_NAME" } >>~/projectsend.creds msg_ok "Set up MariaDB" @@ -47,14 +48,14 @@ chown -R www-data:www-data /opt/projectsend chmod -R 775 /opt/projectsend chmod 644 /opt/projectsend/includes/sys.config.php sed -i -e "s/\(define('DB_NAME', \).*/\1'$DB_NAME');/" \ - -e "s/\(define('DB_USER', \).*/\1'$DB_USER');/" \ - -e "s/\(define('DB_PASSWORD', \).*/\1'$DB_PASS');/" \ - /opt/projectsend/includes/sys.config.php + -e "s/\(define('DB_USER', \).*/\1'$DB_USER');/" \ + -e "s/\(define('DB_PASSWORD', \).*/\1'$DB_PASS');/" \ + /opt/projectsend/includes/sys.config.php sed -i -e "s/^\(memory_limit = \).*/\1 256M/" \ - -e "s/^\(post_max_size = \).*/\1 256M/" \ - -e "s/^\(upload_max_filesize = \).*/\1 256M/" \ - -e "s/^\(max_execution_time = \).*/\1 300/" \ - /etc/php/8.2/apache2/php.ini + -e "s/^\(post_max_size = \).*/\1 256M/" \ + -e "s/^\(upload_max_filesize = \).*/\1 256M/" \ + -e "s/^\(max_execution_time = \).*/\1 300/" \ + /etc/php/8.2/apache2/php.ini echo "${RELEASE}" >/opt/${APPLICATION}_version.txt msg_ok "Installed projectsend" diff --git a/install/pterodactyl-panel-install.sh b/install/pterodactyl-panel-install.sh index 1c3d1650f..1c6068af5 100644 --- a/install/pterodactyl-panel-install.sh +++ b/install/pterodactyl-panel-install.sh @@ -17,12 +17,12 @@ msg_info "Installing Dependencies" $STD apt-get install -y \ lsb-release \ redis \ - mariadb-server \ - mariadb-client \ apache2 \ composer msg_ok "Installed Dependencies" +install_mariadb + msg_info "Adding PHP8.4 Repository" $STD curl -sSLo /tmp/debsuryorg-archive-keyring.deb https://packages.sury.org/debsuryorg-archive-keyring.deb $STD dpkg -i /tmp/debsuryorg-archive-keyring.deb diff --git a/install/shinobi-install.sh b/install/shinobi-install.sh index de28fdb71..759a86921 100644 --- a/install/shinobi-install.sh +++ b/install/shinobi-install.sh @@ -20,6 +20,7 @@ $STD apt-get install -y ca-certificates msg_ok "Installed Dependencies" NODE_VERSION="22" install_node_and_modules +install_mariadb msg_info "Installing FFMPEG" $STD apt-get install -y ffmpeg @@ -41,7 +42,6 @@ sqluser="root" sqlpass="root" echo "mariadb-server mariadb-server/root_password password $sqlpass" | debconf-set-selections echo "mariadb-server mariadb-server/root_password_again password $sqlpass" | debconf-set-selections -$STD apt-get install -y mariadb-server service mysql start mysql -u "$sqluser" -p"$sqlpass" -e "source sql/user.sql" || true msg_ok "Installed Database" diff --git a/install/snipeit-install.sh b/install/snipeit-install.sh index 8df86daf7..43ea5c5c2 100644 --- a/install/snipeit-install.sh +++ b/install/snipeit-install.sh @@ -15,13 +15,14 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ - composer \ - git \ - nginx \ - php8.2-{bcmath,common,ctype,curl,fileinfo,fpm,gd,iconv,intl,mbstring,mysql,soap,xml,xsl,zip,cli} \ - mariadb-server + composer \ + git \ + nginx \ + php8.2-{bcmath,common,ctype,curl,fileinfo,fpm,gd,iconv,intl,mbstring,mysql,soap,xml,xsl,zip,cli} msg_ok "Installed Dependencies" +install_mariadb + msg_info "Setting up database" DB_NAME=snipeit_db DB_USER=snipeit @@ -30,10 +31,10 @@ mysql -u root -e "CREATE DATABASE $DB_NAME;" mysql -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED WITH mysql_native_password AS PASSWORD('$DB_PASS');" mysql -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;" { - echo "SnipeIT-Credentials" - echo "SnipeIT Database User: $DB_USER" - echo "SnipeIT Database Password: $DB_PASS" - echo "SnipeIT Database Name: $DB_NAME" + echo "SnipeIT-Credentials" + echo "SnipeIT Database User: $DB_USER" + echo "SnipeIT Database Password: $DB_PASS" + echo "SnipeIT Database Name: $DB_NAME" } >>~/snipeit.creds msg_ok "Set up database" @@ -48,9 +49,9 @@ cp .env.example .env IPADDRESS=$(hostname -I | awk '{print $1}') sed -i -e "s|^APP_URL=.*|APP_URL=http://$IPADDRESS|" \ - -e "s|^DB_DATABASE=.*|DB_DATABASE=$DB_NAME|" \ - -e "s|^DB_USERNAME=.*|DB_USERNAME=$DB_USER|" \ - -e "s|^DB_PASSWORD=.*|DB_PASSWORD=$DB_PASS|" .env + -e "s|^DB_DATABASE=.*|DB_DATABASE=$DB_NAME|" \ + -e "s|^DB_USERNAME=.*|DB_USERNAME=$DB_USER|" \ + -e "s|^DB_PASSWORD=.*|DB_PASSWORD=$DB_PASS|" .env chown -R www-data: /opt/snipe-it chmod -R 755 /opt/snipe-it diff --git a/install/wavelog-install.sh b/install/wavelog-install.sh index 4ddde5081..8c94f4515 100644 --- a/install/wavelog-install.sh +++ b/install/wavelog-install.sh @@ -15,11 +15,12 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ - libapache2-mod-php \ - mariadb-server \ - php8.2-{curl,mbstring,mysql,xml,zip,gd} + libapache2-mod-php \ + php8.2-{curl,mbstring,mysql,xml,zip,gd} msg_ok "Installed Dependencies" +install_mariadb + msg_info "Setting up Database" DB_NAME=wavelog DB_USER=waveloguser @@ -28,10 +29,10 @@ $STD mysql -u root -e "CREATE DATABASE $DB_NAME;" $STD mysql -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED WITH mysql_native_password AS PASSWORD('$DB_PASS');" $STD mysql -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;" { - echo "Wavelog-Credentials" - echo "Wavelog Database User: $DB_USER" - echo "Wavelog Database Password: $DB_PASS" - echo "Wavelog Database Name: $DB_NAME" + echo "Wavelog-Credentials" + echo "Wavelog Database User: $DB_USER" + echo "Wavelog Database Password: $DB_PASS" + echo "Wavelog Database Name: $DB_NAME" } >>~/wavelog.creds msg_ok "Set up database" diff --git a/install/wordpress-install.sh b/install/wordpress-install.sh index a6d68779d..1f5e78064 100644 --- a/install/wordpress-install.sh +++ b/install/wordpress-install.sh @@ -15,12 +15,13 @@ update_os msg_info "Installing Dependencies (Patience)" $STD apt-get install -y \ - apache2 \ - php8.2-{bcmath,common,cli,curl,fpm,gd,snmp,imap,mbstring,mysql,xml,zip} \ - libapache2-mod-php \ - mariadb-server + apache2 \ + php8.2-{bcmath,common,cli,curl,fpm,gd,snmp,imap,mbstring,mysql,xml,zip} \ + libapache2-mod-php msg_ok "Installed Dependencies" +install_mariadb + msg_info "Setting up Database" DB_NAME=wordpress_db DB_USER=wordpress @@ -29,10 +30,10 @@ $STD mysql -u root -e "CREATE DATABASE $DB_NAME;" $STD mysql -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED BY '$DB_PASS';" $STD mysql -u root -e "GRANT ALL PRIVILEGES ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;" { - echo "WordPress Credentials" - echo "Database User: $DB_USER" - echo "Database Password: $DB_PASS" - echo "Database Name: $DB_NAME" + echo "WordPress Credentials" + echo "Database User: $DB_USER" + echo "Database Password: $DB_PASS" + echo "Database Name: $DB_NAME" } >>~/wordpress.creds msg_ok "Set up Database" @@ -46,9 +47,9 @@ find . -type d -exec chmod 755 {} \; find . -type f -exec chmod 644 {} \; mv wp-config-sample.php wp-config.php sed -i -e "s|^define( 'DB_NAME', '.*' );|define( 'DB_NAME', '$DB_NAME' );|" \ - -e "s|^define( 'DB_USER', '.*' );|define( 'DB_USER', '$DB_USER' );|" \ - -e "s|^define( 'DB_PASSWORD', '.*' );|define( 'DB_PASSWORD', '$DB_PASS' );|" \ - /var/www/html/wordpress/wp-config.php + -e "s|^define( 'DB_USER', '.*' );|define( 'DB_USER', '$DB_USER' );|" \ + -e "s|^define( 'DB_PASSWORD', '.*' );|define( 'DB_PASSWORD', '$DB_PASS' );|" \ + /var/www/html/wordpress/wp-config.php msg_ok "Installed Wordpress" msg_info "Setup Services"