$ sudo systemctl reload rvice $ sudo systemctl reload Now, you can see the check the nf file, if it matches the files directly. Now update the contents of nf with this.ĭownload media wiki to your home folder (i.e /home/student/ ) $ wget $ tar xvf mediawiki-1.31.0.tar.gz $ mv mediawiki-1.31.0.tar.gz wiki $ sudo chown -R nginx:nginx wiki Setting up php fpm $ sudo vi /etc/php/7.0/fpm/pool.d/your_custom_fpm.confĬontents of this file: listen = /var/run/php/ user = nginx group = nginx listen.owner = nginx oup = nginx pm = ondemand pm.max_children = 5 pm.max_requests = 500 Now we make sure that Nginx is able to server php-fpm site. To check if mariadb is working $ sudo systemctl status mysqlĬonfigure the database, CREATE DATABASE wikidb GRANT ALL PRIVILEGES ON wikidb.* TO IDENTIFIED BY 'password' $ sudo apt-get install php7.0 $ sudo apt-get install php7.0-mbstring $ sudo apt install php-fpm $ sudo apt install imagemagick php7.0-intl php7.0-xml php7.0-curl php7.0-gd php7.0-mysql php-apcu $ sudo apt-get install mariadb-server mariadb-client //$ sudo apt install composer Let’s install rest of the requirements now. Start nginx using systemd $ sudo systemctl start nginx $ sudo systemctl status nginx $ sudo systemctl enable nginxĬheck if the nginx server is up by going to the public IP of the server, you can find the public IP by $ curl $ sudo ufw app list $ sudo ufw allow 'Nginx HTTP' $ sudo ufw status Status: active To Action From - OpenSSH ALLOW Anywhere Nginx HTTP ALLOW Anywhere OpenSSH (v6) ALLOW Anywhere (v6) Nginx HTTP (v6) ALLOW Anywhere (v6) Download the custom nf file and place it in /etc/nginx/nfĮnable Nginx HTTP in the ufw firewall.Download the uwf config file for nginx and place it in /etc/ufw/applications.d/nginx.ufw.Download the systemd service file for nginx installation and put it in /lib/systemd/system/rvice.custom_ngnix_build.sh $ make $ sudo make install We’ll be installing a custom nginx build, download this script and place it inside the extracted directory. Install the dependencies first $ sudo apt-get install build-essential $ sudo apt-get install libpcre3 $ sudo apt-get install libpcre3-dev $ sudo apt-get install openssl $ sudo apt-get install libssl-dev $ sudo apt-get install zlib1g zlib1g-dev $ wget $ tar zxf nginx-1.14.0.tar.gz & cd nginx-1.14.0Ĭreate a user specially for the nginx process, ubuntu automatically creates a group with the same name of your user. You might find this step overly complicated, but installing nginx from source gives you greater flexibility than installing from the package manager. Setting up the webserver (Nginx from source) I’ll be following the installation requirements mentioned in the official guide. Installing required software for MediaWiki We’re all set to start our MediaWiki installation now. ssh $ chmod 700 ~/.ssh/ $ sudo cat /root/.ssh/authorized_keys > ~/.ssh/authorized_keys $ chmod 600 ~/.ssh/authorized_keys $ exit $ systemctl reload sshd $ // disconnect your ssh session now $ ssh should now be logged into your server using the new user. # adduser student # usermod -aG sudo student # su - student $ mkdir. Ssh into your server using the root account, $ ssh firewall # sudo ufw app list # sudo ufw allow OpenSSH # sudo ufw enableĪdd a new user ( let’s give it a name of student) and add it to the sudo group. This does not involve setting up domain or ssl or securing your server, but the next guide will.Īfter you get a $5 droplet, it’s time to do some basic stuff like adding a user for the server, you don’t always want the root user to be making the changes. This does not optimize or follow the best practices imo, I’ll come up with a follow up blog with a refactored layout of everything. A short and easy guide on installing MediaWiki on a Digital Ocean Droplet/locally.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |