Ubuntu Configuration Lamp+mediawiki

Source: Internet
Author: User
Tags build wiki install php mediawiki

/* In the laboratory found that the document sent to too much trouble, simply in the laboratory to make a wiki, so the online collection of information, with a, because of the time rush, MediaWiki more advanced things did not come and see, and then use the time to perfect it * *

Environment: Ubuntu 15.10 x64

First, install lamp

Reference: http://www.cnblogs.com/CheeseZH/p/4694135.html

    1. Installing Apache

Installing using the Apt-get management tool

sudo apt-get updatesudoinstall apache2

Install apache2 Documents and accessories "optional"

sudo Install Apache2-doc apache2-utils

Test: Re-enter http://[your IP in the browser] if the following results appear, the installation is successful

2. Install MySQL

sudo Install musql-server php5-mysql

The password for the root user of MySQL needs to be set during installation.

After installation, you need to configure the MySQL environment to run in one terminal

sudo mysql_install_db

Run the other terminal again

sudo mysql_secure_installation

Modify root password, delete sample user and data, disable remote root login, MySQL real-time response, etc. according to your needs

3. Install PHP

sudo Install php5 libapache2-mod-php5 php5-mcrypt php5-curl php5-imagick php5-cli

If you need additional PHP modules, you can use the command below to see which ones are available:

Apt-cache Search php5-

'll see

If you want to see more detailed information about a package:

Apt-cache Show Package_name

Currently, if a user accesses a directory on the server, Apache will first find a file named index.html, we modify this setting, let Apache first find a file named index.php, first to root as a text editor to open the Dir.cof file:

sudo vim/etc/apache2/mods-enabled/dir. conf

Put the index.php in front of you:

<ifmodule mod_dir.c>    index.php index.html index.cgi index.pl index.xhtmlindex.htm </ Ifmodule>

Test:

In Ubuntu, "Web root" points to/var/www/html

New script:

sudo vim/var/www/html/info. php

In the file, enter:

<? PHP Phpinfo ();? >

Save.

Then enter in the browser:

/HTTP[IP_Address]/info.php

If you see the following page, the installation is successful

Then you can start the MediaWiki configuration.

Second, prepare

Reference: http://blog.chinaunix.net/uid-29792372-id-4701619.html

    1. New Wiki user "optional"
sudo useradd wiki-d/home/wiki-m wikipasswd wiki

2. Create a database for the wiki

Log in to MySQL database

Mysql–u root–p

New Database

Create database MediaWiki;

Assign media database permissions to a wiki account and set a password

' 123456 ';

Third, build Wiki website

Reference: Https://help.ubuntu.com/community/MediaWiki

    1. Installing MediaWiki
sudo Install MediaWiki

Install other accessories "optional", about 1G, time is longer

sudo Install ImageMagick mediawiki-math PHP5-GD

2. Configure MediaWiki

sudo VI /etc/mediawiki/apache.conf

Remove the comment symbol:

# Alias/mediawiki/var/lib/mediawiki

Restart Apache2:

sudo service apache2 restart

3. Set MediaWiki

At this point in the browser input: Http://ip_address/mediawiki will prompt 404 Not Found, this is because MediaWiki directory in/var/lib/, and Apache's www path in/var/www/html, So to execute:

sudo CP -r/var/lib/mediawiki/var/www/html

Then restart the Apache service

sudo service apache2 restart

In the browse to enter: Http://ip_address/mediawiki, it will appear: (is not a bit dirty-_-)

Click Complete the installation to set

4. Complete

When Setup is complete, a localsettings.php is generated, moved to the/etc/mediawiki folder, and the wiki server is built successfully.

Ubuntu Configuration Lamp+mediawiki

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.