Mmarangoni (talk | contribs) No edit summary |
Mmarangoni (talk | contribs) No edit summary |
||
Line 85: | Line 85: | ||
''' | ''' | ||
'''sudo apt install php my-sql | '''$ sudo apt install php my-sql | ||
''' | ''' | ||
Revision as of 11:04, 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
$ sudo apt install php my-sql