LNMP下安装discuz

 

vim /usr/local/nginx/conf/nginx.conf

 

 

mkdir  -p  /usr/local/nginx/conf/vhosts

cd /usr/local/nginx/conf/vhosts/

vim test.conf
server    
         
{         
    listen 80 default;
    index index.html index.htm index.php;
    root /discuz;
             
    location ~ \.php$ {
        include fastcgi_params;
        fastcgi_pass unix:/tmp/php-fcgi.sock;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME /discuz$fastcgi_script_name;
    }
}
View Code
 /usr/local/nginx/sbin/nginx  -t
 /usr/local/nginx/sbin/nginx  -s reload

 

 

 

 cat /usr/local/nginx/logs/nginx_error.log

 

 不存在/tmp.www.sock,换一个存在的

server

{
    listen 80;
    server_name www.hyit.com;
    index index.html index.htm index.php;
    root /data/www;

    location ~ \.php$ {
        include fastcgi_params;
        fastcgi_pass unix:/tmp/php-fcgi.sock;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME /data/www$fastcgi_script_name;
    }
}
View Code

 

 

 

 

vim /usr/local/php/etc/php-fpm.conf

 

 cd /discuz

 chown -R   php-fpm   data  uc_server/data/  uc_client/data  config

 

 

 

vim /etc/profile.d/path.sh

source /etc/profile

 

 

create database discuz;
 
grant all on discuz.* to 'hy'@'localhost' identified by '062417';

 

 

 

posted @ 2015-09-18 14:30  沐风先生  阅读(257)  评论(0编辑  收藏  举报