Home > Article > Backend Development > Cloud9 install laravel51
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.