Skip to content
/ inews Public

极简 UGC 分享程序,轻松拥有一个属于自己的 Hack News

Notifications You must be signed in to change notification settings

shangyou/inews

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

iNews

要求

  • PHP 5.3.9+
  • Composer (brew install composer or composer)
  • Apache
  • Mysql 5.0+
  • Git

安装

  • 配置Apache到public目录,并且对该目录打开AllowOverride All
    • 如果是Nginx则需要添加如下
location / {
    try_files $uri $uri/ /index.php?$query_string;
}
  • 配置环境
    • 开发环境检查config/develop.php,如果数据库配置跟本地一样就无需配置
    • 如果不同,否则新建config/环境名.php
    • 如果是Apache新增SetEnv PAGON_ENV 环境名,如果是Nginx+FPM,则需要在FPM设置env[PAGON_ENV] = 环境名
    • 命令行export PAGON_ENV=环境名
    • 公网环境配置相同
  • cd 程序目录
  • 安装依赖:composer update,如果完整包不需要执行此项
  • 初始化数据库:./bin/task db:init
  • 升级数据库:./bin/task db:migrate
  • ./bin/task job:point放到Crontab 10分钟执行一次
  • 搞定

其他用法:

usage: ./bin/task db:init [-h|--help] [-f|--force] [-d|--data]

optional arguments:
    -h, --help          help of the command
    -f, --force         Force create database
    -d, --data          Insert test data

About

极简 UGC 分享程序,轻松拥有一个属于自己的 Hack News

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published