设为首页 收藏本站
查看: 1247|回复: 0

[经验分享] How to install MediaWiki on Ubuntu 18.04 LTS-Arnold

[复制链接]

尚未签到

发表于 2019-2-19 06:04:27 | 显示全部楼层 |阅读模式
  Mediawiki is a free and open source wiki software that allows you to create your own wiki site. It is written in PHP and uses MySQL/MariaDB database backend. Mediawiki comes with lots of features including, Multilanguage support, User Management, Content management and sharing, Editing, Formatting, Referencing and much more.
  In this tutorial, we will learn how to install Mediawiki with Apache web server on Ubuntu 18.04 server.
Requirements

  •   A server running Ubuntu 18.04.
  •   A non-root user with sudo privileges.
Install LAMP Server
  First, install Apache and MariaDB server using the following command:
  sudo apt-get install apache2 mariadb-server -y
  Once both packages are installed, you will need to add Ondrej PHP repository to your system. You can add it with the following command:
  sudo apt-get install software-properties-common
  sudo add-apt-repository ppa:ondrej/php -y
  Once the repository is installed, update the repository and install PHP along with all the required PHP libraries:
  sudo apt-get update -y
  sudo apt-get install php7.2 libapache2-mod-php7.2 php7.2-common php7.2-mbstring php7.2-xmlrpc php7.2-soap php7.2-gd php7.2-xml php7.2-intl php7.2-mysql php7.2-cli php7.2-mcrypt php7.2-zip php7.2-curl -y
  Once all the packages are installed, open php.ini file with the following command:
  sudo nano /etc/php/7.2/apache2/php.ini
  Make the following changes:
memory_limit = 256M  
upload_max_filesize = 100M
  
max_execution_time = 360
  
date.timezone = Asia/Kolkata
  Save and close the file, then start Apache and MariaDB service and enable them to start on boot time:
  sudo systemctl start apache2
  sudo systemctl enable apache2
  sudo systemctl start mysql
  sudo systemctl enable mysql
Configure MariaDB
  First, secure MariaDB installation with the following command:
  sudo mysql_secure_installation
  Answer all the questions as shown below:
    Enter current password for root (enter for none):  
    Set root password? [Y/n]: N
  
    Remove anonymous users? [Y/n]: Y
  
    Disallow root login remotely? [Y/n]: Y
  
    Remove test database and access to it? [Y/n]:  Y
  
    Reload privilege tables now? [Y/n]:  Y
  Once the MariaDB is secured, log in to MariaDB shell:
  mysql -u root -p
  Enter your root password when prompt, then create a database and user for Mediawiki:
  MariaDB [(none)]>CREATE DATABASE mediadb;

  MariaDB [(none)]>CREATE USER 'media'@'localhost'>  Next, grant all the privileges to the mediadb with the following command:

  MariaDB [(none)]>GRANT ALL ON mediadb.* TO 'media'@'localhost'>  Next, flush the privileges and exit from the MariaDB shell:
  MariaDB [(none)]>FLUSH PRIVILEGES;
  MariaDB [(none)]>EXIT;
Install Mediawiki
  First, download the latest version of Mediawiki from their official website:
  wget https://releases.wikimedia.org/mediawiki/1.31/mediawiki-1.31.0.tar.gz
  Once the download is completed, extract the downloaded file with the following command:
  tar -xvzf mediawiki-1.31.0.tar.gz
  Next, copy the extracted directory to the Apache root directory and give proper permissions:
  sudo cp -r mediawiki-1.31.0 /var/www/html/mediawiki
  sudo chown -R www-data:www-data /var/www/html/mediawiki
  sudo chmod -R 777 /var/www/html/mediawiki
  Next, create an Apache virtual host file for Mediawiki with the following command:
  sudo nano /etc/apache2/sites-available/mediawiki.conf
  add the following lines:
  
ServerAdmin admin@example.com
  
DocumentRoot /var/www/html/mediawiki/
  
ServerName example.com
  

  
Options +FollowSymLinks
  
AllowOverride All
  

  
ErrorLog /var/log/apache2/media-error_log
  
CustomLog /var/log/apache2/media-access_log common
  

  Save the file, then enable virtual host file and Apache rewrite module with the following command:
  sudo a2ensite mediawiki.conf
  sudo a2enmod rewrite
  Finally, restart Apache web server to make the changes:
  sudo systemctl restart apache2
Access Mediawiki
  Now, open your web browser and type the URL http://example.com. You will be redirected to the following page:
DSC0000.png

  Now, click on the set up the wiki button. You should see the following page:
DSC0001.png

  Here, choose your wiki language and click on the Continue button. You should see the following page:
DSC0002.png

  Now, click on the Continue button. You should see the following page:
DSC0003.png

  Now, provide your database details and click on the Continue button. You should see the following page:
DSC0004.png

  Now, select storage engine and click on the Continue button. You should see the following page:
DSC0005.png

  Now, provide your wiki site name, username and password. Then, click on the Continue button. You should see the following page:
DSC0006.png

DSC0007.png

  Now, mark all your required settings and click on the Continue button. You should see the following page:
DSC0008.png

  Now, click on Continue button to start the installation. Once the installation is completed. You should see the following page:
DSC0009.png

  Now, click on the Continue button. You should see the following page:
DSC00010.png

  Here, you need to download the LocalSettings.php file and put it on MediaWiki root directory.
  Now, open your web browser and type the URL http://example.com. You should see your MediaWiki site in the following image:
DSC00011.png

Links

  •   Ubuntu
  •   MediaWiki



运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-674027-1-1.html 上篇帖子: How to Install WordPress with EasyEngine on Ubuntu-Arnold 下篇帖子: How to Install Netdata Monitoring Tool on Ubuntu-Arnold
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表