Skip to content

change to mariadb 10.10 #84

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion static/instruction.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ cat << WELCOME
+-----------------------------------------------------------------------+
|Thank you for downloading this Wordpress VM made by T&M Hansson IT AB! |
| |
|This WordPress appliance comes with PHP 7.4, NGINX and Redis Cache for |
|This WordPress appliance comes with PHP 8.1, NGINX and Redis Cache for |
|best performance. The site(s) load very fast! |
| |
|In order to configure everything you have to run the setup script |
Expand Down
17 changes: 7 additions & 10 deletions wordpress-startup-script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -138,14 +138,13 @@ download_script MENU server_configuration
download_script MENU additional_apps

# Make $SCRIPTS excutable
chmod +x -R $SCRIPTS
chown root:root -R $SCRIPTS
chmod +x -R "$SCRIPTS"
chown root:root -R "$SCRIPTS"

# Allow wordpress to run figlet script
chown "$UNIXUSER":"$UNIXUSER" $SCRIPTS/wordpress.sh
chown "$UNIXUSER":"$UNIXUSER" "$SCRIPTS"/wordpress.sh

clear
msg_box"This script will do the final setup for you
msg_box "This script will do the final setup for you

- Genereate new server SSH keys
- Set static IP
Expand All @@ -156,7 +155,6 @@ msg_box"This script will do the final setup for you
- Set new password to the Linux system (user: wordpress)

############### T&M Hansson IT AB - $(date +"%Y") ###############"
clear

msg_box "PLEASE NOTE:
[#] Please finish the whole setup. The server will reboot once done.
Expand Down Expand Up @@ -189,10 +187,10 @@ check_command bash "$SCRIPTS/change_db_pass.sh"
sleep 3

# Server configurations
bash $SCRIPTS/server_configuration.sh
bash "$SCRIPTS"/server_configuration.sh

# Install apps
bash $SCRIPTS/additional_apps.sh
bash "$SCRIPTS"/additional_apps.sh


### Change passwords
Expand Down Expand Up @@ -272,7 +270,6 @@ echo
print_text_in_color "$ICyan" "This is the current administrator(s):"
wp_cli_cmd user list --role=administrator --path="$WPATH"
any_key "Press any key to continue..."
clear

# Cleanup 1
rm -f "$SCRIPTS/change_db_pass.sh"
Expand Down Expand Up @@ -319,7 +316,7 @@ ROOTNEWPROFILE

# Upgrade system
print_text_in_color "$ICyan" "System will now upgrade..."
bash $SCRIPTS/update.sh
bash "$SCRIPTS"/update.sh

# Cleanup 2
apt autoremove -y
Expand Down
8 changes: 4 additions & 4 deletions wordpress_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -204,13 +204,13 @@ done

# Install MariDB repos
install_if_not software-properties-common
curl -LsS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bash -s -- --mariadb-server-version="mariadb-11.0" --skip-maxscale
curl -LsS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bash -s -- --mariadb-server-version="mariadb-10.10" --skip-maxscale
# Avoid i386 since we use x64
sed -i "s|deb http|deb [arch=amd64] http|g" /etc/apt/sources.list.d/mariadb.list
# USed debconf to install it
sudo debconf-set-selections <<< "mariadb-server-11.0 mysql-server/root_password password $MARIADB_PASS"
sudo debconf-set-selections <<< "mariadb-server-11.0 mysql-server/root_password_again password $MARIADB_PASS"
install_if_not mariadb-server-11.0
sudo debconf-set-selections <<< "mariadb-server-10.10 mysql-server/root_password password $MARIADB_PASS"
sudo debconf-set-selections <<< "mariadb-server-10.10 mysql-server/root_password_again password $MARIADB_PASS"
install_if_not mariadb-server-10.10

# mysql_secure_installation
install_if_not expect
Expand Down