GithubHelp home page GithubHelp logo

hover2012 / hookphp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from letwang/hookphp

0.0 1.0 0.0 9.78 MB

此框架旨在降低企业在启动新项目时的时间成本,加速研发者的研发节奏,打破从0到1的惯例,直接从0.1开始!Q群:679116380

Home Page: https://my.oschina.net/cart

License: Apache License 2.0

PHP 48.79% HTML 51.11% CSS 0.10%

hookphp's Introduction

简介

创作此框架的作者是LetWang,2007年ASP,2008年ASP.NET(C#),从2009年一直PHP。

虽然中间几次创业,看过太多的源码,也曾服务于海外多家机构,但越是这样越发现自己的渺小:一个人无法改变太多,需要带动整个群体一起进步!。于是内心酝酿近10年的PHP框架诞生了!

此框架旨在降低企业在启动新项目时的时间成本,加速研发者的研发节奏,打破从0到1的惯例,直接从0.1开始!

理念

配置即产出。

特点

  • 追求极客,行业主流解决方案最新版
  • 能用 C 扩展解决的,坚决不用Composer
  • 一款自带DB的框架,业务SQL集中化管理
  • 集成行业通用功能:用户管理资源管理角色管理权限管理配置管理翻译管理SEO管理多菜单管理多语言管理多模块管理多模板管理多终端管理多平台管理...
  • 支持行业主流特性:微服务多线程多进程常驻内存主从分离负载均衡...

环境

[PHP 7.3]

sudo apt-get install php7.3-common php7.3-cli php7.3-bcmath php7.3-dev php7.3-xml php7.3-opcache php7.3-mbstring php7.3-mysql php7.3-fpm php7.3-gd php7.3-zip php7.3-curl php7.3-intl php7.3-json

[C Extensions]

sudo pecl install yaf

[yaf]
extension=yaf
yaf.use_namespace = 1
yaf.use_spl_autoload = 1
yaf.library = /home/letwang/workspace/HookPHP/vendor/
sudo pecl install yaconf

[yaconf]
extension=yaconf
yaconf.directory = /home/letwang/workspace/HookPHP/conf/
sudo pecl install grpc

[grpc]
extension=grpc
sudo pecl install seaslog

[seaslog]
extension=seaslog
seaslog.trace_notice=1
seaslog.trace_warning=1
seaslog.default_basepath='/home/letwang/workspace/HookPHP/log'
seaslog.default_template = '%T | %L | %P | %Q | %t | %M | %H | %D | %R | %m | %I | %F | %U | %u | %C'
git clone https://github.com/longxinH/xhprof.git ./xhprof
cd xhprof/extension/
phpize7.3
./configure --with-php-config=php-config7.3
make && sudo make install
sudo apt-get install graphviz-dev

[xhprof]
extension=xhprof
xhprof.output_dir = '/var/log/xhprof'
sudo pecl install rar

[rar]
extension=rar

[php.ini]

[Session]
session.save_handler = redis
session.save_path = "tcp://127.0.0.1:6379?weight=1&auth=123456&database=0, tcp://127.0.0.1:6379?weight=2&auth=123456&database=0"

[hosts]

sudo vim /etc/hosts

127.0.0.1 www.admin.com
127.0.0.1 www.erp.com
127.0.0.1 www.paas.com
server {
	listen 80;
	root /home/letwang/workspace/HookPHP/public/admin/;
	index index.html index.htm index.php;
	error_log /var/log/nginx/www.admin.com-error.log error;access_log /var/log/nginx/www.admin.com-access.log combined;
	server_name www.admin.com;

	if (!-e $request_filename) {rewrite ^/(.*)  /index.php?$1 last;}

	location ~ \.php$ {
	       fastcgi_pass   127.0.0.1:9000;
	       fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
	       include        fastcgi_params;
	 }
}

server {
	listen 80;
	root /home/letwang/workspace/HookPHP/public/erp/;
	index index.html index.htm index.php;
	error_log /var/log/nginx/www.erp.com-error.log error;access_log /var/log/nginx/www.erp.com-access.log combined;
	server_name www.erp.com;

	if (!-e $request_filename) {rewrite ^/(.*)  /index.php?$1 last;}

	location ~ \.php$ {
	       fastcgi_pass   127.0.0.1:9000;
	       fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
	       include        fastcgi_params;
	 }
}

server {
	listen 80;
	root /home/letwang/workspace/HookPHP/public/paas/;
	index index.html index.htm index.php;
	error_log /var/log/nginx/www.paas.com-error.log error;access_log /var/log/nginx/www.paas.com-access.log combined;
	server_name www.paas.com;

	if (!-e $request_filename) {rewrite ^/(.*)  /index.php?$1 last;}

	location ~ \.php$ {
	       fastcgi_pass   127.0.0.1:9000;
	       fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
	       include        fastcgi_params;
	 }
}
sudo pecl install redis

[redis]
extension=redis
sudo pecl install mongodb

[mongodb]
extension=mongodb
sudo pecl install amqp

[amqp]
extension=amqp
wget -P /home/sphinx http://sphinxsearch.com/files/sphinx-3.0.3-facc3fb-linux-amd64.tar.gz
sudo pecl install varnish

[varnish]
extension=varnish
curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer
wget -P /home/letwang/workspace/HookPHP/vendor/Hook/Tika http://mirrors.hust.edu.cn/apache/tika/tika-app-1.19.1.jar

[安装]

cd ~/workspace/HookPHP/
sudo chmod 777 -R ./log

composer.phar install

php app/admin/bin/install.php
php app/erp/bin/install.php
php app/paas/bin/install.php

访问

http://www.admin.com/
http://www.erp.com/
http://www.paas.com/

[email protected]
12345678

演示

截图1

hookphp's People

Contributors

letwang avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.