CppBlog - CppCMS Powered Blog Engine
CppBlog is a high performance blog engine based on CppCMS technologyRequirements
Before you install CppBlog you need to install- CppCMS Framework - version 0.999.0 and above
- CppDB Library
- Discount Markdown Library
- ImageMagick or GraphicsMagick library
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
- svn co https://cppcms.svn.sourceforge.net/svnroot/cppcms/blog/trunk cppblog
- cd cppblog
- mkdir build
- cmake ..
/usr path instead
of /usr/local- cmake -DCMAKE_INSTALL_PREFIX=/usr ..
- make
- 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 documentationDatabase
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".
Then create all required tables running:- create database blog;
- create user 'username'@'localhost' identified by 'password';
- grant all privileges on blog.* to 'username'@'localhost';
- mysql -u username --password=secret blog <mysql.sql
- If you use Sqlite3
Create a database:
Make sure that /var/blog/ and /var/blog/blog.db is writable by the web server.- sqlite3 /var/blog/blog.db <sqlite3.sql
- If you use PostgreSQL
- createdb blog
- psql blog <postgresql.sql
CppBlog configuration
Take a sample configuration file placed under /usr/local/share/cppblog/sample_config.js create a copy and edit it.- First create your new, unique private key for session management. Run
Update the private keys in the configuration file.- cppcms_make_key --hmac sha1
REMEMBER THESE ARE YOUR PRIVATE KEYS, KEEP THEM IN SECRET - Configure connection string under
blog.connection_string. Don't forget to define@pool_sizeconnection string property to enable connection pooling.
Refer to CppDB manual for exact options. - Configure your web server according this manual.
Note, the cppblog media files installed into/usr/local/share/cppblog/media. Make sure that you have configured valid alias to this location and theblog.mediahas correct value assigned according to the location of the files relatively the the web servers document root. - Make sure that
localization.messages.messagesandviews.pathspoints to correct path:
Locale dictionaries:
Views path:- "localization" : {
- "messages" : {
- "messages" : [ "/usr/local/share/locale"]
- "views" : {
- "paths" : [ "/usr/local/lib/cppblog" ],
- Make sure you set the correct value for
blog.hostconfiguration 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 settingviews.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。FROM http://cppcms.com/wikipp/en/page/install_cppblog
源码下载地址:http://sourceforge.net/projects/cppcms/files/cppblog/