[SOLVED] Clean EMONCMS install on Ubuntu

Hi Guys,

I run my own Ubuntu 14.4 Server, and have installed EmonCMS 8.4 which was working ok. After playing around, installing the 8.5-X I thought I would start all over. Especially since now 8.5 is out.

  1. Stopped emonhub on raspi.
  2. I have deleted the MySql DB, deleted the tree /var/lib/php* directories, deleted the emoncms directory.
  3. > I thought it's now all gone, so I followed the installation steps again. (https://github.com/emoncms/emoncms/blob/v8.5/docs/LinuxInstall.md)
  4. once I've logged back in, (after creating a new user) I saw all inputs & feeds in my webpage. 
  5. I verified with various browsers... still the same
  6. And the worst is that I can not delete the inputs/feeds via the webinterface (feedback == false)

Does anyone know how to fully clean all traces of emoncms, and start all over?

Many thanks for your feedback.

 

found the solution:

 

redis DB is saving the data on disk... so here you can "delete" the redis DB

root@brutzel:/var/lib/redis# /etc/init.d/redis-server stop
Stopping redis-server: redis-server.
root@brutzel:/var/lib/redis# mv dump.rdb dump.rdb.old
root@brutzel:/var/lib/redis# /etc/init.d/redis-server start
Starting redis-server: redis-server.

roman

 

rgischig's picture

Re: [SOLVED] Clean EMONCMS install on Ubuntu

found the solution myself:

the redis DB is written to the disk.... and reloaded after a fresh install.

root@brutzel:/var/lib/redis# /etc/init.d/redis-server stop
Stopping redis-server: redis-server.
root@brutzel:/var/lib/redis# mv dump.rdb dump.rdb.old
root@brutzel:/var/lib/redis# /etc/init.d/redis-server start
Starting redis-server: redis-server.

Feature request: can we have a configurable DB-ID in the settings.php file?

roman

 

Charly86's picture

Re: [SOLVED] Clean EMONCMS install on Ubuntu

+1 for the db id of redis database, :-)

Charly86's picture

Re: [SOLVED] Clean EMONCMS install on Ubuntu

Sounds very simple to implement, I added in config.php the redis ID you want, example

`$redis_id = 1`;

then in index.php section 2 database becomes

    // 2) Database
    $mysqli = @new mysqli($server,$username,$password,$database);

    if (class_exists('Redis') && $redis_enabled) {
        $redis = new Redis();
        $connected = $redis->connect("127.0.0.1");
        if (!$connected) {
            echo "Can't connect to redis database, it may be that redis-server is not installed or started see readme for redis installation"; die;
        }
        if ( $redis_id >0 && $redis_id <10) {
            if (!$redis->select($redis_id)) {
                    echo "Can't select redis database id " . $redis_id ; die;
                }
        }

    } else {
        $redis = false;
    }

 

Asking emoncms Guru's if I missed something ? but as emoncms code is very clean, this change should work like a charm.

 

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.