Run under Ngix and Apache under Lavarel

Source: Internet
Author: User

[PHP] View plain copy
    1. 1. Check the PHP version after entering the terminal
    2. Php-v
    3. The output might look like this:
    4. PHP 5.4.35 (CLI) (Built:nov 07:04:10) Copyright (c) 1997-2014 the PHP Group Zend Engine v2.6.0, Copyright (c) 199 8-2015 Zend Technologies with Zend opcache V7.0.4-dev, Copyright (c) 1999-2015, by Zend Technologies
[PHP]View PlainCopy
    1. 2. Perform the following command to upgrade the software repository
    2. RPM-UVH https://mirror.webtatic.com/yum/el7/epel-release.rpm
    3. RPM-UVH https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

[PHP]View PlainCopy
    1. 3. Execute the following command to remove PHP
    2. Yum Remove Php-common
    3. And then, like the installation, ask if you want to continue, enter Yes.

[PHP]View PlainCopy
    1. 4. Install PHP version 5.6 (Php56w-devel This is not required)
    2. Yum install-y php56w php56w-opcache php56w-xml php56w-mcrypt php56w-gd php56w-devel php56w-mysql php56w-intl php56w-mbst Ring

[PHP]View PlainCopy
    1. 5. Restart httpd
    2. Service httpd Restart
    3. View the latest version
    4. Php-v
    5. It's supposed to be 5.6 now!
Apache EnvironmentCentOS 7 Installation Laravel: Add two warehouses: RPM-UVH HTTPS://DL.FEDORAPROJECT.ORG/PUB/EPEL/EPEL-RELEASE-LATEST-7.NOARCH.RPMRPM-UVH https://mirror.webtatic.com/yum/el7/webtatic-release.rpm Installing Php:yum install php56w php56w-mysql php56w-mcrypt Php56w-dom php56w-mbstring installing Apache and Mariadb:yum install httpd mariadb mariadb-server start mariadb service: Systemctl start Mariadbsystemctl Enable MARIADB start httpd service: Systemctl start httpdsystemctl enable httpd mariadb database The root password is empty by default, Run MySQL init script: mysql_secure_installation Install COMPOSER:CURL-SS Https://getcomposer.org/installer | Phpchmod +x COMPOSER.PHARMV composer.phar/usr/local/bin/composer from GitHub clone Laravel Source: Cd/var/wwwgit Clone https:// Github.com/laravel/laravel

Installing LARAVEL:CD laravelcomposer Install settings file permissions: Chown-r apache:apache/var/www/laravelchmod-r 755/var/www/laravel Create an. ENV profile: MV. Env.example. env build App key:php artisan key:generate Edit config/app.php, write the key generated above: Configure Apache, create virtual Host:vim/etc/httpd/conf.d/laravel.conf write: <virtualhost *:80>documentroot/var/www/laravel/publicservername Your_domain.com<directory/var/www/laravel/>allowoverride all</directory></virtualhost> Restart Apache service: Systemctl Restart httpd

Run under Ngix and Apache under Lavarel

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.