Laconica Easy-ish Install Scripts Finished

Posted by JuanJose on Jul 13, 2008 in Programming, bored, laconica |

Yet another update! Check out:

Another Laconica Easy Install Script Update

It’s beta, it’s ugly, it works!

I’ve written up two scripts in order to get Laconica installed quickly and easily on any DreamHost account. It’s really ugly, mostly because of all the config details you have to fill out. Still, it’s a whole lot faster then doing everything yourself.

Main install script/config file: http://files.gimmesoda.com/laconica/install_run.sh
Pear install script: http://files.gimmesoda.com/laconica/install_pear.sh
Laconica install script: http://files.gimmesoda.com/laconica/install_laconica.sh

You MUST run the main install script and not the others – it sets all the config variables!

Here is what you need to do for a completely clean install including PEAR:

1) Create the database/db user/password you want for your laconica install.
2) Put these three files in your shell user’s home directory.
3) Modify the install_run.sh file to fit your needs. Here is an example – MySQL is self-explanatory!

export CURUSER=”puretest” ### Shell Username
export YOURDOMAINFOLDER=”example.domain.com/pathforlaconica”
export YOURDOMAINFOLDERESCAPED=”example.domain.com\/pathforlaconica”
export PATHTOCLASSES=”\/home\/${CURUSER}\/${YOURDOMAINFOLDERESCAPED}\/classes”

export LACONICA_CONFIG_SERVER=”example.domain.com”
export LACONICA_CONFIG_PATH=”pathforlaconica”
export LACONICA_CONFIG_FANCY=”false” ###Having trouble with fancy url’s

export MYSQLHOST=”mysql.domain.com”
export MYSQLUSER=”user”
export MYSQLPASS=”password”
export MYSQLDB=”dbname”

4) Run command: chmod +x install_*
5) Run ./install_run.sh

For those who already have PEAR installed to their liking:

You need to modify two lines in install_run.sh

1) export PHPINCLUDEPATHCODE=”ini_set(‘include_path’, ini_get(‘include_path’) . PATH_SEPARATOR . ‘\/home\/${CURUSER}\/pear\/php:\/home\/${CURUSER}\/${YOURDOMAINFOLDERESCAPED}\/extlib’);”

See the part with the /home/${CURUSER}/pear/php? Modify each of those to your pear repository path. Make sure to keep all those escape characters in front of each of your /’s. Notice I also add the extlib folder into the path with this line, so if you’re keeping your extlib/ folder in a different place – modify that too.

2) Comment out: /bin/bash install_pear.sh it should look like this:

###/bin/bash install_pear.sh

3) Make sure you have an empty DB ready and fill out the rest of the config file as usual, then run:

./install_run.sh

With any luck you’ll have a laconica install within a minute of the script being run. You’ll need to modify it manually in order to set things up exactly the way you want them but this should give you a seriously decent starting point without all the fuss of mucking around in the files just to make things run in the first place.

So whether you have a current PEAR install or not the scripts are there for you, I’d recommend running them on a nice shiny new user and subdomain though since I’m not taking any responsibility if your sites/data/first born child goes missing due to the running of my scripts.

Good luck! Feed back is encouraged!

Oh and for those who are wondering why I did this using bash scripting instead of PHP like I normally pump out code, it’s because there are many commands I could accomplish running more smoothly on any DH account using bash and not with PHP. That’s because shared servers @ DH don’t have the exec functions for PHP enabled. (Wisely enough I’d say!)

Original Post:

http://www.gimmesoda.com/2008/07/05/easyinstall-of-laconica-on-dreamhost/

More Resources:

http://decafbad.com/blog/2008/07/03/getting-laconica-up-and-running

http://laconi.ca/Main/LaconicaOnDreamhost

P.S.:

For those of you who don’t already have a DreamHost Account and want to grab a discount or a free domain + a discount use either of these codes:

PRIMEPROMO : $50 Off Any Plan
PRIMEDOMAINCASH : Free Domain And $30 Discount

Those codes come from here:

http://dreamhost.PrimePromoCodes.com

16 Comments

  • Hey, great job! Is it OK to push these into a “tools” dir in the Laconica main distribution?

  • JuanJose says:

    Absolutely! I’ll probably make a few more updates depending on the user response but they should work decently for now.

  • [...] there are two scripts to install Laconica on DreamHost on Gimme [...]

  • Guillaume says:

    hello

    I followed your instructions and it went well but since I am total newbie I am not sure were I am in the complete process : (http://laconi.ca/Main/LaconicaOnDreamhost)

    I think I have to follow the 6a step, is it right ?

    (by the way, I have already done 6c because I could understand it ;-) )

  • JuanJose says:

    Hey Guillaume,

    If you’re on DreamHost all you need to do is enable a shell user, setup the subdomain, create the database, and run my script. It takes care of the 6a step.

    Otherwise to run this manually, login to your shell, and run the svn co svn://netflint.net/xmpphp command, then copy all those php files over to your extlib/ folder.

    If you keep having trouble with this let me know and I’ll see what I can do about helping you out.

  • Neal Locke says:

    Hi JJ — wanted to try out your script on a fresh domain (http://prez.be) but after I upload the scripts into the root and try to run ./install_run.sh I get the following error message:

    : bad interpreter: No such file or directory

    Am I doing something wrong?

  • JuanJose says:

    Eek! Sounds like the line endings are incorrect!

    I went ahead and ran:

    :set fileformat=unix

    From inside of vi on each of those files. If you copy a set of them again you should be fine. Sorry about that!

  • Neal Locke says:

    Worked like a charm! Thanks again.

  • JuanJose says:

    Glad to hear it! If anyone else runs into trouble with these scripts let me know, I’m happy to help out.

  • Bg says:

    it worked. the installation.. on DH. BUT thereafter .. cant register, no open id login works.. any idea?

  • JuanJose says:

    That’s odd, any chance you can send me the URL so I can take a look?

  • Aracnus says:

    Hi Juan Jose,

    First, thank you VERY much for this script. I finally have a testing laconica server on DH.

    It has only one error. It need to copy another directory from XMPPHP, otherwise laconica will crash when we click on IM option. Just add the following line:

    cp xmpphp/XMPPHP ../extlib -R

    just after

    cp ‘PHP Markdown 1.0.1m/markdown.php’ ../extlib/
    cp -r php-openid-2.1.1/Auth ../extlib/
    cp OAuth.php ../extlib/
    cp xmpphp/*.php ../extlib/

    and the problem is gone… :-)

    By the way, do I need to enable the xmpp daemon to send IM messages? Or this is just for “notice broadcasts offline”, as described on config.ini? And what is the best way to activate it on DH?

    Best regards.

  • JuanJose says:

    I definitely got to say thanks for catching that! I’ve updated the script with that fix.

    As for the xmpp daemon question you had, I’ve actually been away from working on pretty much anything for a small while so I’m a little behind about it – you might try checking with one of the people who already have it running – or if one of you guys comments here it’d be great to share the knowledge!

    JJ

  • april says:

    I successfully did all steps except the execute install_run.sh… what should the command be? I tried about one million things, but clearly am doing something wrong (I keep getting “invalid command”).

  • april says:

    Ah, nevermind… however, my installation failed in multiple ways.

  • Patrick says:

    Hello!

    Since weeks I try to install Laconica like on “http://laconi.ca/trac/wiki/InstallationWindows” described, however, always something does not function. When I last, for example, in the command line “c:\xampp\php\pear>.\php go-pear.phar” give has, malfunctioned “CLI” all at once any more and did not have to be finished. Therefore, I am real already with him irritate at the end.

    My request: Would be you able to do Xampp for Windows (ready configured according to installation instruction) as a folder (ZIP or RAR) for me to download, so that I can immediately start under “http://localhost/laconica”? (I know that then I have to create user and database, to import laconica.sql and to correct config.php and to add darcs as path in windows environment variables)

    For me this means very much, thank you a lot for your help!

    Patrick

Leave a Reply

XHTML: You can use these tags:' <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Copyright © 2006-2010 Gimme Soda All rights reserved.
Desk Mess Mirrored v1.4.6 theme from BuyNowShop.com.