elmerfdz / organizrinstaller Goto Github PK
View Code? Open in Web Editor NEWAutomated install script for Organizr (https://github.com/causefx/Organizr) for Ubuntu/Debian/Raspbian/CentOS and Windows
License: GNU General Public License v3.0
Automated install script for Organizr (https://github.com/causefx/Organizr) for Ubuntu/Debian/Raspbian/CentOS and Windows
License: GNU General Public License v3.0
> Installing Organizr...
> Nginx vhost template type?:
[CF] CloudFlare
[LE] Let's Encrypt/Standard [coming soon]
- LE
mv: cannot stat '/etc/nginx/config/domain.com.conf': No such file or directory
mv: cannot stat '/etc/nginx/config/domain.com_ssl.conf': No such file or directory
> Site Created for organizr.local
/bin/sed: can't read /etc/nginx/config/organizr.local.conf: No such file or directory
/bin/sed: can't read /etc/nginx/config/phpblock.conf: No such file or directory
[....] Reloading nginx configuration (via systemctl): nginx.serviceJob for nginx.service failed because the control process exited with error code.
See "systemctl status nginx.service" and "journalctl -xe" for details.
failed!
Oh no! it failed! I knew entering LE
there might be a bad idea, but I don't want cloudflare, and I wasn't sure what else to do.
And in case you were interested in what the /etc/nginx/config/
directory looked like:
├── readme.txt
└── ssl/
└── organizr.local/
2 directories, 1 file
Should I run the installer again? It looks like Organizr is there in /var/www/organizr.local
however browsing there just shows the welcome to nginx page.
On a vanilla debian LXC container ran the installer (option 4) with CF option for V2 and completed successfully.
Upon trying to visit the server's page I got an error
Organizr needs PHP Version: 7.1.3
You have PHP Version: 7.0.33-0+deb9u3
It seems like the V2 installer did not install the minimum required PHP version for running V2?
root@my:/opt/OrganizrInstaller/ubuntu/oui# dpkg -l | grep php
ii php-common 1:49 all Common files for PHP packages
ii php-curl 1:7.0+49 all CURL module for PHP [default]
ii php-fpm 1:7.0+49 all server-side, HTML-embedded scripting language (FPM-CGI binary) (default)
ii php-sqlite3 1:7.0+49 all SQLite3 module for PHP [default]
ii php-xml 1:7.0+49 all DOM, SimpleXML, WDDX, XML, and XSL module for PHP [default]
ii php-xmlrpc 1:7.0+49 all XMLRPC-EPI module for PHP [default]
ii php-zip 1:7.0+49 all Zip module for PHP [default]
ii php7.0-cli 7.0.33-0+deb9u3 amd64 command-line interpreter for the PHP scripting language
ii php7.0-common 7.0.33-0+deb9u3 amd64 documentation, examples and common module for PHP
ii php7.0-curl 7.0.33-0+deb9u3 amd64 CURL module for PHP
ii php7.0-fpm 7.0.33-0+deb9u3 amd64 server-side, HTML-embedded scripting language (FPM-CGI binary)
ii php7.0-json 7.0.33-0+deb9u3 amd64 JSON module for PHP
ii php7.0-opcache 7.0.33-0+deb9u3 amd64 Zend OpCache module for PHP
ii php7.0-readline 7.0.33-0+deb9u3 amd64 readline module for PHP
ii php7.0-sqlite3 7.0.33-0+deb9u3 amd64 SQLite3 module for PHP
ii php7.0-xml 7.0.33-0+deb9u3 amd64 DOM, SimpleXML, WDDX, XML, and XSL module for PHP
ii php7.0-xmlrpc 7.0.33-0+deb9u3 amd64 XMLRPC-EPI module for PHP
ii php7.0-zip 7.0.33-0+deb9u3 amd64 Zip module for PHP
root@my:/opt/OrganizrInstaller/ubuntu/oui# cat /etc/debian_version
9.9
Full error:
`
> 2. Downloading PHP 7.2.0
> Exception calling "DownloadFile" with "2" argument(s): "The remote server returned an error: (404) Not Found."
> At line:1 char:1
> + (New-Object Net.WebClient).DownloadFile('http://windows.php.net/downl ...
> + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
> + FullyQualifiedErrorId : WebException
>
> Invoke-WebRequest : <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml">
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
> <title>404 - File or directory not found.</title>
> <style type="text/css">
> <!--
> body{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;}
> fieldset{padding:0 15px 10px 15px;}
> h1{font-size:2.4em;margin:0;color:#FFF;}
> h2{font-size:1.7em;margin:0;color:#CC0000;}
> h3{font-size:1.2em;margin:10px 0 0 0;color:#000000;}
> #header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS", Verdana, sans-serif;color:#FFF;
> background-color:#555555;}
> #content{margin:0 0 0 2%;position:relative;}
> .content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}
> -->
> </style>
> </head>
> <body>
> <div id="header"><h1>Server Error</h1></div>
> <div id="content">
> <div class="content-container"><fieldset>
> <h2>404 - File or directory not found.</h2>
> <h3>The resource you are looking for might have been removed, had its name changed, or is temporarily
> unavailable.</h3>
> </fieldset></div>
> </div>
> </body>
> </html>
> At line:1 char:1
> + Invoke-WebRequest http://windows.php.net/downloads/releases/php-7.2.0 ...
> + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> + CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebExc
> eption
> + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
`
New PHP Link: http://windows.php.net/downloads/releases/php-7.2.1-nts-Win32-VC15-x64.zip
When I'm running the install on Windows, NGINX is failing to start after modifying the configs:
`####################################
Updating Nginx and PHP config
####################################
1 file(s) copied.
1 file(s) copied.
1 file(s) copied.
nginx: [emerg] no "ssl_certificate" is defined for the "listen ... ssl" directive in c:\nginx/conf/nginx.conf:25
PHP: STOP: The operation completed successfully.
PHP: START: The operation completed successfully.
NGINX: STOP: The operation completed successfully.
NGINX: Unexpected status SERVICE_PAUSED in response to START control.`
So, when it gets to try and do the SSL cert it fails because it can't verify the domain (I have substituted my actual domain name in the below paste)
`#########################################
WIN-ACME: Genertating LE SSL Certificates
#########################################
[INFO] A Simple ACME Client for Windows (WACS)
[INFO] Software version 1912.1.6872.39942 (RELEASE)
[INFO] IIS not detected
[INFO] ACME server https://acme-v01.api.letsencrypt.org/
[INFO] Please report issues at https://github.com/PKISharp/win-acme
[INFO] Running in Unattended mode
[INFO] Plugin Manual generated target [Manual] [1 binding - equinox83.com]
[INFO] Authorize identifier: equinox83.com
[INFO] Authorizing equinox83.com using http-01 validation (FileSystem)
[INFO] Answer should now be browsable at http://domainname.com/.well-known/acme-challenge/C1JzPzCH8-yHse5JkVv80vXEwQgbOGpby2irwV-AJw0
[EROR] Authorization result: invalid
[EROR] ACME server reported:
[EROR] [type] urn:acme:error:connection
[EROR] [detail] Fetching http://domainname.com/.well-known/acme-challenge/C1JzPzCH8-yHse5JkVv80vXEwQgbOGpby2irwV-AJw0: Timeout during connect (likely firewall problem)
[EROR] [status] 400
[EROR] Create certificate failed
nginx: [emerg] BIO_new_file("C:\ProgramData\win-acme\httpsacme-v01.api.letsencrypt.org\domainname.com-chain.pem") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('C:\ProgramData\win-acme\httpsacme-v01.api.letsencrypt.org\domainname.com-chain.pem','r') error:2006D080:BIO routines:BIO_new_file:no such file)
PHP: STOP: The operation completed successfully.
PHP: START: The operation completed successfully.
NGINX: STOP: The operation completed successfully.
NGINX: Unexpected status SERVICE_PAUSED in response to START control.
Waiting for 0 seconds, press CTRL+C to quit ...
Nginx status : SERVICE_PAUSED
PHP status : SERVICE_RUNNING
`
Anyway to build in a setting creating a configuration for Plex to use Cloudflare as a CDN?
So that it’s Plex.domain.com rather that domain.com/plex
Do you think you could make configs for reverse proxying netdata, portainer, webmin, and cloudcmd? Or help me do it myself. I tried editing some of the ones you have premade that i don't use like transmission and it was an epic fail.
in oc_installer.sh it calls to disable hhtp service instead of httpd
When trying to install Ubuntu 20.04 using Let's Encrypt, the script terminates when it's updating packages due to the error below.
E: The repository 'http://ppa.launchpad.net/certbot/certbot/ubuntu focal Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
According to this:
https://askubuntu.com/questions/1233535/focal-ppa-launchpad-missing-release-file
and
https://community.letsencrypt.org/t/unable-to-add-ppa-certbot-certbot-in-ubuntu-20-0-4-lts/123194
Certbot PPA is depleted on Ubuntu 20.04
Changing config/le/ssl.conf line 19 from
add_header X-Frame-Options DENY;
to
config/le/ssl.conf:add_header X-Frame-Options SAMEORIGIN;
Fixes this
Tested on Ubuntu 16.04, Chrome browser.
Hope this helps!
edit: causefx/Organizr#400 is similar.
wget is not included in centos 7 minimal by default this causes the wgets to fail when grabbing the organizr content.
Either yum install it as a dependency like you do other requirements or look to use curl to grab the content
is it possible to set a default dir such as /var/www/domain.com/
should a user just hit enter?
this proyect is the easier way to install Organizr. Its handy for everyone, specialy for the ones who dont know how to code.
add theme.park https://github.com/gilbN/theme.park it would be very helpful
When I reboot my Ubuntu server, Organizr does not start automatically. I am able to see that when i install into another directory it allows the webpage to work.
Is there a specific place where I can create a crontab or service to handle this?
Specifically the username when the account is a linked as a Microsoft account (rather than a local account).
Issue: If the windows user is linked as a Microsoft account the account needs to be their account email and not the account username.
By default it is their name or a version thereof, as represented in the C:\Users\ directory. (for me it was "John Smith", other windows machines I have noticed it was "smitjohn" etc.)
But it needs to be their email address used for the Microsoft account. For example the attached screenshot. (Note the ".\" prefix is mandatory or it will try and use network domains)
Workaround: Open up services.msc find the service and change the username. This needs to be done quickly before the SSL Certificate step as that step is dependent on the NGINX step.
Solution: Automatically figure out if the account is a linked Microsoft account and use the email address. I don't how or if this is possible though.
A prompt for the user as to whether it is a linked account and/or what the username should be.
Trying to install but Organizr doesn't open.
I know it most be something I am doing wrong.
First question:
Thanks for the help.
So I thought I'd do a smart thing and move my nginx stuff on over to my raspberry pi, but whenever I run the setup script it seems to fail on doing letsencrypt correctly and restarting nginx as well... So I was wondering what exactly would I need to do to remove everything..as I am just going to go back to running my server stuff on windows and you don't have an uninstall script for the ubuntu variant of your script :/
(On Debian based systems:) the installer script expects things to be in place like:
/etc/nginx/sites-enabled/
and
/etc/nginx/snippets/
However, if using the official nginx repos for a modern version of nginx, things will instead be in places like:
/etc/nginx/conf.d/
and
/etc/nginx/fastcgi_params
Additionally, depending on the nginx configuration, the nginx user may be running as nginx
instead of www-data
. This can cause conflicts with the php-fpm setup and chown, and the installer script may want to check these things as well before defining values.
I'd be happy to submit some pull requests next week to try and help correct these issues, but I wanted to submit the issue first in case it helps anyone else!
The installer wouldn't let me enter my domain name, mini-me.is.digital
Claimed it was an invalid domain name, which is untrue
I just installed this on a pristine Ubuntu 18.04 server and it went all smooth up until the Letsencrypt cert.
This one failed with a "not authorized" error message.
After exiting the installer and trying to access the web-interface I just get a "403 Forbidden" message.
The directory /var/www/my.domain.com/ has the owner "www-data", so I would assume it should be fine.
When I try http://my.domain.com/html/index.php I am asked to download the file instead of getting the page displayed.
How can I fix that?
I have just updated to Debian v10.x from v9.x and can confirm cURL is installed, however after restarting, Organizr is advising that the prerequisite of cURL is failing.
How do I address this please.
In the owi_installer.bat file, there are 2 instances where the user's input password is used for nginx and php. If the user has the '&' character in their password, the install will fail.
The fix is to add "" around the %pass% variable as "%pass%" both instances.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.