By accessing the website and accepting the Cookie Policy, you agree to use the cookies provided by the Site in accordance with to analyze traffic, remember your preferences, and optimize your experience.
October CMS官方文档 1-安装 (Setup)
October CMS    2018-10-22 18:54:42    925    0    0
emengweb   October CMS

安装

安装方式1:

下载安装文件源码后,解压并通过浏览器进行在线安装及配置:

安装器源码地址:http://octobercms.com/download

image

根据提示,安装缺少的扩展或组件即可。

安装完毕后,记得删除网站目录下的install相关文件。

install_files/      <== Installation directory
install.php         <== Installation script​

安装方式2:

直接在www目录执行shell进行命令行方式安装:

php -r "eval('?>'.file_get_contents('https://octobercms.com/api/installer'));"

如果报错

Some settings on your machine make OctoberCMS unable to install properly.
Make sure that you fix the issues listed below and run this script again:

The ZipArchive extension is missing.
Install it to continue

则需要安装 ZipArchive

sudo apt-get install php7.1-zip

参考

https://websiteforstudents.com/install-octobercms-on-ubuntu-17-04-17-10-with-nginx-mariadb-and-php-fpm-support/

 

CMS配置

配置文件存储在应用程序的config目录中。虽然大多数配置是可选的,但我们强烈建议您在生产环境下时禁用debug mode
调试模式可以通过在config / app.php文件中的debug参数进行设置,默认情况下处于enabled状态。
启用状态下,调试模式将开启以下功能:
  1. 显示详细的错误页面。
  2. 失败的用户身份验证提供了特定原因。
  3. 默认情况下,合并资产不会缩小。
  4. 默认情况下禁用安全模式。

重要提示:对于生产环境,要始终将app.debug设置为false

 

设置调度程序

要使计划任务正常运行,您应将以下Cron条目添加到服务器。
编辑crontab通常使用命令crontab -e执行。
* * * * * php /path/to/artisan schedule:run >> /dev/null 2>&1​
请务必将/path/to/artisan替换为October根目录中artisan文件的绝对路径,这个Cron每分钟都会调用命令调度程序。
宝塔面板可以通过设置定时任务,来实现任务调度。/www/server/php/71/bin/php /www/wwwroot/site.com/artisan schedule:run >> /dev/null 2>&1​

 

Nignx 配置

https://octobercms.com/docs/setup/configuration#nginx-configuration

location / {
    # Let OctoberCMS handle everything by default.
    # The path not resolved by OctoberCMS router will return OctoberCMS's 404 page.
    # Everything that does not match with the whitelist below will fall into this.
    rewrite ^/.*$ /index.php last;
}

# Pass the PHP scripts to FastCGI server
location ~ ^/index.php {
    # Write your FPM configuration here

}

# Whitelist
## Let October handle if static file not exists
location ~ ^/favicon\.ico { try_files $uri /index.php; }
location ~ ^/sitemap\.xml { try_files $uri /index.php; }
location ~ ^/robots\.txt { try_files $uri /index.php; }
location ~ ^/humans\.txt { try_files $uri /index.php; }

## Let nginx return 404 if static file not exists
location ~ ^/storage/app/uploads/public { try_files $uri 404; }
location ~ ^/storage/app/media { try_files $uri 404; }
location ~ ^/storage/temp/public { try_files $uri 404; }

location ~ ^/modules/.*/assets { try_files $uri 404; }
location ~ ^/modules/.*/resources { try_files $uri 404; }
location ~ ^/modules/.*/behaviors/.*/assets { try_files $uri 404; }
location ~ ^/modules/.*/behaviors/.*/resources { try_files $uri 404; }
location ~ ^/modules/.*/widgets/.*/assets { try_files $uri 404; }
location ~ ^/modules/.*/widgets/.*/resources { try_files $uri 404; }
location ~ ^/modules/.*/formwidgets/.*/assets { try_files $uri 404; }
location ~ ^/modules/.*/formwidgets/.*/resources { try_files $uri 404; }
location ~ ^/modules/.*/reportwidgets/.*/assets { try_files $uri 404; }
location ~ ^/modules/.*/reportwidgets/.*/resources { try_files $uri 404; }

location ~ ^/plugins/.*/.*/assets { try_files $uri 404; }
location ~ ^/plugins/.*/.*/resources { try_files $uri 404; }
location ~ ^/plugins/.*/.*/behaviors/.*/assets { try_files $uri 404; }
location ~ ^/plugins/.*/.*/behaviors/.*/resources { try_files $uri 404; }
location ~ ^/plugins/.*/.*/reportwidgets/.*/assets { try_files $uri 404; }
location ~ ^/plugins/.*/.*/reportwidgets/.*/resources { try_files $uri 404; }
location ~ ^/plugins/.*/.*/formwidgets/.*/assets { try_files $uri 404; }
location ~ ^/plugins/.*/.*/formwidgets/.*/resources { try_files $uri 404; }
location ~ ^/plugins/.*/.*/widgets/.*/assets { try_files $uri 404; }
location ~ ^/plugins/.*/.*/widgets/.*/resources { try_files $uri 404; }

location ~ ^/themes/.*/assets { try_files $uri 404; }
location ~ ^/themes/.*/resources { try_files $uri 404; }

 

后台管理地址(admin url)

/backend

 

更换域名

https://octobercms.com/forum/post/change-domain

 

安装curl

sudo apt-get install php7.1-curl

 

参考

 

上一篇: October CMS - 快速入门 1 安装

下一篇: OctoberCMS官方文档 8-组件 (Components)

925 人读过
文档导航