{"id":19766242,"url":"https://github.com/akaliutau/media-wiki","last_synced_at":"2026-05-14T17:10:05.211Z","repository":{"id":120056110,"uuid":"377807537","full_name":"akaliutau/media-wiki","owner":"akaliutau","description":"An implementation of content management system (CMS) on the basis of MediaWiki project","archived":false,"fork":false,"pushed_at":"2021-06-17T11:31:28.000Z","size":80,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-28T10:55:25.258Z","etag":null,"topics":["cms","lamp-stack","mediawiki","php7"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/akaliutau.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-17T11:30:51.000Z","updated_at":"2021-06-17T11:32:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"16234132-516e-40a7-bdb9-f433599c271f","html_url":"https://github.com/akaliutau/media-wiki","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/akaliutau/media-wiki","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akaliutau%2Fmedia-wiki","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akaliutau%2Fmedia-wiki/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akaliutau%2Fmedia-wiki/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akaliutau%2Fmedia-wiki/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/akaliutau","download_url":"https://codeload.github.com/akaliutau/media-wiki/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akaliutau%2Fmedia-wiki/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33034845,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-14T02:00:06.663Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cms","lamp-stack","mediawiki","php7"],"created_at":"2024-11-12T04:23:29.071Z","updated_at":"2026-05-14T17:10:05.204Z","avatar_url":"https://github.com/akaliutau.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\nAbout \n======\n\nThis is an implementation of content management system (CMS) on the basis of LAMP stack.  \n\n\nManual approach\n================\n\nSteps (1) and (2) can be omitted if you are already on Linux\n\n1) Builds image with Ubuntu distribution and tag linux:20.04. Note the dot at the end of the command.\n```\ndocker build -f Dockerfile-min -t linux:20.04 .\n```\n\n2) Instantiates container and connects it to standard console.\n```\ndocker run -p 8082:80 -it linux:20.04 /bin/bash\n```\n\n3) Installing Apache itself is easy.\n```\napt-get install -y apache2\n```\n\n4) Run Apache Server.\n\n```\n/etc/init.d/apache2 start\n```\n\nYou should get:\n```\n * Starting Apache httpd web server apache2                                                                             \nAH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message *\n```\nNote the ip address - this is not the ip address of container\n\nAfter navigating to http://localhost:8082/ you should see the \"Apache2 Ubuntu Default Page\"\n\n5) Installing an SQL database \n\n```\napt-get install -y mariadb-server systemctl\n```\n\nYou can confirm the DB is running using direct command or systemctl:\n```\nmysql --version\nmysql  Ver 15.1 Distrib 10.3.25-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2\n```\n\nIf not running, start it:\n```\nservice mysql start\n```\n\n6) Securing DB\n\n```\nmysql -u root -p \n```\n\nMariaDB might not let you log in unless you run the mysql command as sudo. If this happens, log in using sudo and provide the MariaDB password you created. Then run these three commands at the MySQL prompts (substituting your password for your-password):\n\n```\nSET PASSWORD = PASSWORD('admin123'); \nupdate mysql.user set plugin = 'mysql_native_password' where User='root'; \nFLUSH PRIVILEGES;\n```\n\nThe next time you log in, you should no longer require sudo and, more importantly, MediaWiki should be able to do its job properly.\n\n7) Creating a MediaWiki DB User \n\n```\nCREATE DATABASE wikidb;\nCREATE USER 'mw-admin'@'localhost' IDENTIFIED BY 'wiki-password'; \nGRANT ALL PRIVILEGES ON wikidb.* TO 'mw-admin'@'localhost' IDENTIFIED BY 'wiki-password'; \nFLUSH PRIVILEGES; \n``` \n\n8) Installing PHP\n```\napt-get install -y php libapache2-mod-php nano\n```\n\n9) Testing PHP installation (optional)\n\nTo make sure your PHP installation is live (and to learn about PHP�s local environment and resource integration), create a new file using the .php filename extension in the Apache web document root directory. Then fill the file with the remaining lines of text like so:\n\n```\n# nano /var/www/html/testmyphp.php \n```\n\nThe content of file is:\n```\n\u003c?php \n   phpinfo(); \n?\u003e\n```\n\nrestart apache server:\n```\n/etc/init.d/apache2 restart\n```\n\nNow head over to a browser, enter the IP address of the machine that�s running PHP (or localhost, if it�s the desktop you�re working on) and the name of the file you created:\n```\nhttp://localhost:8082/testmyphp.php\n```\n\n10) Installing and configuring MediaWiki \n\nHead over to the MediaWiki download page (www.mediawiki.org/wiki/Download) to get the latest package\n\n```\napt-get install -y wget\nwget https://releases.wikimedia.org/mediawiki/1.30/mediawiki-1.30.0.tar.gz\n```\n\nthen unpack and copy sources to apache public webdir:\n```\ntar xzvf mediawiki-1.30.0.tar.gz\nls mediawiki-1.30.0 mediawiki-1.30.0.tar.gz\nmkdir /var/www/html/mediawiki\ncp -r mediawiki-1.30.0/* /var/www/html/mediawiki\n```\n\nNavigate to http://localhost:8082/mediawiki/index.php to check the website is up and running\nIn case of any errors from \"missing php extensions\" category (f.e. You are missing a required extension to PHP that MediaWiki requires to run: mbstring) do the following:\n\na) use apt search to see what packages relate to mbstring. Since the running version of PHP is 7, the php7.4-mbstring package seems like the one most likely one to search of, see the output of the following command:\n\n```\napt search mbstring \n```\n\nb) install necessary packages and restart Apache (in this case it is 4 packages, including php7.4-mbstring at al.)\n```\napt-get install -y php7.4-mbstring php7.4-xml php7.4-mysql php-apcu php-imagick \n/etc/init.d/apache2 restart\n```\n\n11) Connecting MediaWiki to the database \n\nAfter restart click on complete the installation link and fill out necessary fields (must use wikidb and wiki user created earlier)\nIn the end download LocalSettings.php file. This file must be put into MediaWiki root (installation) directory, i.e. /var/www/html/mediawiki. Copy the file to MediaWiki's root dir:\n\n```\ndocker cp LocalSettings.php my_container_id:/var/www/html/mediawiki/LocalSettings.php\n```\nIf necessary, one can exit bash console in container and connect to it:\n\n```\ndocker exec -it my_container_id /bin/bash\n```\n\nRestart apache once again and navigate browser to the main page:\n```\nhttp://localhost:8082/mediawiki/index.php\n```\n\nAutomated approach\n===================\n\nUse Dockerfile file to perform steps 1-10; perform step 11 manually:\n```\ndocker build -f Dockerfile -t linux-media-wiki:20.04 .\n```\n\n2) Instantiate container and connects it to standard console.\n```\ndocker run -p 8082:80 -it linux-media-wiki:20.04 /bin/bash\n```\n\n3) Execute the sql script:\n```\nmysql -u root -p \u003c 010_init.sql;\n```\n\n4) navigate browser to the main page and complete the installation:\n```\nhttp://localhost:8082/mediawiki/index.php\n```\nNOTE: installation must be completed manually, because during the last steps all necessary db tables are created\n\n5) Restart apache once again and navigate browser to the main page. We are done!\n\nReferences\n===========\nMore about MediaWiki: [https://www.mediawiki.org/wiki/MediaWiki]\n\n\nNotes\n======\n\nAdditional useful commands:\n\nClean up local docker registry:\n```\ndocker image prune -a --force --filter \"until=2021-01-04T00:00:00\"\n```\n\nAdd exemptions to docker registries:\n```\n{\n  \"registry-mirrors\": [],\n  \"insecure-registries\": [\n    \"reg.domain.com\"\n  ],\n  \"debug\": true,\n  \"experimental\": false\n}\n```\n\n\nUseful commands\n\nGet the list of images:\n\n```\ndocker images -a\n```\n\nGet the list of containers:\n\n```\ndocker ps\n```\n\nClean up local docker registry:\n\n```\ndocker image prune -a --force --filter \"until=2021-01-04T00:00:00\"\n```\n\nClean up local docker registry from images with \u003cnone\u003e tag:\n\n```\ndocker rmi --force $(docker images -q --filter \"dangling=true\")\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakaliutau%2Fmedia-wiki","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakaliutau%2Fmedia-wiki","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakaliutau%2Fmedia-wiki/lists"}