installing booktype on cent os 6.7 with postgresql
  • i had tried to install on cent os 6,7 by following the below mentioned link of your's

    https://wiki.sourcefabric.org/display/Booktype/How+to+install+it+on+CentOS

    but i got stuck on the below command which is not getting executed

    pip install -r Booktype/requirements/postgresql.txt

    it shows the error that "could not open requirement file : no such file or directory "

    and i tried to execute the next command also which is

    ./Booktype/scripts/createbooki --database postgresql mybook<br><br>it also shows the same error that "no such file or directory".<br><br>i hope u can help me to resolve this
  • 15 Comments sorted by
  • Vote Up0Vote Down Daniel JamesDaniel James
    Posts: 844Member, Sourcefabric Team
    Hi Aneesh,

    That wiki page is out of date, sorry. Please follow the official manual chapter http://sourcefabric.booktype.pro/booktype-20-for-authors-and-publishers/installation-on-gnulinux/

    If you look in the Booktype/requirements directory, you will see the files dev.txt (for development) and prod.txt (for production) have replaced postgresql.txt. For example, if you wanted a production install, you would use the command:
    pip install -r Booktype/requirements/prod.txt
    The script createbooki has now been replaced with createbooktype. For example:
    ./createbooktype -p dev --check-versions --database postgresql /var/www/booktype/instance1
    Please let us know how you get on, we would like to update our instructions for CentOS.

    Cheers!

    Daniel

  • hi daniel,

    the above link that you given is mentioning only for debian and ubuntu. but i am here using cent os 6.7 and the error is on this server. so help me to install it on cent os server 6.7 which i am looking for.

    thank you for your assistance
  • Vote Up0Vote Down Daniel JamesDaniel James
    Posts: 844Member, Sourcefabric Team
    Hi Aneesh,

    Debian and Ubuntu package names are shown, but the rest of the instructions are generic for GNU/Linux. What happens when you enter the commands as shown in my post above?

    By the way, if you want to install a production server, you can use the -p flag to set the profile to 'prod':
    ./createbooktype -p prod --check-versions --database postgresql /var/www/booktype/instance1
    You may be serving web pages from a different path than /var/www/ but any path accessible to your web server should work.

    Cheers!

    Daniel
  • when i entered the below command
    ./createbooktype -p prod --check-versions --database postgresql /var/www/booktype/instance1

    it shows the error that

    -bash: ./createbooktype:no such file or directory

    so what will i do next?


  • Vote Up0Vote Down Daniel JamesDaniel James
    Posts: 844Member, Sourcefabric Team
    Hi Aneesh,

    Make sure you're in the directory containing the scripts, for example
    /usr/local/src/booktype/scripts/
    if you are following the instructions in the user manual, linked above. Otherwise you will have to call the script from a relative path.

    Cheers!

    Daniel

  • hai,
    sorry for the delay as i had got time only today to check it...
    As you mentioned i did from the exact location but it does'nt get executed and showed the below error:

    Traceback (most recent call last):
      File "./createbooktype", line 22, in <module>
        import argparse
    ImportError: No module named argparse



  • hi,

    can you do me a favour.

    http://sourcefabric.booktype.pro/booktype-20-for-authors-and-publishers/installation-on-gnulinux/

    can you give me the step by step procedure based on centos server exact lik the abve link of deb. As a beginner i am really getting tough to proceed. And so not familiar with deb and cent os commands too.

    so if you are able give me the steps exactly written for cent os 6.7 (including dedicated cent os commands) it will be very much helpful to me..
  • Vote Up0Vote Down Daniel JamesDaniel James
    Posts: 844Member, Sourcefabric Team
    Hi Aneesh,

    If you don't have argparse as standard, I'm wondering if you are running something older than Python 2.7.

    Please post the output of the command:
    python --version
    Cheers!

    Daniel
  • hi,

    python 2.6.6
  • Vote Up0Vote Down Daniel JamesDaniel James
    Posts: 844Member, Sourcefabric Team
    Hi Aneesh,

    Booktype requires Python 2.7 or above. Please see the tutorial at https://www.atlantic.net/community/howto/install-python-2-7-centos-anaconda/

    If you're not comfortable with upgrading your Python version, I'd recommend considering managed hosting. We would be happy to host a Booktype instance for your organisation.

    Cheers!

    Daniel

  • Post edited by ANEESH SOJAN at 2016-03-01 07:20:19
  • Vote Up0Vote Down Daniel JamesDaniel James
    Posts: 844Member, Sourcefabric Team
    Hi Aneesh,

    I'm sorry that you're having trouble. Your CentOS system relies on Python 2.6 to perform basic functions, including yum.

    Please show the output of:

    ls -l /usr/bin/python

    I'm guessing that by removing the python2.6 binary with rm, you have broken this symbolic link.

    My suggestion would be to try pointing /usr/bin/python to /usr/bin/python2.7 temporarily, to enable you to reinstall Python 2.6 and get your server working again. You can create a temporary symbolic link with:

    ln -s /usr/bin/python2.7 /usr/bin/python
     
    Please let us know how that goes.

    Cheers!

    Daniel
  • hi,

    i had fixed that and installed python 2.7 by referring the link you are given. But still the version showing is python 2.6

    now how can i point out python 2.7 as default ?
  • Vote Up0Vote Down Daniel JamesDaniel James
    Posts: 844Member, Sourcefabric Team
    Hi Aneesh,

    Glad to hear you fixed your server! On CentOS the default should be Python 2.6, as that is what the system needs to run. The trick here is to use two versions of Python in parallel, so that installed programs like Booktype can use 2.7. It is a workaround though, as Python 2.6 is very old now, it was released in 2008.

    I would recommend that you consider managed hosting, it gets more complicated from here on in :-) I understand that you already talked to Julian, please ask him about how we can help your organisation.

    Cheers!

    Daniel
  • hi daniel,

    sorry. i want to fix it manually and want to use it. i am ready to take the risk. As you said i had updated my python to 2.7 tried the below command from /usr/local/src/booktype/scripts

    ./createbooktype -p prod --check-versions --database postgresql /var/www/booktype/instance1


    but it shows the  error as before

    Traceback (most recent call last):
      File "./createbooktype", line 779, in <module>
       activate_this = '{}/bin/activate_this.py'.format(args.virtual_env)
    ValueError: zero length filed name in format



    Post edited by ANEESH SOJAN at 2016-03-02 03:34:53