设为首页 收藏本站
查看: 571|回复: 0

[经验分享] How to install laravel on ubuntu lamp

[复制链接]

尚未签到

发表于 2018-5-1 13:31:47 | 显示全部楼层 |阅读模式


http://tutsnare.com/how-to-install-laravel-on-ubuntu-lamp/
How to install laravel on ubuntu lamp (via laravel installer, composer)
  Now time of frameworks in php like laravel, codeigniter etc and easy
to install php frameworks on local server like lamp, xampp etc. Below wewill see installation steps of a php framework laravel on ubuntu lamp.
Let’s see How to install laravel on ubuntu lamp via
laravel installer and via composer. for this we need some server
requirements, some of software installation. Really a fast and handy
installation of this new php framework. you will get this in few
minutes. In this article (How to install laravel on ubuntu lamp) we are
discussing all laravel installation different method need to give some
hands and got installed.
We need some system requirements to install laravel framework :
  PHP >= 5.4
Mcrypt PHP Extension
OpenSSL PHP Extension
Mbstring PHP Extension
  Below are the steps of installing laravel on ubuntu lamp using composer and laravel installer :- first we need to install latest update and upgrade of unbuntu server. so for this run below command at your terminal
sudo apt-get update
sudo apt-get upgrade  After update we need to install php, apche, mysql (if not already installed)
  Install php mysql and apache
sudo apt-get install apache2
sudo apt-get install php5
sudo apt-get install mysql-server
sudo apt-get install php5-mysql  Now we need to install some of require extension (json, curl, mcrypt
etc.) to run and download laravel framework. and then restart apache
server to setup all extension.
#installing json extension
sudo apt-get install php5-json
#installing unzip extension
sudo apt-get install unzip
#installing curl extension
sudo apt-get install curl
#installing openssl extension
sudo apt-get install openssl
#installing mcrypt extension
sudo apt-get install php5-mcrypt
#enable mcrypt extension
sudo php5enmod mcrypt
#installing git
sudo apt-get install -y git-core
#enable mod rewrite extension
sudo a2enmod rewrite
#restarting apache
sudo service apache2 restart  After successfully configure all php setup and require extension we
need to install composer to download laravel from remote server. for
this first command will be for download composer using curl then second
one move composer to local user directory for make composer globally
use.
# installing composer
curl -sS https://getcomposer.org/installer | php
# move composer globally
sudo mv composer.phar /usr/local/bin/composer
# check composer working
sudo composer

  Now we composer installed successfully on our ubuntu. and then there are two method to install laravel on ubuntu lamp.
1. Via Laravel Installer
2. Via composer
  a. create project command.
b. manually download and install(via commands)
  I am sharing steps below with terminal command run screenshots that how to install laravel on unbuntu lamp.
1. Via Laravel Installer :-
  laravel installer is a new method to install added for laravel 5. it’s much faster method than installing via Composer.
# download installer
  sudo composer global require "laravel/installer=~1.1"
#setting up path
export PATH="~/.composer/vendor/bin:$PATH"
# change dir where to install
sudo cd /var/www/html/
# download and installing
sudo laravel new laravelnew
# giving permission
sudo chmod -R 777 laravelnew

2. Via Composer :-
A. create project command :-
  after install composer you can directly install laravel by
create-project command and give your destination path where you want to
install laravel.
# checking composer is successfully installed
sudo composer
# downloading and install via composer
#composer create-project laravel/laravel --prefer-dist
sudo composer create-project laravel/laravel /var/www/html/laravel3
# setting up writable permission
sudo chmod -R 777 /var/www/html/laravel3

B. manually download and install(via commands) :-
  this is a long method to install laravel in this method we need to
download laravel files then extract then move then apply permission and
then we need composer install command.
# change directory to /var/www/html/(where i want to create laravel project)
sudo cd /var/www/html/
# downloading from github
sudo wget https://github.com/laravel/laravel/archive/master.zip
# unzip downloaded zip
sudo unzip master.zip
# giving a new name to extract directrory
sudo mv /var/www/html/laravel-master /var/www/html/laravel2
# giving writable permission
sudo chmod -R 777 laravel2
# removing zip file
sudo rm master.zip
# getting project directory where i need to install project
sudo cd laravel2
# installing using composer
sudo composer install


  Now you are done with how to install laravel on ubuntu lamp. and openurl on

  http://localhost/yourlaravel and bam.

  Now you can enjoy today’s
fast php framework. you can get more about this on official site of
laravel and see how fast and how many features you are getting. you willreally enjoy this php framework.

  

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-454434-1-1.html 上篇帖子: How To Install Laravel 4 Framework on Ubuntu 下篇帖子: Install laravel 5 on ubuntu server
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表