In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you how to install MediaWiki under Ubuntu 10.04, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
1. Install related software
Sudo apt-get install apache2 sudo apt-get install mysql-server mysql-client (password is required in the middle, remember the password you set) sudo apt-get install php5 php5-mysql sudo apt-get install libgd2-xpm libgd2-xpm-dev php5-gd sudo apt-get install mediawiki
2. Configure mediawiki:
Sudo vi / etc/mediawiki/apache.conf
Remove the comments from the following line:
# Alias / mediawiki / var/lib/mediawiki
Restart apache2:
Service apache2 restart
3. Set mediawiki
Visit http:///wiki and click on the link above: http:///wiki/config/index.php to set up.
When the setup is complete, notice the prompt at the end of the page:
Move / var/lib/mediawiki/config/LocalSettings.php to / etc/mediawiki
Execute the command:
Mv / var/lib/mediawiki/config/LocalSettings.php / etc/mediawiki
4. Permission setting
5. Syntax highlighting plug-in: SyntaxHighlight GeSHi
Go to the plug-in directory of MediaWIKI (extensions) and execute the command:
Svn export http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/SyntaxHighlight_GeSHi
After installation, the following files and directories appear under this directory:
Geshi/ README SyntaxHighlight_GeSHi.class.php SyntaxHighlight_GeSHi.i18n.php SyntaxHighlight_GeSHi.php
Modify the file: LocalSettings.php, insert the code at the end:
Require_once ("$IP/extensions/SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.php")
To modify the file SyntaxHighlight_GeSHi.class.php, refer to the following code:
$css = array (); $css [] ='; $css [] = $geshi- > get_stylesheet (false); $css [] = ".source-$lang {line-height: normal;}"; $css [] = ".source-$lang li, .source-$lang pre {"; $css [] = "\ tline-height: normal; border: 1px dashed # 2f6fabs;"; $css [] = "}"; $css [] = ".$ lang.source-$lang .de1, .$ lang.source-$lang .de2 {"; $css [] = "\ tpadding:10px;" $css [] = "}"; / / $css [] = $geshi- > get_stylesheet (false); $css [] ='; $css [] =''
If this setting is not enabled, comment out this line of code first:
Require_once ("$IP/extensions/SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.php")
Uncomment after refreshing, and then refresh to enable syntax highlighting.
Try to use this tag instead of the original, which has problems dealing with things like xml.
6. Backup and recovery of data
Export data from the MySQL database:
Mysqldump-u root-p-- opt wikidb > wikidb.sql
Go to the installation directory of Ubuntu's mediawiki: / var/lib/mediawiki and package the following files and directories:
Tar-zcvf mediawiki.tar.gz images/ skins/ extensions/ LocalSettings.php
Check to see if the packaged file is what we need:
Tar-ztvf mediawiki.tar.gz
If the directory structure shown is correct, move the wikidb.sql and mediawiki.tar.gz files to where you want to place them to complete the backup.
After mediawiki is reinstalled, you need to set the wiki settings in the browser before doing the following.
Restore database execution: mysql wikidb < wikidb.sql-p
To restore the plug-in, execute: tar-zxvf mediawiki.tar.gz under the mediawiki directory. If the plug-in is not enabled, please check it according to the plug-in settings section.
After the recovery of the home page, may be the default page, do not worry, you choose to edit, this time is the backup of the previous data, can be saved.
The above is all the contents of the article "how to install MediaWiki under Ubuntu 10.04". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.