KETSE / casebox

Casebox: Secure all your information and team communication in one place
https://www.casebox.org
218 stars 117 forks source link

Doesn't install - Ubuntu 14.04 #61

Open gencoimports opened 8 years ago

gencoimports commented 8 years ago

I followed this documentation to a T https://docs.google.com/document/d/15qvGi9tDHHHCItlCpbBB5fBnU5uhEpJedD5xudKVwPo/edit# Step by step, no deviations at all. Used a fresh Digitalocean Ubuntu server install.

I navigate to my url (xxx.xx.xx.xxx/casebox) and nothing happens. How exactly is a person supposed to access the login page?

If this software is to be taken seriously by firms, it needs to be able to be able to be easily installed. Also needs to have directions that work (Telling people to find a install.sh script that doesn't actually exists is a problem.)

I really want this software to work, as it looks like it has great potential and I love open source (No vendor lock in, which is a real problem in this industry) but if I can't even get the thing to run, it makes me a bit cautious about converting an entire firm over to the platform.

vmelnic commented 8 years ago

Hi @gencoimports, Did you try to open xxx.xx.xx.xxx/c/default address? as is described in doc.

StuartIanNaylor commented 7 years ago

The install scripts are in the v1 branch but in the above installer doc I presume composer brings those bits in for you.

I am going to give it a go today and as a sysadmin the install doc looks pretty conclusive and much better than the outdated install documentation on the casebox site.

Not really sure why Casebox tries to support multiple OS installs rather than just stick with the current update of CentOS. Let the community provide alternative OS and distro guides but just save the headaches of providing for many by just simply providing a singular one.

If you look at the issues in the list, for any noob Casebox might look flakey, whilst the opposite is true. I understand the problems of providing opensource and also creating revenue for its upkeep, there are a certain section of leachers who don't engage in anyform of mutual benefit and this can quite distressing to the providers of such quality work.

However many people want to run up the install, to really get to grips the product for a solid evaluation and if this process is painful it can lead to the loss of adoption.

Love CaseBox but the issue list currently detracts from the reality of an excellent product.

StuartIanNaylor commented 7 years ago

I am sort of getting there. The line in /etc/environment #export PATH=$PATH:/opt/jdk1.8.0_91/bin:/opt/jdk1.8.0_91/jre/bin

with you will noticed is remarked out# seems to completely kill my path so on reboot you get a non functional system.

I keep looking and and I am scratching my head to what is wrong with that? echo $PATH returns /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin

So anyway that is a head scratch and will try later as the footy is on :)

Maybe that is why nginx is telling me its a bad gateway but haven't had chance to check yet, but will.

So it all ran along these lines.

Just going to run through a CaseBox install and see how things go.

I am going to do it it virtualbox with a bridged adapter as personally find it much better than Nat.

So first port of call lets get a fresh CentOs install DVD. http://isoredirect.centos.org/centos/7/isos/x86_64/CentOS-7-x86_64-DVD-1611.iso

Which on update can always be found on https://www.centos.org/download/

Whilst that torrent downloads I have created a Virtualbox Appliance called CentOS and Virtualbox set the OS to Redhat64 automatically so good to go. (CentOS being the community version of Redhat)

You can either do a bare metal or virtual box install, by using bridged network they will act the same and they will grab an ip from any available DHCP server (your router).

You can grab virtualbox here if you want to give it a try. https://www.virtualbox.org/wiki/Downloads

Run virtualbox as administrator as I had some problems with the network that seemed to clear when run as administrator (I did some head scratching and various things! Dunno?)

I am using Blingdows10 and going to give the server 2Gb of ram, set networking to bridged mode.

In storage click on the cd icon and then the far right cd icon to open the dialog box to open the recently downloaded CentOS ISO.

So bare metal or virtualbox we are now the same we have either the ISO loaded or a burnt dvd in a bare metal drive.

Start the machine.

Install CentOs 7

Select the language (English UK in my case)

Select a minimal installation, accept auto partitioning, turn on the network adapter (dhcp client is default) and begin.

Set a root password.

You can create a User if you wish and select it to be an admin if you don’t like working as root.

On finish reboot.

I don’t like type direct onto the console without being able to copy and paste and I suggest using a SSH client for this so with windows download putty. http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

ip addr sh to find your ip as no ifconfig in 7. Ok then open putty type your virtualbox ip 192.168.1.3 from ip addr sh click open and accept and logon.

Now I am going to follow the instructions that are posted here https://docs.google.com/document/d/15qvGi9tDHHHCItlCpbBB5fBnU5uhEpJedD5xudKVwPo/edit#

That start “CentOS 7.2 x64”

Login to CentOS server console.

http://www-eu.apache.org/dist/lucene/solr/6.3.0/solr-6.3.0.tgz tar xzf solr-6.3.0.tgz solr-6.3.0/bin/install_solr_service.sh --strip-components=2

./install_solr_service.sh solr-6.3.0.tgz

Now I was a bad boy and did run composer as root which you are not supposed to do. I was lazy on install and never created an admin and yes damn lazy just because I can not be bothered to prefix commands with sudo

firewall-cmd –get-active-zones I like webmin so install webmin the firewalld returned public as the active zone so firewall-cmd --zone=public --add-port=10000/tcp –permanent firewall-cmd –reload do the same for port 80 and 443

StuartIanNaylor commented 7 years ago

Anyway after the football and head scratching /etc/environment will not evaluate variables so you end up with them as literals so I created javaenv.sh in /etc/profile.d with export PATH=$PATH:/opt/jdk1.8.0_91/bin:/opt/jdk1.8.0_91/jre/bin

And yeah, such a small problem and it completely stumped me that one :)

StuartIanNaylor commented 7 years ago

Well i got through to a certain stage sorted out the bad gateway and a few other errors, but the more I chip away the more I find. Sort of lost the will, at least for today.

www.conf is set to run as nginx:nginx its also been started and enabled as a service php-fpm that is, as that was another bit missing from the setup.

`2017/01/02 21:55:59 [error] 13901#0: *13 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught UnexpectedValueException: The stream or file "/var/www/casebox/var/logs/default.log" could not be opened: failed to open stream: Permission denied in /var/www/casebox/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:107 Stack trace:

0 /var/www/casebox/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php(37): Monolog\Handler\StreamHandler->write(Array)

1 /var/www/casebox/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php(122): Monolog\Handler\AbstractProcessingHandler->handle(Array)

2 /var/www/casebox/vendor/monolog/monolog/src/Monolog/Logger.php(337): Monolog\Handler\FingersCrossedHandler->handle(Array)

3 /var/www/casebox/vendor/monolog/monolog/src/Monolog/Logger.php(644): Monolog\Logger->addRecord(500, 'Uncaught PHP Ex...', Array)

4 /var/www/casebox/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php(89): Monolog\Logger->critical('Uncaught PHP Ex...', Array)

5 /var/www/c" while reading response header from upstream, client: 192.168.1.7, server: _, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "192.168.1.4"`

even chown the whole of /var/www/casebox to nginx:nginx and no different to root.

I can not work out why there is a permissions problem but starting to get tired.

bustedvillain commented 6 years ago

Hello Stuart, have you tried to change the selinux rules? usually thats the reason. Try with this: setenforce 0

This will disable selinux completely, its not the best practice, but it will help you to check if that was the issue. I recommend to give permission specifically to apache on selinux rules: chcon -R -t httpd_sys_content_t /var/www/casebox chcon -R -t httpd_sys_rw_content_t /var/www/casebox