首页 ubuntu12.04安装mediawiki

ubuntu12.04安装mediawiki

举报
开通vip

ubuntu12.04安装mediawiki:Running_MediaWiki_on_Ubuntu sudo apt-get update sudo apt-get upgrade sudo apt-get install apache2 mysql-server php5 php5-mysql libapache2-mod-php5 sudo apt-get install php-apc php5-intl imagemagick phpmyadmin vsftpd php5-cli(Useful Packages) cd Downloads wge...

ubuntu12.04安装mediawiki
:Running_MediaWiki_on_Ubuntu sudo apt-get update sudo apt-get upgrade sudo apt-get install apache2 mysql-server php5 php5-mysql libapache2-mod-php5 sudo apt-get install php-apc php5-intl imagemagick phpmyadmin vsftpd php5-cli(Useful Packages) cd Downloads wget tar -xvzf mediawiki-*.tar.gz mv /var/www /var/ww2 cp –a mediawiki-1.25.1 /var/ mv mediawiki www vim /etc/apache2/httpd.conf  增加ServerName localhost service apache2 restart nano /etc/php5/apache2/php.ini upload_max_filesize = 2M  改为20M (最大附件) memory_limit = 8M  改为128M(最大内存) mysql -u root -p CREATE 'user'@'hostname' IDENTIFIED BY 'user';  CREATE DATABASE mediawikidb; GRANT ALL ON mediawikidb.* TO 'user'@'hostname'; FLUSH PRIVILEGES; CREATE 'wiki'@'hostname' IDENTIFIED BY 'wiki';  CREATE DATABASE mediawiki123db; GRANT ALL ON mediawiki123db.* TO 'wiki'@'hostname'; FLUSH PRIVILEGES; Changing the logo[edit | edit source] The $wgLogo variable specifies the graphical logo that gets displayed on the top left corner by default. However, the $wgLogo variable may not be present in LocalSettings.php by default - it must be added in manually to the bottom. There is no standard for the size of the logo image, but 135x135 pixels will fit most skins. If the logo it is oversized for a specific skin it will show from the top left corner and clip the bottom/right of the Image. The logo file can be placed anywhere, but putting it in the top-level directory of the wiki is convenient. Fortunately, the variable $wgScriptPathcontains the top directory of the wiki, so simply adding the following works well: $wgLogo = "$wgScriptPath/wiki.jpg"; Warning: Do not simply change the default logo installed with MediaWiki (/skins/common/images/wiki.png); this filewillbe overwritten when you upgrade.     mediawiki上传图片文件的时候出现如下错误: [html] view plaincopy在CODE上查看代码片派生到我的代码片 Fatal exception of type MWException  先检查下以下三个参数在LocalSettings.php配置是不是正确 [html] view plaincopy在CODE上查看代码片派生到我的代码片 $wgEnableUploads = true;  $wgUseimageMagick = true;  $wgImageMagickConvertCommand = "/usr/bin/convert";  如果没问题,那可能是因为图片目录的权限不够造成的,在服务器的根目录下有个image目录把它的权限改成777就可以了 [python] view plaincopy在CODE上查看代码片派生到我的代码片 chmod 777 images/  上传就没问题了。 但上传图片后又出现了如下错误: [html] view plaincopy在CODE上查看代码片派生到我的代码片 生成缩略图出错:/bin/bash: /usr/bin/convert: No such file or directory  Error code: 127  说明convert程序没有安装.安装下ImageMagick程序就行了 [python] view plaincopy在CODE上查看代码片派生到我的代码片 sudo yum install ImageMagick  上传附件时还不能上传excel及visio文件 允许上 传文件 更改/etc/mediawiki/LocalSettings.php中的$wgEnableUploads,把false改为true。 同时,/etc/php5/apache2/php.ini中的file_uploads,改为on 允许上传的文件类型 更改/var/lib/mediawiki/includes/DefaultSettings里的$wgFileExtensions列表,加上自己要支持的类型。 允许上传的文件大小 除了更改/var/lib/mediawiki/includes/DefaultSettings里 的$wgFileUploadWarning的值(超过这个值的文件,会警告,但可以成功上传),很重要的,还要更改/etc/php5/apache2 /php.ini中的两项。 max_upload_filesize,最根本的,PHP允许上传的最大文件大小 post_max_size,这一项,很多资料上没有说明。这个的大小,也直接决定了上面一项。因为上传的数据,有的是用POST上传上来的,如果这个项的值小于上一项,那会以这一项为准,导致根本上传不成功。 以上设置,在用PHP做其它开发时,同样有这个限制。 批量上传文档功能 :MultiUpload/zh#.E5.AE.89.E8.A3.85 安装 Download and place the file(s) in a directory called MultiUpload in your extensions/ folder. Add the following code at the bottom of your LocalSettings.php: require_once "$IP/extensions/MultiUpload/MultiUpload.php"; YesDone - Navigate to Special:Version on your wiki to verify that the extension is successfully installed. Note 注意: 选项 创建链接至扩展 在侧边栏 通过编辑MediaWiki:Sidebar增加一行使得在侧边栏添加一个链接: ** Special:Multiupload|multiupload ("upload files") 或 ** Special:Multiupload|multiupload-toolbox ("Upload multiple files"). Note 注意: 在侧边栏中将“上传文件”替换为批量上传 In the LocalSettings.php file, right below the last require_once line add: $wgUploadNavigationUrl = "{$wgScriptPath}/index.php?title=Special:MultiUpload"; Setting the maximum number of files to upload Warning Warning:    As of r115614, the $wgMaxUploadFiles global isn't respected. After that commit, members of the staff group could upload 40 files at once via Special:MultiUpload, whereas sysop group could upload 20 at once, autoconfirmed could upload 10 and all other registered users could upload 5 files at once. Now, after complete replacement of the source code, it begins with one file and adds more as files are selected, with no upper limit.
本文档为【ubuntu12.04安装mediawiki】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
该文档来自用户分享,如有侵权行为请发邮件ishare@vip.sina.com联系网站客服,我们会及时删除。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。
本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。
网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
下载需要: 免费 已有0 人下载
最新资料
资料动态
专题动态
is_977556
暂无简介~
格式:doc
大小:24KB
软件:Word
页数:6
分类:互联网
上传时间:2019-01-13
浏览量:8