【PHP-Laravel框架学习】在ubuntu上配置环境
来源:互联网 发布:杜兰特新秀体测数据 编辑:程序博客网 时间:2024/05/19 18:18
服务器环境ubuntu-server-14.04.4
查看系统环境是否满足以下条件
<?php phpinfo(); ?>
OR
命令行php -m 查看模块
对照一下
- PHP >= 5.5.9
- OpenSSL PHP Extension
- PDO PHP Extension
- Mbstring PHP Extension
- Tokenizer PHP Extension
局部安装composer
Installation
First, you need to download Composer into your project folder. Let’s create an empty folder for this purpose in our /var/www Apache web root folder called my_project:
cd /var/wwwmkdir projectcd project
Download Composer into this folder with the following command:
curl -sS https://getcomposer.org/installer | php
You should see a success message that looks something like this:
All settings correct for using ComposerDownloading...Composer successfully installed to: /var/www/my_project/composer.pharUse it: php composer.phar
Now if you check in the project folder, you’ll see that only one file has been downloaded: composer.phar - a PHP archive file that can be run from the command line.
更换composer镜像源
php composer.phar config -g repo.packagist composer https://packagist.phpcomposer.com
安装 Laravel 5.1 LTS
php composer.phar create-project laravel/laravel your-project-name --prefer-dist "5.1.*"
修改apache2 网站目录
根目录是public
sudo vim /etc/apache2/site-enabled/000-default.conf
重启apache
sudo /etc/init.d/apache2 start
sudo /etc/init.d/apache2 restart
sudo /etc/init.d/apache2 stop
访问localhost 出现“Laravel 5” 就OK了
假如发现报错
failed to open之类的
设置下777权限就好了
- 【PHP-Laravel框架学习】在ubuntu上配置环境
- php框架laravel学习 一 (环境搭建)
- 在ubuntu 上配置vim的php开发环境
- 在Ubuntu上配置PHP调试环境Vim+XDebug
- 在ubuntu上配置PHP开发环境(转)
- Laravel PHP 开发环境配置
- Laravel PHP 开发环境配置
- 在ubuntu 上搭建php开发环境
- 在Ubuntu下配置Laravel
- 在虚拟机上安装Ubuntu以及在Windows下配置PHP环境
- 在Ubuntu server上配置lamp环境
- 在Ubuntu上配置LAMP环境
- JDK在ubuntu上的环境配置
- laravel框架学习-配置,路由
- 配置php在eclipse上开发环境.
- 在IIS上配置PHP开发环境
- 在Win7上配置php环境
- php框架优秀框架laravel学习(-)
- android开发中的九宫格布局的实现
- 腾讯2016春季校园实习招聘技术岗终面(HR面)问题汇总(CC++后台)
- AngularJS_3 Form
- 数据结构与算法汇总(持续更新中)
- 一位数 * 一位数
- 【PHP-Laravel框架学习】在ubuntu上配置环境
- 十个随机数求和 1044 郑明雨
- 用闹钟运算
- CAlayer层的属性
- Git版本控制软件结合GitHub从入门到精通常用命令学习手册
- hihocoder 1288
- iOS 语音读文字so easy
- iOS QQ第三方登录的简单实现
- 余数和商 一位数乘一位数