Skip to content

Commit 661515f

Browse files
committed
Alx - Tools installation
0 parents  commit 661515f

2 files changed

Lines changed: 119 additions & 0 deletions

File tree

alx-tools_installation/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Alx - Tools installation
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
#!/usr/bin/env bash
2+
3+
# get the updates.
4+
sudo apt-get -y update
5+
6+
# clone betty repo
7+
git clone https://github.com/alx-tools/Betty.git
8+
9+
# move to betty directory
10+
cd Betty || exit
11+
12+
# install betty linter
13+
sudo ./install.sh
14+
15+
# writing the following contents to a file named "betty"
16+
cat <<EOF > betty
17+
#!/bin/bash
18+
# Simply a wrapper script to keep you from having to use betty-style
19+
# and betty-doc separately on every item.
20+
# Originally by Tim Britton (@wintermanc3r), multiargument added by
21+
# Larry Madeo (@hillmonkey)
22+
23+
BIN_PATH="/usr/local/bin"
24+
BETTY_STYLE="betty-style"
25+
BETTY_DOC="betty-doc"
26+
27+
if [ "\$#" = "0" ]; then
28+
echo "No arguments passed."
29+
exit 1
30+
fi
31+
32+
for argument in "\$@" ; do
33+
echo -e "\\n========== \$argument =========="
34+
\${BIN_PATH}/\${BETTY_STYLE} "\$argument"
35+
\${BIN_PATH}/\${BETTY_DOC} "\$argument"
36+
done
37+
EOF
38+
39+
# changing the file named "betty" to executable
40+
chmod a+x betty
41+
42+
# moving "betty" file into the /usr/local/bin/ directory
43+
sudo mv betty /usr/local/bin/
44+
45+
# install pycodestyle
46+
sudo apt install -y python3-pip
47+
pip install -y pycodestyle
48+
49+
# installing C and C# compilers
50+
sudo apt-get install -y gcc
51+
sudo apt install -y mono-complete
52+
53+
# Install MySQL 8.0
54+
sudo apt-get install -y mysql-server
55+
mysql --version
56+
57+
# Start MySQL service
58+
sudo service mysql start
59+
60+
# waiting to connect to the server
61+
sleep 10
62+
63+
# Connect to MySQL and execute commands
64+
sudo mysql <<EOF
65+
quit
66+
EOF
67+
68+
# installing and activating env
69+
sudo apt-get install -y python3.8-venv
70+
python3 -m venv venv
71+
source venv/bin/activate
72+
73+
# installing mysqldb
74+
sudo apt-get install -y python3-dev libmysqlclient-dev zlib1g-dev
75+
76+
# Install Python package
77+
sudo pip3 install mysqlclient
78+
79+
# Run Python script
80+
python3 - <<EOF
81+
import MySQLdb
82+
print("MySQLdb version:", MySQLdb.version_info)
83+
EOF
84+
85+
# Install SQLAlchemy module version
86+
sudo pip3 install SQLAlchemy
87+
88+
# Check the installed version using Python
89+
python3 - <<EOF
90+
import sqlalchemy
91+
print("SQLAlchemy version:", sqlalchemy.__version__)
92+
EOF
93+
94+
# installing puppet
95+
sudo apt-get install -y ruby=1:2.7+1 --allow-downgrades
96+
sudo apt-get install -y ruby-augeas
97+
sudo apt-get install -y ruby-shadow
98+
sudo apt-get install -y puppet
99+
100+
# installing puppet-lint
101+
sudo gem install puppet-lint
102+
103+
# Install Node 14
104+
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
105+
sudo apt-get install -y nodejs
106+
107+
# installing semi-standard
108+
sudo npm install -y semistandard --global
109+
110+
# installing make
111+
sudo apt-get install -y make
112+
113+
# on successful instalation printf
114+
115+
echo "Installation was successfull. great work Elvis"
116+
117+
118+

0 commit comments

Comments
 (0)