apt get life

Life around technology

  • Technology
    • Guides
    • Linux
    • Development
      • Laravel
    • Misc
    • Raspberry Pi
  • Writing
  • Crafts
    • Crochet
    • Model Making
    • Painting
  • Privacy Policy
You are here: Home / Archives for Technology / Linux

Installing Vagrant on Linux Mint

2014/07/19 by sudo

This article will cover installing Vagrant on Linux Mint, but what is Vagrant? Vagrant is a useful tool for setting up testing and development virtual machines on Linux. Setting it up on Debian and Ubuntu based distributions like Linux Mint is quite straight forward and the following guide will go over the main steps. For further information, Vagrant itself has some great docs http://docs.vagrantup.com/v2/. It covers installation of Vagrant on various Linux distros as well as more advanced management and configuration, but here’s a quick start:

Installing Vagrant on Linux Mint

First, open up a terminal and install virtual box, the kernel sources and vagrant all in one neat step:
sudo apt-get install virtualbox virtualbox-dkms vagrant

Please note that the version in Mint/Ubuntu’s repositories is not the latest one. If you’ve using tools such as PuPHPet you’ll need to grab the latest version of Vagrant from the Vagrant downloads page.

Make a new sub directory in your home folder for your Vagrant machines files to be stored in:
mkdir ~/vagrant

Now lets get create a VM. Pick what machine you want from the Vagrant Boxes (http://www.vagrantbox.es/). I’m going to use Debian 7.3. You need to copy the box URL.

Make sure you’re in your vagrant directory:

cd ~/vagrant

Initialise the vagrant box. This creates a configuration file for it which you can use to change key settings before you start it up

vagrant init debs http://puppet-vagrant-boxes.puppetlabs.com/debian-73-x64-virtualbox-nocm.box

Make configuration changes if you want to. I like to set a hostname and have the machine appear on my main network so I can access it from other computers

nano Vagrantfile

These are the additional lines I put in:

# Set the machines hostname
config .vm.hostname = "debs7"

# Setup a network bridge
config.vm.network :public_network

Now you can start the vagrant box. It’ll download the image first time so it might be a little slow to get going.
vagrant up

Once done, you can access it using
vagrant ssh

Filed Under: Linux, Technology Tagged With: development, Linux, testing, vagrant, Virtual machines

Checking a hard drive’s SMART status from the Linux command line

2014/06/07 by sudo

SMART (Self-Monitoring Analysis and Reporting Technology) allows you to gather and assess if a hard drive has or is near failure. On Debian and Ubuntu based systems (including both flavors of Mint) the smartmontools package contains everything you need to check your drives.

It’s usually a good idea to make sure your Linux distrobution’s repositories are up to date:

sudo apt-get update

Start by installing the smartmontools package to give you access to the utilities to check your hard drive from the command line:

sudo apt-get install smartmontools

Once the package is installed, you can start checking your hard drives. It’s a good idea to run a short test first. To do this type the command below, replacing /dev/sda with your hard drive.

smartctl --test=short /dev/sda

The command will tell you how long it is going to take to test the drive. Normally this is only a few minutes for a short test but can be hours for a longer one:

=== START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION ===
Sending command: “Execute SMART Short self-test routine immediately in off-line mode”.
Drive command “Execute SMART Short self-test routine immediately in off-line mode” successful.
Testing has begun.
Please wait 2 minutes for test to complete.

Once you’ve waited for the drive test to finish you can check the health status of your hard drive. Your first option is a summary telling you if it’s passed or failed:

smartctl -H /dev/sda

If you want more information on the status of your hard drive you can run the following command:

smartctl -a /dev/sda

In the event you find anything you’d consider to be suspicious or your hard drive has been acting strangely you can run a longer test, but this usually takes a few hours to complete:

smartctl --test=long /dev/sda

It’s important to note that a SMART test is only one indication of a failing hard drive. You could test a drive and it pass but still fail the following day. Clicking noises are a good indication of a hard drive that has or is about to fail. You should always have a good backup of all of your data. If your hard drive does fail your disk provider may have tools available on their website to allow you to check them or require you to provide information for an RMA.

Filed Under: Linux, Technology Tagged With: debian, hard drive health, Linux, mint, SMART, smartctl, smartmontools, ubuntu

A Quick Review: Courier vs Dovecot

2011/07/08 by sudo

In the open source email world there seem to be two main competitors: Courier-MTA and Dovecot. These programs would sit on the email server and store messages for accounts that are destined for your domain. In a recent review of the email systems used where I work it’s been questioned as to whether Courier should still be used.

Slow to load in Squirrel mail

Squirrel mail is a popular open source webmail client written in PHP. It isn’t the prettiest web mail client on down the road but it is the most widely compatible. When inboxes are loaded with large amounts of emails in them, Squirrel mail takes a small ice age to load. This seems to be because Courier doesn’t index the maildir where the mail is stored, so every time you open up the webmail client it has to reaload the entire inbox.

 

Ongoing Auto responder problems

Problems with our auto responders have been getting progressively worse in Courier. It seems that due to the load of the system (partly down to the first Courier fault I mentioned: lack of indexing) doesn’t always manage to process the request to send an auto responder.

 

Dovecot

Dovecot is supposedly much faster than Courier due to the indexing it provides. Claims are that it is still not yet as feature rich as courier, but that it is certainly becoming more main stream. One big advantage of Dovecot is its sane use of configuration files, whereas Courier tends to spread them all over the system. Additionally Dovecot uses maildir format so is compatible with standard Courier installations.

 

Filed Under: Linux, Technology

  • « Previous Page
  • 1
  • …
  • 3
  • 4
  • 5

Recent Posts

  • System Hang on Ubuntu 24.04 “e1000_print_hw_hang”
  • Disable iLO on HP Microserver Gen8
  • Ubuntu Desktop 24.04 Change Wallpaper Settings
  • Customising Ubuntu Desktop 24.04
  • Remove domains from Let’s Encrypt using Certbot

Tags

API auditing crochet data recovery debian debudding development Dingo API docker email Getting started with Laravel 5 & Dingo API hard drive health HP Microserver KVM Laravel larvel 5 lenovo Linux Minion mint netgear nas networking network shares php PHP development Postfix raspberry pi review samba security SMART smartctl smartmontools smb testing traefik ubuntu ubuntu 18.04 ubuntu 20.04 ubuntu 22.04 ubuntu server vagrant Virtual machines xdebug xubuntu

© Copyright 2015 apt get life