Tag Archives: ubuntu

Building a ubuntu mining rig with 6 x GTX 1060 6GB GPUs | Set up a eth mining rig

Iv been getting involved in the Bitcoin craze lately. I invested a little cash just to learn how the system works.

So… I thought Id roll the dice with a Bitcoin mining rig. My budget was around $3000, which I got close to.

Here is a detailed log of how I achieved this and what results I received.

Build materials and links.

Total: 3229.48

When clicking on the above links, please keep in mind that all things mining will change in price because of demand. Especially GPUs.

Also, I could have cut costs on things like CPU, Hardisk and power supply but I was rushing to build the rig and didn’t care too much in the end.

In the space of a month the GPUs that I purchased went up by around $50 each, the demand was crazy when the price of bitcoin went up. They remain higher at the moment even though bitcoin has halved in value.

Also another problem was that most good/cheap mining boards use the LGA1150 CPU socket which is no longer available from stores, I had to purchase this CPU second hand.

I had to wait several weeks before all the parts come in, some were delayed and some dodgy ebay stores didnt send them at all.

Putting the rig together was alot of fun, i have not messed around with hardware in a very long time.

Once all the parts came together I fired her up…. PROBLEMO!!!

The power supply was dead, it would start for a few seconds and them die. I purchased another with arrived 3 days later.

Once the new power supply arrived I started the Ubuntu installation. A few were problematic. I settled of Ubuntu 16.04 because it was stable and a lot of other miners were using this version.

Once the base OS was installed and running, we need to setup the NVIDIA drivers. I installed a number of different versions and found the latest version gives the best results as of this time. Version and location below.

Installation instructions for these GPUs.

This concludes the GPU drivers installation.

Now lets install the mining software.

Now lets start the mining!

 

 

BOOM Your Mining!

 

 

Useful Links Below.

https://bitcointalk.org/index.php?topic=1712831.0

http://www.tomshardware.com/answers/id-3335591/max-safe-overclock-evga-gtx-1060-6gb.html

https://www.cryptocompare.com/mining/calculator

Overclocking multiple Nvidia graphics card on Linux

https://github.com/ethereum-mining/ethminer/issues/119

How to mount NFS in a Docker Ubuntu container | mounting nfs shares in docker containers

I had problems mounting NFS shares in my docker container, error would appear with permissions denied. This is the fix which worked for me.

Inside the container execute the following.

on the host execute the following to mount the share.

 

Setting up nextcloud on a Raspberry Pi 1 | how to setup nextcloud on a raspberry pi

A quick and easy way to setup the a Raspberry Pi 1 with Nextcloud.

Nextcloud is an awesome solution for your personal cloud requirements. If will provide you with the following solutions.

  • Data storage accessible via an App or Webgui
  • Share your data with the internet, based on your permissions
  • Store and play music
  • Store and share contacts and calendars
  • Backup and sync with your phone or tablet
  • and many more

Lets gets started, lets install the dependencies.

Download Nextcloud from their site.

Create the data directory and set permissions.

Restart apache

Boom, your done. Point your browser to nextcloud and start to customize.

Ubuntu installing and preparing Apache2 and PHP7 | how to install and setup apache2 and php on ubuntu

I spent a bit of time this morning setting up apache2 and php, things have changed in the newer versions of Linux.

The following will install apache and php.

This will test if PHP is install and running on the command line.

This will check if the PHP modules are loaded in apache.

Save the following file in the following location.

restart apache

in your web browser navigate to

You should see something like this.

 

 

Apache Load Balancer and reverse proxy howto | Apache2 load balancer reverse proxy howto

I wasted alot of time trying to figure out how to use Apache as a reverse proxy to load balance two of my web servers.

I thought I would write a little howto on how to get this up and running quickly.

I know used this setup with docker, using two containers running a standard installation of Apache and the other running Apache with the below configuration (Load Balancer)

Lets get started

The following commands will install all the required software using apt and aptitude.

Run the following to install all the required Apache modules.

Now we need up edit the following Apache configuration file.

This is what the configuration file should look like, please change the IPs and ports of the webservers your proxying.

Restart Apache and your ready to rock and roll!

 

Docker crash course with Ubuntu – for beginners | docker ubunter 16.04 beginners guide howto

A quick crash course on how to get a docker container up and going on a Ubuntu 16.04 server.

01. This first section will essentially install the docker repos onto the Ubuntu box.

02. This will actually install docker.

03. Check that its running.

04. This will test that docker is properly installed and able to execute docker containers.

05. This will download the ubuntu image from the repo.

06. The will need to list the images which are available to us, taking note of the image ID

07. Then we cut-n-paste the ID into the command below.

08. You will now notice your running a full blown Ubuntu OS which is actually in a container, this is tested by checking what procs are running by typing “ps waux”, there should only be a few procs running.

09. Exit out of the container, this will end the container

10. The following command will show you the available containers

11.  Determine which container you worked on, cut and paste the ID into the command below to start it in the background.

12. The container is now running, can may connect to it on the terminal by typing the following command and pasting the ID at the end.

 

All you need to know to get you going!

 

 

 

 

 

 

 

 

 

 

 

 

How to create a USB Ubuntu live image on OSX | making a bootable Ubuntu USB drive using OSX

How to create a USB bootable Ubuntu ISO on a OSX machine
 
Download your ISO image from the ubuntu site and save it in your downloads directory.
 
First we convert the image with the command below.

Then we must first determine the device path of the USB disk
 
Take note of the path and ever it in the command below

Then we use DD to image the USB disk, command below. Ensure you change the device path.


 

GeoIP – Converting IPs to Physical Locations. | locate based on IP geoip maxmind tracing

I manage a large scale SSH server. This server is open to the world via SSH port 22.

Considering I only have Australian clients I would expect only Australian IP’s connected to it, so how would I know?

You can google the IP but that is a manual time consuming process. So I have automated it!

There is a open source tool called GeoIP. Its available by default on Debian and Redhat based distros. Install it with the following method.

Debian

 

Redhat

 

Usage

 

As you can see above, it resolves IP to country. This was perfect for the work I was doing but if you want specific city and GPS coordinates you need to download a higher detailed database from Maxmind.

So to update the database perform the following.

 

Now that you have the new database, you need to advise Geoip of the new database file.

Usage

As you can see, more detail than before.

IPTABLES blocking traffic outbound to a specific IP | iptables block ip hosts outbound

I was in a situation today where an application was talking to hosts it shouldn’t have. A quick way to stop this from happening was with iptables. Make sure you ping the host first before the rule and after to ensure it has taken affect.

The rule to block a specific IP is

To check the rule is in,

To remove the rule, the ‘1’ means the first line in the table, in this case this was the only outbound rule.

 

 

Nagios master / slave configuration files

I run a large Nagios setup, currently running one master server and around 10 slaves in a distributed monitoring setup.

The problem is when you setup your check on the slave for active monitoring you need to do the some on the master for passive monitoring, it takes ages.

So I wrote a single live stripper which changes the field to a passive format which change then be cut-n-pasted into the master. The one thing I put in as an extra is the parent relationships.