Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/myoula/cakeshop
基于tornado、peewee、jinja2的商城
https://github.com/myoula/cakeshop
Last synced: 15 days ago
JSON representation
基于tornado、peewee、jinja2的商城
- Host: GitHub
- URL: https://github.com/myoula/cakeshop
- Owner: myoula
- Created: 2013-10-30T04:17:28.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2013-12-12T05:39:54.000Z (almost 11 years ago)
- Last Synced: 2024-08-01T16:17:44.362Z (3 months ago)
- Language: CSS
- Size: 1.86 MB
- Stars: 187
- Watchers: 22
- Forks: 98
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
系统要求:
nginx
centos 6.x
mysql 5.1x
memcached一 安装基本环境
1 安装系统环境
rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6yum -y install gcc nginx mysql-libs mysql-server mysql-devel memcached python-setuptools
2 安装 virtualenv
easy_install virtualenv3 安装pypy
yum -y install pypy-libs pypy pypy-devel4 创建基本环境
cd /home/www
virtualenv --no-site-packages -p pypy czcakecd czcake
source bin/activate#把源文件放进来
pip install -r requirement.txt
mkdir etc
echo_supervisord_conf > etc/supervisord.confvi etc/supervisord.conf
#添加配置
[program:czcake8080]
command=python /home/www/czcake/src/manager.py
autostart=true
stderr_logfile = /var/log/nginx/app.log
stdout_logfile = /var/log/nginx/app.logsupervisord -c /home/www/czcake/etc/supervisord.conf
vi /etc/nginx.conf
#添加配置
upstream czcake {
server 127.0.0.1:8080;
}server {
listen 80;
server_name czcake.heycz.com;
client_max_body_size 4M;location /
{
proxy_pass_header Server;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
proxy_pass http://czcake;
}
}二 项目配置
cd src
vi setting.py
#设置数据库和缓存服务器信息#初始化数据库
python manager.py --cmd=syncdb三 开始运行
supervisorctl restart all
service nginx restart