merge MariaDB to tools.func Installer
This commit is contained in:
parent
5085547f39
commit
3563354516
@ -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
|
||||
|
@ -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"
|
||||
|
@ -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;"
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
|
||||
|
@ -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
|
||||
|
@ -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? <y/N> " prompt
|
||||
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user