-
-
Notifications
You must be signed in to change notification settings - Fork 494
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #715 from kmehant/common-setup-script
Common setup shell script for linux distros and MacOS
- Loading branch information
Showing
5 changed files
with
179 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/bash | ||
|
||
echo "Installing Homebrew" | ||
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | ||
echo "Homebrew Installed" | ||
|
||
echo "Installing python3 and pip" | ||
brew install python3 | ||
echo "python3 and pip Installed" | ||
|
||
echo "Installing Aria2" | ||
brew install aria2 | ||
echo "Aria2 Installed" | ||
|
||
echo "Installing and starting MySQL" | ||
brew install mysql | ||
brew services start mysql | ||
echo "MySQL Installed and Started" | ||
|
||
echo "Installing Node" | ||
brew install node | ||
echo "Node Installed" | ||
|
||
echo "Installing Bower" | ||
npm install -g bower | ||
echo "Bower Installed" | ||
|
||
echo "Installing Gulp" | ||
npm install -g gulp | ||
npm install -g gulp-cli | ||
echo "Gulp Installed" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#!/bin/bash | ||
|
||
echo "Installing pip" | ||
dnf install python-pip #Python 2 | ||
dnf install python3 #Python 3 | ||
echo "pip installed" | ||
|
||
echo "Upgrading setuptools" | ||
dnf upgrade python-setuptools | ||
echo "setuptools upgraded" | ||
|
||
echo "Installing Aria2" | ||
yum install aria2 | ||
echo "Aria2 installed" | ||
|
||
echo "Installing mysql-server" | ||
## Fedora 29 ## | ||
dnf install https://dev.mysql.com/get/mysql80-community-release-fc29-1.noarch.rpm | ||
# choose accordingly | ||
## Fedora 28 ## | ||
#dnf install https://dev.mysql.com/get/mysql80-community-release-fc28-1.noarch.rpm | ||
|
||
## Fedora 27 ## | ||
#dnf install https://dev.mysql.com/get/mysql80-community-release-fc27-1.noarch.rpm | ||
|
||
dnf install mysql-community-server | ||
systemctl start mysqld.service ## use restart after update | ||
systemctl enable mysqld.service | ||
echo "mysql-server installed" | ||
|
||
echo "Installing libmysqlclient" | ||
yum install mysql-devel | ||
echo "libmysqlclient installed" | ||
|
||
echo "Installing node" | ||
dnf install -y gcc-c++ make | ||
curl -sL https://rpm.nodesource.com/setup_10.x | sudo -E bash - | ||
dnf install nodejs | ||
echo "NodeJS installed" | ||
|
||
echo "Installing bower globally" | ||
npm install -g bower | ||
echo "bower installed" | ||
|
||
echo "Installing gulp globally" | ||
npm install -g gulp | ||
echo "gulp installed" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
#!/bin/bash | ||
|
||
# Documented for centOS 7 | ||
# Updating yum | ||
echo "Setting up yum" | ||
yum -y update | ||
yum -y install yum-utils | ||
yum -y groupinstall development | ||
echo "yum is ready" | ||
|
||
#Installing Python | ||
echo "Installing Python" | ||
yum install centos-release-scl | ||
yum install rh-python36 | ||
scl enable rh-python36 bash | ||
python --version | ||
echo "Python successfully installed" | ||
|
||
#Installing pip | ||
echo "Installing pip" | ||
yum install epel-release -y | ||
yum install python-pip | ||
echo "pip successfully installed" | ||
|
||
#Installing setup tools | ||
echo "Installing setuptools" | ||
wget http://pypi.python.org/packages/source/s/setuptools/setuptools-1.1.6.tar.gz --no-check-certificate | ||
tar xf setuptools-1.1.6.tar.gz | ||
cd setuptools-1.1.6 | ||
python3.3 setup.py install | ||
echo "setuptools installed" | ||
|
||
echo "Installing Aria2" | ||
yum --enablerepo=rpmforge install aria2 -y | ||
echo "Aria2 installed" | ||
|
||
echo "Installing mysql-server" | ||
rpm -ivh https://repo.mysql.com//mysql57-community-release-el7-11.noarch.rpm | ||
yum install mysql-server -y | ||
echo "mysql-server installed" | ||
|
||
echo "Installing libmysqlclient" | ||
yum install mysql-devel -y | ||
echo "libmysqlclient installed" | ||
|
||
echo "Installing node" | ||
yum install -y gcc-c++ make | ||
curl -sL https://rpm.nodesource.com/setup_6.x | sudo -E bash - | ||
yum install nodejs | ||
echo "NodeJS installed" | ||
|
||
echo "Installing bower globally" | ||
npm install -g bower | ||
echo "bower installed" | ||
|
||
echo "Installing gulp globally" | ||
npm install -g gulp | ||
echo "gulp installed" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,48 @@ | ||
#!/bin/sh | ||
|
||
YUM=$(which yum) | ||
DNF=$(which dnf) | ||
APT_GET=$(which apt-get) | ||
PACMAN=$(which pacman) | ||
BREW=$(which brew) | ||
|
||
# Variable for package manager used by the user | ||
PACKAGE_MANAGER="package_manager" | ||
|
||
if ! [ $(id -u) = 0 ]; then | ||
printf "Please run as root to proceed with installations... \n1. Type in: su\n2. Enter your password\n3. Execute: sh setup.sh\n" | ||
printf "Please run as root to proceed with installations... \n1. Type in: su\n2. Enter your password\n3. Execute: sh setup.sh\n" | ||
|
||
else | ||
echo "Starting Installation..." | ||
|
||
echo "Finding the package manager" | ||
APT_GET_CMD=$(which apt-get) | ||
PACMAN_CMD=$(which pacman) | ||
|
||
if [ ! -z $APT_GET_CMD ]; then | ||
echo -e "apt-get found\n" | ||
./package-list-aptget | ||
|
||
elif [ ! -z $PACMAN_CMD ]; then | ||
echo -e "pacman found\n" | ||
./package-list-pacman | ||
else | ||
echo "Please manually install packages in package-list-aptget file" | ||
exit 1; | ||
fi | ||
echo "Starting dependency installation..." | ||
echo "Finding the package manager" | ||
|
||
if [ ! -z $APT_GET ]; then | ||
echo -e "apt-get found\n" | ||
PACKAGE_MANAGER="apt-get" | ||
./package-list-aptget | ||
|
||
elif [ ! -z $PACMAN ]; then | ||
echo -e "pacman found\n" | ||
PACKAGE_MANAGER="pacman" | ||
./package-list-pacman | ||
|
||
elif [ ! -z $DNF ]; then | ||
echo -e "dnf found\n" | ||
PACKAGE_MANAGER="dnf" | ||
./package-list-dnf | ||
|
||
elif [ ! -z $YUM ]; then | ||
echo -e "yum found\n" | ||
PACKAGE_MANAGER="yum" | ||
./package-list-yum | ||
|
||
elif [ ! -z $BREW ]; then | ||
echo -e "brew found\n" | ||
PACKAGE_MANAGER="brew" | ||
./package-list-brew | ||
|
||
else | ||
echo "Please manually install packages in package-list-$PACKAGE_MANAGER file" | ||
exit 1 | ||
fi | ||
fi |