Sunteți pe pagina 1din 5

9/26/2015

ManualinstallonWindows7withApacheandMySQLMoodleDocs

Home
Documentation
Downloads
Demo
Tracker
Development
Translation
Moodle.net
Search

Youarehere

ManualinstallonWindows7withApache
andMySQL
MainpageInstallationManualinstallonWindows7withApacheandMySQL
Installation
InstallingMoodle
InstallationQuickstart
Cron
Installingplugins
InstallationFAQ
Upgrading
Upgradeoverview
Automaticupdatesdeployment
Gitguide
Administrationviacommandline
UpgradingFAQ
Moodlemigration
TheseareinstructionsforinstallingonWindows7desktop(theymayalsobeusefulforaserver
installwithsomethoughttosecurity)usingindividualcomponentsratherthanaoneclick
installer.Thisisintendedonlyasatesting/evaluationinstallvia'localhost'.Properserver
configurationandsecurityisnotconsidered.
NOTE:ThisassumesthatyouarecomfortablewithadministeringaWindowssystemandcanuse
thecommandline.IneveruseWindowsandImanaged,butthismaynotbethequickestormost
efficientwaytodothings.MakesureyourWindowsinstallationisingoodshape,youclearoutall
thejunkandstuffmakingitrunslower(becauseinstallingallthisserversoftwarecertainlyisn't
goingtomakeitrunfaster!)andthatyouhaveinstalledanyoutstandingupdates.
ANOTHERNOTE:Watchoutfortheirritating"Doyouwantthisprogramtogetcontrolofyour
computer"windowthatcomesupatvariousstages.Sometimesitdidn'tappearbutyoudoseea
shielddimlyflashinginthetaskbar.Clickandsayyes.
https://docs.moodle.org/29/en/Manual_install_on_Windows_7_with_Apache_and_MySQL

1/5

9/26/2015

ManualinstallonWindows7withApacheandMySQLMoodleDocs

Contents
1Step1:InstallMySQL
2Step2:InstallApache
3Step3:InstallPHP
4Step4:ConfigureApacheandPHP
5Step5:Testyourinstall
6Step6:InstallGit
7Step7:InstallMoodle
8UpgradingMoodle

Step1:InstallMySQL
InstalltheMySQLdatabaseserveronyourPC.Wewilldothisusingthe'MSI'oneclick
installerforWindows.Gotohttp://dev.mysql.com/downloads/anddownloadthe'MySQL
InstallerforWindows'.Atthetimeofwritingthiswasfromaveryobviousgraphicatthe
topofthescreen(whichImissedthefirsttime).
Runtheinstallation.Click...
InstallMySQLproducts
Acceptthelicense
Allowtheversioncheck(optional)
At'ChooseaSetupType'acceptthe"DeveloperDefault"andclickNext
Anumberofdownloadsofrequiredsoftwaremaybeidentified.ClickExecuteand
followonscreeninstructionstoinstallthem.
At'Installationprogress'screen,hitExecutetheMySQLsoftwarewillbeinstalled
At'Configurationoverview'hitNexttogotothebasicconfigurationscreen.
Acceptallthedefaultsonthe'MySQLServerConfiguration'andhitNext.
Onthepasswordscreen,supplyapasswordforthe'root'(mainadministrator)user.
Makesureit'soneyouwon'tforget.Youcanalsocreatea'User'accountjustfor
Moodlewithmorerestrictedaccessifyoulike.Thiswouldbegoodpracticeona
publicserverbutjustusingthe'root'userwillsufficefortesting.
OntheServicedetailspage,acceptthedefaultsandhitNextandthenNextacouple
moretimesfortheconfigurationprogress.
ClickFinish.Jobdone.
MySQLWorkbenchwillopen.UnderServerAdministration(righthandcolumn,double
click'LocalMySQL56'(orwhateveryoucalledit).Aboxshouldpopupaskingfortheroot
password.Enterthepasswordyousupplied
Theservermanagementscreenshouldappear.Youdon'thavetoworrytoomuchaboutthis.
Itjustshowstheinstallisworking.

Step2:InstallApache
InstalltheApachewebserveronyourPC.Gotohttp://www.apachelounge.com/download/.
Scrolldownthepageuntilyoufindthedownloadforthe'Apache2.4win32binaries'and
download.YouneedtobecarefulthatthemoduledllinPHPmatchestheversionofApache
youinstall.Apachewon'tloadotherwise.
UnzipthefileintoC:\.Youshouldendupwithadirectory'Apache24'(orwhateverthe
latestversionis).
FindStart>Allprograms>Accessories>CommandPrompt......BUT,rightclick,and
select'Runasadministrator'.
Enterthefollowingcommands
https://docs.moodle.org/29/en/Manual_install_on_Windows_7_with_Apache_and_MySQL

2/5

9/26/2015

ManualinstallonWindows7withApacheandMySQLMoodleDocs

cd\Apache24\bin
httpdkinstall
httpdkstart

...youmaywellgetawarningabouttheservername.Don'tworryaboutit.Don'tclosethis
window,youwillneeditagaininaminute.
Totestitworkedtype'http://localhost'intoyourbrowser.Youshouldgetascreenuptothe
effectthatApacheisinstalledandworking.

Step3:InstallPHP
NowinstallthePHPscriptinglanguageonyourPC.Gotohttp://www.php.net/download.In
thecurrentstablereleasesectionclickonlinkforWindows5.x.xbinariesandsource.Scroll
downtothenewest'Zip'forVC11x86ThreadSafe(nonthreadsafedoesn'thavethe
Apachedll)PHP(again,thenewestversionsofPHPdidn'thavethisbutitshouldn'tmatter)
anddownload.*Don't*betemptedtousetheMicrosoftInstallerversionitwon'twork.
OpenthezipfileandextracttoC:\PHP\

Step4:ConfigureApacheandPHP
YounowneedtoeditApache'shttpd.conffile.Inthefileexplorernavigateto
C:\Apache24\conf\httpd.conf.OpenitinNotepad.Attheendofthisfile(orwhereveryoulikeif
youwanttobemoreorganised)addthefollowinglines:
LoadModulephp5_module"C:/PHP/php5apache2_4.dll"
AddHandlerapplication/xhttpdphp.php
PHPIniDirC:/PHP

Theversionofthemodulefilematters(2_4inthiscase).ItMUSTmatchtheApacheversion
installed.
Inthesamefile.SearchforthelinestartingDirectoryIndex.Changeitasfollows
DirectoryIndexindex.phpindex.html

Now,navigatetoC:\PHP,andcopyphp.inidevelopmenttophp.ini.Editthisfile,findthe
followinglinesandmodifythemasfollows(allshouldexistalready):
memory_limit=256M
post_max_size=128M
upload_max_filesize=128M

YouneedtospecifytheextensionsrequiredforMoodle.Findthe'DynamicExtensions'section
andchangethefollowinglines(uncommentandaddthecorrectpath):
extension=c:/php/ext/php_curl.dll
extension=c:/php/ext/php_gd2.dll
extension=c:/php/ext/php_intl.dll
extension=c:/php/ext/php_mbstring.dll
extension=c:/php/ext/php_mysqli.dll
extension=c:/php/ext/php_openssl.dll
https://docs.moodle.org/29/en/Manual_install_on_Windows_7_with_Apache_and_MySQL

3/5

9/26/2015

ManualinstallonWindows7withApacheandMySQLMoodleDocs

extension=c:/php/ext/php_soap.dll
extension=c:/php/ext/php_xmlrpc.dll

(theseareaminimum.Youmayneedotherse.g.LDAPforspecificfunctions)...andsave.
Backinthe'cmd'windowforApache,youneedtorestartittoloadyourchanges...
httpdkrestart

Step5:Testyourinstall
NavigatetoC:\Apache24\htdocsandcreateafilecalled'test.php'.Ihadtochangeafileexplorer
settingtocreate.phpfilesOrganise>Folderandsearchoptions>Viewandthenuntick'Hide
extensionsforknownfiletypes'.
Inthisfileenterthesingleline...
<?phpphpinfo();

Andthen,inyourbrowser,navigatetohttp://localhost/test.php.Youshouldseeascreenwith
massesofinformationandthePHPlogoatthetop.Checkafewlinesdownfor'Loaded
ConfigurationFile'andmakesureitsaysc:\php\php.ini.
That'sPHPandApacheallworking:)

Step6:InstallGit
WewillusetheGitversioncontrolsystemforloadingandupdatingtheMoodlesoftware.Ifyou
reallydon'twanttodothisyoucanjustdownloadthelatestMoodlezipfileandunzipitin
c:\Apache24\htdocsbutGitmakesupdatesMUCHeasier.WeneedtoinstallGitfirst...
Gotohttp://msysgit.github.com.Navigateto'Downloads'anddownload/runthelatest
installer.
Acceptdefaultsuntilyougetto'AdjustingyourPATHenvironment'.Select'RunGitfrom
theWindowsCommandPrompt'atthispoint.
Acceptremainingdefaultsandinstall
IfyourightclickonfoldersinthefileexploreryoushouldnowseeadditionalGit
commands.

Step7:InstallMoodle
InthefileexplorernavigatetoC:\Apache24\htdocs.
Insidethefolder,rightclickandselectGitGUI
Select'Cloneexistingrepository'
Usethefollowingsettingsfortheclone...
Sourcelocation:https://github.com/moodle/moodle.git
Targetdirectory:C:/Apache24/htdocs/moodle

https://docs.moodle.org/29/en/Manual_install_on_Windows_7_with_Apache_and_MySQL

4/5

9/26/2015

ManualinstallonWindows7withApacheandMySQLMoodleDocs

(Youcanalsotrygit://git.moodle.org/moodle.git.Dependingonyourfirewallsituationonemay
workandtheothernot.Thecodeisthesame.)
Click'Clone'.Dependingonyournetworkspeed,thismaywelltakeawhileasthewhole
Moodlehistoryisbeingdownloaded.
Youshouldnowhavea'moodle'directoryinside'htdocs.Rightclickandselect'GitGUI'
againamorecomplexscreenshouldnowappear
Clickonthe'Branch'commandandthen'Checkout...'.
SelecttheversionofMoodleyouwantfromthelist,probably
origin/MOODLE_24_STABLE.Makesure'Trackingbranch'isselectedandclick
Checkout.
CreateadatadirectoryforMoodle.ItcanbeanywhereyoulikebutIusedC:\moodledata.
Justcreateanemptyfolder
Gotohttp://localhost/moodle.Thelanguageselectpageshouldcomeupandyouareaway.
Theinstallationisnotcoveredindetailherebut...
DatadirectoryisC:\moodledata(orwhateveryoucreated)
Databaseuseris'root'(unlessyoucreatedamorerestricteduser)
DatabasepasswordiswhateveryousetinstallingMySQL
Thatshouldbeit!Timeforacupoftea.

UpgradingMoodle
Retrievedfrom"https://docs.moodle.org/29/en/index.php?
title=Manual_install_on_Windows_7_with_Apache_and_MySQL&oldid=106202"
Category: Installation
Thispagewaslastmodifiedon30July2013,at07:31.
ContentisavailableunderGNUGeneralPublicLicenseunlessotherwisenoted.

https://docs.moodle.org/29/en/Manual_install_on_Windows_7_with_Apache_and_MySQL

5/5

S-ar putea să vă placă și