环境: window7
xampp 3.2.0
第一步: 安装 composer.
第二步: 根据 typo3的安装说明,使用 composer 安装 typo3
第三步: 因为 window没有symlink, 需要使用copy ,所以需要设置 Configuration文件夹下的 Settings.yaml, 如下所示
# #
# Example Settings #
# #
# This file contains settings for various parts of the application. #
# Copy this file to Settings.yaml, and adjust as necessary. #
# #
# Please refer to the default settings file(s) or the manuals for #
# possible configuration options. #
# #
TYPO3:
Flow:
persistence:
# It is good practice to not specify user name and password of the database
# connection in this global Settings.yaml file. Rather specify them in the
# settings of the respective context (Production / Development ...).
backendOptions:
host: '127.0.0.1' # adjust to your database host
# You might need to uncomment the following lines and specify
# the location of the PHP binary manually.
core:
phpBinaryPathAndFilename: 'E:/xampp/php/php.exe'
resource:
publishing:
fileSystem:
mirrorMode: 'copy'
第四步: 修改 php.ini, 在最后一行添加
xdebug.max_nesting_level=500
第六步: 清空Data\Temporary中的文件
使用时遇到的问题:
1. 开发模式到产品模式
<VirtualHost *:80>
DocumentRoot E:/xampp/htdocs/neos/typo3/Web
# 下面一行,# 时为开发模式
SetEnv FLOW_CONTEXT Production
ServerName neos.demo
</VirtualHost>
[OPcache]
zend_extension = "E:\xampp\php\ext\php_opcache.dll"
opcache.enable = 1
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
opcache.force_restart_timeout = 180
3. 修改 realpath_cache_size = 2M
class SetupController extends \TYPO3\Flow\Mvc\Controller\ActionController {
/**
* @Flow\Inject
* @var \TYPO3\Flow\Persistence\PersistenceManagerInterface
*/
protected $persistenceManager;
//....
public function indexAction() {
//.... your code
$this->persistenceManager->persistAll();
}
}
'TYPO3.Neos.NodeTypes:Page':
childNodes:
'teaser':
type: 'TYPO3.Neos:ContentCollection'
'test1':
type: 'TYPO3.Neos:ContentCollection'
typo3_typo3cr_domain_model_nodedata , search %test 或 %test1