Skip to content

Commit 12e649d

Browse files
committed
Updated moodle and slims
1 parent b95452e commit 12e649d

8 files changed

+375
-5
lines changed

moodle/moodle-cleanup.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ do
3838
fi
3939
done
4040

41-
sed -i "s/learning.testprojects.me/$dom/g" /etc/apache2/conf-enabled/moodle.conf
41+
sed -i "s/learning.testprojects.me/$dom/g" /etc/apache2/sites-available/moodle.conf
4242
sed -i "s|example.com/moodle|$dom|g" /var/www/html/config.php
4343

4444

@@ -59,7 +59,7 @@ apt-get -y autoremove >/dev/null 2>&1
5959
apt-get -y autoclean >/dev/null 2>&1
6060
rm -rf /root/.bashrc
6161
cp /etc/skel/.bashrc /root
62-
# rm -rf /opt/moodle
62+
rm -rf /opt/moodle
6363
cat /dev/null > /root/.bash_history
6464
unset HISTFILE
6565
history -c

moodle/moodle.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ title: Moodle
33
sidebar_label: Moodle
44
---
55

6-
|**`Version Latest` `OS Ubuntu` `Learning`**| |
7-
|-------------------------------------------------------|--|
6+
|**`Version Latest` `OS Ubuntu` `Content Management Systems`**| |
7+
|-------------------------------------------------------------|--|
88

99
### Description
1010

moodle/moodle.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@
223223
- name: Copy the moodle.conf from /usr/local/src/moodle to /etc/apache2/sites-available
224224
copy:
225225
src: moodle.conf
226-
dest: /etc/apache2/conf-enabled/
226+
dest: /etc/apache2/sites-available/
227227
remote_src: yes
228228

229229

slims/001-default.conf

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<VirtualHost *:80>
2+
ServerName your.domain.name
3+
DocumentRoot /var/www/html
4+
<Directory /var/www/html>
5+
Options Indexes FollowSymLinks MultiViews
6+
AllowOverride All
7+
Require all granted
8+
</Directory>
9+
ErrorLog /var/log/apache2/your.domain.name_error.log
10+
CustomLog /var/log/apache2/your.domain.name_requests.log combined
11+
</VirtualHost>

slims/slims-cleanup.sh

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
#!/bin/bash
2+
3+
RED='\033[1;31m'
4+
NC='\033[0m'
5+
6+
echo -e "${RED}
7+
################################################################################################################
8+
# Your MarketPlace App has been deployed successfully! #
9+
# Passwords are stored under /root/ #
10+
################################################################################################################
11+
${NC}"
12+
13+
echo
14+
echo -e "${RED}This message will be removed in the next login!${NC}"
15+
echo
16+
echo
17+
echo -e "${RED}The Mariadb root Password is $(cat /root/.mariadb_root_password)${NC}"
18+
echo
19+
echo
20+
echo -e "${RED}The slims user Password is $(cat /root/.mariadb_slims_password)${NC}"
21+
echo
22+
echo
23+
24+
25+
#To replace the Domain Name in the apache configuration
26+
a=0
27+
while [ $a -eq 0 ]
28+
do
29+
echo -e "${RED}To cancel setup, press Ctrl+C. This script will run again on your next login:${NC}"
30+
echo -e "${RED}Enter the domain name for your new Moodle site:${NC}"
31+
echo -e "${RED}(ex. example.org or test.example.org) do not include www or http/s:${NC}"
32+
read -p "Domain/Subdomain name: " dom
33+
if [ -z "$dom" ]
34+
then
35+
a=0
36+
echo -e "${RED}Please provide a valid domain or subdomain name to continue to press Ctrl+C to cancel${NC}"
37+
else
38+
a=1
39+
fi
40+
done
41+
42+
sed -i "s/your.domain.name/$dom/g" /etc/apache2/sites-available/001-default.conf
43+
44+
45+
# restart apache2 service
46+
systemctl restart apache2
47+
48+
49+
#Cleanup script
50+
rm -rf /usr/local/src/
51+
mkdir -p /usr/local/src/
52+
rm -rf /var/lib/cloud/instances/*
53+
rm -rf /var/lib/cloud/data/*
54+
find /var/log -mtime -1 -type f -exec truncate -s 0 {} \; >/dev/null 2>&1
55+
rm -rf /var/log/*.gz /var/log/*.[0-9] /var/log/*-????????
56+
cat /dev/null > /var/log/lastlog; cat /dev/null > /var/log/wtmp
57+
apt-get -y autoremove >/dev/null 2>&1
58+
apt-get -y autoclean >/dev/null 2>&1
59+
rm -rf /root/.bashrc
60+
cp /etc/skel/.bashrc /root
61+
rm -rf /opt/slims
62+
cat /dev/null > /root/.bash_history
63+
unset HISTFILE
64+
history -c

slims/slims.md

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
title: Slims
3+
sidebar_label: Slims
4+
---
5+
6+
|**`Version Latest` `OS Ubuntu 20.04` `Business Apps`**| |
7+
|------------------------------------------------------|--|
8+
9+
### Description
10+
11+
SLiMS is a comprehensive and actively developed web-based Open Source Software designed for library automation, catering to libraries of varying sizes and collections. It supports multi-platform functionality, running on systems that support PHP and MySQL. Developed using open-source software, SLiMS offers interactivity through AJAX technology and is licensed under GPLv3, ensuring freedom to modify and redistribute.
12+
13+
### Key Features of SLiMS include:
14+
15+
Online Public Access Catalog (OPAC) with thumbnail displays for book covers
16+
XML record format support for web services
17+
OAI-PMH data exchange
18+
RSS feeds
19+
Z39.50, SRU, and p2p services for copy-cataloging from different libraries
20+
Efficient data management to minimize bibliographic data repetition
21+
Management of master files for various reference data
22+
Circulation management including borrowing, returning, reserves, and lending rules
23+
Membership management with direct picture capture
24+
Collection inventory and reporting/statistics features
25+
Periodical management and support for multimedia and digital documents
26+
Multilingual support and interface options
27+
Support for parent catalog and federated search application
28+
Library visitor counter, member area, and notification systems
29+
LDAP server and a comprehensive system module with various utilities
30+
31+
32+
For detailed documentation, refer to subsequent chapters. Visit http://slims.web.id for demos and software downloads.
33+
34+
### Software Included
35+
36+
- Apache
37+
- Mysql
38+
- php 7.3
39+
- Slims
40+
41+
### Getting started after deploying SLiMS
42+
43+
44+
You can log into the instance as ubuntu using either the password you set when you created the instance or with an SSH key if you added one during creation.
45+
46+
You can then switch the user to root without a password by entering the following command, and note the credenatils
47+
48+
~~~
49+
sudo su -
50+
~~~
51+
52+
Upon logging in, please take note of the MariaDB passwords located in the root directory. Enter the domain name for configuration on Apache once the script finishes running. Access the domain through a browser. Test the database using the provided credentials, create the admin user, and initiate the installation process.
53+
54+
### Security Procedure
55+
56+
The "install" folder in your SLiMS directory already exists. For security purposes, kindly rename or delete it from your VM.

slims/slims.sh

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
3+
mkdir -p /usr/local/src/slims
4+
5+
cd /usr/local/src/slims && wget https://raw.githubusercontent.com/vigneshvrm/Workout/main/Marketplaceapps/slims/slims-cleanup.sh
6+
7+
cd /usr/local/src/slims && wget https://raw.githubusercontent.com/vigneshvrm/Workout/main/Marketplaceapps/slims/slims.yaml
8+
9+
cd /usr/local/src/slims && wget https://raw.githubusercontent.com/vigneshvrm/Workout/main/Marketplaceapps/slims/001-default.conf
10+

0 commit comments

Comments
 (0)