https://github.com/doodlewind/n7books
Second hand book exchange platform for USTCers
https://github.com/doodlewind/n7books
Last synced: 8 months ago
JSON representation
Second hand book exchange platform for USTCers
- Host: GitHub
- URL: https://github.com/doodlewind/n7books
- Owner: doodlewind
- Created: 2014-07-10T02:56:43.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2015-10-30T03:36:16.000Z (over 10 years ago)
- Last Synced: 2024-12-25T19:24:43.083Z (over 1 year ago)
- Language: PHP
- Homepage: http://bookface.ustc.edu.cn
- Size: 3.11 MB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
Awesome Lists containing this project
README
## BookFace
Bookface is an online textbook plea market for USTCers.
### Get started
#### Get Bookface
You may get your LAMP environment installed first.
``` bash
$ git clone https://github.com/doodlewind/n7books.git
```
And change its file permission.
``` bash
$ sudo chmod -R www-data:www-data n7books
```
#### Configure MySQL and CakePHP
After downloaded the source code, you can then import the MySQL table structure.
``` bash
$ mysql -u root -p ustc_old_book < n7books/ustc_old_book.sql
```
Next step is to configure CakePHP for database. Create `n7books/app/Config/database.php` and config like below:
``` php
'Database/Mysql',
'persistent' => false,
'host' => '127.0.0.1',
'login' => 'your_mysql_username',
'password' => 'your_mysql_password',
'database' => 'ustc_old_book',
'encoding' => 'utf8'
);
}
```
#### Configure Apache
The configuration of apache server includes setting the document root and enables URL rewrite, you can start from editing the apache config file in `/etc/apache2/apache2.conf`. Below is the example configure marking lines to be edited.
``` text
Options FollowSymLinks
AllowOverride None
Require all denied
AllowOverride None
Require all granted
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
```
Then, check if `/etc/apache2/mods-enabled` contails `rewrite.load`. If not, just execute this.
``` bash
$ sudo cp /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled
```
Then edit `/etc/apache2/sites-enabled/000-default.conf`
```
DocumentRoot /path/to/n7books/app/webroot
Options FollowSymLinks
AllowOverride All
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
```
Now the configuration to BookFace is completed. To start BookFace, just `$ sudo service apache2 restart` to see.