/* 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
- 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
- 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
- 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