阿 里云Centos 6.5安装laravel 5.1 配置一


1  查询环境变量

 

[root@iZ25uso7yliZ ~] # echo $PATH

/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/www/wdlinux/mysql/bin:/root/bin

 

 

 

                         

Export命令定义变量【只对当前shell(BASH)有效(临时的)】

        

[root@iZ25uso7yliZ bin] #export PATH=/www/wdlinux/apache_php-5.5.9/bin:$PATH

 

[root@iZ25uso7yliZ bin] #php -v

PHP 5.5.9 (cli) (built: Jan28 2016 10:25:45)

Copyright (c) 1997-2014 ThePHP Group

Zend Engine v2.5.0,Copyright (c) 1998-2014 Zend Technologies

 

 

/etc./profile环境变量对所有用户生效(永久的)

 

PATH=/www/wdlinux/apache_php-5.5.9/bin:$PATH

  export PATH

 

Root@iZ25uso7yliZ~]# vim /etc./profile

 

#Current threshold for system reserved uid/gads is 200

#You could check uidgid reservation validity in

#/user/share/doc/setup-*/uidgid file

......

 

PATH=/www/wdlinux/apache_php-5.5.9/bin:$PATH

 export PATH

"/etc./profile"82L, 1856C        82,2          Bot

 

[root@iZ25uso7yliZ~]# source /etc./profile

 

[root@iZ25uso7yliZapache_php-5.5.9]# cd /

[root@iZ25uso7yliZ/]# php -v

PHP5.5.9 (cli) (built: Jan 28 2016 10:25:45)

Copyright(c) 1997-2014 The PHP Group

ZendEngine v2.5.0, Copyright (c) 1998-2014 Zend Technologies

 

  

 3. 在用户目录下的 .bash_profile文件中增加变量【对单一用户生效(永久的)】

 

PATH=/www/wdlinux/apache_php-5.5.9/bin:$PATH

  export PATH

 

root@iZ25uso7yliZ~] # vim ~/.bash_profile

#.bash_profile

#Get the aliases and functions

if[ -f ~/.bashrc ]; then

        . ~/.bashrc

fi

#User specific environment and startup programs

 

PATH=$PATH:$HOME/bin

PATH=/www/wdlinux/apache_php-5.5.9/bin:$PATH

exportPATH

                                                                                                 

"~/.bash_profile"12L, 176C    

 

 

 

4.执行curl 安装 composer , 如下

 

root@iZ25uso7yliZ~]curl -sS http://install.phpcomposer.com/installer | php

#!/usr/bin/envphp

Allsettings correct for using Composer

Downloading...

 

Composersuccessfully installed to: /root/composer.phar

Useit: php composer.phar

[root@iZ25uso7yliZ~]# mv composer.phar /usr/local/bin/composer

[root@iZ25uso7yliZ~]# composer

   ______

  / ____/___ ____ ___  ____  ____ ________  _____

 / /   /__ \/ __ `__ \/ __ \/ __ \/ ___/ _ \/ ___/

//___/ /_/ / / / / / / /_/ / /_/ (__ )  __/ /

\____/\____/_//_/ /_/ .___/\____/____/\___/_/

                    /_/

Composerversion 1.0-dev (cd21505c8d58499a9b4d38573881cfec49c51ffd) 2016-01-27 13:04:22

 

 

 

 

 

 

 

 

 

5修改 laravel安装环境,如下

 

拷贝 .composer/ 的 vendor 目录到  /usr/local/bin

 

[root@iZ25uso7yliZ~]# composer global require "laravel/installer"

[root@iZ25uso7yliZ~]# cd ~/.composer/

[root@iZ25uso7yliZ.composer]# ls

cache  composer.json composer.lock  vendor

[root@iZ25uso7yliZ.composer]# cp -R  vendor   /usr/local/bin

[root@iZ25uso7yliZ.composer]# cd vendor/bin

[root@iZ25uso7yliZbin]# cp  laravel  /usr/local/bin

[root@iZ25uso7yliZ~]# vim /etc./profile

 

PATH=/usr/local/vendor/bin:$PATH

 

 export PATH

    /etc./profile" 86L, 1892C                                                        

[root@iZ25uso7yliZ~]# source /etc./profile

 

 

6查询laravel 命令

 

[root@iZ25uso7yliZ~]# laravel
Laravel Installerversion .3.1

Usage:
 
command [options] [arguments]

Options:
 -h, --help           Display this help message
 -q, --quiet          Do not output any message
 -V, --version        Display this application version
    --ansi           Force ANSI output
    --no-ansi        Disable ANSI output
 -n, --no-interaction Do not ask anyinteractive question
 -v|vv|vvv, --verbose Increase theverbosity of messages: 1 for normal output, 2 for more verbose output and 3 fordebug

Available commands:
 help Displays help for a command
 list Lists commands
 new Create a new Laravel application.
[root@iZ25uso7yliZ ~]#

 


 [1]

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值