Difference between revisions of "Install wiki on win server"

From MPSWiki
Jump to: navigation, search
 
(14 intermediate revisions by 2 users not shown)
Line 1: Line 1:
'''install:'''
+
=Prepare=
# python need 2.7.xx 32bit version (python-2.7.12.msi)
+
==Python==
# php from archive (latest php (64bit threads safe) (php-7.3.2-Win32-VC15-x64.zip))
+
#Install [https://drive.google.com/u/0/uc?id=1tHvZMHZxkApbz0WQP1ALtZS_IxHXn_u0&export=download Python]
# latest mysql (mysql-installer-community-8.0.11.0.msi)
+
==PHP==
 +
#[https://drive.google.com/u/0/uc?export=download&confirm=Zt0E&id=12bQS-caoryip0wIn78IMoAV4AiNo4O-6 Download PHP archive]
 +
##Extract all files from archive to C:\PHP\
 +
##[[File:Php-mapping.png]]
 +
##Click '''Add Module Mapping'''
 +
##[[File:Php-edit-mapping.png]]
 +
##Add default document: [[File:Php-default.png]]
 +
==MYSQL==
 +
#[https://drive.google.com/u/0/uc?id=1ByVELx1RIdFGKO3DYPwP_DoK2bNZBdlH&export=download Install MYSQL]
 +
##Select Custom
 +
##Install Server
 +
##Install WorkBench
 +
##Install MYSQL shell
 +
 
 +
==Media WIKI==
 
# mediawiki from archive
 
# mediawiki from archive
  
 
+
=Setup MySQL=
'''Setup MySQL:'''
 
  
 
# install with legacy password
 
# install with legacy password
Line 34: Line 47:
 
# add default document: index.php
 
# add default document: index.php
 
# FastCGI Settings: add application: C:\php\php=cgi.exe
 
# FastCGI Settings: add application: C:\php\php=cgi.exe
 
 
'''Backup script:'''
 
 
@echo off
 
SETLOCAL ENABLEEXTENSIONS
 
SETLOCAL ENABLEDELAYEDEXPANSION
 
 
set WIKI_FOLDER=E:\WWW\efieldpro\FieldproWiki
 
set BAKEUP_FOLDER=C:\Backups\wiki
 
 
set WIKI_DATABASE=fieldprowiki
 
set WIKI_DATABASE_USER=root
 
set WIKI_DATABASE_PASS=prosuite
 
 
for /f "tokens=2 delims==" %%I in ('wmic os get localdatetime /format:list') do (
 
set DATETIME=%%I
 
set WIKI_BACKUP_DATETIME=!DATETIME:~0,8!_!DATETIME:~8,6!
 
)
 
 
@echo Backup wiki folder from !WIKI_FOLDER!, new backup file wiki_!WIKI_BACKUP_DATETIME!.7z will be in !BAKEUP_FOLDER!
 
"C:\Backups\wiki\7za.exe" a "!BAKEUP_FOLDER!\wiki_!WIKI_BACKUP_DATETIME!.7z" "!WIKI_FOLDER!"
 
 
@echo Backup wiki database !WIKI_DATABASE!, new backup file !WIKI_DATABASE!_!WIKI_BACKUP_DATETIME!.sql will be in !BAKEUP_FOLDER!
 
"C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqldump.exe" -u!WIKI_DATABASE_USER! -p!WIKI_DATABASE_PASS! !WIKI_DATABASE! > "!BAKEUP_FOLDER!\!WIKI_DATABASE!_!WIKI_BACKUP_DATETIME!.sql"
 

Latest revision as of 10:19, 10 January 2021

Prepare

Python

  1. Install Python

PHP

  1. Download PHP archive
    1. Extract all files from archive to C:\PHP\
    2. Php-mapping.png
    3. Click Add Module Mapping
    4. Php-edit-mapping.png
    5. Add default document: Php-default.png

MYSQL

  1. Install MYSQL
    1. Select Custom
    2. Install Server
    3. Install WorkBench
    4. Install MYSQL shell

Media WIKI

  1. mediawiki from archive

Setup MySQL

  1. install with legacy password
  2. remove .NET connector


create: mysql -uroot -ppassword CREATE DATABASE fieldprowiki;

backup: mysqldump.exe -uroot -ppassword fieldprowiki > e:\fieldprowiki.sql

restore: mysql -uroot -ppassword fieldprowiki < e:\fieldprowiki.sql


if 'caching_sha2_password' error - then:

  1. C:\ProgramData\MySQL\MySQL Server 8.0\my.ini - update 'caching_sha2_password' to 'mysql_native_password'

and then update mysql:

  1. login in mysql: mysql -uroot -ppassword
  2. ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';


Setup IIS:

  1. add application pool (with 32bit)
  2. add default document: index.php
  3. FastCGI Settings: add application: C:\php\php=cgi.exe