Giter Site home page Giter Site logo

cakeshop's Introduction

系统要求: 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-6

yum -y install gcc nginx mysql-libs mysql-server mysql-devel memcached python-setuptools

2 安装 virtualenv easy_install virtualenv

3 安装pypy yum -y install pypy-libs pypy pypy-devel

4 创建基本环境 cd /home/www virtualenv --no-site-packages -p pypy czcake

cd czcake source bin/activate

#把源文件放进来

pip install -r requirement.txt

mkdir etc echo_supervisord_conf > etc/supervisord.conf

vi 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.log

supervisord -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

cakeshop's People

Contributors

shiny avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.