Moodle和Lamp优化的学习

为了真正能使Moodle用起来,性能和安全是必须解决的问题。 闲着无事上午把Lamp优化的网页瞎看了一下。 我们的Moodle现在是放在windows上的,可以直接使用Moodle…

为了真正能使Moodle用起来,性能和安全是必须解决的问题。

闲着无事上午把Lamp优化的网页瞎看了一下。

我们的Moodle现在是放在windows上的,可以直接使用Moodle一体化安装包进行优化。也可以考虑最新版Xamppliteforwindows,把一体化安装包中的Moodle相关目录拷贝到这个xmapplite目录下进行安装。

这篇文章:readme_en.txt相对比较详细的介绍了ApacheFriendsXAMPP一些安全必读的内容

这一段很重要:

—————————————————————-

Amatterofsecurity(AMUSTREAD!)

Asmentionedbefore,XAMPPisnotmeantforproductionusebutonlyfordevelopersina

developmentenvironment.ThewayXAMPPisconfiguredistobeopenaspossibleandallowing

thedeveloperanythinghe/shewants.Fordevelopmentenvironmentsthisisgreatbutina

productionenvironmentitcouldbefatal.Herealistofmissingsecurity

inXAMPP:

-TheMySQLadministrator(root)hasnopassword.

-TheMySQLdaemonisaccessiblevianetwork.

-phpMyAdminisaccessiblevianetwork.

-Examplesareaccessiblevianetwork.

TofixmostofthesecurityweaknessessimplycallthefollowingURL:

http://localhost/security/

TherootpasswordforMySQLandphpMyAdmin,andalsoaXAMPPdirectoryprotectioncanbeing

establishedhere.

—————————————————————ApacheFriendsXAMPP(basicpackage)version1.6.4包含以下内容

+Apache2.2.6

+MySQL5.0.45

+PHP5.2.4+PHP4.4.7+PEAR

+PHP-Switchwin321.0(pleaseusethe”php-switch.bat”)

+XAMPPControlVersion2.5fromhttp://www.nat32.com

+XAMPPSecurity1.0

+SQLite2.8.15

+OpenSSL0.9.8e

+phpMyAdmin2.11.1

+ADOdb4.95

+MercuryMailTransportSystemv4.01b

+FileZillaFTPServer0.9.23

+Webalizer2.01-10

+ZendOptimizer3.3.0

+eAccelerator0.9.5.2forPHP5.2.4(commentoutinthephp.ini)

如果对命令行不习惯,也可以考虑使用图形化的Apache配置软件apconf或者APMServ进行Apache的图形

设置,部署好了之后,可以考虑对性能进行一些测试,我这里有一个简单的test.php,可以测试载入时间

,100万次循环运算。

然后看看PHP和Apache的几个优化:

ZendOptimizer

eaccelerator安裝分享

eaccelerator下载

如果是Moodle一体化安装包,就可以直接对内置的zend等进行优化,针对httpd.conf和PHP.INI文件操作

,可以去掉注释符号,把eaccelerator放在zend之前即可。

然后看看Apache的性能测试,在bin目录的ab命令的使用。ab/?看帮助

ab-n10-c10http://127.0.0.1/

得到以下结果

C:\xampp\apache\bin>ab-n10-c10http://127.0.0.1/

ThisisApacheBench,Version2.0.40-dev<$Revision:1.146$>apache-2.0

Copyright1996AdamTwiss,ZeusTechnologyLtd,http://www.zeustech.net/

Copyright2006TheApacheSoftwareFoundation,http://www.apache.org/

Benchmarking127.0.0.1(bepatient)…..done

ServerSoftware:Apache/2.2.6

ServerHostname:127.0.0.1

ServerPort:80

DocumentPath:/

DocumentLength:58769bytes

ConcurrencyLevel:10

Timetakenfortests:1.437500seconds

Completerequests:10

Failedrequests:0

Writeerrors:0

Totaltransferred:589890bytes

HTMLtransferred:587690bytes

Requestspersecond:6.96[#/sec](mean)

Timeperrequest:1437.500[ms](mean)

Timeperrequest:143.750[ms](mean,acrossallconcurrentrequests)

Transferrate:400.70[Kbytes/sec]received

ConnectionTimes(ms)

minmean[+/-sd]medianmax

Connect:000.000

Processing:281871420.410001437

Waiting:281863419.410001437

Total:281871420.410001437

Percentageoftherequestsservedwithinacertaintime(ms)

50%1000

66%1031

75%1281

80%1296

90%1437

95%1437

98%1437

99%1437

100%1437(longestrequest)

也可以将并发数和用户数加大,我加到200的时候,机器类似于死机。-n是多少个请求,-c是多

少个并发当然也可以利用test.php具体测试速度变化,调整到100的时候,感觉能用。看来还需

要对系统进一步优化,见该网页:

Apache1.3.x的安装与配置笔记`

MYsql优化实例

然后就找些资料,慢慢的优化,知道路子就好了。先把模拟考试过程走完

这是官方的Moodle优化建议

没事可以多研究一下。模拟测试的学生名单

模拟考试的试题

根据给的试题和名单,进行模拟名单导入以及模拟试题的导入或填写,

走完部署考试软件过程总结的前5个模拟流程

作者: admin

为您推荐

联系我们

联系我们

邮箱:

关注微信
微信扫一扫关注我们

微信扫一扫关注我们

关注微博
返回顶部