[[turboLinux_White Box Enterprise Linux_Fedora Core_Red Hat Memo]]
**Mconfインストール [#vc7e1f48]

RIGHT:更新日 &lastmod();

BigBlueButtonはユーザインターフェイスを別途作成する必要がある。別アプリから利用することを前提にしているため、BigBlueButtonとは別マシンubuntu12.04にフロントインターフェイスとしてMconfをインストールする。


**ubuntu12.04のインストール [#ya89b6ea]

64bit版のDisktopをインストール

**Mconfのインストール [#md372a3c]

以下のページにしたがってインストール

-http://code.google.com/p/mconf/wiki/MconfWebDeploymentManual

-http://code.google.com/p/mconf/wiki/MconfWebDeployment

***事前準備 [#d0fb623d]

ユーザはmconfを作成すればOKだが、初めてなのでokadaを作成してしまった。あとでmconfに変更する

''OSのUpdateと必要なPKGのインストール''

User okadaでlogin


 $ sudo apt-get update
 $ sudo apt-get install curl make git-core libruby aspell-es aspell-en libxml2-dev libxslt1-dev \ 
 libmagickcore-dev libmagickwand-dev imagemagick libmysqlclient-dev \ 
 mysql-server zlib1g-dev build-essential libreadline-dev nfs-common libcurl4-openssl-dev

''Rubyのインストール''

Ruby 1.9.2(p290)

 $ curl -L https://get.rvm.io | sudo bash -s stable --without-gems="bundler"
   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                  Dload  Upload   Total   Spent    Left  Speed
 100   185  100   185    0     0    134      0  0:00:01  0:00:01 --:--:--   341
 100 10598  100 10598    0     0   4322      0  0:00:02  0:00:02 --:--:-- 12823
 Installing RVM without gems: bundler.

''mconfユーザを作成''

 $ sudo adduser mconf --gid 1001

 $ logout

 &color(red){''mconfでlogin(必ず必要)''}

 $ rvm requirements
 
 Requirements for Linux "Ubuntu 12.04.1 LTS"
 
 NOTE: 'ruby' represents Matz's Ruby Interpreter (MRI) (1.8.X, 1.9.X)
              This is the *original* / standard Ruby Language Interpreter
       'ree'  represents Ruby Enterprise Edition
       'rbx'  represents Rubinius
 
 bash >= 4.1 required
 curl is required
 (略)
 # For Opal, install the following:
   opal: /usr/bin/apt-get install nodejs npm

 $ rvm install 1.9.2-p290
 
 # For Opal, install the following:
  opal: /usr/bin/apt-get install nodejs npm
 
 Press 'q' to continue.
 qを入力
 (略)
 Saving wrappers to '/usr/local/rvm/bin'.
 ruby-1.9.2-p290 - #adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
 ruby-1.9.2-p290 - #importing default gemsets (/usr/local/rvm/gemsets/), this may take time ...
 Install of ruby-1.9.2-p290 - #complete
 
 $ rvm gemset create mconf
 gemset created mconf    => /usr/local/rvm/gems/ruby-1.9.2-p290@mconf

 $ rvm use --default 1.9.2-p290@mconf
 Using /usr/local/rvm/gems/ruby-1.9.2-p290 with gemset mconf

 $ rvm use 1.9.2-p290@global
 Using /usr/local/rvm/gems/ruby-1.9.2-p290 with gemset global

 $ gem install bundler -v 1.0.18
 Fetching: bundler-1.0.18.gem (100%)
 Successfully installed bundler-1.0.18
 1 gem installed
 Installing ri documentation for bundler-1.0.18...
 Installing RDoc documentation for bundler-1.0.18...


***アプリのDownload [#g800f1aa]

 $ mkdir -p ~/mconf-web/current/

 $ git clone git://github.com/mconf/mconf-web.git ~/mconf-web/current/
 Cloning into '/home/mconf/mconf-web/current'...
 remote: Counting objects: 55819, done.
 remote: Compressing objects: 100% (15747/15747), done.
 remote: Total 55819 (delta 39024), reused 55464 (delta 38774)
 Receiving objects: 100% (55819/55819), 71.79 MiB | 8.24 MiB/s, done.
 Resolving deltas: 100% (39024/39024), done.


 cd ~/mconf-web/current
 ==============================================================================
 = NOTICE                                                                     =
 ==============================================================================
 = RVM has encountered a new or modified .rvmrc file in the current directory =
 = This is a shell script and therefore may contain any shell commands.       =
 =                                                                            =
 = Examine the contents of this file carefully to be sure the contents are    =
 = safe before trusting it! ( Choose v[iew] below to view the contents )      =
 ==============================================================================
 Do you wish to trust this .rvmrc file? (/home/mconf/mconf-web/current/.rvmrc)
 y[es], n[o], v[iew], c[ancel]> yes <=yesを入力
 Using /usr/local/rvm/gems/ruby-1.9.2-p290 with gemset mconf


 $ git checkout v0.7
 Note: checking out 'v0.7'.
 
 You are in 'detached HEAD' state. You can look around, make experimental
 changes and commit them, and you can discard any commits you make in this
 state without impacting any branches by performing another checkout.
 
 If you want to create a new branch to retain commits you create, you may
 do so (now or later) by using -b with the checkout command again. Example:
 
   git checkout -b new_branch_name
 
 HEAD is now at 4796b04... Logrotate's read path to mconf-web/current
 
 
 git checkout v0.7
 Note: checking out 'v0.7'.
 
 You are in 'detached HEAD' state. You can look around, make experimental
 changes and commit them, and you can discard any commits you make in this
 state without impacting any branches by performing another checkout.
 
 If you want to create a new branch to retain commits you create, you may
 do so (now or later) by using -b with the checkout command again. Example:
 
   git checkout -b new_branch_name
 
 HEAD is now at 4796b04... Logrotate's read path to mconf-web/current

 $ git checkout latest
 Previous HEAD position was 4796b04... Logrotate's read path to mconf-web/current
 Branch latest set up to track remote branch latest from origin.
 Switched to a new branch 'latest'


 $ git submodule init
 Submodule 'vendor/plugins/station' (git://github.com/mconf/station.git) registe red for path 'vendor/plugins/station'

 $ git submodule update
 Cloning into 'vendor/plugins/station'...
 remote: Counting objects: 8392, done.
 remote: Compressing objects: 100% (2888/2888), done.
 remote: Total 8392 (delta 5531), reused 8031 (delta 5250)
 Receiving objects: 100% (8392/8392), 1.67 MiB | 1008 KiB/s, done.
 Resolving deltas: 100% (5531/5531), done.
 Submodule path 'vendor/plugins/station': checked out '2ed39d1c2115f896666fbfafc5f2d727f947a00e'

 $ bundle install --without=development test
 Fetching git://github.com/mconf/permalink_fu.git
 remote: Counting objects: 377, done.
 remote: Compressing objects: 100% (256/256), done.
 remote: Total 377 (delta 88), reused 362 (delta 78)
 Receiving objects: 100% (377/377), 118.43 KiB | 132 KiB/s, done.
 Resolving deltas: 100% (88/88), done.
 (略)
 
 Installing vpim (0.695)
 Installing whenever (0.7.2)
 Installing will_paginate (3.0.pre2)
 Installing yaml_db (0.2.1)
 Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.


 $ cp ~/mconf-web/current/config/setup_conf.yml.example ~/mconf-web/current/config/setup_conf.yml
 $ cp ~/mconf-web/current/config/database.yml.example ~/mconf-web/current/config/database.yml

***DB(MySQL)の設定 [#l592f9ab]


''database.yml''

password: ***** 3箇所変更

production:の
  username: root                       # MySQL database user
  password: ********                   # MySQL database password

rootでないとDBのドロップ作成ができない?
またはできるユーザを作成

 $ mysqladmin -u root -p create mconf_production

 $ mysql -u root -p
 
 mysql> CREATE USER "mconf"@"localhost" IDENTIFIED BY "*****";
 mysql> GRANT ALL PRIVILEGES ON mconf_production.* TO "mconf"@"localhost" IDENTI FIED BY "******";
 mysql> FLUSH PRIVILEGES;


 $ cd ~/mconf-web/current

MySQLで全て可能ユーザにしないと以下のようなエラーが出るので、今回はとりあえず''database.yml''のproduction:をrootにした

 $ bundle exec rake setup:db RAILS_ENV=production
 (in /home/mconf/mconf-web/current)
  
 Running setup for the environment: production
 
 * Running the task: db:drop
 Couldn't drop mconf_production : #<TypeError: can't convert Fixnum into String>
 * Running the task: db:create
 rake aborted!
 can't convert Fixnum into String
 
 (See full trace by running task with --trace)


再度実行

 $ bundle exec rake secret RAILS_ENV=production
 (in /home/mconf/mconf-web/current)
 73994750e07ee2634a9287aa8107ef65ccb3a7ef0ded55ad3c3d38b1d4e56eaeb30ca481f802755 090ce067d5abefabf58ef48579e32e6d231e162bfacc8520c


***Web Sever [#wf8e77ea]

MconfはApacheで実行

 $ gem install passenger -v 3.0.11
 Successfully installed passenger-3.0.11
 1 gem installed
 Installing ri documentation for passenger-3.0.11...
 Installing RDoc documentation for passenger-3.0.11...


 $ passenger-install-apache2-module
 Welcome to the Phusion Passenger Apache 2 module installer, v3.0.11.
 
 This installer will guide you through the entire installation process. It
 shouldn't take more than 3 minutes in total.
 
 Here's what you can expect from the installation process:

  1. The Apache 2 module will be installed for you.
  2. You'll learn how to configure Apache.
  3. You'll learn how to deploy a Ruby on Rails application.
 
 Don't worry if anything goes wrong. This installer will advise you on how to
 solve any problems.
 
 Press Enter to continue, or Ctrl-C to abort.
 
 
 --------------------------------------------
 
 Checking for required software...
 
  * GNU C++ compiler... found at /usr/bin/g++
  * Curl development headers with SSL support... found
  * OpenSSL development headers... found
  * Zlib development headers... found
  * Ruby development headers... found
  * OpenSSL support for Ruby... found
  * RubyGems... found
  * Rake... found at /usr/local/rvm/wrappers/ruby-1.9.2-p290@mconf/rake
  * rack... found
  * Apache 2... not found
  * Apache 2 development headers... not found
  * Apache Portable Runtime (APR) development headers... not found
  * Apache Portable Runtime Utility (APU) development headers... not found
 
 Some required software is not installed.
 But don't worry, this installer will tell you how to install them.
 
 Press Enter to continue, or Ctrl-C to abort.

一度停止

Ctrl-Cを入力



 ******************************************************************
 以下をインストールすると not foundが消え、インストールが始まる
 $ sudo apt-get install apache2
 $ sudo apt-get install apache2-prefork-dev
 ******************************************************************

 --------------------------------------------
 The Apache 2 module was successfully installed.
 
 Please edit your Apache configuration file, and add these lines:
 
    LoadModule passenger_module /usr/local/rvm/gems/ruby-1.9.2-p290@mconf/gems/passenger-3.0.11/ext/apache2/mod_passenger.so
    PassengerRoot /usr/local/rvm/gems/ruby-1.9.2-p290@mconf/gems/passenger-3.0.11
    PassengerRuby /usr/local/rvm/wrappers/ruby-1.9.2-p290@mconf/ruby
 
 After you restart Apache, you are ready to deploy any number of Ruby on Rails
 applications on Apache, without any further Ruby on Rails-specific
 configuration!
 
 Press ENTER to continue.
 
 --------------------------------------------
 Deploying a Ruby on Rails application: an example
 
 Suppose you have a Rails application in /somewhere. Add a virtual host to your
 Apache configuration file and set its DocumentRoot to /somewhere/public:
 
    <VirtualHost *:80>
       ServerName www.yourhost.com
       DocumentRoot /somewhere/public    # <-- be sure to point to 'public'!
       <Directory /somewhere/public>
          AllowOverride all              # <-- relax Apache security settings
          Options -MultiViews            # <-- MultiViews must be turned off
       </Directory>
    </VirtualHost>
 
 And that's it! You may also want to check the Users Guide for security and
 optimization tips, troubleshooting and other useful information:
 
   /usr/local/rvm/gems/ruby-1.9.2-p290@mconf/gems/passenger-3.0.11/doc/Users guide Apache.html
 
 Enjoy Phusion Passenger, a product of Phusion (www.phusion.nl) :-)
 http://www.modrails.com/
 
 Phusion Passenger is a trademark of Hongli Lai & Ninh Bui.



 $ passenger-install-apache2-module --snippet | sudo tee /etc/apache2/conf.d/mconf-passenger
 [sudo] password for mconf:
 LoadModule passenger_module /usr/local/rvm/gems/ruby-1.9.2-p290@mconf/gems/passenger-3.0.11/ext/apache2/mod_passenger.so
 PassengerRoot /usr/local/rvm/gems/ruby-1.9.2-p290@mconf/gems/passenger-3.0.11
 PassengerRuby /usr/local/rvm/wrappers/ruby-1.9.2-p290@mconf/ruby

 $ sudo a2enmod rewrite
 Enabling module rewrite.
 To activate the new configuration, you need to run:
   service apache2 restart

メモ(元からあったリンク)

000-default -> ../sites-available/default

 $ sudo rm /etc/apache2/sites-enabled/*


 $ sudo curl https://raw.github.com/mconf/mconf-web/latest/config/webserver/apache2.example -o /etc/apache2/sites-available/mconf-web  % Total    % Received % X ferd  Average Speed   Time    Time     Time  Current
                                  Dload  Upload   Total   Spent    Left  Speed
 100   506  100   506    0     0    609      0 --:--:-- --:--:-- --:--:--  1063
 

以下を編集

''/etc/apache2/sites-available/mconf-web''

 <VirtualHost *:80>
 
   # Shows the maintenance page if it exists
   ErrorDocument 503 /system/maintenance.html
   RewriteEngine On
   RewriteCond %{REQUEST_URI} !\.(css|gif|jpg|png)$
   RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f
   RewriteCond %{SCRIPT_FILENAME} !maintenance.html
   RewriteRule ^.*$  -  [redirect=503,last]
 
   ServerName 10.99.99.64
   DocumentRoot /home/mconf/mconf-web/current/public
   <Directory /home/mconf/mconf-web/current/public>
     AllowOverride all
     Options -MultiViews
   </Directory>
 </VirtualHost>


 $ sudo a2ensite mconf-web
 [sudo] password for mconf:
 Enabling site mconf-web.
 To activate the new configuration, you need to run:
   service apache2 reload

 $ sudo service apache2 restart
  * Restarting web server apache2                                                          apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
  ... waiting apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
                                                                                    [ OK ]
 
 
 God:

 $ cd ~/mconf-web/current 
 $ gem install god -v 0.12.1
 Building native extensions.  This could take a while...
 Successfully installed god-0.12.1
 1 gem installed
 Installing ri documentation for god-0.12.1...
 Installing RDoc documentation for god-0.12.1...


 $ rvm wrapper 1.9.2-p290@mconf bootup god
 Saving wrappers to '/usr/local/rvm/bin'.

 $ sudo mkdir -p /etc/god/conf.d/
 $ sudo curl https://raw.github.com/mconf/mconf-web/latest/config/god/config -o /etc/god/config
   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                  Dload  Upload   Total   Spent    Left  Speed
 100   107  100   107    0     0    133      0 --:--:-- --:--:-- --:--:--   192
 

 $ sudo curl https://raw.github.com/mconf/mconf-web/latest/config/god/delayed_job.god -o /etc/god/conf.d/delayed_job.god
   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                  Dload  Upload   Total   Spent    Left  Speed
 100  1864  100  1864    0     0   2302      0 --:--:-- --:--:-- --:--:--  3264
 


 $ sudo sed -i "s:^RAILS_ROOT =.*:RAILS_ROOT = \"/home/mconf/mconf-web/current\":g" /etc/god/conf.d/delayed_job.god


 $ sudo curl https://raw.github.com/mconf/mconf-web/latest/config/god/init_script -o /etc/init.d/god
   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                  Dload  Upload   Total   Spent    Left  Speed
 100  1455  100  1455    0     0   1790      0 --:--:-- --:--:-- --:--:--  2740


 $ sudo chmod a+x /etc/init.d/god
 $ sudo update-rc.d god defaults
  Adding system startup for /etc/init.d/god ...
    /etc/rc0.d/K20god -> ../init.d/god
    /etc/rc1.d/K20god -> ../init.d/god
    /etc/rc6.d/K20god -> ../init.d/god
    /etc/rc2.d/S20god -> ../init.d/god
    /etc/rc3.d/S20god -> ../init.d/god
    /etc/rc4.d/S20god -> ../init.d/god
    /etc/rc5.d/S20god -> ../init.d/god


''/etc/god/conf.d/delayed_job.god''

     w.pid_file = "#{RAILS_ROOT}/tmp/pids/delayed_job.#{num}.pid"
     w.uid = 'mconf'
 #    w.gid = 'mconf'
     w.gid = 'rvm'


 $ cd ~/mconf-web/current
 $ bundle exec whenever --update-crontab RAILS_ENV=production



 $ sudo curl https://raw.github.com/mconf/mconf-web/latest/config/logrotate/mconf-web -o /etc/logrotate.d/mconf-web
   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                  Dload  Upload   Total   Spent    Left  Speed
 100   374  100   374    0     0    398      0 --:--:-- --:--:-- --:--:--   593


 $ sudo chown root:root /etc/logrotate.d/mconf-web
 $ sudo chmod 644 /etc/logrotate.d/mconf-web
 $ sudo logrotate -s /var/lib/logrotate/status /etc/logrotate.d/mconf-web


 $ sudo service apache2 restart
  * Restarting web server apache2                                                           apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
  ... waiting apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
                                                                                    [ OK ]

 $ sudo /etc/init.d/god terminate
 Stopped all watches
 Stopped god
 god.

 $ sudo /etc/init.d/god start
 Starting god: god.

**ユーザ登録のためメールシステムをインストール [#qdcc36d5]

mail

 $ sudo apt-get install mailutils


**Mconfの設定(Web) [#v63b6c8c]

以下のURLからIDパスワードでloginし、上の「Manage」から「SITE」情報と「BIGBLUEBUTTON」情報をいれる

 URL http://10.99.99.63/

 ID admin
 PAss admin

***Web上から設定 [#se813489]

-Manage -> SITE
 

&ref("./mconf1.png");


-Manage -> BIGBLUEBUTTON

&ref("./mconf2.png");


***使用方法 [#r590d3ae]

後はURLにアクセスしてRegisterでとりあえず登録。~
Emailがくるのでアクセスして完了する



***BBBのアクセスURL [#g1451163]

bigbluebutton://(サーバIP)/bigbluebutton/api/join?meetingID=ISM2-6697&password=11&fullName=okada&checksum=9258b4eac38c1a02c5d850300de8227210b**** 

のようにbigbluebutton://はAndroid(BBB-Android)で http://に変更すればPCWebになる



トップ   編集 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS