CppBlog is a high performance blog engine based on CppCMS technology |
|
## Requirements |
|
Before you install CppBlog you need to install |
|
- [CppCMS Framework](/wikipp/en/page/cppcms_1x_build) - version 0.999.0 and above |
- [CppDB Library](/sql/cppdb) |
- [Discount Markdown Library](http://www.pell.portland.or.us/~orc/Code/discount/) |
- [ImageMagick](http://www.imagemagick.org/) or [GraphicsMagick](http://www.graphicsmagick.org) library |
|
Optionally if you want to embed LaTeX formulas you may |
need latex and dvigif programs in runtime. |
|
## Installation of CppBlog |
|
Download cppblog-X.Y.Z.tar.bz2 and extract it: |
|
tar -xjvf cppblog-X.Y.Z.tar.gz |
cd cppblog-X.Y.Z |
|
If you are using trunk version: |
|
svn co https://cppcms.svn.sourceforge.net/svnroot/cppcms/blog/trunk cppblog |
cd cppblog |
|
and then create a build directory |
|
mkdir build |
|
Configure the cppblog build system |
|
cmake .. |
|
Or of you want to install to ordinary `/usr` path instead |
of `/usr/local` |
|
|
cmake -DCMAKE_INSTALL_PREFIX=/usr .. |
|
Then run |
|
make |
|
And as super user |
|
make install |
|
## Configuration of the blog |
|
I assume that you had installed the blog to /usr/local directory (default for configure script). Otherwise, you should update absolute paths given in this documentation |
|
### Database |
|
You can find DB configuration scripts under /usr/local/share/cppblog/sql directory, use them to create a database |
|
- If you use MySQL: |
|
First of all, create database, let's call it "blog". |
|
create database blog; |
|
Then create all required tables running: |
|
mysql -u username --password=secret blog <mysql.sql |
|
- If you use Sqlite3 |
|
Create a database: |
|
sqlite3 /var/blog/blog.db <sqlite3.sql |
|
Make sure that /var/blog/ and /var/blog/blog.db is writable by the web server. |
|
- If you use PostgreSQL |
|
createdb blog |
psql blog <postgresql.sql |
|
### CppBlog configuration |
|
Take a sample configuration file placed under /usr/local/shared/cppblog/sample_config.js create a copy and edit it. |
|
1. First create your new, unique private key for session management. Run |
|
cppcms_make_key --hmac sha1 |
|
Update the private keys in the configuration file. |
|
**REMEMBER THESE ARE YOUR PRIVATE KEYS, KEEP THEM IN SECRET** |
|
2. Configure connection string under `blog.connection_string`. Don't forget to define `@pool_size` connection string property to enable connection pooling. |
|
Refer to [CppDB manual](http://cppcms.com/sql/cppdb) for exact options. |
|
3. Configure your web server according [this manual](/wikipp/en/page/cppcms_1x_tut_web_server_config). |
|
Note, the cppblog media files installed into `/usr/local/share/cppblog/media`. Make sure that you have configured |
valid alias to this location and the `blog.media` |
has correct value assigned according to the location |
of the files relatively the the web servers |
document root. |
|
4. Make sure that `localization.messages.messages` and `views.paths` points to correct path: |
|
Locale dictionaries: |
|
"localization" : { |
"messages" : { |
"messages" : [ "/usr/local/share/locale"] |
|
Views path: |
|
"views" : { |
"paths" : [ "/usr/local/lib/cppblog" ], |
|
5. Make sure you set the correct value for `blog.host` configuration option. It is important for correct RSS generation. |
|
### Customization |
|
You can select one of the two views "orangesky" or "contended". You can select it by setting `views.default_skin` option. |
|
The blog language can be selected by setting required value for `localization.locales` option. |
|
### First Run |
|
Once you had setup the blog of first access you will be asked to create a user and setup a password, once you configured them, login |
CppBlog is a high performance blog engine based on CppCMS technology
|
|
## Requirements
|
|
Before you install CppBlog you need to install
|
|
- [CppCMS Framework](/wikipp/en/page/cppcms_1x_build) - version 0.999.0 and above
|
- [CppDB Library](/sql/cppdb)
|
- [Discount Markdown Library](http://www.pell.portland.or.us/~orc/Code/discount/)
|
- [ImageMagick](http://www.imagemagick.org/) or [GraphicsMagick](http://www.graphicsmagick.org) library
|
|
Optionally if you want to embed LaTeX formulas you may
|
need latex and dvigif programs in runtime.
|
|
## Installation of CppBlog
|
|
Download cppblog-X.Y.Z.tar.bz2 and extract it:
|
|
tar -xjvf cppblog-X.Y.Z.tar.gz
|
cd cppblog-X.Y.Z
|
|
If you are using trunk version:
|
|
svn co https://cppcms.svn.sourceforge.net/svnroot/cppcms/blog/trunk cppblog
|
cd cppblog
|
|
and then create a build directory
|
|
mkdir build
|
|
Configure the cppblog build system
|
|
cmake ..
|
|
Or of you want to install to ordinary `/usr` path instead
|
of `/usr/local`
|
|
|
cmake -DCMAKE_INSTALL_PREFIX=/usr ..
|
|
Then run
|
|
make
|
|
And as super user
|
|
make install
|
|
## Configuration of the blog
|
|
I assume that you had installed the blog to /usr/local directory (default for configure script). Otherwise, you should update absolute paths given in this documentation
|
|
### Database
|
|
You can find DB configuration scripts under /usr/local/share/cppblog/sql directory, use them to create a database
|
|
- If you use MySQL:
|
|
First of all, create database, let's call it "blog".
|
|
create database blog;
|
create user 'username'@'localhost' identified by 'password';
|
grant all privileges on blog.* to 'username'@'localhost';
|
|
Then create all required tables running:
|
|
mysql -u username --password=secret blog <mysql.sql
|
|
- If you use Sqlite3
|
|
Create a database:
|
|
sqlite3 /var/blog/blog.db <sqlite3.sql
|
|
Make sure that /var/blog/ and /var/blog/blog.db is writable by the web server.
|
|
- If you use PostgreSQL
|
|
createdb blog
|
psql blog <postgresql.sql
|
|
### CppBlog configuration
|
|
Take a sample configuration file placed under /usr/local/shared/cppblog/sample_config.js create a copy and edit it.
|
|
1. First create your new, unique private key for session management. Run
|
|
cppcms_make_key --hmac sha1
|
|
Update the private keys in the configuration file.
|
|
**REMEMBER THESE ARE YOUR PRIVATE KEYS, KEEP THEM IN SECRET**
|
|
2. Configure connection string under `blog.connection_string`. Don't forget to define `@pool_size` connection string property to enable connection pooling.
|
|
Refer to [CppDB manual](http://cppcms.com/sql/cppdb) for exact options.
|
|
3. Configure your web server according [this manual](/wikipp/en/page/cppcms_1x_tut_web_server_config).
|
|
Note, the cppblog media files installed into `/usr/local/share/cppblog/media`. Make sure that you have configured
|
valid alias to this location and the `blog.media`
|
has correct value assigned according to the location
|
of the files relatively the the web servers
|
document root.
|
|
4. Make sure that `localization.messages.messages` and `views.paths` points to correct path:
|
|
Locale dictionaries:
|
|
"localization" : {
|
"messages" : {
|
"messages" : [ "/usr/local/share/locale"]
|
|
Views path:
|
|
"views" : {
|
"paths" : [ "/usr/local/lib/cppblog" ],
|
|
5. Make sure you set the correct value for `blog.host` configuration option. It is important for correct RSS generation.
|
|
### Customization
|
|
You can select one of the two views "orangesky" or "contended". You can select it by setting `views.default_skin` option.
|
|
The blog language can be selected by setting required value for `localization.locales` option.
|
|
### First Run
|
|
Once you had setup the blog of first access you will be asked to create a user and setup a password, once you configured them, login
|
|