記錄一下安裝過(guò)程遇到的一些問題,留給需要的人救恨。
1.項(xiàng)目下載下來(lái),找到項(xiàng)目的sites文件夾释树,將default.settings.php 復(fù)制一份肠槽,重命名為settings.php
2.新建一個(gè)files文件夾,在sites/default/下
sites/default/files/
3.在files目錄下新建translations目錄奢啥,把漢化包放進(jìn)去
https://localize.drupal.org/translate/languages/zh-hans
4.設(shè)置files文件夾秸仙,settings.php 的權(quán)限
chmod -R 777 files/
chmod -R 777 settings.php
5.clean urls
解決辦法:檢查apache的http.conf,在配置里允許重寫:
#AllowOverride None
AllowOverride All
#php.ini
LoadModule rewrite_module libexec/mod_rewrite.so
6.打開 op cache
解決辦法:先看phpinfo();找到配置文件位置桩盲,不存在則新建寂纪。
在配置文件里開啟op cache
<pre>
[opcache]
opcache.enable=1
zend_extension=opcache.so
opcache.memory_consumption=128
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=4000
opcache.revalidate_freq=60
opcache.fast_shutdown=1
opcache.enable_cli=1
</pre>
7.Warning: DateTime::createFromFormat(): It is not safe…
修改php.ini的date.timezone
<pre>
[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
;date.timezone =
date.timezone = Asia/Shanghai
</pre>
或者:
<pre>
[root@localhost ~]# sed -i "s/;date.timezone =/date.timezone = Asia/Shanghai/g" /etc/php.ini
</pre>