缓存 接入Lavarel 启用交换区Swap



#php artisan --version

PHP Parse error:  syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /var/www/html/github/laravel/artisan on line 31

[root@iZ288qf4d1yZ laravel]# php -v

PHP 5.4.16 (cli) (built: Aug 11 2016 21:24:59) 

Copyright (c) 1997-2013 The PHP Group

Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies

我升级php版本

#rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm

#rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

# yum remove php-common

# yum install -y php56w php56w-opcache php56w-xml php56w-mcrypt php56w-gd php56w-devel php56w-mysql php56w-intl php56w-mbstring




# php artisan --version

PHP Warning:  PHP Startup: phalcon: Unable to initialize module

Module compiled with module API=20100525

PHP    compiled with module API=20131226

These options need to match

in Unknown on line 0

Laravel Framework version 5.2.22



[root@iZ288qf4d1yZ laravel]# free

              total        used        free      shared  buff/cache   available

Mem:        1015476      200040      149560       32592      665876      600280

Swap:             0           0           0

 

 创建一个新用户

[root@localhost ~]# adduser zhangbiao

[root@localhost ~]# passwd zhangbiao

Username for 'https://github.com': pretty_c_a_t@sina.com

Password for 'https://pretty_c_a_t@sina.com@github.com': 

git config --global user.email "xxx"
git config --global user.name "xxx"
密码是github的密码

[root@iZ288qf4d1yZ github]# chmod -R 777 laravel/

 

root@iZ288qf4d1yZ github]# chmod -R 777 laravel/

[root@iZ288qf4d1yZ github]# su yanghaiyan

 

[yanghaiyan@iZ288qf4d1yZ github]$ cd laravel/

[yanghaiyan@iZ288qf4d1yZ laravel]$ composer install

PHP Warning:  PHP Startup: phalcon: Unable to initialize module

Module compiled with module API=20100525

PHP    compiled with module API=20131226

These options need to match

 in Unknown on line 0

Loading composer repositories with package information

Installing dependencies (including require-dev) from lock file

Nothing to install or update

Generating autoload files

> php artisan clear-compiled

PHP Warning:  PHP Startup: phalcon: Unable to initialize module

Module compiled with module API=20100525

PHP    compiled with module API=20131226

These options need to match

 in Unknown on line 0

> php artisan optimize

PHP Warning:  PHP Startup: phalcon: Unable to initialize module

Module compiled with module API=20100525

PHP    compiled with module API=20131226

These options need to match

 in Unknown on line 0

Generating optimized class loader

Compiling common classes

[yanghaiyan@iZ288qf4d1yZ laravel]$ 

 

okay 了

 

接入redis文件

 

如何启用linux swap (安装redis时内存不够 启用交换区)







安装memcached
  1. brew search memcache
  2. brew install memcached
  3. which memcached
  4. memcached -h memcached 1.4.15


posted @ 2017-07-07 16:22  乐公子  阅读(294)  评论(0编辑  收藏  举报