Skip to content
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

[ADD] Added installer script for installing mysql-server #50

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
35 changes: 35 additions & 0 deletions installers/ffmpeg/installer.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/sh


APT_GET_CMD=$(which apt-get) # apt package manager for Ubuntu & other Debian based distributions
DNF_CMD=$(which dnf) # dnf package manager for new RHEL & CentOS
YUM_CMD=$(which yum) # yum package manager for RHEL & CentOS
PACMAN_CMD=$(which pacman) # pacman package manager for ArchLinux
APK_CMD=$(which apk) # apk package manager for Alpine

if [ ! -z $APT_GET_CMD ]; then
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install ffmpeg ffmpeg-devel
elif [ ! -z $DNF_CMD ]; then
sudo dnf -y install https://download.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
sudo dnf localinstall --nogpgcheck https://download1.rpmfusion.org/free/el/rpmfusion-free-release-8.noarch.rpm
sudo dnf install --nogpgcheck https://download1.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-8.noarch.rpm
sudo dnf install http://rpmfind.net/linux/epel/7/x86_64/Packages/s/SDL2-2.0.10-1.el7.x86_64.rpm
sudo dnf install ffmpeg
sudo dnf -y install ffmpeg-devel
elif [ ! -z $YUM_CMD ]; then
sudo yum install epel-release
sudo rpm -v --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro
sudo rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
sudo yum install ffmpeg ffmpeg-devel
elif [ ! -z $PACMAN_CMD ]; then
pacman -Syu ffmpeg
elif [ ! -z $APK_CMD ]; then
sudo apk add --no-cache ffmpeg
else
echo "Couldn't install package"
exit 1;
fi

ffmpeg -version
14 changes: 14 additions & 0 deletions installers/halyard/installer.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/sh


#Downloading the installer file directly from official repo of halyard
curl -O https://raw.githubusercontent.com/spinnaker/halyard/master/install/debian/InstallHalyard.sh

#Running the bash script
sudo bash InstallHalyard

#Verifying the install
hal -v

#To enable command completion
. ~/.bashrc
35 changes: 35 additions & 0 deletions installers/mysql-server/installer.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Download and Install the Latest Updates for the OS
apt-get update && apt-get upgrade -y

# Install essential packages
apt-get -y install zsh htop

# Install MySQL Server in a Non-Interactive mode. Default root password will be "root"
echo "mysql-server-8.0 mysql-server/root_password password root" | sudo debconf-set-selections
echo "mysql-server-8.0 mysql-server/root_password_again password root" | sudo debconf-set-selections
apt-get -y install mysql-server-8.6

#This utility prompts you to define the mysql root password and other security-related options, including removing remote access to the root user and setting the root password.
mysql_secure_installation utility

# Enable Ubuntu Firewall and allow SSH & MySQL Ports
ufw enable
ufw allow 22
ufw allow 3306

# Run the MySQL Secure Installation wizard
mysql_secure_installation

#start the mysql service
systemctl start mysql
systemctl enable mysql

#configure interfaces
sed -i 's/127\.0\.0\.1/0\.0\.0\.0/g' /etc/mysql/my.cnf
mysql -uroot -p -e 'USE mysql; UPDATE `user` SET `Host`="%" WHERE `User`="root" AND `Host`="localhost"; DELETE FROM `user` WHERE `Host` != "%" AND `User`="root"; FLUSH PRIVILEGES;'

#restarting the service mysql
service mysql restart

#running mysql
/usr/bin/mysql -u root -p