Home >Backend Development >PHP Tutorial >Cloud9 install laravel51

Cloud9 install laravel51

WBOY
WBOYOriginal
2016-07-30 13:29:37983browse

1. First create your own Cloud9 application workspace, select the php environment
2. Delete the generated files inside,

<code>rm README<span>.md</span> php<span>.ini</span> hello-world<span>.php</span></code>

3. Install composer

<code>curl <span>-sS</span> https:<span>//getcomposer.org/installer | php</span></code>

4. Move composer.phar to the bin directory for global convenience Use

<code><span>sudo</span> mv composer.phar /usr/local/bin/composer </code>

5. Create a laravel project

composer create-project laravel/laravel project name – prefer-dist

6. Move the generated sub-files of the laravel project to the previous directory, and then delete the generated laravel project file

shopt -s dotglob
mv laravel/* ./ #laravel refers to generating all the files of the laravel project and moving them to the upper directory
rm -rf laravel #Delete the generated aravel project

7. Specify public for apache in Cloud9

sudo nano /etc/apache2/sites-enabled/001-cloud9.conf

<code><span>// Change this line</span>
DocumentRoot /home/ubuntu/<span>workspace</span>
改成下面的这个样子
<span>// To following</span>
DocumentRoot /home/ubuntu/<span>workspace</span>/public</code>

Copyright statement: This article is the original article of the blogger and may not be reproduced without the permission of the blogger.

The above introduces the installation of laravel51 on Cloud9, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:32 PHP CookiesNext article:32 PHP Cookies