`
leon1509
  • 浏览: 528418 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

【转】【API管理系统showdoc部署】+【CentOS-5.10 YUM 方式安装NGINX+PHP】

阅读更多

杂乱不堪的API文档,word、excel、pdf,迫切想找一款API管理工具,最终找到了showdoc(https://github.com/star7th/showdoc),基于php,对于我这个javaer来说略显困难。在一番折腾后终于搞定。

 

1、安装nginx

 

[html] view plain copy
 
  1. yum install nginx  

 

2、安装php

 

[html] view plain copy
 
  1. yum remove httpd* php*  
  2. yum install yum-priorities -y  
  3. rpm -Uvh http://mirrors.opencas.cn/epel/epel-release-latest-5.noarch.rpm  
  4. rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-5.rpm  
  5. yum --enablerepo=remi install php php-fpm  
  6. yum --enablerepo=remi install php-gd php-mysql php-mbstring php-xml php-mcrypt  


3、配置nginx

 

 

[html] view plain copy
 
  1. vi /etc/nginx/nginx.conf  
[html] view plain copy
 
  1. user  nginx;  
  2. worker_processes  2;  
  3. error_log  /var/log/nginx/error.log warn;  
  4. pid        /var/run/nginx.pid;  
  5.   
  6. events {  
  7.     worker_connections  1024;  
  8. }  
  9. http {  
  10.     include       /etc/nginx/mime.types;  
  11.     default_type  application/octet-stream;  
  12.     log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '  
  13.                       '$status $body_bytes_sent "$http_referer" '  
  14.                       '"$http_user_agent" "$http_x_forwarded_for"';  
  15.     access_log  /var/log/nginx/access.log  main;  
  16.     sendfile        on;  
  17.     #tcp_nopush     on;  
  18.     keepalive_timeout  65;  
  19.     gzip on;  
  20.     gzip_http_version 1.0;  
  21.     gzip_disable "MSIE [1-6]\.(?!.*SV1)";  
  22.     gzip_min_length 1024;  
  23.     gzip_comp_level 3;  
  24.     gzip_types application/javascript text/css image/gif image/jpeg image/png;  
  25.     include /etc/nginx/conf.d/*.conf;  
  26.   
  27.     server {  
  28.         listen 8000;  
  29.         server_name www.域名.com;  
  30.             root /mnt/www;  
  31.             index index.html index.htm index.shtml index.php;  
  32.   
  33.             location / {  
  34.                     if (!-e $request_filename) {  
  35.                             rewrite ^(.*)$ /index.php?s=$1 last;  
  36.                             break;  
  37.                     }  
  38.             }  
  39.   
  40.             location ~ .php {  
  41.                     fastcgi_pass   127.0.0.1:9000;  
  42.                     fastcgi_index  index.php;  
  43.                     fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;  
  44.                     include        fastcgi_params;  
  45.                     set $path_info "";  
  46.                     set $real_script_name $fastcgi_script_name;  
  47.                     if ($fastcgi_script_name ~ "^(.+?\.php)(/.+)$") {  
  48.                             set $real_script_name $1;  
  49.                             set $path_info $2;  
  50.                     }  
  51.                     fastcgi_param SCRIPT_FILENAME $document_root$real_script_name;  
  52.                     fastcgi_param SCRIPT_NAME $real_script_name;  
  53.                     fastcgi_param PATH_INFO $path_info;  
  54.         }  
  55.   
  56.         location ~ /\.ht {  
  57.                     deny all;  
  58.             }  
  59.     }  
  60. }  


4、配置php-fpm

 

 

[html] view plain copy
 
  1. vi /etc/php-fpm.d/www.conf  
[html] view plain copy
 
  1. user = nginx  
  2. group = nginx  


5、配置php

 

 

[html] view plain copy
 
  1. chown -R nginx:nginx /var/lib/php/session  


6、下载https://github.com/star7th/showdoc源码,上传到/mnt/www内

 

 

[html] view plain copy
 
  1. chmod 777 /mnt/www/showdoc-master/Application/Runtime/  

 

 

7、启动php-fpm

 

[html] view plain copy
 
  1. /etc/init.d/php-fpm restart  

8、启动nginx

 

 

[html] view plain copy
 
  1. /etc/init.d/nginx restart  

 

 

9、访问 http://域名:8000/showdoc-master/

分享到:
评论

相关推荐

    利用showdoc自动生成API文档

    利用showdoc自动生成API文档利用showdoc自动生成API文档利用showdoc自动生成API文档利用showdoc自动生成API文档利用showdoc自动生成API文档利用showdoc自动生成API文档利用showdoc自动生成API文档利用showdoc自动...

    docker部署showdoc

    docker部署showdoc

    Windows下安装ShowDoc需要用到的

    ShowDoc是什么 每当接手一个他人开发好的模块或者项目,看着那些没有写注释的代码,我们都无比抓狂。文档呢?!文档呢?!Show me the doc !! 程序员都很希望别人能写技术文档,而自己却很不希望要写文档。因为写...

    showDoc部署资源

    简单在windows上部署showDoc,包含IP的修改和部署中出现的问题

    centos7_install_showdoc

    centos7以及redhat7系统安装showdoc详细文档,及其所需依赖包。

    showdoc部署整合包.rar

    部署SHOWDOC整合资源包

    showdoc-master.zip

    showdoc-master

    showdoc完整部署包

    showdoc完整部署包,里面有最新的运行环境的软件,有最新的showdoc本地部署的最新代码包,还有完美的安装图文指导, 由于上传大小限制,我给出网盘连接: 链接:https://pan.baidu.com/s/1MXHuGA0bmCXGXztafk_XiA ...

    showDoc安装包

    showDoc安装包,点击exe即可安装该软件,前提是要有php环境,内含官网下载链接

    showdoc安装

    showdoc showdoc 环境安装

    一键安装部署k8s,博客里部署操作

    1、系统环境: centos 7 纯净系统; 2、只适用部署1台master + 2台node ; 3、在脚本 install-etcd-flannel-k8s.sh 中设置 3台的IP; 4、做好master到两台node的免密登陆; 5、将安装包放在master上,直接执行bash ...

    群晖docker给showdoc添加ssl证书

    showdoc

    showdoc本地搭建文件.rar

    内容包括: 1、PHP运行环境(WAMP)wamp-server-wamp5-2-5-multi-win.zip 2、vcredist_x86(环境文件) 3、showdoc部署代码 以上资源仅为学习使用,如有问题欢迎联系进行修改

    centos docker showdoc 镜像文件part2

    centos docker showdoc 镜像文件part2

    centos docker showdoc 镜像文件part1

    centos docker showdoc 镜像文件part1

    ShowDoc本地安装.zip

    每当接手一个他人开发好的模块或者项目,看着那些没有写注释的代码,我们都无比抓狂。文档呢?!文档呢?!Show me the doc !...ShowDoc就是一个非常适合IT团队的在线文档分享工具,它可以加快团队之间沟通的效率。

    showdoc-master

    showdoc用以接口文档管理,方便开发人员在开发过程中记录接口信息,测试人员测试及文档最终归档

    showdoc.db.php

    数据库备份资料 sqlite

    Python库 | showdoc-2.0.0.tar.gz

    资源分类:Python库 所属语言:Python 资源全名:showdoc-2.0.0.tar.gz 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059

Global site tag (gtag.js) - Google Analytics