Infra Insert 01: Difference between revisions

This page was last edited on 1 February 2024, at 22:23.
No edit summary
No edit summary
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<!------------------------>
<!------------------------>
<!-- do not remove this -->
<!-- do not remove this -->
<div id="infra##" class="infra-insert">
<div id="Infra Insert 01" class="infra-insert">
<!------------------------>
<!------------------------>


 
$ wget https://releases.wikimedia.org/mediawiki/1.40/mediawiki-1.40.1.tar.gz
Command to check your OS, for this project we will be using Armbian:
 
'''$ cat /etc/os-release
'''
 
Download mediawiki:
 
'''$ wget https://releases.wikimedia.org/mediawiki/1.40/mediawiki-1.40.1.tar.gz
'''
 
Unzip the tar:
 
'''$ tar -xzvf mediawiki-*.tar.gz
'''
 
MediaWiki requires:
 
- PHP 7.4.3+
 
- a webserver software
 
- and either MariaDB 10.3.0+, MySQL 5.7.0+, SQLite 3.8.0+ or PostgreSQL 10.0+. Using MariaDB or MySQL is recommended as Wikipedia uses MariaDB.
 
Install PHP:
 
'''$ sudo apt-get install php-fpm
'''
 
Check the version:
 
'''$ php -v
'''
 
Check the version of nginx:
 
'''$ nginx -v
'''
 
Install database software (MariaDB):
 
'''$ sudo apt-get install mariadb-server
'''
 
Set up nginx configuration to serve the wiki. Here’s an example nginx configuration:
 
https://git.vvvvvvaria.org/varia/wiki-to-print/src/branch/master/wiki-to-print.nginx.example
 
Make a symbolic link (symlink) between the configurations in /sites-available and /sites-enabled:
 
'''$ ln sites-available/wiki2print.conf sites-enabled/wiki2print.conf
'''
 
First, check if the nginx configuration works, before reloading:
 
'''$ nginx -t
'''
 
If it works, hold your breath and reload nginx:
 
'''$ sudo systemctl reload nginx
'''
 
or
 
'''$ service nginx reload
'''
 
Edit the wiki2print.conf file, based on this example:
 
https://git.vvvvvvaria.org/varia/wiki-to-print/src/branch/master/wiki-to-print.nginx.example
 
Enable PHP. Installing some PHP extensions are required:
 
'''$ sudo apt install php-mbstring'''
 
'''$ sudo apt install php-xml'''
 
'''$ sudo apt install php-intl
'''
 
 


<!------------------------>
<!------------------------>

Latest revision as of 22:23, 1 February 2024