@@ -280,24 +280,6 @@ elif [[ "$OS_NAME" == "CentOS Linux" ]] || [[ "$OS_NAME" == "Red Hat" ]]; then | |||
sudo dnf install java-11-openjdk -y || { echo "Failed to install Java 11"; exit 1; } | |||
fi | |||
# MySQL Installation for CentOS Stream | |||
if [[ "$OS_NAME" == "CentOS Linux" ]] || [[ "$OS_NAME" == "CentOS Stream" ]]; then | |||
sudo dnf install mysql-server -y | |||
sudo systemctl start mysqld | |||
sudo systemctl enable mysqld | |||
MYSQL_ROOT_PASSWORD=$(sudo grep 'temporary password' /var/log/mysqld.log | tail -n 1 | awk '{print $NF}') | |||
echo "MySQL root temporary password: $MYSQL_ROOT_PASSWORD" | |||
sudo mysql_secure_installation | |||
else | |||
# If on Ubuntu/Debian, you can use debconf-set-selections | |||
sudo debconf-set-selections <<EOF | |||
mysql-server mysql-server/lowercase-table-names select Enabled | |||
EOF | |||
sudo apt install mysql-server -y | |||
sudo systemctl start mysql | |||
fi | |||
git clone $REPOSERVER/$REPOOWNER/bbhverse | |||
cd bbhverse | |||
npm i | |||
@@ -344,7 +326,7 @@ echo "module.exports = { instanceName : '$INSTANCENAME', reposerver: '$REPOSERVE | |||
# ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'cihsr'; | |||
# FLUSH PRIVILEGES; | |||
bash elxr/mysql.init.sh | |||
bash elxr/i.mysql.sh | |||
bash elxr/load.mysql.sh | |||
bash elxr/i.sqlexpress.sh | |||
bash elxr/load.sqlexpress.sh |
@@ -4,47 +4,52 @@ | |||
echo "Updating the system..." | |||
sudo yum update -y | |||
# MySQL Installation for CentOS Stream | |||
sudo dnf install mysql-server -y | |||
sudo systemctl start mysqld | |||
sudo systemctl enable mysqld | |||
MYSQL_ROOT_PASSWORD=$(sudo grep 'temporary password' /var/log/mysqld.log | tail -n 1 | awk '{print $NF}') | |||
echo "MySQL root temporary password: $MYSQL_ROOT_PASSWORD" | |||
sudo mysql_secure_installation | |||
bash elxr/mysql.init.sh | |||
# Install the MySQL repository | |||
echo "Installing MySQL repository..." | |||
sudo yum localinstall -y https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm | |||
# Enable the MySQL repository | |||
echo "Enabling MySQL repository..." | |||
sudo yum-config-manager --enable mysql80-community | |||
# Install MySQL server | |||
echo "Installing MySQL server..." | |||
sudo yum install -y mysql-server | |||
# Start MySQL service | |||
echo "Starting MySQL service..." | |||
sudo systemctl start mysqld | |||
# Enable MySQL to start on boot | |||
echo "Enabling MySQL to start on boot..." | |||
sudo systemctl enable mysqld | |||
# Get the temporary MySQL root password | |||
TEMP_PASS=$(sudo grep 'temporary password' /var/log/mysqld.log | tail -n 1 | awk '{print $NF}') | |||
echo "Temporary MySQL root password: $TEMP_PASS" | |||
# Secure MySQL installation (you can modify the commands for automation if desired) | |||
echo "Securing MySQL installation..." | |||
sudo mysql_secure_installation <<EOF | |||
y | |||
$TEMP_PASS | |||
newpassword | |||
newpassword | |||
y | |||
y | |||
y | |||
y | |||
EOF | |||
# Output MySQL status | |||
echo "MySQL installation completed successfully." | |||
# You can log into MySQL by running: | |||
echo "You can log into MySQL with: mysql -u root -p" | |||
# echo "Installing MySQL repository..." | |||
# sudo yum localinstall -y https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm | |||
# # Enable the MySQL repository | |||
# echo "Enabling MySQL repository..." | |||
# sudo yum-config-manager --enable mysql80-community | |||
# # Install MySQL server | |||
# echo "Installing MySQL server..." | |||
# sudo yum install -y mysql-server | |||
# # Start MySQL service | |||
# echo "Starting MySQL service..." | |||
# sudo systemctl start mysqld | |||
# # Enable MySQL to start on boot | |||
# echo "Enabling MySQL to start on boot..." | |||
# sudo systemctl enable mysqld | |||
# # Get the temporary MySQL root password | |||
# TEMP_PASS=$(sudo grep 'temporary password' /var/log/mysqld.log | tail -n 1 | awk '{print $NF}') | |||
# echo "Temporary MySQL root password: $TEMP_PASS" | |||
# # Secure MySQL installation (you can modify the commands for automation if desired) | |||
# echo "Securing MySQL installation..." | |||
# sudo mysql_secure_installation <<EOF | |||
# y | |||
# $TEMP_PASS | |||
# newpassword | |||
# newpassword | |||
# y | |||
# y | |||
# y | |||
# y | |||
# EOF | |||
@@ -0,0 +1,25 @@ | |||
# Determine the group to add the user to based on the OS | |||
if [ -f /etc/os-release ]; then | |||
. /etc/os-release | |||
OS_NAME=$NAME | |||
fi | |||
# MySQL Installation for CentOS Stream | |||
if [[ "$OS_NAME" == "CentOS Linux" ]] || [[ "$OS_NAME" == "CentOS Stream" ]]; then | |||
bash elxr/i.mysql.centos.sh | |||
else | |||
# If on Ubuntu/Debian, you can use debconf-set-selections | |||
sudo debconf-set-selections <<EOF | |||
mysql-server mysql-server/lowercase-table-names select Enabled | |||
EOF | |||
sudo apt install mysql-server -y | |||
sudo systemctl start mysql | |||
fi | |||
# Output MySQL status | |||
echo "MySQL installation completed successfully." | |||
# You can log into MySQL by running: | |||
echo "You can log into MySQL with: mysql -u root -p" | |||
@@ -60,7 +60,7 @@ install_sqlserver_ubuntu() { | |||
source ~/.bashrc | |||
# Verify installation | |||
sqlcmd --version | |||
sqlcmd --? | |||
} | |||
# Function to install SQL Server on CentOS |
@@ -167,10 +167,21 @@ var shell_verse = { | |||
, getbash : ()=>{ return "sh" } | |||
, createJuntionOrLink : (dirOrFile, target, opts)=>{ | |||
return nodeShellExec('ln', ['-sf', target, dirOrFile], opts).catch((e) => { | |||
var promises = [] | |||
promises.push( | |||
nodeShellExec('rm', [dirOrFile], opts).catch((e) => { | |||
console.error(util.inspect(e)) | |||
fs.writeFileSync( `${this.tempRunDir()}\\run.log`, ', ' + JSON.stringify({ e }), {'flag':'a+'} ) | |||
}) | |||
) | |||
promises.push(nodeShellExec('ln', ['-s', target, dirOrFile], opts).catch((e) => { | |||
console.error(util.inspect(e)) | |||
fs.writeFileSync( `${this.tempRunDir()}\\run.log`, ', ' + JSON.stringify({ e }), {'flag':'a+'} ) | |||
}) | |||
) | |||
return any(promises) | |||
} | |||
, removeJuncionOrLink : ( junctionOrLink )=>{ |
@@ -1,7 +1,7 @@ | |||
#!/bin/bash | |||
# Prompt for MySQL root password securely | |||
read -sp "Enter MySQL root password: " MYSQL_PASSWORD | |||
read -sp "Enter MSSQL root password: " MSSQL_PASSWORD | |||
echo # Newline after password input | |||
# Prompt for the database name (default: elixir) |