Category: Ubuntu

rss

Install pandoc 1.9 on ubuntu lucid/oneric

Don't install pandoc with apt-get. Follow those instructions to get the latest version,

You need haskell-platform. Don't install haskell with apt-get, too.

Use this guide how to install haskell on ubuntu.

As soon as you are done, you can install pandoc with this:

1
2
$ cabal update
$ cabal install pandoc

Remember to do this NOT with sudo, because you want to have cabal locally available with the current user.

But if it fails with:

1
2
3
Resolving dependencies...
cabal: dependencies conflict: base-3.0.3.2 requires syb ==0.1.0.2 however
syb-0.1.0.2 was excluded because json-0.5 requires syb >=0.3.3

you did accidently installed haskell-platform with apt-get. Do

1
$ sudo apt-get remove haskell-platform

and follow the link from the beginning of this post!

In Ubuntu By DracoBlue @ 22:44 10.03.2012

Remote logging with rsyslog, php and agavi

When I tried to get rsyslog running with php I didn't face much problems. Anyways I want to share some things I noticed while getting it to work.

First of all ubuntu uses rsyslog already. Just a simple

1
# apt-get install rsyslog-mysql

and all syslog messages went directly into the database "syslog". Configure /etc/rsyslog.d/mysql.conf to insert this information into a remote machine.

Now let's get to php. You have the option to set:

1
error_log=syslog

This however does log all messages with

1
php: whatever the issue or error is

If you want to replace "php" with a custom message, you have to call

1
openlog('myapp', LOG_PID | LOG_ODELAY, LOG_USER);

before any error happens. Because LOG_ODELAY is given, it won't connect to syslog unless any error happens, so one should be save to put this call at the top of your dispatcher file.

The final log message will look like that (254 is the process id):

1
Sep 26 13:39:44 root-server myapp[254]: the issue or error

Finally I wanted to log all messages created by agavi's logging system. Since I didn't found an existing AgaviSyslogLoggerAppender, I wrote one and put it up on a github-gist.

Have fun logging!

In MyQuests, php, Agavi & Ubuntu By DracoBlue @ 13:55 26.09.2011

Installing php 5.3.5/5.3.6 on Ubuntu Maverick/Lucid

Latest Version for PHP 5.3 on Ubuntu is just PHP 5.3.3. This is not so good, if you want to have some of the plenty bugfixes which will be shipped with a later version.

If you want to upgrade to 5.3.5 (5.3.6 support may come later), you can use this inofficial ppa by the nginx user at launchpad: https://launchpad.net/~nginx/+archive/php5.

For ubuntu maverick just create a file:

1
$ gedit /etc/apt/sources.list.d/php5-ppa.list

with the contents

1
2
3
deb http://ppa.launchpad.net/nginx/php5/ubuntu maverick main
deb-src http://ppa.launchpad.net/nginx/php5/ubuntu maverick main

and run:

1
2
$ sudo apt-get update
$ sudo apt-get dist-upgrade

Now you have php-5.3.5 installed on your ubuntu box! Have fun.

In Linux, php & Ubuntu By DracoBlue @ 22:02 13.04.2011