您的位置:首页 > Web前端 > BootStrap

MAC bootstrap-cms安装记录

2015-11-22 16:31 281 查看
源码网址:https://github.com/BootstrapCMS/CMS

按照git上得installation说明一步步执行,执行以下命令之后需要安装npm才可以继续,所以先安装了brew,通过它来安装node和npm

composer create-project graham-campbell/bootstrap-cms --prefer-dist -s dev

composer install --no-dev -o

一、Homebrew

brew是MAC下的apt-get,yum。官网地址brew.sh/或者http://brew.sh/index_zh-cn.html。

安装之前/usr/local文件夹下只有bin目录,安装完后会多出一堆。

安装完之后可以用brew doctor命令来check一下,正常的话会提示Your system is ready to brew.

二、利用Homebrew安装node和npm

只需要一个命令即可:brew install node

这玩意比用git下下来再安装方便多了!

三、配置XAMPP

修改mysql的root账户密码,并且在XAMPP/xamppfiles/phpmyadmin/config.ini.php中修改root的密码

对于apachedocumentroot的设置在XAMPP/xamppfiles/etc/httpd.conf修改路径

四、XAMPP在MIGRATE时PDO错误提示

[PDOException] SQLSTATE[HY000] [2002] No such file or directory
解决方法;把.env文件中的localhost改成127.0.0.1
原因:windows不会出现这种问题,mac容易出现这种问题,是因为mac里面本来就有一个PHP了,如果还用XAMPP的话,这个时候就有两个PHP,但如果不经过配置,命令行方式的PHP默认执行的是系统自带的,所以要修改默认执行的PHP

在YII中的解决方法: 找到Yii根目录下的/yii文件打开,第一行#!/usr/bin/env php 改成 #!/usr/bin/env /Applications/XAMPP/xamppfiles/bin/php,laravel应该也有类似的解决方法

五、在Installation的第四步中

Run
php
artisan app:install
followed by
gulp
--production
to setup the application.
首先php artisan app:install,然后gulp --production的时候提示没有装gulp,然后安装gulp参考https://bhavyanshu.me/tutorials/styling-laravel-5-based-app-with-twitter-bootstrap/08/24/2015/
注意一下得,gulp
is a toolkit that will help you automate painful or time-consuming tasks in your development workflow. For web development (if that’s your thing) it can help you by doing CSS preprocessing, JS transpiling, minification, live reloading, and much more.

具体命令:安装gulp:sudo npm install -g gulp
sudo npm install -g gulp

先php artisan app:install,然后再

sudo gulp --production
六、installation的第五步,修改mail-server配置

进入public后页面空白,这个时候

cd learnlaravel5

sudo chmod -R 777 storage

然后提示500error internal server error,最后发现问题是由于.env中没有配置APP_KEY,执行命令:

php artisan key:generate

然后终于进入了正常界面:)

不过悲哀地发现貌似没有admin功能?不知道有啥用,跟预想中的不一样。发了个邮件问了Graham Campbell,没有编辑功能也能叫CMS,坑啊!!!!

附一个windows下安装的视频地址https://www.youtube.com/watch?v=VbacABn9ebY
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: