Paul Jennings

Father – Crypto Miner – Solution Architect

DriveWithPearson.com

I’ve created a website for Martin Pearson and his fantastic School of Motoring start-up http://www.drivewithpearson.com.

The site is HTML5, responsive to device type and has a cool video background. If anyone wants something similar, then contact me for a cheap all-in-one price.

It's only fair to share...Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInEmail this to someone

Terminal Session Recording with asciinema

I’ve come across several blog posts where they use a .GIF approach to sharing terminal session recording and I’s always wondered “how do they do that?”. Seeing as I’m starting to train myself in Ansible, I thought that I’d share my knowledge and hence would need to record and share.

After come research, I came across asciinema and then the wordpress plug in called danixland-asciinema. This is a test post to check if my first asciinema video can be posted in my blog…

[UPDATE] FYI, you need to make your asciinema video public which gives you the numeric version of the URL for the danixland-asciinema plugin embedded link.

https://asciinema.org/

https://wordpress.org/plugins/danixland-asciinema/

It's only fair to share...Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInEmail this to someone

WWW FTP access on Digital Ocean

A common issue when using droplets from Digital Ocean if post ProFTPD installation and you wish to upload your website to /var/www. By following the standard tutorials, your user wont have access to the folder.

Here is what you need to do…

Install ProFTPD

https://www.digitalocean.com/community/articles/how-to-set-up-proftpd-on-ubuntu-12-04

Edit ProFTPD Config

Re-edit the config and re-comment out the Default Root line

sudo nano /etc/proftpd/proftpd.conf

Find the correct line and re-comment it out

# Use this to jail all users in their homes
# DefaultRoot
Restart PtoFTPD
sudo service proftpd restart

Confirm the Group allocation for /var/www

stat /var/www

Output from the comment should show something like this..

File: `/var/www'
Size: 20480 Blocks: 40 IO Block: 4096 directory
Device: fd00h/64768d Inode: 1312692 Links: 11
Access: (0775/drwxrwxr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2013-08-23 08:54:30.290042645 +0000
Modify: 2013-08-23 11:20:25.322055581 +0000
Change: 2013-08-23 11:20:25.322055581 +0000
The Group here is shown under "Gid: ( 0/ root)" as root.

We now need to change our non-root user that we use for FTP to belong to the same Group (root)

usermod -a -G root YOURUSER
When you now FTP into your droplet, you can navigate to /var/www and upload files!
It's only fair to share...Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInEmail this to someone

Initial Server Setup with Ubuntu 12.04; security

Easy to follow video for the Digitial Ocean, Initial Server Set-up for Ubuntu 12.04; security.

https://www.digitalocean.com/community/articles/initial-server-setup-with-ubuntu-12-04

Basically, we are going to add a new user, disable root SSH access and change the default SSH port from 22.

Step One—Change Root Password

Change the root password Digital Ocean allocated to you to something else.

passwd

Step Two—Create a New User

After you have entered a secure password, you can leave everything else blank; just press enter

adduser neggs

Step Three—Root Privileges

Let’s assign your new user root access.

visudo

Find this…

User privilege specification
root ALL=(ALL:ALL) ALL

and then add this…

neggs  ALL=(ALL:ALL) ALL
Type ‘cntrl x’ to exit the file.
Press Y to save; press enter, and the file will save in the proper place.

Step Four—Secure SSH

Let’s disable root SSH access and change the default port from 22.

Open the configuration file…

nano /etc/ssh/sshd_config
Find the following sections and change the information where applicable:
We have changed 22 to 25000, but this can be anything between 1025 and 65536.
Port 25000
Protocol 2
PermitRootLogin no
Now allow only the new user you have created to have SSH access.
UseDNS no
AllowUsers neggs

Step Five—Reload SSH

reload ssh

Step Six—Test it!

WITHOUT logging out as root, open a new SSH connection (new putty window) and log in with your new user (neggs) and new port number (25000).

The reason why we leave root still logged in, is in case we have made a mistake. If we log out, we may never be may to log back in again as root!


It's only fair to share...Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInEmail this to someone

Install nginx on Ubuntu 12.04

Based on Digital Ocean Post

nginx is a high performance web server software. It is a much more flexible and lightweight program than Apache.

Step One—Install nginx

To install nginx, open terminal and type in:

sudo apt-get install nginx

When prompted, say yes.

Step Two—Start nginx

nginx does not start on its own. To get nginx running, type:

sudo service nginx start

Step Three— Confirm That nginx Has Started

You can confirm that nginx has been installed as your web server by directing

your browser to your IP address.

**You can run the following command to reveal your virtual server’s IP address.

ifconfig eth0 | grep inet | awk '{ print $2 }'

When you visit your IP address or DNS name page in your browser, you will see the words
, “Welcome to nginx”

You can see a screenshot of the utilitarian nginx welcome page here

To ensure that nginx will be up after reboots, it’s best to add it to the startup.

Type this command into terminal:

update-rc.d nginx defaults

You may see a message like:

System start/stop links for /etc/init.d/nginx already exist.

If that is the case, then nginx is set up to run on startup!

You have now installed nginx

It's only fair to share...Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInEmail this to someone