ITS:1‐Setting_up_a_Media_Wiki_page - ConnorEast/Tech-Journal GitHub Wiki

Setting up A media Wiki Page from Scratch:

Creating a Virtual Machine:

Name: IT-SP24-East-MediaWiki: Linux CentOS HDD ISO --> CentOS-7.iso
Machine Stats --> Network: TestNet, CPU:2, Memory:2GB, Hard Disk:16GB, Language --> English (United States);
image

On the page labeled Installation Summary: Select an installation destination disk and click begin install. Next create a root and a user account and click done twice. Once the loading is done hit the blue reboot button;

username root: root;
Password root: root_Password;
username user: connor;
Password user: helloW0rld;

image

Next use the nmtui command set it to automatic and continue enable the connection. Then continue with the steps below.
Current IPADDR = 192.168.201.51/24


Downloading MediaWiki

Media wiki is a web-based page daemon that is used to host content. This can be active content such as videos and instructions, or passive content such as this page. In order for media wiki to work it must be allocated 48MB of ram and have a web server software (apache/Nginx), PHP, and a database server (MariaDB/MySQL) installed. In order to download all of this to a linux based server you would use the following command.
Command: ---> "sudo apt-get (yum) install -y apache2 mariadb-server php php-intl php-mbstring php-xml php-apcu php-curl php-mysql"**

Next, we need to download media Wiki using one of the the following commands:

Command: ---> "wget https://releases.wikimedia.org/mediawiki/[insertversionhere]/mediawiki-[insertversionhere].tar.gz"
Command: ---> "curl -O https://releases.wikimedia.org/mediawiki/[insertversionhere]/mediawiki-[insertversionhere].tar.gz"
image
Next, we will need to unzip the ".tar.gz" file. We can do that with the following command:
Command: ---> "tar -xzvf mediawiki-*.tar.gz"
image

Next, we need to transfer the unzipped folder to our Apache "/var/www/" file directory.
Command: ---> "yum install -y rsync"
Command: ---> "cd -r /mediawiki-*/ /var/www/mw/"
Command: ---> "chown -R root:root /var/www/mw/"
image


Creating the MariaDB/Mysql database:

Command 1: ---> systemctl start mariadb
Command 2: ---> systemctl enable mariadb.service
Command 3: ---> mysql_secure_installation

MariaDB root password: RootedInPlac3
image

Once installation has completed, use the command "mysql -u root -p". This allows you to log into mysql as user root with the password shown above. Once logged in continue with the following commands:
Command 4: ---> "CREATE DATABASE example_database"
Command 5: ---> GRANT ALL ON exampe_database .* TO '[INSERT-USER-NAME]'@'localhost' IDENTIFIED BY '[INSERT-PASSWORD]' WITH GRANT OPTIONS
Command 6: ---> FLUSH PRIVILEGE


Finishing Configuration:

Go to "http://[YOUR_IP]/mw-config" on a web browser connected to your device. Click on the link labeled "please set up the wiki first." During setup just follow the proccesses associated with the instructions listed.