Search This Blog

Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Thursday, 2 April 2015

Docker, CentOS & a Proxy all walk into a pub

CentOS 7.1 behind SQUID Proxy.  Docker install using YUM.


docker info

FATA[0000] Get http:///var/run/docker.sock/v1.18/images/search?term=apache: dial unix /var/run/docker.sock: no such file or directory. Are you trying to connect to a TLS-enabled daemon without TLS?

Followed the official instructions @ https://docs.docker.com/articles/systemd/ which seemed to fix docker info but subsequent

docker search <name>

would fail with :

FATA[0127] Error response from daemon: Get https://index.docker.io/v1/search?q=name: dial tcp 162.242.195.84:443: connection timed out

Tried setting the environment variable manually and also running the command inline

https_proxy=http://<server>:<port> docker search <name>

Stumbled across a blog suggesting adding environment variables to /etc/sysconfig/docker

 HTTP_PROXY=http://<IP>:<Port>   
 http_proxy=$HTTP_PROXY  
 HTTPS_PROXY=$HTTP_PROXY  
 https_proxy=$HTTP_PROXY   
 export HTTP_PROXY HTTPS_PROXY http_proxy https_proxy   

Problem fixed

Friday, 7 November 2014

CentOS 7 Missing ifconfig command

CentOS 7 no longer ships with the command/s.  You can install via yum
sudo yum install net-tools

Thursday, 5 June 2014

Basic Syslog-NG Install & Config

Ubuntu OS, apt syslog-ng install & added the following lines to get a basic UDP server running.


options { 
<Keep all the default Options>
create_dirs(yes);
dir_perm(0755);
};
source s_net { 
udp(ip(0.0.0.0) port(514));
};

destination d_any_remote {
file("/var/log/syslog-ng/$HOST/$FACILITY.log");
};

log {
source(s_net); destination(d_any_remote);
};

Thursday, 23 January 2014

64-bit Linux, 32-bit Chrome & Cisco AnyConnect

Obvious when you think about it but 32Bit Chrome will fail to connect to make the initial the SSL/HTTPs connection and so download/prompt for the client.

Switch to Firefox (Other 64Bit browsers are available) and you'll be good.

Monday, 10 December 2012

Cleaning up BackTrack/Ubuntu NIC's

Copying BackTrack virtual box images around and the network wouldn't start.  I'm Recording the commands here as its not something I do everyday and I will have the same issue again .. Same process would work for Ubuntu.

root@bt:~# ifconfig eth0 up
eth0: ERROR while getting interface flags: No such device

root@bt:~# lspci
Will list all the hardware devices.  Confirm the Ethernet controller is loaded.

root@bt:~# ifconfig -a
Will list all the interfaces known to the system regardless if they are 'UP'.  In my case the card was ETH4.

root@bt:~# ifconfig eth4 up
Worked.

I wanted to clean this up as ETH0-3 are all a result of switching machines and MAC address.

nano /etc/udev/rules.d/70-persistent-net.rules

remove the redundant config and switch your NIC to ETH0

Monday, 11 June 2012

Change the Grub Boot Order Ubuntu


GRUB can be configured using the /etc/default/grub file. Before you make any changes to it, it may be a good idea to back it up by creating a copy:sudo cp /etc/default/grub /etc/default/grub.bak
You can restore the copying the backup over the original:sudo cp /etc/default/grub.bak /etc/default/grub
Open the file using the text editor with root privileges:gksu gedit /etc/default/grub
The line GRUB_DEFAULT=0 means that GRUB will select the first menu item to boot. Change this to GRUB_DEFAULT=saved . This change will make it easier to change the default item later.
Save and close the file. Run this command to apply your changes to GRUB’s configuration:sudo update-grub
The configuration change we made allows the grub-set-default and grub-reboot commands to be used at any time. These allow you to change the default boot item permanently or only for the next boot, respectively.
Run grub-set-default or grub-reboot (with sudo) with the number of the menu item to boot (the first item is 0). This command will change the default to the second item:sudo grub-set-default 1
In the screenshot above, Windows Vista is menu item 5. If you want to select an item from a submenu like Previous Linux Versions, you can specify the position in the main menu, followed by a greater-than sign (>), followed by the position in the submenu. You can also name an entry instead of giving its position. There’s a Forum post about how this works. The Ubuntu Wiki also has more details on configuring GRUB.

Thursday, 5 April 2012

apt-get Proxy Issue

Testing out Security Onion and apt-get update was failing.  The server is behind a proxy.

Added proxy settings to all the regular places :

/etc/environment    
export http_proxy=http://proxy.domain:port
/etc/apt/apt.conf    
aquire::http::proxy "http://proxy.domain:port/"; 
/etc/apt/apt.conf.d/80proxy    
aquire::http::proxy "http://proxy.domain:port/";

None of which worked.  In the end the command :

http_proxy='http://proxy.domain:port/' apt-get update
and because I always forget how to do this :

#!/bin/bash
http_proxy='http://proxy.eu.rtdom.net:8080/' $1 $2 $3

Wednesday, 7 March 2012

Friday, 2 March 2012

Ubuntu/Backtrack eth0/wlan0 Missing

My good deed for the week was to offer my laptop as a replacement for one with a screwed VGA port.

'Yeah just switch the disks' - Linux is clever, it will work it out. #FAIL

Dual boot with Ubuntu 11.10 & BackTrack (Ubuntu).  Both failed to connect to the network and had created eth1 & wlan1 interfaces.

Google took me to http://www.orzeszek.org/blog/2010/07/25/fix-missing-eth0-when-cloning-ubuntu-vmware-virtual-machines/

Its discussing the same problem, but in a virtual environment.  The conclusion is the same in that the MAC address has changed and Ubuntu stores this as a reference in :

/etc/udev/rules.d/70-persistent-net.rules
Delete the file, reboot, problem fixed.

Monday, 20 February 2012

Linux Clonezilla "Error: no argument specified"

Ubuntu 10.04 LTS cloned from an identical friend using Clonezilla.

When you boot theres a quick flash of an error, in this case SSD disks so too quick to read, and your presented with the GRUB menu.

Selecting the current kernel threw out :

Error: no argument specified
All the grub config files appeared correct.

Fix :

  1. apt-get remove grub-pc
  2. apt-get remove grub-common
  3. rm /boot/grub/grub.cfg
  4. apt-get install grub-common
  5. apt-get install grub-pc
    • Install grub to the disk to contain MBR, in my case /dev/sda / 


Wednesday, 15 February 2012

Puppy Linux Full Install


  1. Download and create the Puppy linux LiveCD/LIveUSB
  2. Boot the PC using #1
  3. Follow the options to configure the screen res and then the locale options
  4. Prepare the disk, if you need.  Menu -> System -> GParted.  Delete/create the partitions as you need and restart the PC.  Don't save settings
  5. Install the files to disk.  Menu -> Setup -> Puppy universal installer. Follow the prompts to select your local disk.
  6. Install Grub. Menu -> System -> Grub legacy boot loader.  Follow the prompts and when asked select your local disk, eg /dev/sda1 and make sure you select destination to MBR.
Puppy Linux installed on 9 year old Sony Vaio.  I thank you.  

Wednesday, 23 November 2011

Empathy new IM notifications / window

Part of my continued insistence on using Linux rather than Windows has meant using Pidgin as my IM client for corporate Sametime and Google chat.


Not being 100% happy with it I switched to Empathy.  Much cleaner interface and generally more happy.


But, new IM conversations appeared on the notifications bar (Gnome3) rather than launching a new window.  Annoying and very easily missed.


Nothing obvious in the preferences.   Clutched at straws by disabling (Preferences | General) 'Display incoming events in the notification area' and bingo. 
 
New tabs/windows open on a new IM - happy (for now)


Saturday, 24 July 2010

Ubuntu 10.04 netbook install on Sony Vaio

I have a really old Vaio,  PCG-TR5MP, I think circa 2004.  I use it really as a travelling backup for my photos and earlier in the year upgraded it to a massive 1Gb RAM and installed Windows 7.  Which worked surprising well and actually better than XP !

Having recently acquired a Mac book which I'll now carry around I thought I'd try one of the netbook versions of Linux on the Sony. Just for giggles.

I've always preferred the Ubuntu distro so went with 10.04 ..

First problem was the Vaio BIOS doesn't support USB boot .. So burnt a CD/DVD.

Boot, install starts, pretty graphics, black screen .... nothing.  Google.  Apparently its an issue with the intel chipset - https://wiki.ubuntu.com/X/Bugs/Lucidi8xxFreezes

To resolve :
1) At the purple screen with a keyboard and stickfigure, press Enter to get to the menu.
2) Hit Enter to select your language, and then press F6 and then Esc.
3) Add "i915.modeset=1" after "quiet splash".
4) Press Enter to boot the LiveCD.
This then installed, but on the first reboot again stuck on the black screen .. so to fix and boot follow :

1) Hold down Shift while booting to enter the GRUB menu.
2) Press 'e' to edit.
3) Add "i915.modeset=1" after "quiet splash".
4) Ctrl+x to boot.

Ubuntu loaded, logged in .... WTF ... the GUI is slow as anything, unusable. 

I then ran :
echo options i915 modeset=1 | sudo tee /etc/modprobe.d/i915-kms.conf
sudo update-initramfs -u
Which I think make the i915 changes permanent ..

and
sudo add-apt-repository ppa:glasen/intel-driver 
sudo apt-get update && sudo apt-get upgrade
Rebooted and the GUI was much better ...

For the hell of it I also did :
sudo add-apt-repository ppa:glasen/855gm-fix
sudo apt-get update && sudo apt-get install dkms 855gm-fix-exp-dkms

I think I did most of this out of order but ultimately I have a functioning install now.

This is why Linux will not win .. sorry Linux people.