laravel 框架安装 注意事项

16 篇文章 0 订阅
10 篇文章 0 订阅

1 打开禁用的两个函数

1、进入php.ini文件,找到disable_function=,删除proc_open函数,即可。
2、进入php.ini文件,找到disable_function=,删除proc_get_status函数,即可。

2 linux 下载composer 并且全局处理

1、curl -sS https://getcomposer.org/installer | php  
2、mv /tmp/composer.phar /usr/local/bin/composer 

3 linux 下配置 git 和ssh 秘钥

设置Git的user name和email:
$ git config --global user.name "xuhaiyan"
$ git config --global user.email "haiyan.xu.vip@gmail.com"

二、生成SSH密钥过程:
1.查看是否已经有了ssh密钥:cd ~/.ssh
如果没有密钥则不会有此文件夹,有则备份删除
2.生存密钥:
$ ssh-keygen -t rsa -C “haiyan.xu.vip@gmail.com”
按3个回车,密码为空。

Your identification has been saved in /home/tekkub/.ssh/id_rsa.
Your public key has been saved in /home/tekkub/.ssh/id_rsa.pub.
The key fingerprint is:
………………

最后得到了两个文件:id_rsa和id_rsa.pub

3.添加密钥到ssh:ssh-add 文件名
需要之前输入密码。
4.在github上添加ssh密钥,这要添加的是“id_rsa.pub”里面的公钥。

4 linux 下配置 gitclone 你的项目

进行克隆的文件夹和克隆下来的文件夹要进行权限设置 chmod -R 777 你的文件夹

5 linux 在你的当前目录下 用composer install 进行 框架 更新

如果不更新将Laravel 5 Failed opening required bootstrap/../vendor/autoload.php 报错

6 linux 配置你的nginx.conf 配置文件

server 里面加入 


    location / {  
                try_files $uri $uri/ /index.php$is_args$query_string;  
            }
   并且注释掉      #error_page   404   /404.html;  
server  
    {  
        listen 80;  
        #listen [::]:80;  
        server_name www.xxxxx.com xxxxx.com;  
        index index.html index.htm index.php default.html default.htm default.php;  
        root  /home/wwwroot/www.pjcms.com/public;  

        include other.conf;  
        #error_page   404   /404.html;  

               location / {  
                    try_files $uri $uri/ /index.php$is_args$query_string;  
                }  
        location ~ [^/]\.php(/|$)  
            {  
                # comment try_files $uri =404; to enable pathinfo  
                try_files $uri =404;  
                fastcgi_pass  unix:/tmp/php-cgi.sock;  
                fastcgi_index index.php;  
                include fastcgi.conf;  
                #include pathinfo.conf;  
            }  

        location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$  
            {  
                expires      30d;  
            }  

        location ~ .*\.(js|css)?$  
            {  
                expires      12h;  
            }  

        access_log  /home/wwwlogs/www.pjcms.com.log  access;  
    }  

www.186886.top
liulei.186886.top

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值