日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

Wiki引擎mediawiki

發(fā)布時(shí)間:2023/12/20 编程问答 30 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Wiki引擎mediawiki 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

作者:【吳業(yè)亮】云計(jì)算開發(fā)工程師
博客:http://blog.csdn.net/wylfengyujiancheng

MediaWiki是一套基于網(wǎng)絡(luò)的Wiki引擎,維基媒體基金會(huì)的所有項(xiàng)目乃至眾多wiki網(wǎng)站皆采用了這一軟件。MediaWiki軟件最初是為自由內(nèi)容百科全書維基百科所開發(fā)的,今日已被一些公司機(jī)構(gòu)部署為內(nèi)部的知識(shí)管理和內(nèi)容管理系統(tǒng)。Novell甚而還在多個(gè)高流量的網(wǎng)站中使用了該軟件。MediaWiki采用PHP編程語言寫成,并可使用MySQL、MariaDB、PostgreSQL或SQLite之一作為其關(guān)系數(shù)據(jù)庫管理系統(tǒng)。MediaWiki在GNU通用公共許可證第2版及其后續(xù)版本的條款下分發(fā),其文檔則按知識(shí)共享-署名-相同方式共享3.0版協(xié)議釋出,部分文檔還被釋入了公有領(lǐng)域,這使其成為了自由軟件。出于服務(wù)維基百科的需求,軟件的第一個(gè)版本于2002年被部署,后來,維基百科和其他維基項(xiàng)目繼續(xù)定義了MediaWiki的大部分功能。為了有效地處理大型項(xiàng)目,MediaWiki得到了很好的優(yōu)化,使其可以承載萬億字節(jié)的內(nèi)容和每秒數(shù)十萬次的訪問請(qǐng)求。因?yàn)榫S基百科是全球最大的網(wǎng)站之一,需要MediaWiki能為開發(fā)者實(shí)現(xiàn)通過多層次的實(shí)現(xiàn)可伸縮性緩存和數(shù)據(jù)庫響應(yīng),對(duì)開發(fā)者來說,這一直是一個(gè)讓他們很頭疼的大問題,而MediaWiki很好的解決了這一問題。MediaWiki有700多個(gè)配置設(shè)置和超過1800個(gè)擴(kuò)展,可以使各種特性被添加或更改。在維基百科上,超過1000個(gè)自動(dòng)化和半自動(dòng)化的機(jī)器人和其他工具用于協(xié)助編輯。它也被一些公司部署為一個(gè)內(nèi)部知識(shí)管理系統(tǒng),一些教育機(jī)構(gòu)也讓學(xué)生使用MediaWiki來進(jìn)行小組項(xiàng)目的管理和維護(hù)。

一、安裝http
1、安裝軟件包

# yum -y install httpd

2、刪除歡迎詞

# rm -f /etc/httpd/conf.d/welcome.conf

3、修改配置文件/etc/httpd/conf/httpd.conf

86行定義管理員郵箱 ServerAdmin root@srv.world95行定義服務(wù)器名稱 ServerName www.srv.world:80 # line 151: change 151行定義權(quán)限 AllowOverride All 164行添加只能使用目錄名稱訪問的文件名 DirectoryIndex index.html index.cgi index.php # 在后面新增 # server's response header ServerTokens Prod # keepalive is ON KeepAlive On

4、啟動(dòng)服務(wù)并設(shè)置開機(jī)啟動(dòng)

# systemctl start httpd # systemctl enable httpd

5、設(shè)置防火墻

# firewall-cmd --add-service=http --permanent success # firewall-cmd --reload Success

6、寫入測(cè)試文件

# vi /var/www/html/index.html<html> <body> <div style="width: 100%; font-size: 40px; font-weight: bold; text-align: center;"> Test Page </div> </body> </html>

7、測(cè)試

二、安裝PHP
1、安裝軟件包

# yum -y install php php-mbstring php-pear

修改配置文件

# vi /etc/php.ini # line 878: 修改時(shí)區(qū) date.timezone = "Asia/Shanghai"

2、重啟http服務(wù)

# systemctl restart httpd

3、創(chuàng)建測(cè)試文件

# vi /var/www/html/index.php<html> <body> <div style="width: 100%; font-size: 40px; font-weight: bold; text-align: center;"> <?phpprint Date("Y/m/d"); ?> </div> </body> </html>

4、測(cè)試

三、安裝數(shù)據(jù)庫
1、安裝軟件包

# yum -y install mariadb-server

2、修改配置文件/etc/my.cnf

# add follows within [mysqld] section [mysqld] character-set-server=utf8

3、啟動(dòng)服務(wù)并設(shè)置開機(jī)啟動(dòng)

# systemctl start mariadb # systemctl enable mariadb

4、初始化數(shù)據(jù)庫

# mysql_secure_installationNOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDBSERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!In order to log into MariaDB to secure it, we'll need the current password for the root user. If you've just installed MariaDB, and you haven't set the root password yet, the password will be blank, so you should just press enter here.Enter current password for root (enter for none): OK, successfully used password, moving on...Setting the root password ensures that nobody can log into the MariaDB root user without the proper authorisation.# set root password Set root password? [Y/n] y New password: Re-enter new password: Password updated successfully! Reloading privilege tables..... Success!By default, a MariaDB installation has an anonymous user, allowing anyone to log into MariaDB without having to have a user account created for them. This is intended only for testing, and to make the installation go a bit smoother. You should remove them before moving into a production environment. # remove anonymous users Remove anonymous users? [Y/n] y... Success!Normally, root should only be allowed to connect from 'localhost'. This ensures that someone cannot guess at the root password from the network.# disallow root login remotely Disallow root login remotely? [Y/n] y... Success!By default, MariaDB comes with a database named 'test' that anyone can access. This is also intended only for testing, and should be removed before moving into a production environment.# remove test database Remove test database and access to it? [Y/n] y- Dropping test database...... Success!- Removing privileges on test database...... Success!Reloading the privilege tables will ensure that all changes made so far will take effect immediately.# reload privilege tables Reload privilege tables now? [Y/n] y... Success!Cleaning up...All done! If you've completed all of the above steps, your MariaDB installation should now be secure.Thanks for using MariaDB!

5、連接數(shù)據(jù)庫

# mysql -u root -p Enter password: # MariaDB root password you set Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 3 Server version: 5.5.37-MariaDB MariaDB ServerCopyright (c) 2000, 2014, Oracle, Monty Program Ab and others.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

6、查看用戶

MariaDB [(none)]> select user,host,password from mysql.user; +------+-----------+-------------------------------------------+ | user | host | password | +------+-----------+-------------------------------------------+ | root | localhost | *xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | | root | 127.0.0.1 | *xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | | root | ::1 | *xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | +------+-----------+-------------------------------------------+ 3 rows in set (0.00 sec)

7、顯示數(shù)據(jù)庫

MariaDB [(none)]> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | performance_schema | +--------------------+ 3 rows in set (0.00 sec)MariaDB [(none)]> exit Bye

8、配置防火墻

[root@dlp ~]# firewall-cmd --add-service=mysql --permanent success [root@dlp ~]# firewall-cmd --reload Success

四、創(chuàng)建mediawiki數(shù)據(jù)庫

# mysql -u root -p Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 10 Server version: 5.5.44-MariaDB MariaDB Server Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. # create "mediawiki" databse (set any password for "password" section) MariaDB [(none)]> create database mediawiki; Query OK, 1 row affected (0.00 sec) MariaDB [(none)]> grant all privileges on mediawiki.* to mediawiki@'localhost' identified by 'password'; Query OK, 0 rows affected (0.00 sec) MariaDB [(none)]> flush privileges; Query OK, 0 rows affected (0.00 sec) MariaDB [(none)]> exit Bye

五、安裝mediawiki
1、下載軟件包

# wget https://releases.wikimedia.org/mediawiki/1.26/mediawiki-1.26.4.tar.gz

2、解壓軟件包

# tar zxvf mediawiki-1.26.4.tar.gz

3、拷貝到/var/www/html/mediawiki

# mv mediawiki-1.26.4 /var/www/html/mediawiki

4、設(shè)置權(quán)限

# chown -R apache. /var/www/html/mediawiki

5、重啟httpd服務(wù)

# systemctl restart httpd

6、配置seLinux

# chcon -R -t httpd_sys_rw_content_t /var/www/html/mediawiki # semanage fcontext -a -t httpd_sys_rw_content_t /var/www/html/mediawiki

六、通過界面配置mediawiki
http://(server’s hostname or IP address)/mediawiki/mw-config/
1、設(shè)置語言

點(diǎn)擊繼續(xù)

2、配置數(shù)據(jù)庫

3、創(chuàng)建管理員用戶


4、下載配置文件,并將LocalSettings.php通過ftp工具上傳到后臺(tái)/var/www/html/mediawiki下,注意目錄權(quán)限

5、開始使用

參考:
https://zh.wikipedia.org/wiki/MediaWiki

總結(jié)

以上是生活随笔為你收集整理的Wiki引擎mediawiki的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。