showdoc架设

新建模拟器安装的阿里centos7 mini

安装完后发现没有可用ifconfig,查不到ip,网络不可用

解决方案https://blog.csdn.net/koevas/article/details/97496394

安装docker    解决方案  https://www.jianshu.com/p/c983b1ccbc27

安装showdoc  解决方案 https://www.showdoc.cc/help?page_id=65610

以上安装运行没有问题了。

如需二次开发需

安装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

    server {
        listen       80;
        server_name  127.0.0.1;
        root         /var/www/html;
        index index.php index.html;
        error_page  404              /404.html;
        location = /40x.html {
        }
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
        }
        location ~ \.php$ {
            root           /var/www/html;
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
            include        fastcgi_params;
        }
        location ~ /\.ht {
            deny  all;
        }
    }

保存。然后执行命令:

service nginx start
service php-fpm start
chkconfig php-fpm on
chkconfig nginx on

然后进入目录/var/www/html(不存在则新建),将ShowDoc上传并按照部署手册

如启动nginx之后80不能访问,需对防火墙进行配置

第一步,对80端口进行防火墙配置:

firewall-cmd --zone=public --add-port=80/tcp --permanent
第二步,重启防火墙服务:
systemctl restart firewalld.service
然后重新在浏览器中访问你的ip,应该就可以访问了。

事后碰到个问题一直困扰我。怎么修改文件权限都不能开启PHP的写权限。因虚拟机使用,我将selinux给关了。

查看SELinux状态:

1、/usr/sbin/sestatus -v      ##如果SELinux status参数为enabled即为开启状态

SELinux status:                 enabled

2、getenforce                 ##也可以用这个命令检查

关闭SELinux:

1、临时关闭(不用重启机器):

setenforce 0                  ##设置SELinux 成为permissive模式

                              ##setenforce 1 设置SELinux 成为enforcing模式

2、修改配置文件需要重启机器:

修改/etc/selinux/config 文件

将SELINUX=enforcing改为SELINUX=disabled

重启机器即可

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值