Mmarangoni (talk | contribs) No edit summary |
Mmarangoni (talk | contribs) No edit summary |
||
Line 9: | Line 9: | ||
'''$ cat /etc/os-release | '''$ cat /etc/os-release | ||
''' | ''' | ||
Download mediawiki: | Download mediawiki: | ||
'''$ wget https://releases.wikimedia.org/mediawiki/1.40/mediawiki-1.40.1.tar.gz | '''$ wget https://releases.wikimedia.org/mediawiki/1.40/mediawiki-1.40.1.tar.gz | ||
''' | ''' | ||
Unzip the tar: | Unzip the tar: | ||
'''$ tar -xzvf mediawiki-*.tar.gz | '''$ tar -xzvf mediawiki-*.tar.gz | ||
''' | ''' | ||
MediaWiki requires: | MediaWiki requires: | ||
Line 29: | Line 32: | ||
'''$ sudo apt-get install php-fpm | '''$ sudo apt-get install php-fpm | ||
''' | ''' | ||
Check the version: | Check the version: | ||
'''$ php -v | '''$ php -v | ||
''' | ''' | ||
Check the version of nginx: | Check the version of nginx: | ||
'''$ nginx -v | '''$ nginx -v | ||
''' | ''' | ||
Install database software (MariaDB): | Install database software (MariaDB): | ||
'''$ sudo apt-get install mariadb-server | '''$ sudo apt-get install mariadb-server | ||
''' | ''' | ||
Set up nginx configuration to serve the wiki. Here’s an example nginx configuration: | Set up nginx configuration to serve the wiki. Here’s an example nginx configuration: | ||
Line 49: | Line 56: | ||
'''$ ln sites-available/wiki2print.conf sites-enabled/wiki2print.conf | '''$ ln sites-available/wiki2print.conf sites-enabled/wiki2print.conf | ||
''' | ''' | ||
First, check if the nginx configuration works, before reloading: | First, check if the nginx configuration works, before reloading: | ||
'''$ nginx -t | '''$ nginx -t | ||
''' | ''' | ||
If it works, hold your breath and reload nginx: | If it works, hold your breath and reload nginx: | ||
'''$ sudo systemctl reload nginx | '''$ sudo systemctl reload nginx | ||
''' | ''' | ||
or | or | ||
'''$ service nginx reload | '''$ service nginx reload | ||
''' | ''' | ||
Edit the wiki2print.conf file, based on this example: | Edit the wiki2print.conf file, based on this example: | ||
Line 72: | Line 83: | ||
$ sudo apt install php-intl''' | $ sudo apt install php-intl''' | ||
Revision as of 10:59, 1 February 2024
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