-
Notifications
You must be signed in to change notification settings - Fork 53
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 #110 from Emory-HITI/dev
An install script for Niffler
- Loading branch information
Showing
17 changed files
with
303 additions
and
229 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
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 @@ | ||
false |
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,9 @@ | ||
[Unit] | ||
Description=Disable Transparent Huge Pages (THP) | ||
|
||
[Service] | ||
Type=simple | ||
ExecStart=/bin/sh -c "echo 'never' > /sys/kernel/mm/transparent_hugepage/enabled && echo 'never' > /sys/kernel/mm/transparent_hugepage/defrag" | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
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 @@ | ||
false |
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 @@ | ||
false |
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,11 @@ | ||
[mongodb-org-4.2] | ||
|
||
name=MongoDB Repository | ||
|
||
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/4.2/x86_64/ | ||
|
||
gpgcheck=1 | ||
|
||
enabled=1 | ||
|
||
gpgkey=https://www.mongodb.org/static/pgp/server-4.2.asc |
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,12 @@ | ||
conn = new Mongo(); | ||
db = conn.getDB("admin"); | ||
db.createUser( | ||
{ | ||
user: "researchpacsroot", | ||
pwd: passwordPrompt(), // Or "<cleartext password>" | ||
roles: [{role:"root", db:"admin"}] | ||
} | ||
); | ||
|
||
conn.close(); | ||
quit(); |
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 @@ | ||
false |
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,62 @@ | ||
#!/bin/sh | ||
echo "Configuring Niffler" | ||
sudo chmod -R 777 . | ||
|
||
PIP=`head -n 1 init/pip.out` | ||
if [ "$PIP" = false ] ; then | ||
sudo yum install -y python3 | ||
echo "Installing pip" | ||
sudo yum install python3-pip | ||
pip install -r requirements.txt | ||
wget https://repo.anaconda.com/archive/Anaconda3-2020.11-Linux-x86_64.sh | ||
sh Anaconda3-2020.11-Linux-x86_64.sh -u | ||
source ~/.bashrc | ||
rm Anaconda3-2020.11-Linux-x86_64.sh | ||
echo "true" > init/pip.out | ||
fi | ||
|
||
MISC=`head -n 1 init/misc.out` | ||
if [ "$MISC" = false ] ; then | ||
echo "Installing gdcm and mail" | ||
conda install -c conda-forge -y gdcm | ||
sudo yum install mailx -y | ||
sudo yum install sendmail sendmail-cf | ||
chmod +x modules/meta-extraction/service/mdextractor.sh | ||
echo "Disable THP" | ||
sudo cp init/disable-thp.service /etc/systemd/system/disable-thp.service | ||
sudo systemctl daemon-reload | ||
sudo systemctl start disable-thp | ||
sudo systemctl enable disable-thp | ||
echo "true" > init/misc.out | ||
fi | ||
|
||
DCM4CHE=`head -n 1 init/dcm4che.out` | ||
if [ "$DCM4CHE" = false ] ; then | ||
echo "Installing JDK" | ||
sudo yum install java-1.8.0-openjdk-devel | ||
echo "Installing Maven" | ||
sudo dnf install maven | ||
echo "Installing DCM4CHE" | ||
cd .. | ||
wget https://sourceforge.net/projects/dcm4che/files/dcm4che3/5.22.5/dcm4che-5.22.5-bin.zip/download -O dcm4che-5.22.5-bin.zip | ||
unzip dcm4che-5.22.5-bin.zip | ||
rm dcm4che-5.22.5-bin.zip | ||
cd Niffler | ||
echo "true" > init/dcm4che.out | ||
fi | ||
|
||
MONGO=`head -n 1 init/mongo.out` | ||
if [ "$MONGO" = false ] ; then | ||
echo "Installing mongo" | ||
sudo cp init/mongodb-org-4.2.repo /etc/yum.repos.d/ | ||
sudo yum install mongodb-org | ||
sudo systemctl start mongod | ||
sudo systemctl enable mongod | ||
mongo init/mongoinit.js | ||
sudo cp modules/meta-extraction/service/mdextractor.service /etc/systemd/system/ | ||
sudo systemctl daemon-reload | ||
sudo systemctl start mdextractor.service | ||
sudo systemctl enable mdextractor.service | ||
echo "true" > init/mongo.out | ||
fi | ||
|
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
Oops, something went wrong.