These are instructions for installing on Windows 7 desktop (they may also be useful for a server install with some thought to security) using individual components rather than a one click installer. This is intended only as a testing/evaluation install via 'localhost'. Proper server configuration and security is not considered.

NOTE: This assumes that you are comfortable with administering a Windows system and can use the command line. I never use Windows and I managed, but this may not be the quickest or most efficient way to do things. Make sure your Windows installation is in good shape, you clear out all the junk and stuff making it run slower (because installing all this server software certainly isn't going to make it run faster!) and that you have installed any outstanding updates.

ANOTHER NOTE: Watch out for the irritating "Do you want this program to get control of your computer" window that comes up at various stages. Sometimes it didn't appear but you do see a shield dimly flashing in the task bar. Click and say yes.

Step 1: Install MySQL

  • Install the MySQL database server on your PC. We will do this using the 'MSI' one-click installer for Windows. Go to http://dev.mysql.com/downloads/ and download the 'MySQL Installer for Windows'. At the time of writing this was from a very obvious graphic at the top of the screen (which I missed the first time).
  • Run the installation. Click...
    • Install MySQL products
    • Accept the license
    • Allow the version check (optional)
    • At 'Choose a Setup Type' accept the "Developer Default" and click Next
    • A number of downloads of required software may be identified. Click Execute and follow onscreen instructions to install them.
    • At 'Installation progress' screen, hit Execute - the MySQL software will be installed
    • At 'Configuration overview' hit Next to go to the basic configuration screen.
    • Accept all the defaults on the 'MySQL Server Configuration' and hit Next.
    • On the password screen, supply a password for the 'root' (main administrator) user. Make sure it's one you won't forget. You can also create a 'User' account just for Moodle with more restricted access if you like. This would be good practice on a public server but just using the 'root' user will suffice for testing.
    • On the Service details page, accept the defaults and hit Next and then Next a couple more times for the configuration progress.
    • Click Finish. Job done.
  • MySQL Workbench will open. Under Server Administration (right hand column, double click 'Local MySQL56' (or whatever you called it). A box should pop up asking for the root password. Enter the password you supplied
  • The server management screen should appear. You don't have to worry too much about this. It just shows the install is working.

Step 2: Install Apache

  • Install the Apache web server on your PC. Go to http://www.apachelounge.com/download/. Scroll down the page until you find the download for the 'Apache 2.4 win32 binaries' and download. You need to be careful that the module dll in PHP matches the version of Apache you install. Apache won't load otherwise.
  • Unzip the file into C:\. You should end up with a directory 'Apache24' (or whatever the latest version is).
  • Find Start > All programs > Accessories > Command Prompt...... BUT, right click, and select 'Run as administrator'.
  • Enter the following commands
  1. cd \Apache24\bin
  2. httpd -k install
  3. httpd -k start

...you may well get a warning about the server name. Don't worry about it. Don't close this window, you will need it again in a minute.

  • To test it worked type 'http://localhost' into your browser. You should get a screen up to the effect that Apache is installed and working.

Step 3: Install PHP

  • Now install the PHP scripting language on your PC. Go to http://www.php.net/download. In the current stable release section click on link for Windows 5.x.x binaries and source. Scroll down to the newest 'Zip' for VC11 x86 Thread Safe (non thread safe doesn't have the Apache dll) PHP (again, the newest versions of PHP didn't have this but it shouldn't matter) and download. *Don't* be tempted to use the Microsoft Installer version; it won't work.
  • Open the zip file and extract to C:\PHP\

Step 4: Configure Apache and PHP

You now need to edit Apache's httpd.conf file. In the file explorer navigate to C:\Apache24\conf\httpd.conf. Open it in Notepad . At the end of this file (or wherever you like if you want to be more organised) add the following lines:

  1. LoadModule php5_module "C:/PHP/php5apache2_4.dll"
  2. AddHandler application/x-httpd-php .php
  3. PHPIniDir C:/PHP

The version of the module file matters (2_4 in this case). It MUST match the Apache version installed.

In the same file. Search for the line starting DirectoryIndex. Change it as follows

  1. DirectoryIndex index.php index.html

Now, navigate to C:\PHP, and copy php.ini-development to php.ini. Edit this file, find the following lines and modify them as follows (all should exist already):

  1. memory_limit = 256M
  2. post_max_size = 128M
  3. upload_max_filesize = 128M

You need to specify the extensions required for Moodle. Find the 'Dynamic Extensions' section and change the following lines (uncomment and add the correct path):

  1. extension=c:/php/ext/php_curl.dll
  2. extension=c:/php/ext/php_gd2.dll
  3. extension=c:/php/ext/php_intl.dll
  4. extension=c:/php/ext/php_mbstring.dll
  5. extension=c:/php/ext/php_mysqli.dll
  6. extension=c:/php/ext/php_openssl.dll
  7. extension=c:/php/ext/php_soap.dll
  8. extension=c:/php/ext/php_xmlrpc.dll

(these are a minimum. You may need others - e.g. LDAP - for specific functions) ...and save.

Back in the 'cmd' window for Apache, you need to restart it to load your changes...

  1. httpd -k restart

Step 5: Test your install

Navigate to C:\Apache24\htdocs and create a file called 'test.php'. I had to change a file explorer setting to create .php files - Organise > Folder and search options > View and then untick 'Hide extensions for known file types'.

In this file enter the single line...

  1. <?php phpinfo();

And then, in your browser, navigate to http://localhost/test.php. You should see a screen with masses of information and the PHP logo at the top. Check a few lines down for 'Loaded Configuration File' and make sure it says c:\php\php.ini.

That's PHP and Apache all working :)

Step 6: Install Git

We will use the Git version control system for loading and updating the Moodle software. If you really don't want to do this you can just download the latest Moodle zip file and unzip it in c:\Apache24\htdocs but Git makes updates MUCH easier. We need to install Git first...

  • Go to http://msysgit.github.com. Navigate to 'Downloads' and download/run the latest installer.
  • Accept defaults until you get to 'Adjusting your PATH environment'. Select 'Run Git from the Windows Command Prompt' at this point.
  • Accept remaining defaults and install
  • If you right click on folders in the file explorer you should now see additional Git commands.

Step 7: Install Moodle

  • In the file explorer navigate to C:\Apache24\htdocs.
  • Inside the folder, right click and select Git GUI
  • Select 'Clone existing repository'
  • Use the following settings for the clone...
  1. Source location: https://github.com/moodle/moodle.git
  2. Target directory: C:/Apache24/htdocs/moodle

(You can also try git://git.moodle.org/moodle.git. Depending on your firewall situation one may work and the other not. The code is the same.)

  • Click 'Clone'. Depending on your network speed, this may well take a while as the whole Moodle history is being downloaded.
  • You should now have a 'moodle' directory inside 'htdocs. Right click and select 'Git GUI' again - a more complex screen should now appear
  • Click on the 'Branch' command and then 'Checkout...'.
  • Select the version of Moodle you want from the list, probably origin/MOODLE_24_STABLE. Make sure 'Tracking branch' is selected and click Checkout.
  • Create a data directory for Moodle. It can be anywhere you like but I used C:\moodledata. Just create an empty folder
  • Go to http://localhost/moodle. The language select page should come up and you are away. The installation is not covered in detail here but...
    • Data directory is C:\moodledata (or whatever you created)
    • Database user is 'root' (unless you created a more restricted user)
    • Database password is whatever you set installing MySQL

That should be it! Time for a cup of tea.

Upgrading Moodle

Manual install on Windows 7 with Apache and MySQL的更多相关文章

  1. windows下搭建apache+php+mysql

    在windows下,apache和mysql都有自动化安装的程序,本篇则侧重从apache和php版本选择,php线程安全,apache和mysql安装启动服务,工作环境配置这几个方面来阐述windo ...

  2. Windows手动安装Apache,MySql服务

    绿色版的Apache,Mysql需要以服务方式运行.或者由于某种原因服务管理器里面没有服务项了,可以进行手工注册服务和启并服务. # Apache Apache进到安装目录的bin目录下,运行dos命 ...

  3. Windows下卸载Apache、Mysql

    卸载Apache 1. 停止服务 2.以管理员身份打开命令环境 3. 删除Apache文件目录 卸载Mysql 一.在控制面板,卸载MySQL的所有组件控制面板——>所有控制面板项——>程 ...

  4. ubuntu下的apache+php+mysql的安装

    平时我都时在windows下搭配apache+php+mysql环境的,只不过后来听别人说在linux下搭配apache+php+mysql更受欢迎,而且一般公司也是用这样的搭配,所以今天在试着在ub ...

  5. Linux操作系统Centos7.2版本搭建Apache+PHP+Mysql环境

    对于在校大学生来说腾讯云1元主机很划算,所以就申请了一台,打算在上面学习下linux,使用版本为centos7.2版本.在服务器上比较推荐centos,此版本生命周期较长,而且网上有关centos的教 ...

  6. CentOS 6.5 Apache、MySQL、PHP环境配置(LAMP)

    yum -y install httpd mysql-server php #安装apache.mysql和PHP yum -y install php-mysql php-gd php-mbstri ...

  7. 搭建基于Windows + Apache + PHP + MySQL的Moodle平台

    说起Moodle,我相信学习教育技术的同学应该都不陌生,在大学的网络与远程教育课中,我有幸与传说中的Moodle相遇,然后相知,但是我绝对不会跟你们说一直到我毕业,我都没有找到一个合适的时间与这位Ms ...

  8. windows 64位 安装apache+php+mysql

    1.下载PHP.Apache和Mysql软件以及VC库. 下面分别是PHP.Apache和Mysql的官网地址. PHP:http://windows.php.net/qa/ 注意 选择Thread ...

  9. Setup Apache + PHP + MySql on Windows 10

    The below steps recorded my experiences to setup the Apache + PHP + MySql on my Windows 10. 1. Downl ...

随机推荐

  1. Telnet配置

    一.环境 路由 IP:192.168.56.2 本地云 IP:192.168.56.1 二.认证模式 AAA模式 认证 授权 计费的安全技术 当配置用户界面的认证方式为AAA时, 用户登录设备时需要首 ...

  2. 解决SVN UUID客户端和服务器不一致的问题

    下面是从别的文章中COPY过来的两篇文章,可以完美的解决这个问题: 一. 重新定位SVN的时候,遇到uuid不一致的问题. Google得知可以使用以下命令 有到svnadmin命令:(位于 SVN安 ...

  3. Java语言实现简单的登陆注册

    1.登录注册 1.1数据库设计 create table USER_INFO( id number not null, name ) not null, pass ) )insert into USE ...

  4. Many-to-many relationships in EF Core 2.0 – Part 1: The basics

    转载这个系列的文章,主要是因为EF Core 2.0在映射数据库的多对多关系时,并不像老的EntityFramework那样有原生的方法进行支持,希望微软在以后EF Core的版本中加入原生支持多对多 ...

  5. bit and sbit---c51

    bit和sbit都是C51扩展的变量类型. bit和int char之类的差不多,只不过char=8位, bit=1位而已.都是变量,编译器在编译过程中分配地址.除非你指定,否则这个地址是随机的.这个 ...

  6. 单源最短路dijkstra算法&&优化史

    一下午都在学最短路dijkstra算法,总算是优化到了我能达到的水平的最快水准,然后列举一下我的优化历史,顺便总结总结 最朴素算法: 邻接矩阵存边+贪心||dp思想,几乎纯暴力,luoguTLE+ML ...

  7. chromium之message_pump_win之二

    接下来分析 MessagePumpForUI上一篇分析MessagePumpWin,可以参考chromium之message_pump_win之一 根据对MessagePumpWin的分析,Messa ...

  8. 删除文件的第一列 -Linux

    删除文件 text中第一列 方式一 awk '{$1="";print $0}' text 方式二 sed -e 's/[^ ]* //' text

  9. 05.odoo12开源框架学习

    博客为日常工作学习积累总结: 1.odoo12学习 参考博客:https://alanhou.org/centos-odoo-12/ CentOS 7快速安装配置 Odoo 12 添加新用户必做,不然 ...

  10. hive常见的几种优化手段

    Hive调优的几个入手点: Hive是基于Hadoop框架的,Hadoop框架又是运行在JVM中的,而JVM最终是要运行在操作系统之上的,所以,Hive的调优可以通过如下几个方面入手: 操作系统调优 ...