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

歡迎訪問 生活随笔!

生活随笔

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

编程问答

apache mediawiki 安装_mediawiki安装使用

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

一、安裝mediawiki(apache/php/mysql/mediawiki)

1.安裝apache,

Server Infomation分別填寫:

.localdomain

.localdomain

admin@.localdomain

測試http://localhost,如果顯示It Works,說明apache安裝正常

2.安裝php,

Web Server Setup選擇Apache 2.2.x module

Apache Configuration Directory選擇apache的安裝路徑

重啟apache,在apache的htdocs目錄下新建hello.php文件,內容為

測試http://localhost/hello.php,如果顯示很多php的信息,說明php安裝成功

3.安裝mysql,創建用戶

4.解壓縮mediawiki,文件夾改名為wiki,然后復制到apache的htdocs目錄下

http://localhost/wiki/mw-config/index.php,進行mediawiki的配置,配置完成后會得到一個LocalSettings.php,將它復制到mediawiki的目錄下

修改LocalSetting.php文件的以下變量

$wgServer改為實際ip地址

$wgLogo改為實際的logo圖片位置

$wgEnableUploads改為true

修改左側導航欄:在搜索位置輸入mediawiki:sidebar,然后編輯

默認是

* navigation

** mainpage|mainpage-description

** portal-url|portal

** currentevents-url|currentevents

** recentchanges-url|recentchanges

** randompage-url|randompage

** helppage|help

* SEARCH

* TOOLBOX

* LANGUAGES

In your LocalSettings.php, look to see if $wgServer is set to something.

二、WikiEditor

http://www.mediawiki.org/wiki/Extension:WikiEditor

LocalSettings.php添加以下內容:

require_once( "$IP/extensions/WikiEditor/WikiEditor.php" );

# Enables use of WikiEditor by default but still allow users to disable it in preferences

$wgDefaultUserOptions['usebetatoolbar'] = 1;

$wgDefaultUserOptions['usebetatoolbar-cgd'] = 1;

# Displays the Preview and Changes tabs

$wgDefaultUserOptions['wikieditor-preview'] = 1;

# Displays the Publish and Cancel buttons on the top right side

$wgDefaultUserOptions['wikieditor-publish'] = 1;

三、mediawiki語法

code

四、目錄顯示在右側

編輯commonContent.css,添加一行

#toc { float: right; border: 1px solid #aaa; BACKGROUND-COLOR: #aaa };

五、管理

Special:ListUsers,列出所有的用戶

========================!!!!!!!!!!安裝步驟!!!!!!!!!=========================1.?yum?install?httpd?php?pcre?php-mysql?php-pear?php-pecl-apc?mysql-server?ImageMagick?sendmail?php-intl?wget?system-config-firewall-tui

2.?service?mysqld?start

3./usr/bin/mysql_secure_installation

4.登陸mysql,建立用戶和密碼如下:

insert?into?mysql.user(Host,User,Password)?values("localhost","mediawiki",password("1234"));

5.?建立數據庫并賦權:

create?database?wikidb;

grant?index,?create,?select,?insert,?update,?delete,?alter,?lock?tables?on?wikidb.*?to?'mediawiki'@'localhost'?identified?by?'1234';

exit;

遠程訪問賦權:

grant?all?privileges?on?*.*?to?'mediawiki'@'192.168.1.111'?identified?by?'1234';

FLUSH?PRIVILEGES;

6.cd?/var/www/html

7.wget?http://download.wikimedia.org/mediawiki/1.18/mediawiki-1.18.2.tar.gz

8.tar?xzpf?mediawiki-1.18.2.tar.gz

9.mv?mediawiki-1.18.2?wiki

10.chown?-R?apache:apache?wiki

11.vi?/etc/httpd/conf/httpd.conf?添加:

Options?-Indexes

#?Ignore?.htaccess?files

AllowOverride?None

#?Serve?HTML?as?plaintext,?don't?execute?SHTML

AddType?text/plain?.html?.htm?.shtml?.php

#?Don't?run?arbitrary?PHP?code.

php_admin_flag?engine?off

#?If?you've?other?scripting?languages,?disable?them?too.

11.?/etc/httpd/conf/httpd.conf??設置serverName

12.chmod?775?/var/www/html/wiki/p_w_picpaths

13.?vi?/etc/php.ini?設置上傳文件大小

post_max_size?=?128M

upload_max_filesize?=?128M

14.?打開系統的?80和443?端口

15.service?httpd?restart

16.?登陸??http://IP:端口/wiki

設置:database?name:wikidb,?database?username:?mediawiki?等(設置時有前面第4步創建的一致)

并選擇PHP?object?caching

17.下載LocalSettings.php并放到/var/www/html/wiki?目錄

18.vi?/var/www/html/wiki/LocalSettings.php

$wgEnableUploads?=?true;?#?Set?this?to?true

#?添加如下:

$wgFileExtensions?=?array('png','gif','jpg','jpeg','doc','xls','mpp','pdf','ppt','tiff','bmp','docx',?'xlsx',?'pptx','ps','odt','ods','odp','odg','exe');

$wgFileBlacklist?=?array_diff(?$wgFileBlacklist,?array?('exe')?);

19.chkconfig?httpd?on

20.chkconfig?mysqld?on

21.service?sendmail?restart

22.?chkconfig?sendmail?on

23.?安裝完畢,?開始你的wiki之旅。

問題1:##linux?下apche無法監聽端口解決辦法

[root@localhost?html]#?service?httpd?start

Starting?httpd:?httpd:?Could?not?reliably?determine?the?server's?fully?qualified?domain?name,?using?localhost.termwikidev?for?ServerName

(13)Permission?denied:?make_sock:?could?not?bind?to?address?[::]:81

(13)Permission?denied:?make_sock:?could?not?bind?to?address?0.0.0.0:81

no?listening?sockets?available,?shutting?down

Unable?to?open?logs

解決辦法:

semanage?port?-l|grep?http

semanage?port?-a?-t?http_port_t?-p?tcp?81

問題2:###?CentOS?打開端口?如打開3306端口,操作如下:

/sbin/iptables?-I?INPUT?-p?tcp?--dport?3036?-j?ACCEPT

保存我們的操作,命令如下:

/etc/rc.d/init.d/iptables?save

查看端口的狀態,命令如下:

/etc/init.d/iptables?status

總結

以上是生活随笔為你收集整理的apache mediawiki 安装_mediawiki安装使用的全部內容,希望文章能夠幫你解決所遇到的問題。

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