Showing posts with label centos. Show all posts
Showing posts with label centos. Show all posts

Wednesday, November 28, 2018

Codename: Ubuntu Rusty

Just call me Rusty -  with regards to Ubuntu anyway.  Man!  I can't remember how to set the IP in the old Ubuntu.  Now, 18.04 has changed yet again.  I'm a RHELish* user when I'm not using Slackware for my own personal desktop.  Don't get me wrong - Ubuntu is a fine desktop.  I used it from '04 to '09 parting ways when the Unity desktop came into play.  I did enjoy Xubuntu and then later Lubuntu but found my 5+ years of 'buntu had weakened my RHELish skills much in the way the last (nearly 10) years has mu 'buntu skills SO I switched back.  Actually, I always load Ubuntu for other people (non-Unix folks) who want to salvage an old laptop or old desktop that ran Windows 7 or something.  I've had some success stories there.  But I digress.  

This is just a place to save these commands so I don't have to hunt them up YET AGAIN.  


Changing an Ubuntu 18.04 LTS server's name

This is pretty easy.  

$ sudo hostnamectl set-hostname linuxconfig

This note is not (currently) for me: Check for the existence of /etc/cloud/cloud.cfg and change preserve_hostname: false to preserve_hostname: true

Changing the static IP of an Ubuntu 18.04 LTS server

This is no longer in the /etc/network/interfaces.  Instead look in /etc/netplan (sudo -s first or it will not auto-complete leading me to believe it didn't exist).  The file is 50-cloud-init.yaml.

That is all I have to say since this note is mainly for me.  Hopefully I'll know what else to do when I need this information again. 



---
*RHELish (pronounced "relish") is the term I coined for Red Hat -like based systems such as (of course) Red Hat Enterprise Linux, CentOS, Scientific Linux and Oracle Linux. 

Thursday, December 17, 2015

The Joy of Modern Computing

  1. Solaris Zones & Containers
  2. Oracle VirtualBox
  3. Xen 
  4. VMware
  5. KVM 
  6. Heroku
  7. Hyper-V 
  8. Citrix XenServer 
  9. Oracle VM Manager (OVM) 
  10. Amazon Web Services (AWS) 
  11. Microsoft Azure Cloud Services
These are a few of my favorite virtualization platforms that I've been using since 2006. I love virtualization!  I work mainly out of a virtualized desktop running ssh into virtualized systems.   Lately, I've been working a lot with Microsoft Azure Cloud Services.

It's funny how this is perceived by some people unfamiliar with it.  Today in a meeting, some people thought that moving systems to the "cloud" would cause a loss of IT positions.  I never thought so.  My least favorite part of the job is the part that takes .001% of your time - mounting the physical hardware in a rack and wiring it.  If that goes away, I will not miss it at all.

I love that I can clone, copy and snapshot VMs.  Using physical hardware now seems to me like working without a net. I would not want to go back.  Even better is having the services in the cloud.  No messy wires, no failing hard drives (I have an open ticket for one now).  Even backups are a breeze.

I have a 32 bit Windows 7 desktop VM that I migrated from a PC running CentOS 5 under Xen to a PC running Red Hat Linux 6 running KVM (that was a tough migration - but it worked!) and then I moved it again to a PC running Oracle Linux 7 under KVM (much easier move).  So, my Windows 7 has been with me through 3 PCs.  All of my stuff is there - all my files and software.  Virtualized PC's are really cool!

I also run additional VMs on my PC.  If a new distro comes out and I want to see what it looks like - I just load it from the ISO!  I don't have to have spare hardware.  It's great!  I have been running my desktop like this about 6 years and can't imagine doing it any other way.  (I started virtualizing my servers almost 10 years ago).

Lately, as I have built about a dozen various VMs in Azure.  I've been testing the cloning of VMs & filesystems and securing endpoints. (It took some time to figure out how to reserve static addresses.)

Now, I love Linux and my technology passion is learning pretty much anything OpenSource - BUT, even though I could do quite a bit with the cross platform kit for Azure under Linux - most of the work was easier in Powershell.  No problem - because I really like Powershell - BUT, my 32 bit Windows 7 system didn't seem to want to finish the install and hung twice.  I figured it was because it was 32 bit.  Again, thanks to virtualization - No problem - I just loaded up 64 bit Windows 10.  (I tried to like Windows 8 and 8.1 but eventually gave up. Skipping that one.)  Windows 10 is a nice mix and seems more intuitive then its predecessor and ran the Azure Powershell environment which made cloning much easier.

The cool thing is, I can still run my old Windows 7 for as long as it gets patches (and then I could just remove the network and keep it for nostalgia) BUT I also get to run Windows 10 and use the Azure Powershell features I need.

Anyway, Linux and KVM gives you a lot of possibilities and it's free (your VMs, may not be). 


Thursday, April 10, 2014

SELinux and CentOS 6 with Special Guest: BackupPC

I was trying to tighten things back up on the BackupPC after getting it running.  SELinux is a pain - but I like to have it running on all systems.  I had two BackupPC installs - one on a CentOS 5 server and one a CentOS 6 server.  You would think the latter would be the easiest - but not so!  

For the most part, I just used this blog article BackupPC on CentOS 5 (selinux fix) but I had a few issues between the two servers so I'm documenting that.

CentOS5

CentOS 5 didn't have the semodule command.  So...

# yum install selinux*

And then create a source policy module...

# grep httpd /var/log/audit/audit.log | audit2allow -m backuppc > backuppc.te

And then build the policy module...

# grep httpd /var/log/audit/audit.log | audit2allow -M backuppc

And finally, install the module...

# semodule -i backuppc.pp

After that, I turned on SELinux=enforcing at the command line and edited the /etc/selinux/conf to default to enforcing.

# setenforce 1
# sestatus 
SELinux status:                 enabled
SELinuxfs mount:                /selinux
Current mode:                   enforcing
Mode from config file:          enforcing
Policy version:                 21
Policy from config file:        targeted



CentOS 6

CentOS 6 also needed to have all of the SELinux tools installed (I think).  However, when I tried the exact same things as above, the semodule command gave an error:

     Tried to link in a non-MLS module with an MLS base

After some searching I found that I needed to run system-config-selinux which is a GUI (no system-config-selinux-tui I could find).

# system-config-selinux


Here, I was expecting to see MLS instead of targeted.  Not sure why, but it was already toggled to the correct setting.  (So why does it think it's MLS?)  So, I checked the box to "Relabel on next reboot" and rebooted.  I was a little afraid of this because it said it could take a long time if you had a large filesystem and this had already used about 23% of 3TB.  It was probably done well under 20 minutes (by the time I tried it again) and it worked!

 


Thursday, November 12, 2009

New Linux

I've gotten spoiled by Ubuntu.  I think it's a great desktop OS (if you're into Linux).  I was recently using Fedora 11 as a Desktop at home (off of a bootable USBish device).  It's okay - I prefer it for server apps that are designed for Fedora.  I also loaded CentOS in a zone on  Solaris.  It's okay too.  Still - Ubuntu makes a lot of things too easy to pass up.  I've got Karmic Koala at home.  It's fine.  Can't see any difference between that and the 9.04 (whatever fuzzy animal that was named after - Feisty Fawn?)

Anyway, this guy was beating it up. His reasons seem silly. He's probably just trying to get some hits on his web site.

But I ran across this: Hadn't seen Lubuntu before (but noticed Knoppix's been using that desktop for a while). (I'm on Linux-Mag's mailing list since I *had* to see the answer to a forum there the other day).

So anyway, lot's of fanfare about Karmic this week. This guy mentions ArchLinux as an easier alternative to Gentoo. I wondered if anyone had tried it. Then I remembered we had this mailing
list... but it bounced. Maybe we don't have a mailing list anymore...