october

拉丁文 Octo 是老历法的8月

两个o,就是 8

改革历法后塞了两个月进来,但人们仍袭用旧名称来称呼10月

英语10月 october,便由此演变而来

php 的一个 cms

建立一个文件夹, 比如 mkdir october

php环境

# sudo apt-get install php7.0 php7.0-fpm php7.0-pgsql -y
sudo apt-get install php7.1 php7.1-fpm php7.1-pgsql -y

posgresql 数据库

sudo su - postgres
psql

然后建立库和用户

create role october login encrypted password 'october' noinherit valid until 'infinity';
create database october with encoding='utf8' owner=october;

install

进入以后运行

curl -s https://octobercms.com/api/installer | php
php artisan october:install

填入数据库信息,注意port要填,不然会报错

还有用户密码什么的

nginx config

    server {
        listen       80;
        server_name  test.lorstone.com;


        location / {
            try_files $uri /index.php$is_args$args;
        }

        location ~ \.php$ {
            root  /home/bigzhu/october;
            try_files $uri =404;
            fastcgi_split_path_info ^(.+\.php)(/.+)$;
            fastcgi_index index.php;
            fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            include /etc/nginx/fastcgi_params;
        }

        location ~* \.(html|js|jpg|jpeg|png|css|woff|woff2|ttf|svg|swf|apk|txt)$ {
            root  /home/bigzhu/october;
            index  index.html index.htm;
            location ~* \.(html)$ {
                expires off;
            }
            expires max;
        }

        rewrite ^themes/.*/(layouts|pages|partials)/.*.htm /index.php break;
        rewrite ^bootstrap/.* /index.php break;
        rewrite ^config/.* /index.php break;
        rewrite ^vendor/.* /index.php break;
        rewrite ^storage/cms/.* /index.php break;
        rewrite ^storage/logs/.* /index.php break;
        rewrite ^storage/framework/.* /index.php break;
        rewrite ^storage/temp/protected/.* /index.php break;
        rewrite ^storage/app/uploads/protected/.* /index.php break;
    }

要把 /home/bigzhu/october 的用户改为 www-data

sudo chown www-data -R october/

打开

http://october.lorstone.com/backend

进入安装主题 or 插件时会报错

"Use of undefined constant CURLOPT_FOLLOWLOCATION - assumed 'CURLOPT_FOLLOWLOCATION'" on line 444 of /home/bigzhu/october/vendor/october/rain/src/Network/Http.php

要装

sudo apt-get install php7.0-curl

重启 php7.0-fpm

sudo service php7.0-fpm restart