Nginx+kodexplorer(可道云部署纪要)

简介: Nginx+kodexplorer部署纪要,问题纪要

Nginx+kodexplorer(可道云部署纪要)

安装nginx

yum install yum-utils
To set up the yum repository, create the file named /etc/yum.repos.d/nginx.repo with the following contents:
[nginx-stable]
name=nginx stable repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=1
enabled=1
gpgkey=https://nginx.org/keys/nginx_signing.key

[nginx-mainline]
name=nginx mainline repo
baseurl=http://nginx.org/packages/mainline/centos/$releasever/$basearch/
gpgcheck=1
enabled=0
gpgkey=https://nginx.org/keys/nginx_signing.key

yum-config-manager --enable nginx-mainline

yum install nginx


systemctl status nginx
systemctl start nginx
systemctl enable nginx

防火墙

systemctl stop firewalld.service
systemctl disable firewalld.service

SElinux关闭

临时关闭:

[root@localhost ~]# getenforce
Enforcing
[root@localhost ~]# setenforce 0
[root@localhost ~]# getenforce
Permissive

永久关闭:

[root@localhost ~]# vim /etc/sysconfig/selinux
SELINUX=enforcing 改为 SELINUX=disabled
#重启服务reboot

php安装

[root@localhost conf.d]# yum -y install php-fpm php-mbstring php-gd
[root@localhost conf.d]# systemctl status  php-fpm
[root@localhost conf.d]# systemctl restart  php-fpm
[root@localhost conf.d]# systemctl enable  php-fpm

下载kodexplorer

wget http://static.kodcloud.com/update/download/kodexplorer4.39.zip

解压到/data/kodexplorer目录下(自定义目录,本文在/data/kodexplorer)

cd /data/kodexplorer
unzip kodexplorer4.39.zip

nginx配置

server {
    listen 80;
    server_name localhost;
    root /data/kodexplorer/;
    index  index.html index.htm index.php;

        location ~ \.php$ {
                root kodexplorer;
                fastcgi_pass 127.0.0.1:9000;
                fastcgi_index index.php;
                #fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                fastcgi_param SCRIPT_FILENAME /data/kodexplorer$fastcgi_script_name;
                include fastcgi_params;
        }
 }

新增加php配置

vim /etc/php.ini
#在最后一行
extension=mbstring.so
extension=php_gd2.dll
:wq!
#保存退出即可
#重启php-fpm服务
systemctl restart php-fpm

遇到的问题:

1、php的index.html无法访问,SElinux没有关闭导致;

2、是由于php-mbstring php-gd没有安装,并且php.ini没有添加配置(如上<新增加php配置>),图片无法加载‘

3、nginx无法访问到,是由于nginx配置不对,如下修改:

#fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_FILENAME /data/kodexplorer$fastcgi_script_name;
目录
相关文章
|
2月前
|
Kubernetes 应用服务中间件 nginx
百度搜索:蓝易云【使用Kubernetes部署Nginx应用教程】
现在,你已经成功在Kubernetes集群上部署了Nginx应用。通过访问Service的外部IP地址,你可以访问Nginx服务。
41 4
|
3月前
|
安全 应用服务中间件 nginx
百度搜索:蓝易云【使用Debian、Docker和Nginx部署Web应用教程】
这些是在Debian上使用Docker和Nginx部署Web应用的基本步骤。根据您的需求和具体环境,可能还需要进行其他配置和调整。请确保在进行任何与网络连接和安全相关的操作之前,详细了解您的网络环境和安全需求,并采取适当的安全措施。
44 0
|
17天前
|
前端开发 应用服务中间件 nginx
Nginx配置详解Docker部署Nginx使用Nginx部署vue前端项目
Nginx配置详解Docker部署Nginx使用Nginx部署vue前端项目
78 0
|
3月前
|
应用服务中间件 Linux 网络安全
windows+linux环境下nginx部署环境
windows+linux环境下nginx部署环境
|
2天前
|
应用服务中间件 Linux 开发工具
如何在阿里云服务器快速搭建部署Nginx环境
以下是内容的摘要: 本文档主要介绍了在阿里云上购买和配置服务器的步骤,包括注册阿里云账号、实名认证、选择和购买云服务器、配置安全组、使用Xshell和Xftp进行远程连接和文件传输,以及安装和配置Nginx服务器的过程。在完成这些步骤后,你将能够在服务器上部署和运行自己的网站或应用。
|
4月前
|
前端开发 应用服务中间件 nginx
前端破圈使用Docker Nginx容器部署项目🏴‍☠️
前端破圈使用Docker Nginx容器部署项目🏴‍☠️
|
1月前
|
应用服务中间件 Linux nginx
web后端-linux-nginx-1.18操作命令和部署
web后端-linux-nginx-1.18操作命令和部署
|
3月前
|
应用服务中间件 Linux 网络安全
【Nginx】Nginx Linux 部署
【1月更文挑战第25天】【Nginx】Nginx Linux 部署
|
3月前
|
TensorFlow 算法框架/工具 数据安全/隐私保护
如何在云服务器使用docker快速部署jupyter web服务器(Nginx+docker+jupyter+tensorflow)
如何在云服务器使用docker快速部署jupyter web服务器(Nginx+docker+jupyter+tensorflow)
77 0
|
3月前
|
Linux 应用服务中间件 nginx
linux下 web 版 vscode本地部署 云端加个nginx同
linux下 web 版 vscode本地部署 云端加个nginx同
20 0