https://www.server-world.info/en/note?os=Ubuntu_16.04&p=hostname 1. Temporarily change hostname. (but if rebooting, it will be back). show current hostname: $ hostname ubuntu # output change hostname (substitute ‘newname’ with any name you choose): $ hostname newname verify the change: $ hostname newname # output 2. Change hostname permanently. $ hostnamectl set-hostname newname verify settings: $ hostnamectl output example: Static […]
Mounting An External Drive On Ubuntu Server
https://help.ubuntu.com/community/Mount/USB 1. Get device info: $ lsblk or $ sudo fdisk -l 2. Create the Mount Point In the example below, the mount point name is “external”. You can name it anything you want. $ sudo mkdir /media/external for devices formatted in FAT16 or FAT32: $ sudo mount /dev/sdb1 /media/external for devices formatted in ntfs: […]
How To Create A Self-Signed SSL Certificate For Apache In Ubuntu 16.04
https://www.digitalocean.com/community/tutorials/how-to-create-a-self-signed-ssl-certificate-for-apache-in-ubuntu-16-04 A self-signed certificate will encrypt communication between your server and any clients. However, because it is not signed by any of the trusted certificate authorities included with web browsers, users cannot use the certificate to validate the identity of your server automatically. A self-signed certificate may be appropriate if you do not have a […]
How To Install Gogs On Ubuntu 16.04
https://www.youtube.com/watch?v=deSfX0gqefE https://gogs.io/docs/installation/install_from_binary https://dl.gogs.io/0.10.8/linux_amd64.tar.gz 1. SSH into the server $ ssh user@ip_address 2. Create the Gogs database (a) login to mysql: $ mysql -u root -p (b) create the database: https://github.com/gogits/gogs/blob/master/scripts/mysql.sql mysql> CREATE DATABASE gogs CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; exit: mysql> \q 3. Download the binary file for Gogs available at https://gogs.io/docs/installation/install_from_binary the file link […]
WordPress .htaccess File Settings For Image Hotlinking
http://stevegrunwell.github.io/wordpress-git/#/ This code can be used inside local wordpress website development (root directory) to link to images from the live/ production site. The code just redirects all internal links referenced from the ‘wp-contents/uploads’ folder to the same folder from the live/production site. This usage can be used when you have images that have been uploaded […]
Generating an SSH Key Pair For GitLab
https://gitlab.com/help/ssh/README 1. ssh into virtual machine $ vagrant ssh 2. From the command line: $ ssh-keygen -t rsa -C “GitLab” -b 4096 Next, you will be prompted to input a file path to save your key pair to. If you don’t already have an SSH key pair use the suggested path by pressing enter. Using […]
Pulling GitLab Code To DigitalOcean Server
https://premium.wpmudev.org/blog/improve-wordpress-development-workflow-local-server/ Create the empty Git repository on the production server 4. From your local command line create an ssh connection to the remote server: $ ssh username@your_ip_address Assuming Git is already installed, configure global settings with same info used to connect your pc/laptop with GitLab: $ git config –global user.name “NewUser” $ git config –global […]