Centos 7.9 部署可道云
作者:互联网
#安装服务需要的依赖包
yum install epel-release -y && yum clean all && yum makecache
yum install nginx php-fpm php-cli lrzsz unzip php-mbstring php-gd -y
#更改php启动用户名
sed -i 's#apache#nginx#g' /etc/php-fpm.d/www.conf
#修改nginx配置
groupadd nginx
useradd nginx -s /sbin/nologin -M
cat >/etc/nginx/nginx.conf<<EOF
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;
index index.html index.htm index.php;
location ~ \.php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}
EOF
#上传可道云软件压缩
cd /usr/share/nginx/html && rm -fr ./*
rz kodexplorer4.40.zip
unzip kodexplorer4.40.zip
#授权解压组件目录
chown -R nginx.nginx /usr/share/nginx/html/
#启动php-fpm
php-fpm &
#启动nginx
nginx
标签:index,php,Centos,nginx,html,yum,7.9,可道,fastcgi 来源: https://www.cnblogs.com/slyy/p/14868889.html