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; } }
/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; } }
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';
谢谢