doc/book/en/tutorials/base/blog-in-five-minutes.rst
branchstable
changeset 6835 87e2641d75f7
parent 6833 8fe4b003c1bc
child 6837 7562418985ef
equal deleted inserted replaced
6834:b4befa12bbcc 6835:87e2641d75f7
     1 .. -*- coding: utf-8 -*-
     1 .. -*- coding: utf-8 -*-
     2 
     2 
     3 .. _BlogFiveMinutes:
     3 .. _TutosBaseBlogFiveMinutes:
     4 
     4 
     5 Get a blog running in five minutes!
     5 Get a blog running in five minutes!
     6 -----------------------------------
     6 -----------------------------------
     7 
     7 
     8 For Debian or Ubuntu users, first install the following packages
     8 For Debian or Ubuntu users, first install the following packages
    15 
    15 
    16 Then create and initialize your instance::
    16 Then create and initialize your instance::
    17 
    17 
    18     cubicweb-ctl create blog myblog
    18     cubicweb-ctl create blog myblog
    19 
    19 
    20 And start it::
    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 higly recommended to
       
    24 choose `sqlite` when asked for which database driber 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: ::
    21 
    29 
    22     cubicweb-ctl start -D myblog
    30     cubicweb-ctl start -D myblog
    23 
    31 
    24 The -D option is the debugging mode of |cubicweb|, removing it will lauch the
    32 The `-D` option activate the debugging mode, removing it will launch the instance
    25 instance in the background.
    33 as a daemon in the background.
    26 
    34 
    27 Permission
       
    28 ~~~~~~~~~~
       
    29 
    35 
    30 This command assumes that you have root access to the /etc/ path. In order to initialize your instance as a `user` (from scratch), please check your current PYTHONPATH then create the ~/etc/cubicweb.d directory.
    36 About file-system permissions
       
    37 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       
    38 
       
    39 Unless you installed from sources, above commands assumes that you have root
       
    40 access to the :file:`/etc/` path. In order to initialize your instance as a
       
    41 regulary user, within your home directory, you can use the :envvar:`CW_MODE`
       
    42 environment variable: ::
       
    43 
       
    44   export CW_MODE=user
       
    45 
       
    46 then create a :file:`~/etc/cubicweb.d` directory that will hold your instances.
       
    47 
       
    48 More information about how to configure your own environment in :ref:`ResourceMode`.
       
    49 
    31 
    50 
    32 Instance parameters
    51 Instance parameters
    33 ~~~~~~~~~~~~~~~~~~~
    52 ~~~~~~~~~~~~~~~~~~~
    34 
    53 
    35 If you would like to change some instance parameters, for example, the main
    54 If you would like to change database parameters such as the database host or the
    36 database host or the user name, edit the `sources` file located in the
    55 user name used to connect to the database, edit the `sources` file located in the
    37 :file:`/etc/cubicweb.d/myblog` directory.
    56 :file:`/etc/cubicweb.d/myblog` directory.
    38 
    57 
    39 Then relaunch the database creation::
    58 Then relaunch the database creation::
    40 
    59 
    41      cubicweb-ctl db-create myblog
    60      cubicweb-ctl db-create myblog
    42 
    61 
    43 Other paramaters, like web server or emails parameters, can be modified in the
    62 Other paramaters, like web server or emails parameters, can be modified in the
    44 :file:`/etc/cubicweb.d/myblog/all-in-one.conf` file.
    63 :file:`/etc/cubicweb.d/myblog/all-in-one.conf` file.
    45 
    64 
    46 This is it. Your blog is running. Visit http://localhost:8080 and enjoy it! This
    65 You'll have to restart the instance after modification in one of those files.
    47 blog is fully functionnal. The next section section will present the way to
       
    48 develop new cubes and customizing the look of your instance.
       
    49 
    66 
       
    67 This is it. Your blog is functionnal and running. Visit http://localhost:8080 and enjoy it!
    50 
    68