Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Wed Apr 15, 2015 4:00 pm 
Offline
Newbie

Joined: Wed Apr 15, 2015 3:28 pm
Posts: 3
I've get new instance of CentOS 6.5, prepare needed software and by the end, as usual, tried to enable SELinux...

Ok, as I can see, images from Linode don't include SELinux support in kernel. May be in order to reduce clients troubles, I don't know...

As I think I have to build new kernel with SELinux support. Would you advise me how to do it? I've never do it :(


Top
   
PostPosted: Wed Apr 15, 2015 7:58 pm 
Offline
Senior Member
User avatar

Joined: Sun Jan 18, 2009 2:41 pm
Posts: 830
You should not need to compile a custom kernel - the CentOS distribution-provided kernel includes SELinux. Review the Linode guide for instructions on how to use the distribution kernel.


Top
   
PostPosted: Thu Apr 16, 2015 8:21 am 
Offline
Newbie

Joined: Wed Apr 15, 2015 3:28 pm
Posts: 3
Thank you very much!


Top
   
PostPosted: Thu Apr 16, 2015 4:31 pm 
Offline
Junior Member

Joined: Thu Apr 16, 2015 9:44 am
Posts: 21
Can this also be applied to Centos 7?
I tried once following the Centos 6.5 instructions but I don't think I did it right. Because files end with .debug when I look at the boot directory and I am not sure if I am doing it right.

Thank you.


Top
   
PostPosted: Thu Apr 16, 2015 4:41 pm 
Offline
Linode Staff
User avatar

Joined: Thu Sep 06, 2012 2:22 pm
Posts: 26
Location: New Jersey - Where the weak are killed and eaten.
While Vance is right and you don't have to use a custom compiled kernel, it just so happens that we recently updated our guides on the subject, including one for CentOS 7:

https://www.linode.com/docs/tools-refer ... b-centos-7

EDIT: btw SELINUX is the example option in the guide, so it should have everything you need.


Last edited by alexfornuto on Fri Apr 17, 2015 7:38 am, edited 1 time in total.

Top
   
PostPosted: Thu Apr 16, 2015 5:10 pm 
Offline
Junior Member

Joined: Thu Apr 16, 2015 9:44 am
Posts: 21
thank you! I will follow the guide right away.


Top
   
PostPosted: Thu Apr 16, 2015 5:53 pm 
Offline
Junior Member

Joined: Thu Apr 16, 2015 9:44 am
Posts: 21
Wow! It takes forever to install this. I mostly prepare a Centos server with all necessary features I need (like SeLinux settings) in max 45 minutes so I like feeling comfortable to be able to make a server ready in an hour or so. It looks this might be a real pain to work with Linode distributions. I wonder why not simply have a minimal default Centos distribution - I am not a total Linux person but I just wonder. I am about to decide switching my Cloud needs to Linode, so this is an important point.

It is still trying to complete "make -j3 bzImage" command. wow.


Top
   
PostPosted: Thu Apr 16, 2015 6:28 pm 
Offline
Junior Member

Joined: Thu Apr 16, 2015 9:44 am
Posts: 21
I followed each line of the guide very carefully and I couldn't make it work for some reason.

The only warning I had was "Cannot find LILO." during "make install". I made a search about it and people says it doesn't matter.
I renamed vmlinuz as vmlinuz-3.19.3-custom as instructed but after completing everything, and rebooting the server, uname gives me back following:
Linux li152-129.members.linode.com 3.19.3 #2 SMP Thu Apr 16 22:18:54 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

there is no cutstom suffix. :(


Top
   
PostPosted: Fri Apr 17, 2015 7:06 am 
Offline
Junior Member

Joined: Thu Apr 16, 2015 9:44 am
Posts: 21
There must be something not included in the guide - for someone who is not 100% linux guy but simply needs SeLinux in the server as stated in the guide.

Perhaps tried 6-7 times now and I can't make it work. Feeling like an idiot.

"uname -a" changes from 3.19.1 to 3.19.3 but it doesn't use my 3.19.3-custom.

Any other suggestion would be great. Thanks.


Top
   
PostPosted: Fri Apr 17, 2015 7:21 am 
Offline
Linode Staff
User avatar

Joined: Thu Sep 06, 2012 2:22 pm
Posts: 26
Location: New Jersey - Where the weak are killed and eaten.
smozgur wrote:
"uname -a" changes from 3.19.1 to 3.19.3 but it doesn't use my 3.19.3-custom.


If you get this change that means that you're running the new kernel you compiled. I'm not sure why it's not exactly the output you expect it to be without seeing your system first hand, but if you can log in and uname shows the right kernel version number, then it sounds like it worked. Have you tried setting up SELinux afterwards?


Top
   
PostPosted: Fri Apr 17, 2015 7:45 am 
Offline
Junior Member

Joined: Thu Apr 16, 2015 9:44 am
Posts: 21
Yes, I changed /etc/selinux/config to enable selinux as permissive. Reboot and it is still disabled. :(


Top
   
PostPosted: Fri Apr 17, 2015 7:53 am 
Offline
Junior Member

Joined: Thu Apr 16, 2015 9:44 am
Posts: 21
Thank you for the reply by the way :) I am really frustrated so I forgot to say before :)


Top
   
PostPosted: Fri Apr 17, 2015 10:24 am 
Offline
Junior Member

Joined: Thu Apr 16, 2015 9:44 am
Posts: 21
I really liked Linode but I gave up. This took me 2 days since the initial sign in and a simple cloud server rebuild that would take about 45 minutes just turned on to a nightmare for me because of SELinux and it is not being included in the distro.

Thanks for the replies.


Top
   
PostPosted: Mon Apr 20, 2015 5:15 am 
Offline
Junior Member

Joined: Thu Apr 16, 2015 9:44 am
Posts: 21
I couldn't have managed getting SELinux work by using any of provided guides. It should be something I don't know and missing.

I was about to move on but I then discovered the most impressive feature of Linode cloud service: upload my own virtual machine! So I built a minimal (default) Centos server in my local computer, uploaded it to my Linode, changed Kernel as necessary (it is still required as I learned by experiencing), then restarted my machine, wow! It works!!!

Just in case, I made a backup as Golden master of my disk, so I wouldn't need to upload again (then I learned, I already have a Clone feature - what a beautiful place is this!).

Now I am happy! I am guessing that Centos installation in Linode doesn't include some SELinux related applications that Minimum Centos includes. So when I built and uploaded my Centos, then after changing Kernel, everything worked!

It is time to create another Linode now! :)

Thanks for the help!


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group