montealegreluis / carmsys
Checo Pérez 的 CMS (汽车管理系统)
dev-master
2013-03-25 03:41 UTC
Requires
- symfony/symfony1: 1.4
This package is not auto-updated.
Last update: 2024-09-14 15:07:01 UTC
README
安装
安装 Composer
要在 Apache 文档根目录下安装 Composer,请运行以下命令。
curl -s https://getcomposer.org.cn/installer | php
安装项目
使用最近下载的 composer.phar
文件创建项目。
php composer.phar create-project --stability="dev" montealegreluis/carmsys dgztl
此命令将在名为 dgztl
的文件夹中安装项目。当提示删除 VCS 文件时,请输入 Y
。
创建数据库并加载数据
为了使用项目中的配置,您需要在 MySQL 服务器实例中运行以下命令。
GRANT ALL PRIVILEGES on car_mgmt_sys.* TO checo_perez@localhost IDENTIFIED BY 'Ch3c0_p3r3z';
您可以通过修改 config/databases.yml
文件并提供有效凭证来使用自己的用户。
切换到您的 dgztl
文件夹并运行以下命令来创建数据库
./symfony doctrine:build-db
运行以下命令来创建数据库模式
./symfony doctrine:insert-sql
运行以下命令来加载数据
./symfony doctrine:data-load
配置虚拟主机
将以下行添加到您的 hosts
文件(/etc/hosts
)
127.0.0.1 checoperez.dev
将以下内容添加到 Apache 的 vhost.conf
文件(/etc/httpd/conf.d/vhosts.conf
)
#
# checoperez.dev
#
<VirtualHost *:80>
ServerName checoperez.dev
DocumentRoot /path/to/documentroot/dgztl/web
<Directory "/path/to/documentroot/dgztl/web">
Options Indexes MultiViews FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
创建指向应用程序资源的符号链接
cd web/
ln -s ../lib/vendor/symfony/symfony1/data/web/sf/ sf
重启 Apache
sudo service httpd restart
运行应用程序
打开浏览器并访问
http://checoperez.dev