Mac 下搭建xampp+elgg

来源:互联网 发布:浏览器ip代理软件 编辑:程序博客网 时间:2024/06/05 14:16
Mac 下xampp+elgg的搭建

1.下载xampp 
https://www.apachefriends.org/zh_cn/index.html
2.下载elgg
https://elgg.org
将elgg解压到  /Applications(应用程序)/XAMPP/xamppfiles/htdocs/

最好将解压后的文件夹改名为 elgg

3.打开浏览器 (Requirements Check)
在地址栏输入 https://localhost/elgg

点击next之后可能出现图片:



Web Server 的解决方法:因为服务器要向elgg文件夹中写入一个文件,所以要改变elgg文件夹的写入权限,方法如下,
1. cd /Applications/XAMPP/xamppfiles/htdocs
2.chmod 777 elgg

Settings File的解决方法:因为服务器要向engine文件夹中写入一个文件,所以要改变engine文件夹的写入权限,方法同上:
1.cd  /Applications/XAMPP/xamppfiles/htdocs/elgg
2.chmod 777 engine

点击refresh ,再点击next。

4.建立数据库(Database installation)

一开始数据库的用户名为 root 密码为空,修改密码为1234(自定义)。

修改方法:可以用phpadmin来修改,在浏览器地址输入https://localhost/phpmyadmin







(1).点击用户->黑框中的编辑权限->全局权限(全选)->右下角执行按钮
(2).点击黑框中的修改密码
(3).点击new 新建一个数据库为test(自定义)
(4).替换 /Applications/XAMPP/xamppfiles/phpmyadmin/路径下的 config.inc.php 文件
打开该文件,复制到新建的txt文档中,修改其中的内容,也就是刚才修改的密码

$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '1234;(刚才设定的密码),

将txt文档另存为 config.inc.php,替换原来的文件。

也可以用命令行修改。

填写信息:
DataBase UserName :root
DataBase Password: 1234
DataBase Name:test(刚才建立数据库的名字)
剩下的默认即可。
点击NEXT

5.建立一个Data Dictionary(Configure Site)

在与elgg相同的路径(/Applications/XAMPP/xamppfiles/htdocs)下建立一个文件夹,用来装数据,命名为elggdata(自定义)。
因为服务器要写入数据,更改该文件夹的写入权限:
(1) cd /Applications/XAMPP/xamppfiles/htdocs/
 (2)   chmod 777 elggdata(刚才建立的文件夹的名字)

按步骤填写完整路径:
Data Dictionary: /Applications/XAMPP/xamppfiles/htdocs/elggdata

其他信息自定义
点击 next。

6.Create Admin account
自己填写就行
点击 next。

7.Finished

点击go to site 或者在地址栏输入https://localhost/elgg
出现如下图片则搭建成功
















1 0