Skip to content

Commit

Permalink
adjust the format of README
Browse files Browse the repository at this point in the history
  • Loading branch information
yueyoum committed Sep 28, 2012
1 parent d67971a commit 05ac080
Showing 1 changed file with 34 additions and 40 deletions.
74 changes: 34 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,24 @@ Project deployed with **Virtualenv**.

### How to initial a NEW server for python-gears:

1, apt-get update && apt-get upgrade
1. apt-get update && apt-get upgrade

2, add a non root user (optional)
2. add a non root user (optional)

```bash
mkdir -p /home/yueyoum
groupadd yueyoum
useradd yueyoum -d /home/yueyoum -g yueyoum -s /bin/bash
passwd yueyoum
usermod -a -G www-data yueyoum
usermod -a -G sudo yueyoum
```
mkdir -p /home/yueyoum
groupadd yueyoum
useradd yueyoum -d /home/yueyoum -g yueyoum -s /bin/bash
passwd yueyoum
usermod -a -G www-data yueyoum
usermod -a -G sudo yueyoum

3, apt-get install build-essential
3. apt-get install build-essential

4, apt-get install mysql-server
4. apt-get install mysql-server

_ubuntu 12.04 will install mysql 5.5_

5, vim /etc/mysql/my.cnf
5. vim /etc/mysql/my.cnf

add the following in [client]
default-character-set = utf8
Expand All @@ -43,43 +41,39 @@ usermod -a -G sudo yueyoum
character-set-server = utf8


6, /etc/init.d/mysql restart
6. /etc/init.d/mysql restart


7, install requirments
7. install requirments

```bash
apt-get install libmysqld-dev
apt-get install python-dev
apt-get install memcached
apt-get install nginx
apt-get install python-virtualenv
```
apt-get install libmysqld-dev
apt-get install python-dev
apt-get install memcached
apt-get install nginx
apt-get install python-virtualenv

8, deploy
8. deploy

```bash
cd /
mkdir -p data/project
chmod 777 data
cd data
chown yueyoum:www-data project
chmod g+w project
cd /
mkdir -p data/project
chmod 777 data
cd data
chown yueyoum:www-data project
chmod g+w project

cd project
su yueyoum
mkdir python_gears # and locate code here
cd python_gears
virtualenv env --no-site-packages --distribute --prompt="(python-gears)"
source env/bin/activate
cd project
su yueyoum
mkdir python_gears # and locate code here
cd python_gears
virtualenv env --no-site-packages --distribute --prompt="(python-gears)"
source env/bin/activate

pip install -r deploy/requirements.txt
pip install -r deploy/requirements.txt

python manage.py validate
```
python manage.py validate


9, final, set uwsgi, nginx, and run project
9. final, set uwsgi, nginx, and run project


### NOTICE
Expand Down

0 comments on commit 05ac080

Please sign in to comment.