doc/tutorials/base/blog-in-five-minutes.rst
changeset 10491 c67bcee93248
parent 6837 7562418985ef
child 12362 aa3581fc685c
child 12363 72fced7549e6
equal deleted inserted replaced
10490:76ab3c71aff2 10491:c67bcee93248
       
     1 .. -*- coding: utf-8 -*-
       
     2 
       
     3 .. _TutosBaseBlogFiveMinutes:
       
     4 
       
     5 Get a blog running in five minutes!
       
     6 -----------------------------------
       
     7 
       
     8 For Debian or Ubuntu users, first install the following packages
       
     9 (:ref:`DebianInstallation`)::
       
    10 
       
    11     cubicweb, cubicweb-dev, cubicweb-blog
       
    12 
       
    13 Windows or Mac OS X users must install |cubicweb| from source (see
       
    14 :ref:`SourceInstallation` and :ref:`WindowsInstallation`).
       
    15 
       
    16 Then create and initialize your instance::
       
    17 
       
    18     cubicweb-ctl create blog myblog
       
    19 
       
    20 You'll be asked a few questions, and you can keep the default answer for most of
       
    21 them. The one question you'll have to think about is the database you'll want to
       
    22 use for that instance. For a quick test, if you don't have `postgresql` installed
       
    23 and configured (see :ref:`PostgresqlConfiguration`), it's highly recommended to
       
    24 choose `sqlite` when asked for which database driver to use, since it has a much
       
    25 simple setup (no database server needed).
       
    26 
       
    27 One the process is completed (including database initialisation), you can start
       
    28 your instance by using: ::
       
    29 
       
    30     cubicweb-ctl start -D myblog
       
    31 
       
    32 The `-D` option activates the debugging mode. Removing it will launch the instance
       
    33 as a daemon in the background, and ``cubicweb-ctl stop myblog`` will stop
       
    34 it in that case. 
       
    35 
       
    36 
       
    37 About file system permissions
       
    38 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       
    39 
       
    40 Unless you installed from sources, the above commands assume that you have root
       
    41 access to the :file:`/etc/` directory. In order to initialize your instance as a
       
    42 regular user, within your home directory, you can use the :envvar:`CW_MODE`
       
    43 environment variable: ::
       
    44 
       
    45   export CW_MODE=user
       
    46 
       
    47 then create a :file:`~/etc/cubicweb.d` directory that will hold your instances.
       
    48 
       
    49 More information about how to configure your own environment is
       
    50 available in :ref:`ResourceMode`.
       
    51 
       
    52 
       
    53 Instance parameters
       
    54 ~~~~~~~~~~~~~~~~~~~
       
    55 
       
    56 If you would like to change database parameters such as the database host or the
       
    57 user name used to connect to the database, edit the `sources` file located in the
       
    58 :file:`/etc/cubicweb.d/myblog` directory.
       
    59 
       
    60 Then relaunch the database creation::
       
    61 
       
    62      cubicweb-ctl db-create myblog
       
    63 
       
    64 Other parameters, like web server or emails parameters, can be modified in the
       
    65 :file:`/etc/cubicweb.d/myblog/all-in-one.conf` file.
       
    66 
       
    67 You'll have to restart the instance after modification in one of those files.
       
    68 
       
    69 This is it. Your blog is functional and running. Visit http://localhost:8080 and enjoy it!
       
    70