Advertisement
penzoiders

Install BigBlueButton on a clean Ubuntu 16.04 LTS

Mar 10th, 2020
1,804
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.68 KB | None | 0 0
  1. #!/bin/bash
  2. # This scripts installs BigBlueButton on a clean Ubuntu Xenial instance
  3.  
  4. # Check prerequisites and eventually install and reboot
  5. if [ -z "$(grep xenial /etc/lsb-release)" ]; then
  6.     echo "This is only supported on Ubuntu 16.04 LTS clean installation"
  7.     exit 1
  8. fi
  9. if [ -z "$(uname -r | grep 4.15)" ]; then
  10.     wget -qO - https://www.mongodb.org/static/pgp/server-3.4.asc | sudo apt-key add -
  11.     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
  12.     echo "deb http://archive.ubuntu.com/ubuntu/ xenial multiverse" | sudo tee -a /etc/apt/sources.list
  13.     add-apt-repository ppa:bigbluebutton/support -y
  14.     add-apt-repository ppa:rmescandon/yq -y
  15.     echo "deb https://ubuntu.bigbluebutton.org/xenial-220/ bigbluebutton-xenial main" | sudo tee /etc/apt/sources.list.d/bigbluebutton.list
  16.     wget https://ubuntu.bigbluebutton.org/repo/bigbluebutton.asc -O- | sudo apt-key add -
  17.     apt update
  18.     apt dist-upgrade -y
  19.     apt install -y --install-recommends linux-generic-hwe-16.04 haveged language-pack-en mongodb-org curl
  20.     curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
  21. sudo apt-get install -y nodejs
  22.     apt autoremove -y
  23.     update-locale LANG=en_US.UTF-8
  24.     systemctl set-environment LANG=en_US.UTF-8
  25.     reboot
  26. fi
  27.  
  28. # Get user input for instance configuration
  29. read -p "define an hostname (FQDN): " BBBHOSTNAME
  30. read -p "define an Administrator user (username): " BBBADMIN
  31. read -p "define an Administrator user (email address): " BBBMAIL
  32. read -p "define an Administrator password (will be echoed! watch your back!): " BBBPASS
  33.  
  34. read -p "Do you want a Let's Encrypt certifcate (have you set a DNS entry and forwarded the right ports?) ? (y/n) " DNSFWOK
  35. if [ "$DNSFWOK" = "y" ]; then
  36.     read -p  "define an email address for Let's Encrypt (email address): " BBBLETSMAIL
  37. else
  38.     echo "Going to provide an http only instance..."
  39. fi
  40.  
  41. # Set hostname
  42. hostnamectl set-hostname $BBBHOSTNAME
  43.  
  44. # Install bbb according to user inputs
  45. if [ ! -z "$BBBLETSMAIL" ]; then
  46.     wget -qO- https://ubuntu.bigbluebutton.org/bbb-install.sh | bash -s -- -v xenial-220 -s $BBBHOSTNAME -e $BBBLETSMAIL -g
  47. else
  48.     wget -qO- https://ubuntu.bigbluebutton.org/bbb-install.sh | bash -s -- -v xenial-220 -s $BBBHOSTNAME -g
  49. fi
  50.  
  51. # Admin user creation
  52. cd ~/greenlight/
  53. docker exec greenlight-v2 bundle exec rake user:create["$BBBADMIN","$BBBMAIL","$BBBPASS","admin"]
  54.  
  55. # Workaround to run the postgresql container at boot time
  56. sed -i 's#exit 0#docker-compose -f /root/greenlight/docker-compose.yml up -d#' /etc/rc.local
  57. echo "exit 0" >> /etc/rc.local
  58.  
  59. # Enable Firewall Rules
  60. source /etc/bigbluebutton/bbb-conf/apply-lib.sh
  61. enableUFWRules
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement