以Centos6.6、通过yum安装为例子。需要编译安装的请暂先搜索网络教程,这里尚未来得及整理。

首先你需要安装web服务器,apache或者nginx中的一个(如果已安装了请忽略),然后再安装PHP环境配合使用

安装 Apache + PHP

yum install httpd

yum install php php-gd php-mcrypt php-mbstring php-mysql php-pdo

service httpd start

chkconfig httpd on

安装完毕后,默认的Apache Web目录是/var/www/html,将ShowDoc上传并按照部署手册安装即可

安装Nginx + PHP

yum install nginx

yum install php php-gd php-fpm php-mcrypt php-mbstring php-mysql php-pdo

安装完后,在/etc/nginx/conf.d新建文件127.0.0.1.conf

  1.    server {

  2.        listen       80;

  3.        server_name  127.0.0.1;

  4.        root         /var/www/html;

  5.        index index.php index.html

  6.        error_page  404              /404.html;

  7.        location = /40x.html {

  8.        }

  9.        error_page   500 502 503 504  /50x.html;

  10.        location = /50x.html {

  11.        }

  12.        location ~ \.php$ {

  13.            root           /var/www/html;

  14.            fastcgi_pass   127.0.0.1:9000;

  15.            fastcgi_index  index.php;

  16.            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;

  17.            include        fastcgi_params;

  18.        }

  19.        location ~ /\.ht {

  20.            deny  all;

  21.        }

  22.    }

保存。然后执行命令:

service nginx start

service php-fpm start

chkconfig php-fpm on

chkconfig nginx on

然后进入目录/var/www/html(不存在则新建),将ShowDoc上传并按照部署手册(http://blog.star7th.com/2016/05/2007.html )安装即可。安装后便可通过浏览器访问127.0.0.1

 

在线管理接口(API)工具ShowDoc环境搭建_html

https://www.showdoc.cc/help?page_id=14