Learn about Centmin Mod LEMP Stack today
Register Now

How to install Laravel?

Discussion in 'Other Web Apps usage' started by HarryPotter, Apr 5, 2015.

  1. HarryPotter

    HarryPotter Member

    41
    0
    6
    Apr 3, 2015
    Ratings:
    +0
    Local Time:
    5:19 AM
    Hi. I have try to install Laravel but it not work. I have searched Google as well but it difference with Centmin Mod.

    Laravel Recipes :: Creating a Nginx VirtualHost

    Where is php5-fpm? also www.conf. I have search that names but not found.

    So any tutorial to create an project Laravel?

     
  2. pamamolf

    pamamolf Premium Member Premium Member

    4,071
    427
    83
    May 31, 2014
    Ratings:
    +833
    Local Time:
    9:19 PM
    Nginx-1.25.x
    MariaDB 10.3.x
    First you need to create a new vhost ....from Centminmod menu like yourdomain.com

    Then upload your files to:

    Code:
    /home/nginx/domains/yourdomain.com/public
    And then edit the phpfpm config file by running from ssh:

    Code:
    fpmconf
    Then restart phpfpm by running from ssh:

    Code:
    fpmrestart
    And if you need to restart Nginx also run from ssh:

    Code:
    ngxrestart
    But i am not so sure that this will work for your software....So test it and let us know...
     
  3. eva2000

    eva2000 Administrator Staff Member

    53,865
    12,160
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,712
    Local Time:
    5:19 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    For Centmin Mod location of files check out
    Never used Laravel myself unfortunately. But you won't be able to use the instructions at Laravel Recipes :: Creating a Nginx VirtualHost as Centmin Mod only has a single PHP-FPM pool and that needs to run as user/group = nginx and can't be changed.

    For Centmin Mod, you'd need to follow Getting Started guide steps particular step 1 and 2. Step 2 would be your domain's Nginx vhost setup and creation. For instance if you're using Centmin Mod .08 beta and ran centmin.sh menu option 2 to create and site's Nginx vhost, you would end up with yourdomain.com related Nginx vhost files at /usr/local/nginx/conf/conf.d/yourdomain.com.conf
    • Nginx vhost conf path will be at /usr/local/nginx/conf/conf.d/yourdomain.com.conf
    • Vhost public web root will be at /home/nginx/domains/yourdomain.com/public (where you upload your web files to)
    • Vhost log directory will be at /home/nginx/domains/yourdomain.com/log
    with Nginx vhost contents for /usr/local/nginx/conf/conf.d/yourdomain.com.conf

    Code:
    # Centmin Mod Getting Started Guide
    # must read http://centminmod.com/getstarted.html
    
    # redirect from non-www to www
    # uncomment, save file and restart Nginx to enable
    # if unsure use return 302 before using return 301
    #server {
    #            listen   80;
    #            server_name yourdomain.com;
    #            return 301 $scheme://www.yourdomain.com$request_uri;
    #       }
    
    server {
      server_name yourdomain.com www.yourdomain.com;
    
    # ngx_pagespeed & ngx_pagespeed handler
    #include /usr/local/nginx/conf/pagespeed.conf;
    #include /usr/local/nginx/conf/pagespeedhandler.conf;
    #include /usr/local/nginx/conf/pagespeedstatslog.conf;
    
      # limit_conn limit_per_ip 16;
      # ssi  on;
    
      access_log /home/nginx/domains/yourdomain.com/log/access.log combined buffer=256k flush=60m;
      error_log /home/nginx/domains/yourdomain.com/log/error.log;
    
      root /home/nginx/domains/yourdomain.com/public;
    
      location / {
    
    # block common exploits, sql injections etc
    #include /usr/local/nginx/conf/block.conf;
    
      # Enables directory listings when index file not found
      #autoindex  on;
    
      # Shows file listing times as local time
      #autoindex_localtime on;
    
      # Enable for vBulletin usage WITHOUT vbSEO installed
      # More example Nginx vhost configurations at
      # http://centminmod.com/nginx_configure.html
      #try_files            $uri $uri/ /index.php;
    
      }
    
      include /usr/local/nginx/conf/staticfiles.conf;
      include /usr/local/nginx/conf/php.conf;
      include /usr/local/nginx/conf/drop.conf;
      #include /usr/local/nginx/conf/errorpage.conf;
    }
    the equivalent transformation of this Centmin Mod Nginx vhost to the one outlined at Laravel Recipes :: Creating a Nginx VirtualHost would be something like below. Notice php stuff isn't added as it's contented in Centmin Mod's php include file at /usr/local/nginx/conf/php.conf

    not sure what root you should use for such but best to keep it within /home/nginx/domains/yourdomain.com for easier backup so set root path for doc root to /home/nginx/domains/yourdomain.com/vagrant/projects/myapp/public

    Code:
    # Centmin Mod Getting Started Guide
    # must read http://centminmod.com/getstarted.html
    
    # redirect from non-www to www
    # uncomment, save file and restart Nginx to enable
    # if unsure use return 302 before using return 301
    #server {
    #            listen   80;
    #            server_name yourdomain.com;
    #            return 301 $scheme://www.yourdomain.com$request_uri;
    #       }
    
    server {
      server_name yourdomain.com www.yourdomain.com;
    
    # ngx_pagespeed & ngx_pagespeed handler
    #include /usr/local/nginx/conf/pagespeed.conf;
    #include /usr/local/nginx/conf/pagespeedhandler.conf;
    #include /usr/local/nginx/conf/pagespeedstatslog.conf;
    
      access_log /home/nginx/domains/yourdomain.com/log/access.log combined buffer=256k flush=60m;
      error_log /home/nginx/domains/yourdomain.com/log/error.log;
    
      root /home/nginx/domains/yourdomain.com/vagrant/projects/myapp/public;
    
      location / {
            try_files $uri $uri/ /index.php?q=$uri&$args;
      }
    
    error_page 404 /index.php;
    
      include /usr/local/nginx/conf/staticfiles.conf;
      include /usr/local/nginx/conf/php.conf;
      include /usr/local/nginx/conf/drop.conf;
      #include /usr/local/nginx/conf/errorpage.conf;
    }
    
    /usr/local/nginx/conf/php.conf include file contents which means no need to add php location stuff from that linked guide
    Code:
    location ~ \.php$ {
        try_files $uri =404;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass   127.0.0.1:9000;
        #fastcgi_pass   unix:/tmp/php5-fpm.sock;
        fastcgi_index  index.php;
        #fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        fastcgi_param  SCRIPT_FILENAME    $request_filename;
        fastcgi_param PHP_ADMIN_VALUE open_basedir=$document_root/:/usr/local/lib/php/:/tmp/;
    
    # might shave 200+ ms off PHP requests
    # which don't pass on a content length header
    # slightly faster page response time at the
    # expense of throughput / scalability
    #sendfile on;
    #tcp_nopush off;
    #keepalive_requests 0;
    
    fastcgi_connect_timeout 60;
    fastcgi_send_timeout 180;
    fastcgi_read_timeout 180;
    fastcgi_buffer_size 512k;
    fastcgi_buffers 512 16k;
    fastcgi_busy_buffers_size 1m;
    fastcgi_temp_file_write_size 4m;
    fastcgi_max_temp_file_size 4m;
    fastcgi_intercept_errors on;
    
    # next 3 lines when uncommented / enabled
    # pallow Nginx to handle uploads which then
    # passes back the completed upload to PHP
    #fastcgi_pass_request_body off;
    #client_body_in_file_only clean;
    #fastcgi_param  REQUEST_BODY_FILE  $request_body_file;
    
    #new .04+ map method
    fastcgi_param HTTPS $server_https;
    
    # comment out PATH_TRANSLATED line if /usr/local/lib/php.ini sets following:
    # cgi.fix_pathinfo=0
    # as of centminmod v1.2.3-eva2000.01 default is set to cgi.fix_pathinfo=1
    
    fastcgi_param  PATH_INFO          $fastcgi_path_info;
    fastcgi_param  PATH_TRANSLATED    $document_root$fastcgi_path_info;
    
    fastcgi_param  QUERY_STRING       $query_string;
    fastcgi_param  REQUEST_METHOD     $request_method;
    fastcgi_param  CONTENT_TYPE       $content_type;
    fastcgi_param  CONTENT_LENGTH     $content_length;
    
    fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;
    fastcgi_param  REQUEST_URI        $request_uri;
    fastcgi_param  DOCUMENT_URI       $document_uri;
    fastcgi_param  DOCUMENT_ROOT      $document_root;
    fastcgi_param  SERVER_PROTOCOL    $server_protocol;
    
    fastcgi_param  GATEWAY_INTERFACE  CGI/1.1;
    fastcgi_param  SERVER_SOFTWARE    nginx/$nginx_version;
    
    fastcgi_param  REMOTE_ADDR        $remote_addr;
    fastcgi_param  REMOTE_PORT        $remote_port;
    fastcgi_param  SERVER_ADDR        $server_addr;
    fastcgi_param  SERVER_PORT        $server_port;
    fastcgi_param  SERVER_NAME        $server_name;
    
    # Set php-fpm geoip variables
    fastcgi_param GEOIP_COUNTRY_CODE $geoip_country_code;
    fastcgi_param GEOIP_COUNTRY_CODE3 $geoip_country_code3;
    fastcgi_param GEOIP_COUNTRY_NAME $geoip_country_name;
    fastcgi_param GEOIP_CITY_COUNTRY_CODE $geoip_city_country_code;
    fastcgi_param GEOIP_CITY_COUNTRY_CODE3 $geoip_city_country_code3;
    fastcgi_param GEOIP_CITY_COUNTRY_NAME $geoip_city_country_name;
    fastcgi_param GEOIP_REGION $geoip_region;
    fastcgi_param GEOIP_CITY $geoip_city;
    fastcgi_param GEOIP_POSTAL_CODE $geoip_postal_code;
    fastcgi_param GEOIP_CITY_CONTINENT_CODE $geoip_city_continent_code;
    fastcgi_param GEOIP_LATITUDE $geoip_latitude;
    fastcgi_param GEOIP_LONGITUDE $geoip_longitude;
    
    # PHP only, required if PHP was built with --enable-force-cgi-redirect
    fastcgi_param  REDIRECT_STATUS    200;
    
                       }
    
    no idea if that works but that would the literal transformation from your linked example into Centmin Mod Nginx's example vhost setup
     
  4. HarryPotter

    HarryPotter Member

    41
    0
    6
    Apr 3, 2015
    Ratings:
    +0
    Local Time:
    5:19 AM
    Not work. How to uninstall Centmin Mod??? Very very tired.
     
  5. eva2000

    eva2000 Administrator Staff Member

    53,865
    12,160
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,712
    Local Time:
    5:19 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    No Centmin Mod uninstall, so only way is to reload/reinstall CentOS.

    But which version of Centmin Mod you using ?

    I got it working and I've never used Laravel before but reading documentation I at least got to the default laravel project image page.

    From documentation at

    Centmin Mod Pre work

    Getting Started guide steps particular step 1 and 2 to create new Nginx vhost via centmin.sh menu option 2, created a domain called newdomain1.com so end up with:

    Code:
    vhost for newdomain1.com created successfully
    vhost conf file for newdomain1.com created: /usr/local/nginx/conf/conf.d/newdomain1.com.conf
    upload files to /home/nginx/domains/newdomain1.com/public
    vhost log files directory is /home/nginx/domains/newdomain1.com/log
    
    Disable apc.enable_cli if you use APC Cache

    Code:
    sed -i 's/apc.enable_cli=1/apc.enable_cli=0/' /etc/centminmod/php.d/apc.ini
    fpmrestart
    php -i | grep apc.enable_cli
    
    Install composer globally

    Code:
    curl -sS https://getcomposer.org/installer | php
    mv composer.phar /usr/local/bin/composer
    
    Check composer works
    Code:
    composer --help
    Usage:
    help [--xml] [--format="..."] [--raw] [command_name]
    
    Arguments:
    command               The command to execute
    command_name          The command name (default: "help")
    
    Options:
    --xml                 To output help as XML
    --format              To output help in other formats (default: "txt")
    --raw                 To output raw command help
    --help (-h)           Display this help message
    --quiet (-q)          Do not output any message
    --verbose (-v|vv|vvv) Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
    --version (-V)        Display this application version
    --ansi                Force ANSI output
    --no-ansi             Disable ANSI output
    --no-interaction (-n) Do not ask any interactive question
    --profile             Display timing and memory usage information
    --working-dir (-d)    If specified, use the given directory as working directory.
    
    Help:
    The help command displays help for a given command:
    
       php /usr/local/bin/composer help list
    
    You can also output the help in other formats by using the --format option:
    
       php /usr/local/bin/composer help --format=xml list
    
    To display the list of available commands, please use the list command.
    
    Using composer create-project command Composer to create a new project called, myprojectname by first changing to /home/nginx/domains/newdomain1.com top level directory of your account setup via centmin.sh menu option 2

    So your Laravel project ends up at /home/nginx/domains/newdomain1.com/myprojectname
    Code:
    cd /home/nginx/domains/newdomain1.com
    composer create-project laravel/laravel myprojectname --prefer-dist
    
    Setup nginx user/group permissions and permissions of storage directory

    Code:
    chown -R nginx:nginx /home/nginx/domains/newdomain1.com/myprojectname
    chmod -R 0770 /home/nginx/domains/newdomain1.com/myprojectname/storage
    
    Check directory ownership/permissions

    Code:
    ls -lah /home/nginx/domains/newdomain1.com
    total 4.0K
    drwxr-s---   7 nginx nginx   76 Apr  5 07:20 .
    drwxr-s---.  4 nginx nginx   48 Apr  5 06:46 ..
    drwxr-s---   2 nginx nginx    6 Apr  5 06:46 backup
    drwxr-s---   2 nginx nginx   39 Apr  5 06:46 log
    drwxr-sr-x  11 nginx nginx 4.0K Apr  5 07:20 myprojectname
    drwxr-s---   2 nginx nginx    6 Apr  5 06:46 private
    drwxr-s---   2 nginx nginx  151 Apr  5 06:46 public
    
    Code:
    ls -lah /home/nginx/domains/newdomain1.com/myprojectname/
    total 160K
    drwxr-sr-x 11 nginx nginx 4.0K Apr  5 07:20 .
    drwxr-s---  7 nginx nginx   76 Apr  5 07:20 ..
    drwxr-sr-x 10 nginx nginx  137 Mar 24 21:06 app
    -rwxr-xr-x  1 nginx nginx 1.6K Mar 24 21:06 artisan
    drwxr-sr-x  2 nginx nginx   39 Mar 24 21:06 bootstrap
    -rw-r--r--  1 nginx nginx  788 Mar 24 21:06 composer.json
    -rw-r--r--  1 nginx nginx  99K Mar 24 21:06 composer.lock
    drwxr-sr-x  2 nginx nginx 4.0K Mar 24 21:06 config
    drwxr-sr-x  4 nginx nginx   52 Mar 24 21:06 database
    -rw-r--r--  1 nginx nginx  302 Apr  5 07:20 .env
    -rw-r--r--  1 nginx nginx  286 Mar 24 21:06 .env.example
    -rw-r--r--  1 nginx nginx   61 Mar 24 21:06 .gitattributes
    -rw-r--r--  1 nginx nginx   27 Mar 24 21:06 .gitignore
    -rw-r--r--  1 nginx nginx  503 Mar 24 21:06 gulpfile.js
    -rw-r--r--  1 nginx nginx   98 Mar 24 21:06 package.json
    -rw-r--r--  1 nginx nginx   87 Mar 24 21:06 phpspec.yml
    -rw-r--r--  1 nginx nginx  777 Mar 24 21:06 phpunit.xml
    drwxr-sr-x  4 nginx nginx   95 Mar 24 21:06 public
    -rw-r--r--  1 nginx nginx 1.7K Mar 24 21:06 readme.md
    drwxr-sr-x  5 nginx nginx   42 Mar 24 21:06 resources
    -rw-r--r--  1 nginx nginx  560 Mar 24 21:06 server.php
    drwxrws---  5 nginx nginx   60 Mar 24 21:06 storage
    drwxr-sr-x  2 nginx nginx   47 Mar 24 21:06 tests
    drwxr-sr-x 26 nginx nginx 4.0K Apr  5 07:20 vendor
    
    Check version of Laravel installed

    Code:
    cd /home/nginx/domains/newdomain1.com/myprojectname
    php artisan -V
    Laravel Framework version 5.0.16
    
    For Centmin Mod .08 beta and higher, need to edit /usr/local/nginx/conf/php.conf and modify and comment out the open_basedir path as that prevents laravel from finding and accessing the rest of the projects files. You can use command short cut to edit /usr/local/nginx/conf/php.conf

    Code:
    phpinc
    
    then comment out with hash # in front this line

    Code:
        #fastcgi_param PHP_ADMIN_VALUE open_basedir=$document_root/:/usr/local/lib/php/:/tmp/;
    
    so it shows up as

    Code:
    location ~ \.php$ {
        try_files $uri =404;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass   127.0.0.1:9000;
        #fastcgi_pass   unix:/tmp/php5-fpm.sock;
        fastcgi_index  index.php;
        #fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        fastcgi_param  SCRIPT_FILENAME    $request_filename;
        #fastcgi_param PHP_ADMIN_VALUE open_basedir=$document_root/:/usr/local/lib/php/:/tmp/;
    
    If you use Centmin Mod .07 stable you can ignore commenting out open_base_dir line

    Then setup your Nginx vhost that was generated via centmin.sh menu option 2 at /usr/local/nginx/conf/conf.d/newdomain1.com.conf

    change from default format below

    Code:
    # Centmin Mod Getting Started Guide
    # must read http://centminmod.com/getstarted.html
    
    # redirect from non-www to www
    # uncomment, save file and restart Nginx to enable
    # if unsure use return 302 before using return 301
    #server {
    #            listen   80;
    #            server_name newdomain1.com;
    #            return 301 $scheme://www.newdomain1.com$request_uri;
    #       }
    
    server {
      server_name newdomain1.com www.newdomain1.com;
    
    # ngx_pagespeed & ngx_pagespeed handler
    #include /usr/local/nginx/conf/pagespeed.conf;
    #include /usr/local/nginx/conf/pagespeedhandler.conf;
    #include /usr/local/nginx/conf/pagespeedstatslog.conf;
    
      # limit_conn limit_per_ip 16;
      # ssi  on;
    
      access_log /home/nginx/domains/newdomain1.com/log/access.log combined buffer=256k flush=60m;
      error_log /home/nginx/domains/newdomain1.com/log/error.log;
    
      root /home/nginx/domains/newdomain1.com/public;
    
      location / {
    
    # block common exploits, sql injections etc
    #include /usr/local/nginx/conf/block.conf;
    
      # Enables directory listings when index file not found
      #autoindex  on;
    
      # Shows file listing times as local time
      #autoindex_localtime on;
    
      # Enable for vBulletin usage WITHOUT vbSEO installed
      # More example Nginx vhost configurations at
      # http://centminmod.com/nginx_configure.html
      #try_files            $uri $uri/ /index.php;
    
      }
    
      include /usr/local/nginx/conf/staticfiles.conf;
      include /usr/local/nginx/conf/php.conf;
      include /usr/local/nginx/conf/drop.conf;
      #include /usr/local/nginx/conf/errorpage.conf;
    }
    
    
    to this format with custom root doc root path at /home/nginx/domains/newdomain1.com/myprojectname/public

    Code:
    # Centmin Mod Getting Started Guide
    # must read http://centminmod.com/getstarted.html
    
    # redirect from non-www to www
    # uncomment, save file and restart Nginx to enable
    # if unsure use return 302 before using return 301
    #server {
    #            listen   80;
    #            server_name newdomain1.com;
    #            return 301 $scheme://www.newdomain1.com$request_uri;
    #       }
    
    server {
      server_name newdomain1.com www.newdomain1.com;
    
    # ngx_pagespeed & ngx_pagespeed handler
    #include /usr/local/nginx/conf/pagespeed.conf;
    #include /usr/local/nginx/conf/pagespeedhandler.conf;
    #include /usr/local/nginx/conf/pagespeedstatslog.conf;
    
      access_log /home/nginx/domains/newdomain1.com/log/access.log combined buffer=256k flush=60m;
      error_log /home/nginx/domains/newdomain1.com/log/error.log;
    
      root /home/nginx/domains/newdomain1.com/myprojectname/public;
    
      location / {
        try_files $uri $uri/ /index.php?$query_string;
      }
    
      include /usr/local/nginx/conf/staticfiles.conf;
      include /usr/local/nginx/conf/php.conf;
      include /usr/local/nginx/conf/drop.conf;
      #include /usr/local/nginx/conf/errorpage.conf;
    }
    
    Then restart Nginx and PHP-FPM services

    using command shortcuts restart Nginx
    Code:
    ngxrestart
    
    using command shortcuts restart PHP-FPM
    Code:
    fpmrestart
    
    using command shortcuts restart Nginx + PHP-FPM at same time
    Code:
    nprestart
    
    Then go to newdomain1.com and should see

    default_logo.png

    I assume the rest works but have no idea as this was very first time I ever used composer/laravel :)
     
  6. HarryPotter

    HarryPotter Member

    41
    0
    6
    Apr 3, 2015
    Ratings:
    +0
    Local Time:
    5:19 AM
    Installed composer without errors. But with laravel config to work. I have try but its not.
     
  7. eva2000

    eva2000 Administrator Staff Member

    53,865
    12,160
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,712
    Local Time:
    5:19 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    tried my steps above ? is showing the logo on default index i.e. newdomain1.com as above mean Laravel works ?
     
  8. HarryPotter

    HarryPotter Member

    41
    0
    6
    Apr 3, 2015
    Ratings:
    +0
    Local Time:
    5:19 AM
    Ok. Work now :)
     
  9. eva2000

    eva2000 Administrator Staff Member

    53,865
    12,160
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,712
    Local Time:
    5:19 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    excellent.. if you have time maybe share with Centmin Mod readers your Laravel progress/experience with Centmin Mod Nginx too. Curious what you can do with Laravel as the above steps is as far as I go experience wise. Wouldn't even know what to do next heh.
     
  10. HarryPotter

    HarryPotter Member

    41
    0
    6
    Apr 3, 2015
    Ratings:
    +0
    Local Time:
    5:19 AM
    It not work on centos 7 and latest version of centminmod :-/
     
  11. eva2000

    eva2000 Administrator Staff Member

    53,865
    12,160
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,712
    Local Time:
    5:19 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    please elaborate ? details ? error messages ?
     
  12. HarryPotter

    HarryPotter Member

    41
    0
    6
    Apr 3, 2015
    Ratings:
    +0
    Local Time:
    5:19 AM
    Blank page and get 500 server error. No log file :oops:
     
  13. eva2000

    eva2000 Administrator Staff Member

    53,865
    12,160
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,712
    Local Time:
    5:19 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    well web app specific issues would be something you'd have to figure out on your own.. as I said I never used Laravel myself but quick google shows could be directory/file permissions Blank 500 error pages instead of Traceback in Laravel 5.0.1 on storage directory which above instructions would of taken care of
    Code:
    chown -R nginx:nginx /home/nginx/domains/newdomain1.com/myprojectname
    chmod -R 0770 /home/nginx/domains/newdomain1.com/myprojectname/storage
     
  14. HarryPotter

    HarryPotter Member

    41
    0
    6
    Apr 3, 2015
    Ratings:
    +0
    Local Time:
    5:19 AM
    Do it many times :oops:
     
  15. eva2000

    eva2000 Administrator Staff Member

    53,865
    12,160
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,712
    Local Time:
    5:19 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    No probs here tested Laravel 5.1.12 install on CentOS 7 with PHP 5.6.12 and Zend Opcache and Centmin Mod 1.2.3-eva2000.09 beta01

    Code:
    cat /etc/redhat-release
    CentOS Linux release 7.1.1503 (Core)
    
    Code:
    cat /etc/centminmod-release
    1.2.3-eva2000.09
    
    Code:
    php -v
    PHP 5.6.12 (cli) (built: Aug 31 2015 01:55:47)
    Copyright (c) 1997-2015 The PHP Group
    Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
        with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies
    
    Laravel 5.1.12 via above install instructions at How to install Laravel? | Centmin Mod Community

    Code:
    cd /home/nginx/domains/newdomain1.com
    composer create-project laravel/laravel myprojectname --prefer-dist
    Installing laravel/laravel (v5.1.11)
      - Installing laravel/laravel (v5.1.11)
        Loading from cache
    
    Created project in myprojectname
    > php -r "copy('.env.example', '.env');"
    Loading composer repositories with package information
    Installing dependencies (including require-dev)
      - Installing vlucas/phpdotenv (v1.1.1)
        Downloading: 100%       
    
      - Installing symfony/var-dumper (v2.7.3)
        Downloading: 100%       
    
      - Installing symfony/translation (v2.7.3)
        Downloading: 100%       
    
      - Installing symfony/routing (v2.7.3)
        Downloading: 100%       
    
      - Installing symfony/process (v2.7.3)
        Downloading: 100%       
    
      - Installing psr/log (1.0.0)
        Downloading: 100%       
    
      - Installing symfony/debug (v2.7.3)
        Downloading: 100%       
    
      - Installing symfony/http-foundation (v2.7.3)
        Downloading: 100%       
    
      - Installing symfony/event-dispatcher (v2.7.3)
        Downloading: 100%       
    
      - Installing symfony/http-kernel (v2.7.3)
        Downloading: 100%       
    
      - Installing symfony/finder (v2.7.3)
        Downloading: 100%       
    
      - Installing symfony/dom-crawler (v2.7.3)
        Downloading: 100%       
    
      - Installing symfony/css-selector (v2.7.3)
        Downloading: 100%       
    
      - Installing symfony/console (v2.7.3)
        Downloading: 100%       
    
      - Installing swiftmailer/swiftmailer (v5.4.1)
        Downloading: 100%       
    
      - Installing jakub-onderka/php-console-color (0.1)
        Downloading: 100%       
    
      - Installing jakub-onderka/php-console-highlighter (v0.3.2)
        Downloading: 100%       
    
      - Installing dnoegel/php-xdg-base-dir (0.1)
        Downloading: 100%       
    
      - Installing nikic/php-parser (v1.4.0)
        Downloading: 100%       
    
      - Installing psy/psysh (v0.5.2)
        Downloading: 100%       
    
      - Installing nesbot/carbon (1.20.0)
        Downloading: 100%       
    
      - Installing mtdowling/cron-expression (v1.0.4)
        Downloading: 100%       
    
      - Installing monolog/monolog (1.17.0)
        Downloading: 100%       
    
      - Installing league/flysystem (1.0.11)
        Downloading: 100%       
    
      - Installing jeremeamia/superclosure (2.1.0)
        Downloading: 100%       
    
      - Installing doctrine/inflector (v1.0.1)
        Downloading: 100%       
    
      - Installing danielstjules/stringy (1.10.0)
        Downloading: 100%       
    
      - Installing classpreloader/classpreloader (2.0.0)
        Downloading: 100%       
    
      - Installing laravel/framework (v5.1.12)
        Downloading: 100%       
    
      - Installing fzaninotto/faker (v1.5.0)
        Downloading: 100%       
    
      - Installing hamcrest/hamcrest-php (v1.2.2)
        Downloading: 100%       
    
      - Installing mockery/mockery (0.9.4)
        Downloading: 100%       
    
      - Installing sebastian/version (1.0.6)
        Downloading: 100%       
    
      - Installing sebastian/global-state (1.0.0)
        Downloading: 100%       
    
      - Installing sebastian/recursion-context (1.0.1)
        Downloading: 100%       
    
      - Installing sebastian/exporter (1.2.1)
        Downloading: 100%       
    
      - Installing sebastian/environment (1.3.2)
        Downloading: 100%       
    
      - Installing sebastian/diff (1.3.0)
        Downloading: 100%       
    
      - Installing sebastian/comparator (1.2.0)
        Downloading: 100%       
    
      - Installing symfony/yaml (v2.7.3)
        Downloading: 100%       
    
      - Installing doctrine/instantiator (1.0.5)
        Downloading: 100%       
    
      - Installing phpdocumentor/reflection-docblock (2.0.4)
        Downloading: 100%       
    
      - Installing phpspec/prophecy (v1.5.0)
        Downloading: 100%       
    
      - Installing phpunit/php-text-template (1.2.1)
        Downloading: 100%       
    
      - Installing phpunit/phpunit-mock-objects (2.3.7)
        Downloading: 100%       
    
      - Installing phpunit/php-timer (1.0.7)
        Downloading: 100%       
    
      - Installing phpunit/php-token-stream (1.4.6)
        Downloading: 100%       
    
      - Installing phpunit/php-file-iterator (1.4.1)
        Downloading: 100%       
    
      - Installing phpunit/php-code-coverage (2.2.2)
        Downloading: 100%       
    
      - Installing phpunit/phpunit (4.8.6)
        Downloading: 100%       
    
      - Installing phpspec/php-diff (v1.0.2)
        Downloading: 100%       
    
      - Installing phpspec/phpspec (2.2.1)
        Downloading: 100%       
    
    symfony/var-dumper suggests installing ext-symfony_debug ()
    symfony/translation suggests installing symfony/config ()
    symfony/routing suggests installing symfony/config (For using the all-in-one router or any loader)
    symfony/routing suggests installing symfony/expression-language (For using expression matching)
    symfony/routing suggests installing doctrine/annotations (For using the annotation loader)
    symfony/event-dispatcher suggests installing symfony/dependency-injection ()
    symfony/http-kernel suggests installing symfony/browser-kit ()
    symfony/http-kernel suggests installing symfony/class-loader ()
    symfony/http-kernel suggests installing symfony/config ()
    symfony/http-kernel suggests installing symfony/dependency-injection ()
    psy/psysh suggests installing ext-pdo-sqlite (The doc command requires SQLite to work.)
    monolog/monolog suggests installing graylog2/gelf-php (Allow sending log messages to a GrayLog2 server)
    monolog/monolog suggests installing raven/raven (Allow sending log messages to a Sentry server)
    monolog/monolog suggests installing doctrine/couchdb (Allow sending log messages to a CouchDB server)
    monolog/monolog suggests installing ruflin/elastica (Allow sending log messages to an Elastic Search server)
    monolog/monolog suggests installing videlalvaro/php-amqplib (Allow sending log messages to an AMQP server using php-amqplib)
    monolog/monolog suggests installing ext-amqp (Allow sending log messages to an AMQP server (1.0+ required))
    monolog/monolog suggests installing aws/aws-sdk-php (Allow sending log messages to AWS services like DynamoDB)
    monolog/monolog suggests installing rollbar/rollbar (Allow sending log messages to Rollbar)
    monolog/monolog suggests installing php-console/php-console (Allow sending log messages to Google Chrome)
    league/flysystem suggests installing ext-fileinfo (Required for MimeType)
    league/flysystem suggests installing league/flysystem-eventable-filesystem (Allows you to use EventableFilesystem)
    league/flysystem suggests installing league/flysystem-rackspace (Allows you to use Rackspace Cloud Files)
    league/flysystem suggests installing league/flysystem-copy (Allows you to use Copy.com storage)
    league/flysystem suggests installing league/flysystem-azure (Allows you to use Windows Azure Blob storage)
    league/flysystem suggests installing league/flysystem-webdav (Allows you to use WebDAV storage)
    league/flysystem suggests installing league/flysystem-aws-s3-v2 (Allows you to use S3 storage with AWS SDK v2)
    league/flysystem suggests installing league/flysystem-aws-s3-v3 (Allows you to use S3 storage with AWS SDK v3)
    league/flysystem suggests installing league/flysystem-dropbox (Allows you to use Dropbox storage)
    league/flysystem suggests installing league/flysystem-cached-adapter (Flysystem adapter decorator for metadata caching)
    league/flysystem suggests installing league/flysystem-sftp (Allows you to use SFTP server storage via phpseclib)
    league/flysystem suggests installing league/flysystem-ziparchive (Allows you to use ZipArchive adapter)
    laravel/framework suggests installing aws/aws-sdk-php (Required to use the SQS queue driver and SES mail driver (~3.0).)
    laravel/framework suggests installing doctrine/dbal (Required to rename columns and drop SQLite columns (~2.4).)
    laravel/framework suggests installing guzzlehttp/guzzle (Required to use the Mailgun and Mandrill mail drivers (~5.3|~6.0).)
    laravel/framework suggests installing iron-io/iron_mq (Required to use the iron queue driver (~2.0).)
    laravel/framework suggests installing league/flysystem-aws-s3-v3 (Required to use the Flysystem S3 driver (~1.0).)
    laravel/framework suggests installing league/flysystem-rackspace (Required to use the Flysystem Rackspace driver (~1.0).)
    laravel/framework suggests installing pda/pheanstalk (Required to use the beanstalk queue driver (~3.0).)
    laravel/framework suggests installing predis/predis (Required to use the redis cache and queue drivers (~1.0).)
    laravel/framework suggests installing pusher/pusher-php-server (Required to use the Pusher broadcast driver (~2.0).)
    sebastian/global-state suggests installing ext-uopz (*)
    phpdocumentor/reflection-docblock suggests installing dflydev/markdown (~1.0)
    phpdocumentor/reflection-docblock suggests installing erusev/parsedown (~1.0)
    phpunit/php-code-coverage suggests installing ext-xdebug (>=2.2.1)
    phpunit/phpunit suggests installing phpunit/php-invoker (~1.1)
    phpspec/phpspec suggests installing phpspec/nyan-formatters (~1.0 – Adds Nyan formatters)
    Writing lock file
    Generating autoload files
    > php artisan clear-compiled
    > php artisan optimize
    Generating optimized class loader
    > php artisan key:generate
    Application key [RhjEwqZc3eKm5HBgg3MQ4rNVSICUYPPa] set successfully.
    
    Code:
    ls -lah /home/nginx/domains/newdomain1.com/myprojectname/
    total 164K
    drwxr-sr-x 11 nginx nginx 4.0K Aug 31 02:03 .
    drwxr-s---  7 nginx nginx   76 Aug 31 01:59 ..
    drwxr-sr-x 10 nginx nginx  134 Aug 30 11:31 app
    -rwxr-xr-x  1 nginx nginx 1.7K Aug 30 11:31 artisan
    drwxr-sr-x  3 nginx nginx   51 Aug 30 11:31 bootstrap
    -rw-r--r--  1 nginx nginx 1.2K Aug 30 11:31 composer.json
    -rw-r--r--  1 nginx nginx 103K Aug 31 02:03 composer.lock
    drwxr-sr-x  2 nginx nginx 4.0K Aug 30 11:31 config
    drwxr-sr-x  5 nginx nginx   68 Aug 30 11:31 database
    -rw-r--r--  1 nginx nginx  323 Aug 31 02:03 .env
    -rw-r--r--  1 nginx nginx  307 Aug 30 11:31 .env.example
    -rw-r--r--  1 nginx nginx   61 Aug 30 11:31 .gitattributes
    -rw-r--r--  1 nginx nginx   57 Aug 30 11:31 .gitignore
    -rw-r--r--  1 nginx nginx  503 Aug 30 11:31 gulpfile.js
    -rw-r--r--  1 nginx nginx  159 Aug 30 11:31 package.json
    -rw-r--r--  1 nginx nginx   87 Aug 30 11:31 phpspec.yml
    -rw-r--r--  1 nginx nginx  899 Aug 30 11:31 phpunit.xml
    drwxr-sr-x  2 nginx nginx   73 Aug 30 11:31 public
    -rw-r--r--  1 nginx nginx 1.9K Aug 30 11:31 readme.md
    drwxr-sr-x  5 nginx nginx   42 Aug 30 11:31 resources
    -rw-r--r--  1 nginx nginx  567 Aug 30 11:31 server.php
    drwxrws---  5 nginx nginx   43 Aug 30 11:31 storage
    drwxr-sr-x  2 nginx nginx   47 Aug 30 11:31 tests
    drwxr-sr-x 28 nginx nginx 4.0K Aug 31 02:03 vendor
    
    Code:
    cd /home/nginx/domains/newdomain1.com/myprojectname
    php artisan -V
    Laravel Framework version 5.1.12 (LTS)
    
    upload_2015-8-31_12-7-26.png

    newdomain1.com logs at /home/nginx/domains/newdomain1.com/log

    Code:
    ls -lah /home/nginx/domains/newdomain1.com/log
    total 0
    drwxr-s--- 2 nginx nginx 39 Aug 31 01:46 .
    drwxr-s--- 7 nginx nginx 76 Aug 31 01:59 ..
    -rw-r--r-- 1 root  nginx  0 Aug 31 01:46 access.log
    -rw-r--r-- 1 root  nginx  0 Aug 31 01:46 error.log
     
  16. HarryPotter

    HarryPotter Member

    41
    0
    6
    Apr 3, 2015
    Ratings:
    +0
    Local Time:
    5:19 AM
    It weird. I will try again. Also I could not use 'Composer Update'. It say swap not defined.
     
  17. eva2000

    eva2000 Administrator Staff Member

    53,865
    12,160
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,712
    Local Time:
    5:19 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    what web host ? VPS ? OpenVZ, KVM, Xen ? you probably don't have swap setup as you need to do that maybe as Centmin Mod doesn't automatically do this if the server doesn't have swap setup

    see Install - CentOS7 swap with centminmod .08 | Centmin Mod Community

    Code:
    free -m
    i.e.
    Code:
    free -m
                 total       used       free     shared    buffers     cached
    Mem:          1024        426        597        393          0        160
    -/+ buffers/cache:        266        757
    Swap:         1024        101        922 
     
  18. eva2000

    eva2000 Administrator Staff Member

    53,865
    12,160
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,712
    Local Time:
    5:19 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  19. negative

    negative Active Member

    415
    50
    28
    Apr 11, 2015
    Ratings:
    +98
    Local Time:
    9:19 PM
    1.9.10
    10.1.11
    @eva2000 Do i need to disable Zend Opcache for use Laravel certainly ?

    Btw, i will run a Laravel 4.2 project for my homepage, laravel 4.2 doesn't support the php 7.x so i downgrade my php to 5.6.18 anymore but still i'm experiencing some problems even open_basedir line disabled too.

    And, i have a /forum/ directory in public so do i need to set document root parameter to up level of public too ? if doc root parameter outside of public then what will happen the forum directory ?

    Thanks for your help.
     
  20. eva2000

    eva2000 Administrator Staff Member

    53,865
    12,160
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,712
    Local Time:
    5:19 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    No idea never used Laravel myself beyond this install guide