Linode Installation Laravel 5 notes

Source: Internet
Author: User
Tags gmp ldap postgresql module snmp snmp module tidy xsl to domain
A few days ago to learn PHP, found Laravel this framework, began to see the time is 4.2 version of the Thursday when suddenly found Laravel 5 officially on-line.
I am not a lot of contact with the framework, because it is not the code, but the programming has been a strong interest, began to look at. Previously saw Yii, look dizzy, say really not very like, but laravel a look feel comfortable.

Today toss a big half-day in Linode Laravel 5, finally toss to the Welcome page, very happy.

  1. Apply for a Linode server that I use for Ubuntu 14.4
  2. Install PHP

    • sudo apt-get update//Warehouse list Upgrade
    • sudo apt-get install apache2//install Apache server, ver 2.4.7
    • sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql//install MySQL
    • sudo apt-get install php5 libapache2-mod-php5 php5-mcrypt//install php5,mcrypt This extension is required by laravel
    • If you need to load other modules
      Apt-cache Search php5-//Get module list
      List
      Php5-cgi-server-side, html-embedded scripting language (CGI binary)
      Php5-cli-command-line interpreter for the PHP5 scripting language
      Php5-common-common files for packages built from the PHP5 source
      Php5-curl-curl Module for PHP5
      Php5-dbg-debug Symbols for PHP5
      Php5-dev-files for PHP5 module development
      PHP5-GD-GD Module for PHP5
      PHP5-GMP-GMP Module for PHP5
      PHP5-LDAP-LDAP Module for PHP5
      Php5-mysql-mysql Module for PHP5
      PHP5-ODBC-ODBC Module for PHP5
      Php5-pgsql-postgresql Module for PHP5
      Php5-pspell-pspell Module for PHP5
      Php5-recode-recode Module for PHP5
      PHP5-SNMP-SNMP Module for PHP5
      Php5-sqlite-sqlite Module for PHP5
      Php5-tidy-tidy Module for PHP5
      PHP5-XMLRPC-XML-RPC Module for PHP5
      Php5-xsl-xsl Module for PHP5
      Php5-adodb-extension optimising the ADODB Database Abstraction Library
      php5-auth-pam-a PHP5 extension for Pam authentication

      sudo apt-get install name of the module//installation

  3. Installing Laravel

    • Curl-ss Https://getcomposer.org/installer | PHP//Installation composer
    • Composer global require "laravel/installer=~1.1"//Download Installer
    • Export $PATH = PATH: "~/.composer/vendor/bin"//Add environment variable to facilitate direct execution laravel
    • You can use the Laravel command to set up a new site.
      eg
      Go to var/www/html folder execution
      Laravel New MySite
      After execution, a MySite folder is created, Laravel even if it is downloaded.
  4. Vhost on the simple configuration server point to this site
    Because Apache2 is a 2.4.7 version, the configuration is slightly different

    Laravel requires sudo a2enmod rewrite//Turn on rewrite module

    • Configuration Vhost//It took some time here today
      Go to etc/apache2/folder and find Sites-available

    • CP default.conf mysite.com.conf//"conf" before the name is the same as the site you want to

    • Edit Save

         
               
                  ServerName   mysite.com  serveralias  mysite.com  ServerAdmin  webmaster@mysite.c Om   documentroot  /var/www/html/mysite/public/#这里是public, Laravel starts with the index.php file here. span> 
              
                allowoverride   all  # This place is going to be a lot of detours today.   Options   +execcgi-multiviews +symlinksifownermatch   Order   allow,deny   allow   from  all     errorlog  ${apache_log_dir} /error.log  customlog   ${apache_log_dir} /access.log Combined    
    • Add a new site to the server
      A2ensite mysite.com.conf (delete with a2disite xxxxx)
      To see how many stations are open, enter the Sites-enable folder to see the files.

  5. The storage folder under the Laravel directory needs to be writable, Laravel Use this folder as the session's storage area

  6. Check the. htaccess under public under the Mystie folder. Here is Laravel rewrite configuration, generally do not move

All done, go to domain to make a record point, and then OK.

Call.. Keep a record of what you did today, toss this redirect for a half day today
Because it doesn't open.
AllowOverride all this Part

Write here to calculate a record, if accidentally help who, also counted good!

The above describes the Linode installation Laravel 5 notes, including the aspects of the content, I hope that the PHP tutorial interested in a friend helpful.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.