Category: blogs

  • Ubuntu 18 : How to import a MySQL .sql database

    ssh to your server with a user that can sudo up, and have your details ready, and change to the directory where the .sql dump is located. Of course, maybe make a new database in the mysql server, so you don’t accidentally override anything. mysql -u dbusername -p dbname < file.sql The dbusername is the…

  • How to make a tarball backup of public_html

    There’s a lot of different (type) of files in the public_html directory of your web server. You should manually back this up, and back it up properly. I recommend using tar, it can gzip it for you. And it can respect the permissions and relative path. It’s an easy tarball as they call it, that…

  • Ubuntu 18 : PHP Allow bigger file uploads

    I found that the default is 2 megabyte with post upload limit of 8 megs. This is not enough these days anymore. I found in Ubuntu 18 with PHP 7.2, that I have my php.ini file to reside here: /etc/php/7.2/apache2 Edit it: sudo nano -w /etc/php/7.2/apache2/php.ini And find: post_max_size = 8M Change this to a…

  • XenForo : How to get Friendly URL to work

    If you don’t use managed hosting solutions for your forums, you might have to install everything yourself. By default the directive for AllowOverride is set to None, meaning even if you enable the friendly urls in XenForo, it will show you 404 not found pages. Step 1. If you already have a .htaccess file, get…

  • Ubuntu 18 : How to install phpmyadmin and secure phpmyadmin

    Once you have https configured on your server, and you have a MySQL server installed, it might be desirable to install phpmyadmin, this is a php web interface solution to help you manage your mysql databases, users, etc. For security reasons: don’t install it. If you do wish to install it, continue reading, but take…

  • Ubuntu 18 : How to install Let’s Encrypt (Add https to your site)

    If you’ve finished setting up your LAMP setup, it’s important to encrypt the traffic over https, we do this with a free solution called Let’s Encrypt. Because why pay unless you’re an Enterprise.. ssh into the server with a user that can sudo up, and type: sudo apt install python-certbot-apache Follow the on-screen instructions. Note:…

  • Ubuntu 18 : How to add Virtual Hosts to Apache2

    Assuming you’ve properly installed Apache2, MySQL, PHP, and read some of the other blogs I’ve written, it’s time to add domains that point to the IP of the server, to the Apache2 as virtual hosts. This makes it easier to add files to load, per domain, even if you have multiple domains on the same…

  • Ubuntu 18 : Install PHP

    Assuming you’re going for a LAMP setup, which is Linux, Apache, MySQL and PHP, and have followed some of my other blog posts, we’re at the point where you might find out that PHP isn’t installed on Ubuntu 18 on most hosting solutions. Hopefully this quick guide will get you started. sudo apt install php…

  • Ubuntu 18 : Add MySQL database and user

    After installing the MySQL server and setting it all up as per this blog post: https://mrfloris.com/article/3288/ubuntu-18-how-to-add-basic-firewall-with-ufw/, it’s time to add a database, and a user to this database. Assuming you’ve followed the previous blog post, connect to the mysql server with the mysql root user as such: mysql -u root -p It will look like…

  • Ubuntu 18 : How to install MySQL server

    By default Ubuntu 18 usually has the Apache2 server installed, but the MySQL server might not be there. We will require it for omgboards.com and other websites. So we’re going to install it. ssh to the server, login with a user that can sudo up, and type from the command line: sudo apt install mysql-server…

  • Ubuntu 18 : How to add basic firewall with ufw

    It should be installed by default on Ubuntu, but some virtualization images etc might not have it. Login with ssh to your server, with a sudo abled user and install ufw sudo apt install ufw Note: It’s important you stay logged in while you sort this out, and that you don’t restart the server, or…

  • Ubuntu 18 : Enable ssh keys, disable ssh passwords

    This is a two step howto, and this is how I do it. Do it in this order to avoid issues. Before you begin, make sure you have read the other blog posts, where I explain how to add a super user to the system, and disable root from logging into the ssh service. The…