一、环境搭建
echo '192.168.12.201 mirrors.aliyun.com' >>/etc/hosts
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
curl -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
二、安装nginx和php
yum install nginx php-fpm -y
grep -Ev '^$|#' /etc/nginx/nginx.conf.default >/etc/nginx/nginx.conf
vim /etc/nginx/nginx.conf
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 80;
server_name localhost;
root /code;
index index.php index.html index.htm;
location / {
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /code$fastcgi_script_name;
include fastcgi_params;
}
}
}
mkdir /code
vim /etc/php-fpm.d/www.conf
修改用户:
user nginx;group nginx
systemctl start php-fpm.service nginx.service
三、下载KodExplorer的安装包
cd /code
wget http://192.168.12.201/docker_image/kodexplorer4.40.zip
chown -R nginx:nginx .
四、浏览器访问:ip:端口(测试)

至此搭建完成!
网友评论