lnmp一键安装包+laravel安装+samba文件共享 在windows上面编辑linux上面的文件

一键安装lnmp

https://lnmp.org/

安装composer

添加php用户 php

安装laravel

composer create-project --prefer-dist laravel/laravel blog 5.8.*

在这里插入图片描述

vi /usr/local/php/etc/php.ini

在这里插入图片描述

配置nginx/php-fpm

server {
        listen       8000;
        server_name  localhost;

        #charset koi8-r;

        access_log  logs/access.log  ;
        error_log logs/error.log;
        location / {
            root   /home/wwwroot/default/blog/public;
            index  index.php index.html index.htm;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            try_files $uri $uri/ /index.php?$query_string;
        }

        #error_page  404              /404.html;

        # redirect server error pages to the static page /50x.html
        #
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }

        # proxy the PHP scripts to Apache listening on 127.0.0.1:80
        #
        #location ~ \.php$ {
        #    proxy_pass   http://127.0.0.1;
        #}

        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        #
        location ~ \.php$ {
            root           /home/wwwroot/default/blog/public;
           # fastcgi_pass   127.0.0.1:9000;
            fastcgi_pass        unix:/tmp/php-cgi.sock;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME  /$document_root$fastcgi_script_name;
            include        fastcgi_params;
        }
        location /static {
            root   /home/wwwroot/default/ann_tag/public;
        }
        # deny access to .htaccess files, if Apache's document root
        # concurs with nginx's one
        #
        #location ~ /\.ht {
        #    deny  all;
        #}
    }

[error] 16957#0: *78 FastCGI sent in stderr: “Unable to open primary script:

2019/03/26 14:01:34 [error] 16957#0: *78 FastCGI sent in stderr: “Unable to open primary script: //home/wwwroot/default/blog/public/index.php (No such file or directory)” while reading response header from upstream, client: 36.110.147.197, server: localhost, request: “GET /index.php HTTP/1.1”, upstream: “fastcgi://unix:/tmp/php-cgi.sock:”, host: “”
啥几把文件权限限制,将站点根目录放到/home/wwwroot/default/blog

open_basedir的错误

将fastcgi.conf的这一行注释
#fastcgi_param PHP_ADMIN_VALUE “open_basedir=$document_root/:/tmp/:/proc/”;

[error] 23081#0: *8255 open() failed (13: Permission denied)

vim nginx.conf
修改user nginx为当前系统用户,如:user root

总结:先按照默认的安装配置跑通,再修改

安装samba在windows上编辑

yum install samba samba-client samba-swat -y
smbpasswd -a root
vi /etc/samba/smb.conf
[tmp]
        path=/home/wwwroot/default/
        browseable=yes
        writeable=yes
        valid users=root

在这里插入图片描述
service smb restart
参考:
安装samba https://blog.csdn.net/u012322925/article/details/51388159

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值