Closed Retep1972 closed 4 years ago
@Retep1972 I came from Jitsi, because it imposes a huge load on older clients and has a poor perfomance on weaker client hardware. The BBB install went very smooth in less than 30 minutes on a private kvm-vserver that supports docker, but unfortunately our school vservers are not docker-compatible (running on virtzozzo), so for these cases there should really be a non-docker installation guide. virtuozzo supports docker on ubuntu 18.04, so perhaps the problem solves when BBB 2.3 is released. Actually I like BBB more than Jitsi... anyway, thanks for you posts above, I guess, I wouldn't have the system running without your posts!
@NaLiJa I had the same problem. My vserver only supports docker on Ubuntu 18.04. And the BBB installation is done very fast. The Greenlight stuff cost most of the time. So if you get it up and running in a production environment then I would like to know please. Then I will have a go at it again. Because I realy like the BBB features.
On my server the problem actually was that the .env wasn't loaded at all, [...] Then I installed https://github.com/rbenv/rbenv-vars and copied .env to .rbenv-vars, added RAILS_ENV=production to the file and restarted Rails. Now it seems to work properly.
We already moved to another conference software - out of interest I just tested your suggestion - it seems to work now in production environment.
@Retep1972 It is working on a production server now and first tests seem to confirm that all the features are working. At the moment it is still using the sqllite3 backend, at some point I should try to change this to postgresql. The rakes for user creation on the shell do not work, but I didn‘t have time yet to look after this. But since users can register normally through the website, this wasn‘t necessary anyway. Next week I will call in for two meetings with 20 people. Afterwards I will know more ;-)
@seteq Thanks for confirming! Yes, it looks promising on my server as well.
On Ubuntu 18.04
$ adduser gluser
( with gluser:x:1000:1000:gluser,,,:/home/gluser:/bin/bash
)
$ echo "gluser ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
$ echo "DenyUsers gluser postgres" >> /etc/ssh/sshd_config
$ systemctl restart sshd.service
$ apt-get update
$ apt-get update curl
$ curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
$ curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
$ echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
$ apt-get update
$ apt-get install apt-file git-core zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev software-properties-common libffi-dev nodejs yarn language-pack-en language-pack-fr
$ echo "deb http://apt.postgresql.org/pub/repos/apt/ bionic-pgdg main" > /etc/apt/sources.list.d/pgdg.list
$ wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
$ apt-get update
$ apt-get install postgresql-11 libpq-dev libapache2-mod-shib2 libapr1-dev libaprutil1-dev apache2-dev libapache2-mod-xsendfile libcurl-openssl1.0-dev
$ update-locale LANG=en_US.UTF-8
$ systemctl set-environment LANG=en_US.UTF-8
$ echo "export PATH=\"\$HOME/.rbenv/bin:\$PATH\"" >> /home/gluser/.bashrc
$ echo "eval \"\$(rbenv init -)\"" >> /home/gluser/.bashrc
$ echo "export PATH=\"\$HOME/.rbenv/plugins/ruby-build/bin:\$PATH\"" >> /home/gluser/.bashrc
$ systemctl stop postgresql.service
$ rm -Rf /var/lib/postgresql/11/main/*
$ /usr/lib/postgresql/11/bin/postgres -D /var/lib/postgresql/11/main -c config_file=/etc/postgresql/11/main/postgresql.conf
$ mkdir /var/lib/postgresql/11/main/tablespaces
$ chown postgres:postgres /var/lib/postgresql/11/main/tablespaces
$ chmod 1700 /var/lib/postgresql/11/main/tablespaces
$ systemctl start postgresql.service
$ su - postgres
$ psql
ALTER USER postgres with password 'xxx'; CREATE TABLESPACE gldbdata LOCATION '/var/lib/postgresql/11/main/tablespaces'; create database gldb tablespace gldbdata; CREATE ROLE gluser LOGIN password 'xxxxx'; ALTER DATABASE gldb OWNER TO gluser; \q
$ psql < /usr/share/postgresql/11/extension/adminpack--1.0.sql $ psql
create extension adminpack; \c gldb; CREATE SCHEMA AUTHORIZATION gluser; \q
$ exit
You can adapt /etc/postgresql/11/main/pg_hba.conf and /etc/postgresql/11/main/postgresql.conf by default it works
$ su - gluser $ git clone https://github.com/rbenv/rbenv.git ~/.rbenv $ exec $SHELL $ git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build $ exec $SHELL $ rbenv install 2.5.1 $ rbenv global 2.5.1 $ gem install bundler $ rbenv rehash $ git clone https://github.com/rbenv/rbenv-vars.git /home/gluser/.rbenv/plugins/rbenv-vars $ rbenv rehash $ exit $ mkdir -p /opt/bigbluebutton/greenlight $ chown -R gluser:www-data /opt/bigbluebutton $ cd /opt/bigbluebutton/greenlight $ su - gluser $ git clone git://github.com/bigbluebutton/greenlight.git /opt/bigbluebutton/greenlight/ $ bundle install $ bundle exec rake secret $ cp sample.env .rbenv-vars $ vim .rbenv-vars
edit the ENV vars
you must have this for the bdd:
DB_ADAPTER=postgresql DB_HOST=127.0.0.1 DB_NAME=gldb DB_USERNAME=gluser DB_PASSWORD=xxx
$ RAILS_ENV=production bundle exec rake db:migrate $ RAILS_ENV=production rake assets:precompile
to run rails manually
$ rails s -p 5000 -e production -b 127.0.0.1
or with systemd
$ vim /lib/systemd/system/greenlight.service
[Unit] Description=Greenlight Requires=network.target
[Service] Type=simple User=gluser Group=gluser WorkingDirectory=/opt/bigbluebutton/greenlight ExecStart=/home/gluser/.rbenv/shims/rails s -p 5000 -e production -b 127.0.0.1 TimeoutSec=30 RestartSec=15s Restart=always
[Install] WantedBy=multi-user.target
$ systemctl enable greenlight.service $ systemctl start greenlight.service
Last step apache2 - adapt with your conf you need certs from your/a CA
$ vim /etc/apache2/sites-enabled/gl.conf
<VirtualHost _default_:80>
ServerName x.x.x
ServerAlias x.
ErrorLog ${APACHE_LOG_DIR}/conf-error.log
CustomLog ${APACHE_LOG_DIR}/conf-access.log combined
RedirectMatch permanent "^(.)$" https://x.x.x$1
</VirtualHost>
<VirtualHost _default_:443>
ServerName x.x.x
ErrorLog ${APACHE_LOG_DIR}/conf-ssl-error.log
CustomLog ${APACHE_LOG_DIR}/conf-ssl-access.log combined
TransferLog ${APACHE_LOG_DIR}/conf-ssl-transfert.log
Include sites-enabled/ssl/gl_ssl.conf
SSLEngine on
SSLOptions +StrictRequire
SSLProxyEngine on
RequestHeader set X_FORWARDED_PROTO 'https'
ProxyPass / http://localhost:5000/
ProxyPassReverse / http://localhost:5000/
ProxyPreserveHost on
</VirtualHost>
$ systemctl enable apache2.service $ systemctl restart apache2.service
Regards ;)
Could somebody enlighten me about how and when the .rbenv-vars is read? Because, after I updated my greenlight to a more recent version, I noticed it ignores the settings I made there. I renamed the file to .env as this is what the manual says would be used, but with no success.
Yeah... so I dug into this and it figured I had to set up a ruby environment with rbenv etc. as described above. I'm not too happy about installing a specific ruby version which is end of life, not from the system package but required just to run a web service.
Anyway, checking the instructions line by line I came across the sudo entry: echo "gluser ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers`
I don't see why gluser should be allowed to do anything with root privileges...?
Also, the systemd file won't use gluser's rbenv. So, to use a newer version (of anything), I think a wrapper or something might be required. Maybe someone who understands ruby can shed some light on this? :)
@datenritter In fact, my wiki was the first version.
It is not necesseray to add an entry in the sudoers file.
the .rbenv-vars file is read with
$ git clone https://github.com/rbenv/rbenv-vars.git /home/gluser/.rbenv/plugins/rbenv-vars
$ rbenv rehash
and
vim ~/.bashrc
export LANG="en_US.UTF-8"
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"
For the service
vim /lib/systemd/system/greenlight.service
[Unit]
Description=Greenlight
Requires=network.target
[Service]
Type=simple
User=gluser
Group=gluser
WorkingDirectory=/opt/bigbluebutton/greenlight
ExecStart=/home/gluser/.rbenv/shims/rails s -p $port -e production -b 127.0.0.1
TimeoutSec=30
RestartSec=15s
Restart=always
[Install]
WantedBy=multi-user.target
You have to choose a port
@datenritter You can install the ruby version you want.
In my case, the last one in branch 2.7 ( 2.7.4 ) https://www.ruby-lang.org/en/downloads/releases/
I have a spare VPS which I wnat to setup for some schools to help them in these troubled times. Installation instructions for bbb are excelent! But my VPS Linux 16.04 does not support Docker, I would have to switch to Linux 18.04 but then bbb cannot be installed.
Is there any way to install Greenlight 2.0 without Docker? Al the google searches and answers end up at dead ends..