Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # This scripts installs BigBlueButton on a clean Ubuntu Xenial instance
- # Check prerequisites and eventually install and reboot
- if [ -z "$(grep xenial /etc/lsb-release)" ]; then
- echo "This is only supported on Ubuntu 16.04 LTS clean installation"
- exit 1
- fi
- if [ -z "$(uname -r | grep 4.15)" ]; then
- wget -qO - https://www.mongodb.org/static/pgp/server-3.4.asc | sudo apt-key add -
- echo "deb [ arch=amd64,arm64 ] http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list
- echo "deb http://archive.ubuntu.com/ubuntu/ xenial multiverse" | sudo tee -a /etc/apt/sources.list
- add-apt-repository ppa:bigbluebutton/support -y
- add-apt-repository ppa:rmescandon/yq -y
- echo "deb https://ubuntu.bigbluebutton.org/xenial-220/ bigbluebutton-xenial main" | sudo tee /etc/apt/sources.list.d/bigbluebutton.list
- wget https://ubuntu.bigbluebutton.org/repo/bigbluebutton.asc -O- | sudo apt-key add -
- apt update
- apt dist-upgrade -y
- apt install -y --install-recommends linux-generic-hwe-16.04 haveged language-pack-en mongodb-org curl
- curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
- sudo apt-get install -y nodejs
- apt autoremove -y
- update-locale LANG=en_US.UTF-8
- systemctl set-environment LANG=en_US.UTF-8
- reboot
- fi
- # Get user input for instance configuration
- read -p "define an hostname (FQDN): " BBBHOSTNAME
- read -p "define an Administrator user (username): " BBBADMIN
- read -p "define an Administrator user (email address): " BBBMAIL
- read -p "define an Administrator password (will be echoed! watch your back!): " BBBPASS
- read -p "Do you want a Let's Encrypt certifcate (have you set a DNS entry and forwarded the right ports?) ? (y/n) " DNSFWOK
- if [ "$DNSFWOK" = "y" ]; then
- read -p "define an email address for Let's Encrypt (email address): " BBBLETSMAIL
- else
- echo "Going to provide an http only instance..."
- fi
- # Set hostname
- hostnamectl set-hostname $BBBHOSTNAME
- # Install bbb according to user inputs
- if [ ! -z "$BBBLETSMAIL" ]; then
- wget -qO- https://ubuntu.bigbluebutton.org/bbb-install.sh | bash -s -- -v xenial-220 -s $BBBHOSTNAME -e $BBBLETSMAIL -g
- else
- wget -qO- https://ubuntu.bigbluebutton.org/bbb-install.sh | bash -s -- -v xenial-220 -s $BBBHOSTNAME -g
- fi
- # Admin user creation
- cd ~/greenlight/
- docker exec greenlight-v2 bundle exec rake user:create["$BBBADMIN","$BBBMAIL","$BBBPASS","admin"]
- # Workaround to run the postgresql container at boot time
- sed -i 's#exit 0#docker-compose -f /root/greenlight/docker-compose.yml up -d#' /etc/rc.local
- echo "exit 0" >> /etc/rc.local
- # Enable Firewall Rules
- source /etc/bigbluebutton/bbb-conf/apply-lib.sh
- enableUFWRules
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement