


CentOS 7にeラーニングプラットフォームのMoodle(ムードル)をインストールしてみました。
ムードル – Wikipedia
https://ja.wikipedia.org/wiki/ムードル
Moodle公式サイト
https://moodle.org/
一度もMoodleのインストール経験が無いのでドキュメントを漁ったのですが、これと言ったのが無くてその都度の試行錯誤になってしまいました。
取り敢えずこんなところから…
RedHat Linux installation
https://docs.moodle.org/29/en/RedHat_Linux_installation
- Apacheのインストール
- httpdの自動起動の設定
- Aliasの設定
- httpdの起動
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
[root@host01 ~]# yum info httpd 読み込んだプラグイン:fastestmirror Loading mirror speeds from cached hostfile * base: www.ftp.ne.jp * epel: ftp.tsukuba.wide.ad.jp * extras: www.ftp.ne.jp * remi-safe: remi.kazukioishi.net * updates: www.ftp.ne.jp 利用可能なパッケージ 名前 : httpd アーキテクチャー : x86_64 バージョン : 2.4.6 リリース : 31.el7.centos 容量 : 2.7 M リポジトリー : base/7/x86_64 要約 : Apache HTTP Server URL : http://httpd.apache.org/ ライセンス : ASL 2.0 説明 : The Apache HTTP Server is a powerful, efficient, and : extensible web server. [root@host01 ~]# yum -y install httpd 読み込んだプラグイン:fastestmirror Loading mirror speeds from cached hostfile * base: www.ftp.ne.jp * epel: ftp.kddilabs.jp * extras: www.ftp.ne.jp * remi-safe: mirrors.mediatemple.net * updates: www.ftp.ne.jp 依存性の解決をしています --> トランザクションの確認を実行しています。 ---> パッケージ httpd.x86_64 0:2.4.6-31.el7.centos を インストール --> 依存性の処理をしています: httpd-tools = 2.4.6-31.el7.centos のパッケージ: httpd-2.4.6-31.el7.centos.x86_64 --> 依存性の処理をしています: /etc/mime.types のパッケージ: httpd-2.4.6-31.el7.centos.x86_64 --> トランザクションの確認を実行しています。 ---> パッケージ httpd-tools.x86_64 0:2.4.6-31.el7.centos を インストール ---> パッケージ mailcap.noarch 0:2.1.41-2.el7 を インストール --> 依存性解決を終了しました。 依存性を解決しました ================================================================================ Package アーキテクチャー バージョン リポジトリー 容量 ================================================================================ インストール中: httpd x86_64 2.4.6-31.el7.centos base 2.7 M 依存性関連でのインストールをします: httpd-tools x86_64 2.4.6-31.el7.centos base 79 k mailcap noarch 2.1.41-2.el7 base 31 k トランザクションの要約 ================================================================================ インストール 1 パッケージ (+2 個の依存関係のパッケージ) 総ダウンロード容量: 2.8 M インストール容量: 9.6 M Downloading packages: (1/3): httpd-tools-2.4.6-31.el7.centos.x86_64.rpm | 79 kB 00:00 (2/3): mailcap-2.1.41-2.el7.noarch.rpm | 31 kB 00:00 (3/3): httpd-2.4.6-31.el7.centos.x86_64.rpm | 2.7 MB 00:00 -------------------------------------------------------------------------------- 合計 3.2 MB/s | 2.8 MB 00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction 警告: RPMDB は yum 以外で変更されました。 インストール中 : mailcap-2.1.41-2.el7.noarch 1/3 インストール中 : httpd-tools-2.4.6-31.el7.centos.x86_64 2/3 インストール中 : httpd-2.4.6-31.el7.centos.x86_64 3/3 検証中 : httpd-tools-2.4.6-31.el7.centos.x86_64 1/3 検証中 : mailcap-2.1.41-2.el7.noarch 2/3 検証中 : httpd-2.4.6-31.el7.centos.x86_64 3/3 インストール: httpd.x86_64 0:2.4.6-31.el7.centos 依存性関連をインストールしました: httpd-tools.x86_64 0:2.4.6-31.el7.centos mailcap.noarch 0:2.1.41-2.el7 完了しました! |
1 2 3 4 5 6 |
[root@host01 ~]# systemctl list-unit-files | grep httpd httpd.service disabled [root@host01 ~]# systemctl enable httpd ln -s '/usr/lib/systemd/system/httpd.service' '/etc/systemd/system/multi-user.target.wants/httpd.service' [root@host01 ~]# systemctl list-unit-files | grep httpd httpd.service enabled |
Moodleプログラムを/var/www/moodleに設置することにしてAlias設定を行います。
1 2 3 4 5 6 7 8 9 10 11 |
[root@host01 ~]# vi /etc/httpd/conf.d/moodle.conf [root@host01 ~]# cat /etc/httpd/conf.d/moodle.conf Alias /moodle/ "/var/www/moodle/" <Directory "/var/www/moodle"> DirectoryIndex index.php AcceptPathInfo on AllowOverride None Options None Order allow,deny Allow from all </Directory> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
[root@host01 ~]# systemctl start httpd [root@host01 ~]# systemctl status httpd httpd.service - The Apache HTTP Server Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled) Active: active (running) since 日 2015-06-21 16:53:30 JST; 4s ago Process: 23570 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=0/SUCCESS) Main PID: 23577 (httpd) Status: "Processing requests..." CGroup: /system.slice/httpd.service tq23577 /usr/sbin/httpd -DFOREGROUND tq23578 /usr/sbin/httpd -DFOREGROUND tq23579 /usr/sbin/httpd -DFOREGROUND tq23580 /usr/sbin/httpd -DFOREGROUND tq23581 /usr/sbin/httpd -DFOREGROUND mq23582 /usr/sbin/httpd -DFOREGROUND 6月 21 16:53:30 host01.rootlinks.net systemd[1]: Started The Apache HTTP Server. |
必要に応じて/etc/httpd/conf/httpd.conf等も設定して下さい。