Composer on OMV – harder than I thought

So I now decided it would be nice to install firefly iii.

This needs Composer.

So installing Composer is proving harder than expected.

The download keeps timing out go gave up and just downloaded latest version (1.6.5) from here

https://getcomposer.org/download/

Created a /usr/local/composer directory and downloaded the file into that.

Then executed


mv /usr/local/composer/composer.phar /usr/local/bin/composer

chmod +x /usr/local/bin/composer

composer -v

All seems OK now

The problem seems to be something to do with the way curl works with ipv6 vs ipv4.

I also enabled ipv6 on the OMV box.

So I did add

ipv4 >> ~/.curlrc

but still made no difference.

Changes to the OMV box – rkhunter

Today I added rkhunter to check for Rootkits.  There is a Debian version of this which installs fine using

apt-get intall rkhunter

The package installs rkhunter into /usr/bin

The instructions here are good –> https://sourceforge.net/p/rkhunter/wiki/install/ but need to be followed carefully.

I did also install skdet and unhide as suggested.  Again the instructions work just fine.  I had some trouble with the patch command for skdet but only as I typed -pl and not -p1 (a 1 not an l)!

The tests all worked fine and nothing found.

Config files are in /etc/rkhunter.conf

The package comes with a cron.daily job in etc/cron.daily which pulls in some default values from /etc/default/rkhunter.  So this file needs to be update to make the cron job do anything.

and this is where the trouble started……

This job uses sendmail.  So you would think, well I did to install sendmail.  I did without looking at the dependencies and it wipes out Openmediavault!  Ekkk!

So 36 hours later we are running again!  It corrupted the system on a reboot and networking did not work.

Eventually I worked out that sendmail did not uninstall correctly and OMV did not install correctly.  The Linux prompts help but key were reloading OMV Extras.  Nothing worked except apt-get clean followed by a load using

wget -O – http://omv-extras.org/install | bash

which I got from the OMV Extras site here…. http://omv-extras.org/joomla/index.php/guides

(Interesting just noticed they are using Joomla!)

I needed to remove some packages using apt-get purge after checking what they were using wget -l | grep openm.

At last working OK.  Note some editing needed on the etc/openmediavault/config.xml to remove old entries which cause errors.  Clever .xml record what should be in OMV which is fine until things go wrong!  Also read the developers guide for info on how to edit the xml without actually accessing the file directly.

Changes to the OMV box – eXtplorer

Added eXtplorer to the OMV box today.

The config uses the latest version from here –> http://extplorer.net/projects/extplorer/files

Used a sensible local location for the files.

Changed permission to allow www-data to be user and group.

Followed the instructions here –> http://extplorer.net/projects/extplorer/wiki/Getting_Started

Stand Alone Installation
1. Extract the downloaded Archive to a local directory, say C:\Files\extplorer
2. Login to your server via FTP and create a subdirectory for eXtplorer, say /extplorer
3. Allow write access for your webserver for that subdirectory and the subdirectory /extplorer/ftp_tmp (e.g. chmod 777)
4. With your FTP program browse to the eXtplorer directory /config and make the file “.htusers.php” writable (CHMOD 666).
5. Upload all eXtplorer files from your computer into the subdirectory on the server
6. Browse to the URL and login (user: admin, pass: admin).
7. Remembered to immediately change the admin password.

Added into OMV an Nginx server root with www-data as the user and group but otherwise used the defaults.

Added a new .conf file into /etc/nginx/openmendiavault-webgui.d folder.

location /extplorer {
    alias /xx/xx/eXtplorer;

    index index.php;
    try_files $uri $uri/ index.php;

    location ~ \.php$ {
        include fastcgi.conf;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $request_filename;
        fastcgi_pass unix:/var/run/xxx.sock;
    }

    location ~ /extplorer/\. {
        deny all;
    }

    location ~* /extplorer/(?:config)/.*\.php$ {
        deny all;
    }

    location ~* /extplorer/\.(js|css|png|jpg|jpeg|gif|ico)$ {
        expires max;
        log_not_found off;
    }
}