[PHP] View plain copy
- 1. Check the PHP version after entering the terminal
- Php-v
- The output might look like this:
- 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
- 2. Perform the following command to upgrade the software repository
- RPM-UVH https://mirror.webtatic.com/yum/el7/epel-release.rpm
- RPM-UVH https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
[PHP]View PlainCopy
- 3. Execute the following command to remove PHP
- Yum Remove Php-common
- And then, like the installation, ask if you want to continue, enter Yes.
[PHP]View PlainCopy
- 4. Install PHP version 5.6 (Php56w-devel This is not required)
- Yum install-y php56w php56w-opcache php56w-xml php56w-mcrypt php56w-gd php56w-devel php56w-mysql php56w-intl php56w-mbst Ring
[PHP]View PlainCopy
- 5. Restart httpd
- Service httpd Restart
- View the latest version
- Php-v
- 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