homestead vagrant box下SULU CMS安装失败
SULU CMS installation failed under homestead vagrant box
我尝试按照本手册安装 SULU CMS:http://docs.sulu.io/en/latest/book/getting-started.html but when go to http://sulu.app/website.php(我的本地开发人员 URL)我遇到了这些错误:
Fatal error: Uncaught PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'homestead.ro_routes' doesn't exist in /home/vagrant/Code/sulu/app/Resources/views/master.html.twig on line 18
Twig_Error_Runtime: An exception has been thrown during the rendering of a template ("You need to be logged in for this operation"). in /home/vagrant/Code/sulu/app/Resources/views/master.html.twig on line 18
在此之前,所有安装步骤都很顺利,我没有看到任何错误。
此外,在执行此命令后,mysql 数据库中的 table 为空:
bin/adminconsole sulu:build prod
这是我的parameters.yml文件:
# This file is auto-generated during the composer install
parameters:
database_driver: pdo_mysql
database_host: 127.0.0.1
database_port: 33060
database_name: homestead
database_user: homestead
database_password: secret
database_version: 5.5
mailer_transport: smtp
mailer_host: 127.0.0.1
mailer_user: null
mailer_password: null
secret: ThisTokenIsNotSoSecretChangeIt
sulu_admin.name: Sulu
sulu_admin.email: null
websocket_port: 9876
websocket_url: sulu.lo
phpcr_backend:
type: doctrinedbal
phpcr_workspace: default
phpcr_user: admin
phpcr_pass: admin
phpcr_cache: file_system
我用的是homestead vagrant box v.5.,
主机Ubuntu 16.04,
Virtualbox v.5
这是我的 Homestead.yaml 内容(所有标准选项):
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/Code
to: /home/vagrant/Code
sites:
- map: sulu.app
to: /home/vagrant/Code/sulu/web
databases:
- homestead
# blackfire:
# - id: foo
# token: bar
# client-id: foo
# client-token: bar
# ports:
# - send: 50000
# to: 5000
# - send: 7777
# to: 777
# protocol: udp
任何想法为什么以及如何解决?
提前致谢!
您在 parameters.yml
中使用了错误的数据库端口。它应该是 3306
而不是 33060
.
我尝试按照本手册安装 SULU CMS:http://docs.sulu.io/en/latest/book/getting-started.html but when go to http://sulu.app/website.php(我的本地开发人员 URL)我遇到了这些错误:
Fatal error: Uncaught PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'homestead.ro_routes' doesn't exist in /home/vagrant/Code/sulu/app/Resources/views/master.html.twig on line 18 Twig_Error_Runtime: An exception has been thrown during the rendering of a template ("You need to be logged in for this operation"). in /home/vagrant/Code/sulu/app/Resources/views/master.html.twig on line 18
在此之前,所有安装步骤都很顺利,我没有看到任何错误。
此外,在执行此命令后,mysql 数据库中的 table 为空:
bin/adminconsole sulu:build prod
这是我的parameters.yml文件:
# This file is auto-generated during the composer install
parameters:
database_driver: pdo_mysql
database_host: 127.0.0.1
database_port: 33060
database_name: homestead
database_user: homestead
database_password: secret
database_version: 5.5
mailer_transport: smtp
mailer_host: 127.0.0.1
mailer_user: null
mailer_password: null
secret: ThisTokenIsNotSoSecretChangeIt
sulu_admin.name: Sulu
sulu_admin.email: null
websocket_port: 9876
websocket_url: sulu.lo
phpcr_backend:
type: doctrinedbal
phpcr_workspace: default
phpcr_user: admin
phpcr_pass: admin
phpcr_cache: file_system
我用的是homestead vagrant box v.5., 主机Ubuntu 16.04, Virtualbox v.5
这是我的 Homestead.yaml 内容(所有标准选项):
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/Code
to: /home/vagrant/Code
sites:
- map: sulu.app
to: /home/vagrant/Code/sulu/web
databases:
- homestead
# blackfire:
# - id: foo
# token: bar
# client-id: foo
# client-token: bar
# ports:
# - send: 50000
# to: 5000
# - send: 7777
# to: 777
# protocol: udp
任何想法为什么以及如何解决? 提前致谢!
您在 parameters.yml
中使用了错误的数据库端口。它应该是 3306
而不是 33060
.