Apache httpd : Wiki System : MediaWiki2025/03/04 |
Install the Wiki System, MediaWiki. |
|
[1] | |
[2] | |
[3] | Install other required PHP modules. |
root@www:~ #
pkg install -y php83-mysqli php83-pear php83-mbstring php83-xml php83-fileinfo php83-session php83-curl php83-zip php83-zlib php83-gd php83-intl php83-ctype php83-iconv php83-dom php83-exif php83-tokenizer
root@www:~ #
vi /usr/local/etc/php-fpm.d/www.conf
;; add to last line
;; maybe you need to configure parameters below for your usage
php_value[max_execution_time] = 600
php_value[memory_limit] = 2G
php_value[post_max_size] = 2G
php_value[upload_max_filesize] = 2G
php_value[max_input_time] = 600
php_value[max_input_vars] = 2000
php_value[date.timezone] = Asia/Tokyo
service php_fpm reload |
[4] | Create User and Database on MariaDB for MediaWiki. |
root@www:~ # mysql Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 9 Server version: 10.11.11-MariaDB FreeBSD Ports Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. root@localhost [(none)]> create database mediawiki; Query OK, 1 row affected (0.00 sec) root@localhost [(none)]> grant all privileges on mediawiki.* to mediawiki@'localhost' identified by 'password'; Query OK, 0 rows affected (0.00 sec) root@localhost [(none)]> exit Bye |
[5] | Configure Apache httpd for MediaWiki. |
root@www:~ # fetch https://releases.wikimedia.org/mediawiki/1.43/mediawiki-1.43.0.tar.gz root@www:~ # tar zxvf mediawiki-1.43.0.tar.gz root@www:~ # mv mediawiki-1.43.0 /usr/local/www/apache24/mediawiki root@www:~ # chown -R www:www /usr/local/www/apache24/mediawiki
root@www:~ #
vi /usr/local/etc/apache24/Includes/mediawiki.conf # create new Timeout 600 ProxyTimeout 600 Alias /mediawiki "/usr/local/www/apache24/mediawiki" DirectoryIndex index.php index.html index.htm <Directory "/usr/local/www/apache24/mediawiki"> Options FollowSymLinks AllowOverride All Require all granted <FilesMatch \.(php|phar)$> SetHandler "proxy:unix:/var/run/php-fpm.sock|fcgi://localhost/" </FilesMatch> </Directory> <Directory "/usr/local/www/apache24/mediawiki/images"> AllowOverride None AddType text/plain .html .htm .shtml .phtml Header always set X-Content-Type-Options "nosniff" <FilesMatch \.(php|phar)$> SetHandler None </FilesMatch> </Directory> service apache24 reload |
[6] | Access to the URL [https://(Server's Hostname or IP address)/mediawiki/mw-config/] with Web browser on any Client, then following screen is displayed. Click the [Continue] button. |
![]() |
[7] | Verify that the installation requirements are met and click the [Continue] button. |
![]() |
[8] | This is the database connection setting. Enter the database name, user name, and password you created, and click the [Continue] button. |
![]() |
[9] | Click the [Continue] button. |
![]() |
[10] | Set the Wiki name and administrator account. |
![]() |
[11] | This is an optional setting, so set it according to your preference. |
![]() |
[12] | Click the [Continue] button. |
![]() |
[13] | Click the [Continue] button. |
![]() |
[14] | This will display the setup completion screen. Finally, as instructed on the screen, download [LocalSettings.php] and upload it under the MediaWiki root directory ([/var/www/mediawiki] in this example). |
![]() |
[15] | This is the main screen of MediaWiki, where you can create a Wiki site, like WikiPedia. |
![]() |
Sponsored Link |
|