环境

  • PHP >= 5.4
  • PHP扩展mysqli,pdo,memcache,mbstring
  • PHP Composer
  • Mysql
  • Memcahed
  • Apache模块rewrite或者nginx重写规则(可选)
if (!-e $request_filename) {
  rewrite ^(.*)$ /index.php?s=/$1 last;
  break;
}

安装

  1. 克隆或下载到任意目录${PROJECT_PATH},并切换至${PROJECT_PATH}
cd ${PROJECT_PATH}
git clone https://github.com/osscraft/SingleAuth.git 
cd SingleAuth
  1. 使用 Composer 安装依赖:
composer install
  1. 导入数据表结构${PROJECT_PATH}/assets/sql/SSO-demo/sso.sql和demo数据${PROJECT_PATH}/assets/sql/SSO-demo/data.sql
  2. php.ini文件中增加配置项
browscap = ${PROJECT_PATH}/config/lite_php_browscap.ini

WEB服务

使用apache2、nginx等WEB服务器软件,将WEB根目录指向${PROJECT_PATH}/public,或使用PHP

php -S localhost:8800 -t public

浏览器中打开地址http://127.0.0.1:8800/