Classified directory archiving: Shell

MariaDB 10.5+One click installation script

Script properties:

  • Only install MariaDB 10+and its dependencies, and do not install others to reduce disk space occupation;
  • The script supports CentOS 7~8, System installation of Red Hat 7~8;
  • The script supports high customization, which can be customized as required;
  • The MariaDB 10.5+installation mode is binary (the default installation version is Mariadb-10.5.5 x64).

How to install MariaDB 10.5+:

Copy and paste the following code to the terminal and press Enter:

 curl -o-  https://renwole.com/sh/install_mariadb-10.5.sh  | bash

Script instructions:

There are two variable values in the script that can be modified as needed, namely, the MariaDB version and the MariaDB password. Others do not need to be modified. MariaDB will be installed in /apps/server/mariadb Directory, data files are stored in  /apps/server/mariadb/data Location.

For example, if you need to install MariaDB 10.5.4, you only need to replace 10.5.5 with the required version. This method is applicable to all versions of MariaDB 10.5+.

 mariadb_version="10.5.4" mariadb_password="Renwole.com#Node"

notes : After the installation is successful, the account password information will be printed on the screen.
In addition, if the relevant version of MariaDB has been installed, please uninstall it first and delete the startup script, otherwise the installation may fail.

Special attention: When selecting a version, please confirm
https://mirrors.tuna.tsinghua.edu.cn/mariadb/
http://mirrors.ustc.edu.cn If there is a corresponding version in, otherwise the installation will fail.

MySQL 8.0+one click installation script

Script properties:

  • Only MySQL 8 and its dependencies are installed, and others are not installed to reduce the disk space occupation;
  • The script supports CentOS 7~8, System installation of Red Hat 7~8;
  • The script supports high customization, which can be customized as required;
  • MySQL 8 is installed in binary mode (the default version is mysql-8.0.21-linux-glibc2.12-x86_64).

How to install MySQL 8.0+:

Copy and paste the following code to the terminal and press Enter:

 curl -o-  https://renwole.com/sh/install_mysql-8.0.sh  | bash

Script instructions:

There are two variable values in the script that can be modified as needed, namely MySQL version and MySQL password, and others do not need to be modified. MySQL will be installed in /apps/server/mysql Directory, data files are stored in /apps/server/mysql/data Location.

For example, if you need to install MySQL 8.0.18, just replace 8.0.20 with the required version. This method is applicable to all versions of MySQL 8+.

 mysql_version=" 8.0.20 " mysql_password=" Renwole.com#Node "

notes : After the installation is successful, the account password information will be printed on the screen.
In addition, if you have installed the relevant version of MySQL, please uninstall it first and delete the startup script, otherwise the installation may fail.

One click backup script of Web MySQL

Script property description:

  • Backup website data/database data to remote FTP server;
  • Support CentOS/Fedora/Ubuntu/Debian system;
  • Support crontab scheduled backup;
 #!/ bin/env bash #Install FTP tools according to the system version command -v yum >/dev/null 2>&1 && apt-get -y install ftp command -v apt-get >/dev/null 2>&1 && yum -y install ftp #Database name/account/password #Fill in according to the actual information DBName=" renwole " DBUser=" renwole " DBPass=" Renwole1!@# " #Ftp remote host/port/account/password #Fill in according to the actual information FtpHost=" renwole.com " FtpPort=" twenty-one " FtpUser=" renwole " FtpPass=" Renwole1!@# " FtpDir=" /wwwroot/Renwolecom " #Web name/directory and backup path #Modify according to the actual web path WebName=" Renwole " WebDir=" /apps/web/renwole.com " mkdir /backup BakDir="/backup" #Package, backup and upload the database and website data to the ftp server command -v mysqldump >/dev/null 2>&1 || { echo "Not found MySQL/MariaDB ENV";  kill -9 $$; } mysqldump -u${DBUser} -p${DBPass} ${DBName} >${BakDir}/$ {DBName}- $(date +"%Y%m%d").sql tar zcf ${BakDir}/$ {WebName}- $(date +"%Y%m%d").tar.gz ${WebDir} ftp -v -n ${FtpHost} ${FtpPort}<< EOF user ${FtpUser} ${FtpPass} type binary passive cd ${FtpDir} put ${BakDir}/$ {DBName}- $(date +"%Y%m%d").sql put ${BakDir}/$ {WebName}- $(date +"%Y%m%d").tar.gz bye EOF

Download the data backup script:

 curl -O  https://renwole.com/sh/backup.sh  && chmod +x backup.sh

Set crontab scheduled task:

 #Backup at 2:00 am every day and push it to the FTP server echo "0 0 2 * * /backup/backup.sh " >> /var/spool/cron/root

notes : Content annotated gules Some of them need to be modified according to their own actual information , others do not need to be modified. In addition, you can also modify ftp and support the sftp security backup mode. Or delete ftp and only back up the data to the local specified directory.

ILNMP PHP one click installation script

iLNMP Introduction

ILNMP (Installation Linux Nginx MySQL PHP) uses lightweight scripts written in shell to quickly deploy Nginx/MariaDB/MySQL/PHP/phpMyadmin, which is applicable to CentOS 7~8 Redhat 7-8 x86_64 bit operating system.

Script properties

  • Continuous update (synchronous update application on official website);
  • No redundant source code, no garbage data generation;
  • All source codes are downloaded from the official website, which is safe and reliable;
  • Fast binary installation, highly customized
  • Interactive installation.

Note: Zabbix One click configuration and installation of Redis, Kafka, Zookeeper, ES and other big data components.

Download link

https://renwole.com/minilnmp/install-iLNMP