个人工具
119.28.94.63
该IP地址的讨论
登录
查看“UbuntuHelp:MoodleZope”的源代码 - Ubuntu中文
UbuntuHelp
讨论
查看源代码
历史
搜索
导航
首页
最近更改
随机页面
页面分类
帮助
编辑
编辑指南
沙盒
新闻动态
字词处理
工具
链入页面
相关更改
特殊页面
页面信息
查看“UbuntuHelp:MoodleZope”的源代码
来自Ubuntu中文
←
UbuntuHelp:MoodleZope
跳转至:
导航
,
搜索
因为以下原因,你没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
{{From|https://help.ubuntu.com/community/MoodleZope}} {{Languages|UbuntuHelp:MoodleZope}} == Goal == To run moodle (http://moodle.org/) and zope2.7 (http://www.zope.org/) on port 80 of our school computer science web server (http://linus.yhspatriot.net). We are behind a firewall with only port 80 open, so I needed to setup virtual hosting with apache2 to make this work. I wanted linus.yhspatriot.net to point to a zope2.7 instance, and moodle.yhspatriot.net to point to a moodle instance. I found it convenient to have mysql.yhspatriot.net point to mysql-admin as well. == Setting up the server == <ol><li>install ubuntu 5.04 server </li><li>edit <code><nowiki>/etc/network/interfaces</nowiki></code> for static ip address by changing the primary interface to:</li></ol> <pre><nowiki> # The primary network interface iface eth0 inet static address 158.59.195.113 netmask 255.255.252.0 gateway 158.59.192.1 </nowiki></pre> <ol><li>edit <code><nowiki>/etc/apt/sources.list</nowiki></code> removing cdrom source at top and uncommenting universe sources </li><li>do the apt-get dance (<code><nowiki>apt-get update</nowiki></code> and <code><nowiki>apt-get upgrade</nowiki></code>) </li><li>install the following using apt-get:</li></ol> * ssh * zip and unzip * apache2 * mysql-server * phpmyadmin == Configuring mysql == <ol><li>Point a web brower at <code><nowiki>http://158.59.195.113/phpmyadmin/</nowiki></code> </li><li>By default, username <code><nowiki>root</nowiki></code> with no password is enabled </li><li>Login, click on "Change password", and change the password </li><li>Click "Databases", fill-in "Create new database" with <code><nowiki>moodle</nowiki></code> and click "Create" </li><li>Click "Privileges" then "Add a new User" </li><li>Add user <code><nowiki>moodle</nowiki></code> with all "Data" and "Structure" privileges checked</li></ol> == Configuring Apache Modules == * As root, run the following: <code><nowiki>ln -s /etc/apache2/mods-available/proxy.conf /etc/apache2/mods-enabled/proxy.conf</nowiki></code> * Repeat with <code><nowiki>proxy_connect.load</nowiki></code> and <code><nowiki>proxy.load</nowiki></code> == Configuring virtual hosts == <ol><li>Edit <code><nowiki>/etc/apache2/apache2.conf</nowiki></code>, adding a <code><nowiki>NameVirtualHost</nowiki></code> line, so that the last three lines of the file look like this: <pre><nowiki> # Include the virtual host configurations NameVirtualHost 158.59.195.113:80 Include /etc/apache2/sites-enabled/[^.#]* </nowiki></pre> </li><li>Create a file named azi.conf in /etc/apache2/sites-available with the following: <pre><nowiki> <VirtualHost 158.59.195.113:80> ServerName linus.yhspatriot.net ServerAdmin jeff@elkner.net ProxyRequests off <Proxy *> Order deny,allow Allow from all </Proxy> ProxyPass / http://158.59.195.113:8080/ ProxyPassReverse / http://158.59.195.113:8080/ ProxyPass /misc_ http://158.59.195.113:8080/misc_ ProxyPassReverse /misc_ http://158.59.195.113:8080/misc_ ProxyPass /p_ http://158.59.195.113:8080/p_ ProxyPassReverse /p_ http://158.59.195.113:8080/p_ </VirtualHost> <VirtualHost 158.59.195.113:80> ServerName mysql.yhspatriot.net ServerAdmin jeff@elkner.net ProxyRequests off <Proxy *> Order deny,allow Allow from all </Proxy> DocumentRoot /var/www/phpmyadmin/ Options +FollowSymLinks <IfModule mod_php4.c> php_flag magic_quotes_gpc On php_flag magic_quotes_runtime Off php_flag file_uploads On php_flag short_open_tag On php_flag session.auto_start Off php_flag session.bug_compat_warn Off php_value upload_max_filesize 2M php_value post_max_size 2M </IfModule> <IfModule mod_dir.c> DirectoryIndex index.php </IfModule> </VirtualHost> <VirtualHost 158.59.195.113:80> ServerName moodle.yhspatriot.net ServerAdmin jeff@elkner.net ProxyRequests off <Proxy *> Order deny,allow Allow from all </Proxy> DocumentRoot /var/www/moodle/ Options +FollowSymLinks <IfModule mod_php4.c> php_flag magic_quotes_gpc On php_flag magic_quotes_runtime Off php_flag file_uploads On php_flag short_open_tag On php_flag session.auto_start Off php_flag session.bug_compat_warn Off php_value upload_max_filesize 2M php_value post_max_size 2M </IfModule> <IfModule mod_dir.c> DirectoryIndex index.php </IfModule> </VirtualHost></nowiki></pre> </li><li>create a sym-link in sites-enabled:</li></ol> <code><nowiki>ln -s /etc/apache2/sites-available/azi.conf /etc/apache2/sites-enabled/azi.conf</nowiki></code> == Installing moodle == My goal was to use packages from the ubuntu and universe repositories whenever possible, but the after several unsuccessful attempts to use the moodle package I found it much easier to install moodle from source, using the following proceedure: <ol><li>Download the latest moodle source</li></ol> (<code><nowiki>wget http://download.moodle.org/stable15/moodle-1.5.2.tgz</nowiki></code> worked at the time this was written <ol><li>Untar it in <code><nowiki>/var/www</nowiki></code> </li><li>Point a web browser at <code><nowiki>http://158.59.195.113/moodle</nowiki></code> </li><li>Run through all the setup pages:</li></ol> * use <code><nowiki>/var/moodledata</nowiki></code> for data directory (as root): <ol><li><code><nowiki>mkdir /var/moodledata</nowiki></code> </li><li><code><nowiki>chown www-data.www-data /var/moodledata</nowiki></code></li></ol> == Installing zope2.7 == As root: <ol><li><code><nowiki>apt-get install zope2.7</nowiki></code> </li><li><code><nowiki>apt-get install zope-zwiki</nowiki></code> </li><li><code><nowiki>mkzope2.7instance</nowiki></code> </li><li>edit <code><nowiki>/var/lib/zope2.7/instance/linus/etc/zope.conf</nowiki></code> changing <code><nowiki>http-server</nowiki></code> port to 8080</li></ol> Now log into your zope instance and create a <code><nowiki>SiteRoot</nowiki></code>, setting the <code><nowiki>Base</nowiki></code> to <code><nowiki>http://linus.yhspatriot.net</nowiki></code> and the <code><nowiki>Path</nowiki></code> to <code><nowiki>/</nowiki></code>. ---- [[category:UbuntuHelp]]
该页面使用的模板:
模板:From
(
查看源代码
)
模板:Languages
(
查看源代码
)(受保护)
模板:Languages/Lang
(
查看源代码
)(受保护)
返回至
UbuntuHelp:MoodleZope
。