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

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

Wiki引擎mediawiki

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

作者:【吳業亮】云計算開發工程師
博客:http://blog.csdn.net/wylfengyujiancheng

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

一、安裝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行定義服務器名稱 ServerName www.srv.world:80 # line 151: change 151行定義權限 AllowOverride All 164行添加只能使用目錄名稱訪問的文件名 DirectoryIndex index.html index.cgi index.php # 在后面新增 # server's response header ServerTokens Prod # keepalive is ON KeepAlive On

4、啟動服務并設置開機啟動

# systemctl start httpd # systemctl enable httpd

5、設置防火墻

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

6、寫入測試文件

# 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、測試

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

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

修改配置文件

# vi /etc/php.ini # line 878: 修改時區 date.timezone = "Asia/Shanghai"

2、重啟http服務

# systemctl restart httpd

3、創建測試文件

# 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、測試

三、安裝數據庫
1、安裝軟件包

# yum -y install mariadb-server

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

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

3、啟動服務并設置開機啟動

# systemctl start mariadb # systemctl enable mariadb

4、初始化數據庫

# 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、連接數據庫

# 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、顯示數據庫

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

四、創建mediawiki數據庫

# 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、設置權限

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

5、重啟httpd服務

# 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、設置語言

點擊繼續

2、配置數據庫

3、創建管理員用戶


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

5、開始使用

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

總結

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

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。