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

上一篇:CGI,FastCGI和PHP-FPM之间的关系和区别。


下一篇:nginx高并发配置详解