This article talks about the basic installation and migration process of XUNO on a Windows 2016 server located in a school environment.
Each installation and migration will be different, but should follow these basic installation steps. New schools need only follow the installation guide, however schools migrating to a new server should complete both the Installation and the Migration processes.
Installation guide:
Migration guide:
XUNO server minimum requirements
The new XUNO server must meet the minimum requirements found here. Installation of XUNO on a server that does not meet these requirements will result in problems installing and maintaining the XUNO installation.
XUNO DNS host record
Before the XUNO website will be accessible, the school technician will need to create a DNS record which resolves the host header 'xuno' to the server on which XUNO is to be installed. This should be done after the migration has been completed, and the old server has been shut down.
To check if the DNS record has been created correctly, run the following command in command prompt:
nslookup xuno
Up-to-date
If you are moving from an old XUNO server to a new one, to ensure the migration will run smoothly and all the required packages install correctly, please make sure your server is running with the latest Windows Updates.
Installing IIS
The following steps will guide you through installing and configuring IIS on the XUNO server.
- On the XUNO server, open the Server Manager console.
- Navigate to Add roles and features.
- Click Next on the Before You Begin page.
- Leave Role-based or feature-based installation selected as the installation type and click Next.
- Click Next to leave the current server as the destination server.
- Find and check Web Server (IIS) from the list of available server roles.
- Click on Role Services.
- Find and check CGI from the list of Role Services, under Application Development.
- Click Next then Install to finalize the installation.
- Tick to restart the server if necessary.
Installing IIS URL Rewrite Module
The following steps will guide you through installing IIS URL Rewrite Module on the XUNO server.
- Download the Web Platform Installer.
- Click Install this extension to download the Web Platform installer.
- Start the installer.
- Enter Application Request Routing 3.0 in the search field, and press Enter.
- Select Application Request Routing 3.0.
- Click Add.
- Click Install.
- Click I Accept.
- Click Finish, and then click Exit to quit the Web Platform Installer.
Installing XUNO on the new Server
The following steps will guide you through installing the XUNO website files.
- Download the XUNO installation file onto the XUNO server.
- Run the installation file on the XUNO server and follow the prompts.
Destination Location
Do not install XUNO in the default installation located in C:\Inetpub\wwwroot\xuno. Instead, install the XUNO installation folder in a new folder called 'Websites' located in the root path of a local server drive. e.g. C:\Websites\XUNO. - Once the website files are installed, navigate to the 'XUNO' folder in Windows Explorer.
- Create the folders: docs, tmp, photos, reports, uploads (if they do not already exist).
- Right click on the docs folder and select Properties.
- Click on the Security tab.
- Click on the Edit button.
- Click on the Add button.
- Under the 'Enter the object names to select' text box, type IUSR and click 'Check Names'.
- Click on the Advanced button.
- Click on the Locations button and select the local XUNO server.
- Click on the Find Now button.
- In the search results, find and select the IIS_IUSRS group.
- Click the OK button to return to the 'Select Users or Groups' window.
- Click the OK button to return to the 'Permissions for <folder>' window.
- Make sure that IUSR and IIS_IUSRS have modify access set.
- Click the OK button to return to the '<folder> Properties' window.
- Click the OK button to confirm the permission changes and close the '<folder> Properties' window.
- Repeat steps 6 to 18 for the following folders: includes\custom, images, tmp, uploads, photos, reports and C:\Windows\Temp.
- Right click on the secure folder and select Properties.
- Click on the Security tab.
- Click on the Advanced button.
- Check the checkbox which reads Replace all child object permission entries with...
- Remove the IUSR and IIS_IUSRS rows (if they exist).
- Save your changes.
Configuring the XUNO website in IIS
The following steps will guide you through creating the XUNO website in IIS.
- Open the Internet Information Services Manager (in the Windows Administrative Tools folder via the Start Menu).
- In the left panel of the IIS Manager, open Sites and delete the default website as it is not being used.
- Right-click Sites and select Add Website...
- Name the website 'XUNO'.
- Set the physical path of the website to the XUNO installation directory e.g. C:\Websites\XUNO.
- Set the host name of the website to 'xuno'.
- Click the OK button to create the website.
- Highlight the XUNO website.
- On the right panel, open up HTTP Response Headers > Set Common Headers > Enable HTTP Keep Alive.
- On the right panel open up Handler Mappings.
- Double click on php-cgi. The name of this file may vary from computer to computer. EG PHP_via_FastCGI. If the php-cgi doesn't show up, please go to next session and install PHP.
- Click on Request Restrictions.
- Select the Verbs tab.
- Choose All Verbs.
- Click OK.
- Click OK.
- If you see an error message reading:
"The specified executable for the handler must be a .dll or .exe file. If the path to the script processor (only in the case of a .exe. file) has spaces, use double quotation mars to specify the executable." Click OK. Then type double quotes at the start and end of the Executable row. Click OK.
Important! Do not add an empty binding to the XUNO website. The only bindings added should be specific to XUNO.
Installing PHP and SQL Server Drivers for IIS
The following steps will guide you through installing and configuring PHP and SQL Server Drivers on the XUNO server.
- Open the Internet Information Services Manager which can be found under Administrative Tools.
- Select the IIS server from the navigation panel on the left.
- From the actions panel located on the right, select Get New Web Platform Components which will launch the Web Platform Installer.
- Select the Products tab.
- Search for 'SQL server 5.3 PHP x64' in the search bar and hit Enter (we are looking for the latest PHP version & SQL server drivers that are supported in IIS).
- Find the latest version (At the time of writing it is 'Microsoft Drivers 5.3 (x64) for PHP v7.2 for SQL Server in IIS') do not choose x86 or IISExpress versions.
- Click Add and then click Install below.
- Follow the prompts to install.
- Download the latest ssl libraries.
- This may be done by downloading the cacert.pem file from https://curl.haxx.se/docs/caextract.html
- Download loaders.
- Download the appropriate Windows loadings.zip file from https://www.sourceguardian.com/loaders.html
- Unzip the file.
- Copy downloaded files into the PHP folder.
- Go to the PHP folder via Windows Explorer (C:\Program Files\PHP\v7.2)
- Copy the cacert.pem file from step 9a into this folder.
- Open the ext folder.
- Copy the file ixed7.2win from step 10b into the ext folder. If you are not using PHP 7.2, copy the appropriate file.
- Follow the steps found in part 3 from step 12 onwards, of the article How to install or update PHP to configure the php.ini file for the XUNO installation.
You should now be able to test the installation of XUNO by selecting the XUNO website from the IIS navigation panel and then clicking the Browse xuno on *:80 (http) button from the actions panel on the left hand side of the console.
Installing MySQL
The following steps will guide you through installing and configuring MySQL on the XUNO server.
You will need to install Visual C++ Redistributable for Visual Studio 2015 (both x86 and x64) before installing MySQL. You can download that here.
- Download and run the MySQL installer on the XUNO server.
- Open the installer.
- Click to accept the license terms.
- Choose Custom setup type.
- Click on Edit.
- Change Age to Other Releases and Architecture to 64-bit.
- Click Filter to show options.
- Expand MySQL Server/s.
- At the moment XUNO supports the latest build of MySQL Server 5.7.x
- Now expand Applications and select the latest version of MySQL Workbench (At the time of writing it is MySQL Workbench 8.0.1.2 - x64).
- Click Next .
- Click Execute to Install the requirements if any.
- Click Execute to Install.
- Click Next to continue.
- Click Next to continue.
- Choose Standalone MySQL Server / Classic MySQL Replication.
- Choose Config Type: Server Computer.
- Click Next to continue.
- Choose a complicated MySQL Root password.
- Click Next to continue.
- Click Next to continue.
- Click Next to continue without enabling X Protocol.
- Click Execute to Apply Configuration.
- Click Next to continue.
- Click Finish complete installation.
- Press Windows Key + Pause.
- On the left pane, click Advanced system settings.
- Click Environment Variables.
- Down the bottom in System variables, choose to edit Path.
- Click New, and then Browse.
- Navigate to the MySQL bin folder (Normally found at C:\Program Files\MySQL\MySQL Server 5.7\bin).
- Click Ok to add the folder to Path.
- Open up a new command prompt and type 'mysql'.
- If you get the message:
ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password: NO)
Then Success! Otherwise try restarting the server.
Optimising the MySQL Database
See MySQL performance and optimisation settings.
Migrating XUNO database to new server (if applicable)
New schools
New schools will not need to do any data migration - this section is only for existing on-premise XUNO schools moving to a new server.
Archiving and backing up XUNO data
Important! Before we go further, you will need to make sure IIS is stopped on the old server. You can do this by opening IIS, clicking on the server and clicking Stop on the right actions panel
In MYSQL Workbench -> Server -> Data Export, select the XUNO database (structure and data) and check "Dump Stored Procedures and Functions". Click on "Start Export".
Once done, zip up the Dumped folder (lets called it xunodb_suite.zip) so that we can copy this zip file across to the new server easily.
Copy data across
- From the old XUNO server, copy the xunodb_suite.zip to the Desktop of the new server.
The transferring of this ZIP file from the old server to your new server, can take a long time depending on the size of the folders and your network speed. It has taken over 24 hours in the past, so grab a coffee! - Once copied, on the new server extract the xunodb_suite.zip to the path of the XUNO installation. Be sure to click Yes to overwrite any existing files.
- Go to the includes > custom folder in the XUNO directory, and open customconfig.inc.php.
- Change the old 'password' to the new XUNO Database password.
- Change the 'server' value to the address of the new XUNO server, if the old one is listed.
- Change the 'database' value to the new XUNO database name. Let's call it xunosuite_db
Import Database
It's time to import the database so we can start using XUNO.
- In MYSQL Workbench, create a new database called xunosuite_db.
- To prevent timeout issues if the database is large, In MYSQL Workbench -> Edit -> Preferences -> SQL Editor, set DBMS connection read time out to something very large.
- In MYSQL workbench -> Server -> Data Import. Select the dumped folder and click "Start Import".
- Once import is completed, run the XUNO setup again on the new server. You can download it from here.
- Login to XUNO and test that it's working.
- Delete all unwanted dumped sql files.
- Celebrate! You have completed the migration.
You will now need to make sure all DNS records are pointing to the new server
You will also need to ensure the EduHub sync is pointing to the new XUNO server. Have a look at the instructions here to set up EduHub for the new server.
If necessary, don't forget to set scheduled backups of your XUNO database. Have a look at our article here that talks about setting a scheduled task using our backup template.
If you are pointing to the old server's mySQL and receive the following error message ' ERROR: Unable to connect to MySQL server! Error: Host 'xxxxxxx' is not allowed to connect to this MySQL server' then run the following SQL query
mysql> CREATE USER 'root'@'new IP address' IDENTIFIED BY 'root_password';
mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'new IP address' WITH GRANT OPTION;
mysql> FLUSH PRIVILEGES;
on the SQL server to grant permission to the new server.