Xibo install on vm of server 2016

Hi all

Does anyone have a detailed guide of how to install xibo without docker

Thanks

James

https://xibo.org.uk/manual/en/manual_install.html

How do you install php

I’m honestly not sure. I just assumed the documentation might help you.

The problem is the documentation before was great and now isn’t as good

It’s been two years since I setup our server, so I don’t remember the procedure, but PHP can be installed on Windows, along with the Apache web server and MariaDB Xibo needs, using the XAMPP suite.

Xibo 2.x Software Installation
**On **
Microsoft Server 2016
Introduction

This guide will explain every step for installing Xibo 2.x on IIS 10 on WINDOWS SERVER 2016 Standard 64Bit. Reference Xibo document from site:

Xibo Server requirements:
⦁ MySQL 5.6 or 5.7 (only)
⦁ CGI Support for IIS
⦁ Visual C++ Redistributable (VC15) 32 & 64bit
⦁ A web server (iis)
⦁ PHP 7.2 (VC15) 64bit “Non Thread Safe”
⦁ PHP-CLI 7.2+
⦁ PHP PHAR support
⦁ ZeroMQ bindings for PHP 7.2 (VC15)
⦁ URL Rewriting
⦁ Virtual Hosts or dedicated web server (modify DocumentRoot)
⦁ CRON/Scheduled Tasks https://xibo.org.uk/docs/setup/xtr-routine-tasks

Install CGI for IIS support from Server Roles:

Install MYSQL 5.6
Mysql 5.6 download from community and install
https://dev.mysql.com/downloads/file/?id=467267497

  1. Run the mysql-installer-community-5.6.35.0 installer.

  2. After starting the installation, you may be presented with a message about installing .NET Framework 4.0

  3. If so, install it from here http://go.microsoft.com/fwlink/?LinkId=181012

  4. When you make it to the welcome screen, select ‘Install MySQL Products’

  5. Accept the license.

  6. Their next window is poorly designed it looks like two selectable radio buttons, but they aren’t. Just click ‘Execute’ and the installer will make sure it has the latest data that it needs.

  7. Next you will select the type of installation. I used SERVER type role.

You will then be presented with a dependency checklist of software that will be installed. Select ‘Execute’
.
7. The MySQL software installation list will be presented to you. Just click ‘Execute’
8. Initial Configuration of ‘MySQL Server 5.6.35′

  1. The default values are okay. Check ‘Show Advanced Options’

  2. Config Type: ‘Development Machine’ is okay

  3. ‘Enable TCP/IP Networking’ is checked

  4. Check ‘Show Advanced Options’

  5. click ‘Next’

  6. Account configuration

  7. Set the root password (Make sure it is something you remember!)

  8. You don’t need to create any user accounts right now.

  9. Click ‘Next’

  10. Windows service details

  11. Pick a windows service name ‘MySQL56′ is okay

  12. Make sure ‘run windows service as a standard system account’ is checked.

  13. Logging options

  14. Use the default options.

  15. Finish configuration

Install PHP 7.2.x (Non Thread Safe) 64bit
Download and manually install PHP 7.2.20:

NOTE: If you are using PHP as FastCGI with IIS you should use the Non-Thread Safe (NTS) versions of PHP.

Get PHP 7.2.20 “Non threat safe” 64bit zip package
Click on link PHP For Windows: Binaries and sources Releases

Create directory for your Library Files “C:\PHP” - And Give Permission for IUSR and IIS_IUSR

Unzip PHP7.2 files into “C:\PHP” directory
Copy “C:\PHP\php.ini-production” to “C:\PHP\php.ini”

Edit Configuration file: C:\PHP\php.ini and change basic PHP settings for CGI support

Fastcgi.impersonate = 1
Cgi.fix_pathinfo = 0
Cgi.force_redirect = 0
Extension_dir = “ext”
Error_log = C:\PHP\php_errors.log
Date.timezone = "America/New_York”

In [PHP] section: Uncomment extensions to support SQL requirements

extension=mysqli
extension=curl
extension=fileinfo
extension=gd2
extension=mysqli
extension=pdo_mysql
extension=openssl
extension=pdo_mysql

extension=soap

Change settings to support XIBO requirements
post_max_size=200M
upload_max_filesize=200M
max_execution_time=120

SMTP = exchange.website.ca
smtp_port = 25
sendmail_from =xibo@website.ca
mail.add_x_header = On

Now save the file and close notepad

Set server PATH environmental variable

Control Panel->System->System Properties->Environment Variable->System Variables
Edit PATH
Add “C:\PHP”

Install MS Web Platform Installer

Install Microsoft Web Platform Installer from Microsoft downloads site

Download and install x64 installer
After installation is complete - Launch the new application
Click on the “Products” tab
Add the following Products:
URL Rewrite 2.1
Click Finish & Exit

run the command: iisreset

Install Xibo PHP files and Configure IIS v10

Extract XIBO 2.x files into Server 2016 dedicated Folders

Launch “Files and Folders” and perform the following commands
In this Manual web site is: Default Web Site you can use which you want in IIS
Extract all Xibo CMS Files to C:\XIBO_CMS - And Give “Full Control” Permission for IUSR and IIS_IUSR
Create directory for your Library Files C:\XIBO_LIB - And Give “Full Control” Permission for IUSR and IIS_IUSR

Configure IIS Settings:
Launch IIS Manager
→ Handler Mappings

Add Module Mapping
· Request path: *.php
· Module: FastCgiModule
· Executable: C:\PHP\php-cgi.exe
· Name: FastCGI

To prevent “HTTP 405 error” when try to save a setting in portal

Click on "Request Restrictions"
Select Verbs tab and choose "All verbs".

save your changes

→ Default Web Site → Basic Settings-Change Physical path to your XiboFiles folder in this manual C:\XIBO_CMS\web

→ Default Web Site-> Request Filtering
Edit Feature Settings…
Set Maximum Query String (Bytes) to 4096 (otherwise you will get datatables.ajax error)
Set Maximum allowed content length (Bytes) (3000000 to 30000000) (Add one more zero)

→ Default Web Site->URLRewrite
Import Rules
Browse the Configuration files and import the .htaccess file in C:\XIBO_CMS\web
Click “Import”
(remove the problem line and import by placing a “#” comment in the front of the code)
Click on “Apply” to make changes

→ Default Web Site->MimeTypes → Add (.woff = font/x-woff ) If missing
→ Default Web Site-> MimeTypes → Add (.woff2 = font/woff2 ) If missing

→ Default Web Site->Default Document
Add → “index.php” (if missing from list)

Move to the top of the list “index.php” otherwise you will get HTTP 500 error when start.
· install.php

Test PHP installation

To test if PHP setting or working launch MS Powershell

Type “cmd” at the PS prompt
Type “echo %PATH%” to view current PATH environmental variable
If the “C:\PHP” path is not in the list

Control Panel->System->System Properties->Environment Variable->System Variables
Add it to the “PATH” variable under

reboot the server

Launch MS Powershell (again) if the server required rebooting

Type “php –info”
If no exporting of data is displayed, confirm that Visual C++ Redistributable (VC15) 32 & 64bit files were installed.
· Execute the program “C:\PHP\php-win.exe”
· If “VCRUNTIME140.dll” is missing error window pops up you are missing the> C++

Redistribution files. http://stackoverflow.com/questions/30811668/php7-missing-vcruntime140-dll
If everything passes, exit Powershell and create the following “info.php” text file.
< ?php
phpinfo();
?>

Save the file to your default web page “C:\XIBO_CMS\web\info.php”

Type “localhost\test.php” in your webpage URL
If you are presented with the PHP configuration page you successfully installed PHP

Install ZeroMq

Confirm the following setting on your PHP information page are reflecting information below:
· PHP version (should be at 7.2.20)
· Architecture (should be x64)
· Thread Safety (should be disabled)

Confirm the version of Microsoft Visual C++ Runtimes (both 32 and 64bit)
Microsoft Visual C++ 2017 equates to (VC15)

Download zero mq package from windows.php.net - /downloads/pecl/releases/zmq/

Release 1.1.3 = PHP Version 7.0.x – 7.2.x
TS = Thread Save
NTS = None Thread Save

http://windows.php.net/downloads/pecl/releases/zmq/1.1.3/php_zmq-1.1.3-7.2-nts-vc15-x64.zip

copy “php_zmq.dll” to your ext folder in PHP installation (ex. C:\PHP\ext)
copy “libzmq.dll” to your PHP installation folder (ex. C:\PHP)

If your package is wrong you could get error. You can check from Windows Event Viewer-Application Logs (PHP Warning: PHP Startup: Unable to load dynamic library ‘C:\PHP\ext\php_zmq.dll’ - The specified module could not be found.)

Modify php.ini

Edit Configuration file: C:\PHP\php.ini and change basic PHP settings for ZMQ support
Under the Dynamic Extensions section of PHP.ini

extension=php_zmq

Copy from C:\XIBO_CMS\vendor\xibosignage\xibo-xmr
or Create new file “config.json”
as follows: (Note: change “yourip” to the actual server IP xx.xx.xx.xx)

{
“listenOn”: “tcp://127.0.0.1:50001”,
“pubOn”: [“tcp://yourip:9505”, “tcp://yourip:50002”],
“debug”: true
}

Copy the file in to C:\XIBO_CMS\vendor\bin folder.

In same folder open command prompt (Pressing Shift and right mouse key and select Open Command prompt from here)

run the command: iisreset
run the command: php xmr.phar

You will get debug console with information on xmr events

If everything is correct you will get a screen like this:

php xmr.phar
[2017-05-04 22:13:19] xmr.INFO: Starting up - listening for CMS on tcp://127.0.0.1:50001.
[2017-05-04 22:13:19] xmr.INFO: Bind to tcp://yourip:9505 for Publish.
[2017-05-04 22:13:19] xmr.INFO: Bind to tcp://yourip:50002 for Publish.
[2017-05-04 22:13:49] xmr.DEBUG: Heartbeat…
[2017-05-04 22:14:19] xmr.DEBUG: Heartbeat…
[2017-05-04 22:14:49] xmr.DEBUG: Heartbeat…
[2017-05-04 22:15:19] xmr.DEBUG: Heartbeat…

REBOOT SERVER
Note: Dont forget to run “php xmr.phar” command when you restart your server

Xibo 2.0 installation

Open Internet Explorer and type the following URL:

http://localhost

Check that all the prerequisites are checked

Follow the POST XIBO installation steps after completing the installation

make sure you also change these settings

Auto start XMR-Service on startup

Open notepad and create a batch file called XMR.BAT

cd C:\XIBO_CMS\vendor\bin
php xmr.phar
exit

Save it to C:\XIBO_CMS\xmr.bat

It is important that this script is always running. If not, XMR will not work.

Run “Task Scheduler” and select “Create Basic Task”

Give it a name “XiboXMRstartup” ==> Next
Set the trigger to “When the computer starts” ==> Next
Select “Start a program” ==>Next
Browse to the Batch file where you saved it above
Add the Start in patch without the "" at the end

Check the box: “Open the Properties dialog …” ==>Finish
Under General tab:
Select “Run whether user is logged on”
“Run with highest privileges”

Under Conditions Tab:
Check “Wake the computer to run this task”
“OK”
An authentication box will pop up.
Enter the password for the Administrator account

Configure XMR in Xibo

Settings-> Displays-> XMR Private Address: tcp://127.0.0.1:50001
Settings-> Displays-> XMR Public Address: tcp://x.x.x.x:9505
Save

Displays-> Display Setting for your display group → Edit
Under XMR Public Address: tcp://x.x.x.x:9505
Save

Go to: Displays and push the button “Column visibility” and choose “Xmr-Registered” to display that your Xibo-Player received XMR-Commands.

In Displays menu choose: “Edit” and go to “Advanced” and check on “Reconfigure XMR”
Save

After players get those settings you will need to restart player. You should now see XMR Status: Connected (tcp://x.x.x.x:9505, last activity 04.05.2017 12:23:22) It will update every 30 seconds

Here are the post instructions for upgrading an existing 2.x version of Xibo on Server 2016:

Xibo Upgrade Preparations
Since we’re done with the configuration of the webserver itself, we can go on with the Xibo upgrade. This is how Xibo processes it’s upgrades:

  1. Create a back-up of your Xibo file in your ‘./www’ folder and one of your SQL database.
  2. Move the contents of your Xibo files to another folder. Call the old folder something like ‘Xibo_old’.
  3. Copy the new Xibo installation to the place of your previous install.
  4. Copy your custom ‘config.json’, ‘xmr.bat’ and ‘settings.php’ files from the previous installation.
  5. Reboot Server
  6. Now open Xibo through the installation and the upgrade process should pop-up!
  7. Your Xibo upgrade is ready.

Now we got the Xibo CMS files, let’s get a database dump. This one is pretty easy as it also requires one single command. Tweak the command down below so it’s the same as your own user/database name.

cd c:\Program Files\MySQL\MySQL Server 5.6\bin
mysqldump -u root -p xibo_db> xibo_backup.sql

Enter your SQL root password when prompted

This might take a minute or two. Once it’s done I recommend to get all the files to an external disk or location. A back-up that’s stored on the local device isn’t a back-up, it’s just an extra security risk!

We will now download the Xibo CMS files to your home directory on your server.

https://github.com/xibosignage/xibo-cms/releases/download/2.1.0/xibo-cms-2.1.0.zip

Now we move our current installation to a different folder. Change the destination folder to something on your own webserver

           Create a new folder C:\Xibo_old
           move C:\Xibo_CMS\*.* C:\Xibo_old

Now we need to copy custom XMR file to new version.
Copy c:\Xibo_old\vendor\bin\config.json c:\Xibo_CMS\vendor\bin*.*

Now we need to copy XMR startup batch file to new version.
Copy c:\Xibo_old\xmr.bat c:\Xibo_CMS*.*

This will be the last step before we can open the Xibo upgrade page. As stated before we needed to back-up the ‘settings.php’ before replacing and moving the website files.

   Copy c:\Xibo_old\web\settings.php c:\Xibo_CMS\web\*.*

Reboot server

Xibo Upgrade Process
Now we’ve done all the preparations we can head to the Xibo upgrade page. Open your favorite browser and refer to the server IP address. If everything is configured correctly you should be greeted with the Xibo installation page on the page ‘/install’. Note you should be forwarded to this page automatically. If this is not the case, please check the settings in your configuration files as you probably missed something

Press next if everything is correct. You will see an overview of the steps involved in this upgrade.

Hi, i have installed as how guide is and everything work perfect except XMR. Zeromq also installed.

When i C:\Xibo_Cms\vendor\bin: php xmr.phar

İ get nothing. Its all empty.
How can i solve this.

Thanks for guide.

please provide me with the details from the php.info dump for these items:
PHP version
Architecture
Thread Safety

Php version 7.2.21
Architecture x64
Thread Safety disabled

And you added the extension=php_zmq to the php.ini file?

php_zmq-1.1.3-7.2-nts-vc15-x64.zip

Did you use this version of the zmq download

Yes exactly i used that one.

Yes i added and zmq checked on installation.

ok - the only thing left is whether you installed both the 32bit and 64 bit C++ distribution files.

They must be the correct 2017 version
Microsoft Visual C++ Runtimes (both 32 and 64bit)
Microsoft Visual C++ 2017 equates to (VC15)

You need to install both 32bit and 64bit versions on the server.

Do another reboot as-well

I think I see your problem or my problem.

C:\YDSPHP\vendor\bin>php xmr.phar

should have read

C:\XIBO_CMS\vendor\bin\php xmr.phar

You should also be in that directory folder when you issue the DOS command

I also changed the path to the XMR.PHAR file in the XMR.BAT file:

Open notepad and change the batch file called XMR.BAT with the correct path to the xmr.phar file that was edited with the custom info.

cd C:\XIBO_CMS\vendor\bin
php xmr.phar
exit

Do you mean theese?
Visual C++ Redistributable for Visual Studio 2017 (version 15.0) 32 bit
Visual C++ Redistributable for Visual Studio 2017 (version 15.0) 64 bit

I installed them both already
Also run the commond in the same folder vendor/bin

Non of them works. Any other suggestion?