0
点赞
收藏
分享

微信扫一扫

Centos7.6手工安装showdoc

玉新行者 2022-08-18 阅读 66

cd /opt/
git clone https://github.com/star7th/showdoc.git

 

#(慎用,应该指定到特定用户组)

chmod 777

 

安装php依赖,接上文安装php7.2

cd /usr/local/src/php-7.2.32/ext

 

安装phpize

yum install

生成gcc编译文件
phpize

安装依赖并编译

yum install libjpeg-devel
yum install libpng-devel
yum install freetype-devel

./configure --with-php-config=/usr/local/php/bin/php-config --with-png-dir --with-freetype-dir --with-jpeg-dir

Centos7.6手工安装showdoc_php

 

make&&make install

以后如下

Centos7.6手工安装showdoc_nginx_02

 

 然后修改php.ini

vim /etc/php.ini

添加

extension=gd

 

 配置nginx(网上很多傻逼就写了一点点,坑死我了)

server {
listen 81;
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location / {
root /opt/showdoc;
index index.php index.html index.htm;
}
location ~ \.php$ {
root /opt/showdoc;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}

 

重启服务

service php-fpm restart

nginx -s reload

访问 http://xxx.xxx.xxx.xxx:81/index.php

依次执行,安装后效果如下

Centos7.6手工安装showdoc_nginx_03

 

举报

相关推荐

0 条评论