• Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
  • Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

Diving into CentOS 7

Scheduled Pinned Locked Moved
General
3
22
8.9k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S
    sudburr
    last edited by sudburr Sep 18, 2015, 1:25 PM Sep 18, 2015, 6:48 PM

    I’ve been quiet on the forums for a little while … busy time of year and all that with back to school.

    I have a moment now where I’m re-deploying a few FOG servers and since Microsoft officially only publishes Linux Integration Services for Hyper-V for RHEL and CentOS, I figured I’d try my hand now at a CentOS 7 installation.

    I’ve tamed Ubuntu and Debian for our FOG deployments. Wish me luck with CentOS!

    [ Standing in between extinction in the cold and explosive radiating growth ]

    1 Reply Last reply Reply Quote 0
    • W
      Wayne Workman
      last edited by Sep 18, 2015, 7:18 PM

      You might find this helpful with your CentOS 7 journey, it’s all the same commands.

      Fedora is also just beta for RHEL. Did you know that RH financially supports Fedora for their development environment/test bed ?

      https://wiki.fogproject.org/wiki/index.php/Fedora_21_Server

      Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
      Daily Clean Installation Results:
      https://fogtesting.fogproject.us/
      FOG Reporting:
      https://fog-external-reporting-results.fogproject.us/

      1 Reply Last reply Reply Quote 0
      • S
        sudburr
        last edited by Sep 18, 2015, 7:22 PM

        mmm, thx. I will keep an eye tilted to that document.

        Interesting installer for CentOS.

        [ Standing in between extinction in the cold and explosive radiating growth ]

        1 Reply Last reply Reply Quote 0
        • S
          sudburr
          last edited by Sep 18, 2015, 7:44 PM

          Am I correct?

          By the looks of it, the command:

          yum update -y
          

          is the CentOS equivalent of what’s used by Ubuntu and Debian:

          apt-get clean &&
          apt-get update &&
          apt-get upgrade -y &&
          apt-get dist-upgrade -y &&
          apt-get autoremove -y &&
          apt-get autoclean -y &&
          

          [ Standing in between extinction in the cold and explosive radiating growth ]

          W 1 Reply Last reply Sep 18, 2015, 7:48 PM Reply Quote 1
          • W
            Wayne Workman @sudburr
            last edited by Sep 18, 2015, 7:48 PM

            @sudburr said:

            Am I correct?

            By the looks of it, the command:

            yum update -y
            

            is the CentOS equivalent of what’s used by Ubuntu and Debian:

            apt-get clean &&
            apt-get update &&
            apt-get upgrade -y &&
            apt-get dist-upgrade -y &&
            apt-get autoremove -y &&
            apt-get autoclean -y &&
            

            Not entirely. yum update -y simply updates all installed software that yum manages, including OS files.

            yum clean all would clear out cache files and basically free up space, but the next update will be a little slower because it has to remake all that.

            Here’s some info on it.
            http://yum.baseurl.org/wiki/YumCommands

            Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
            Daily Clean Installation Results:
            https://fogtesting.fogproject.us/
            FOG Reporting:
            https://fog-external-reporting-results.fogproject.us/

            1 Reply Last reply Reply Quote 0
            • S
              sudburr
              last edited by Sep 18, 2015, 8:36 PM

              Got it. Thx.

              [ Standing in between extinction in the cold and explosive radiating growth ]

              1 Reply Last reply Reply Quote 0
              • S
                sudburr
                last edited by sudburr Sep 23, 2015, 8:46 AM Sep 18, 2015, 9:26 PM

                Interesting. My CentOS installation is less than half the size of Debian.

                2.3GiB vs 5.3GiB
                P.S. I got it even further down to 1.66GB, but then aha. I switched from XFS file system to ext4 and it’s now 5.5GB.

                [ Standing in between extinction in the cold and explosive radiating growth ]

                W 1 Reply Last reply Sep 18, 2015, 9:34 PM Reply Quote 0
                • W
                  Wayne Workman @sudburr
                  last edited by Sep 18, 2015, 9:34 PM

                  @sudburr said:

                  Interesting. My CentOS installation is less than half the size of Debian.

                  2.3GiB vs 5.3GiB

                  … 😕 I’ve been advocating for Fedora / CentOS for a long time… lol

                  Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
                  Daily Clean Installation Results:
                  https://fogtesting.fogproject.us/
                  FOG Reporting:
                  https://fog-external-reporting-results.fogproject.us/

                  1 Reply Last reply Reply Quote 0
                  • S
                    sudburr
                    last edited by sudburr Sep 19, 2015, 8:46 PM Sep 20, 2015, 2:35 AM

                    I’ve run into my first problem with CentOS that I haven’t found a direct solution for yet. It’s a difference in syntax for ‘git’ compared to Ubuntu/Debian.

                    Git in Ubuntu/Debian allows me to direct clone and pull to a specific path (/opt/trunkgit) using:

                    git -C /opt/trunkgit clone https://github.com/FOGProject/fogproject.git /opt/trunkgit
                    git -C /opt/trunkgit pull
                    

                    Git in CentOS doesn’t have a -C . For now I’m making do with

                    cd /opt/trunkgit
                    git clone https://github.com/FOGProject/fogproject.git
                    

                    … but, git then creates the directory /opt/trunkgit/fogproject and downloads to that. For updating I must then:

                    cd /opt/trunkgit/fogproject
                    git pull
                    

                    I like my scripts to have as few differences as possible between OSes so I’m looking for a way for git to perform the same in all three.

                    Pausing to reflect on what I just wrote … I realize I needed to think in the other direction. This works:

                    if [ ! -d /opt/trunkgit ]; then
                    mkdir /opt/trunkgit
                    fi
                    if [ ! -d /opt/trunkgit/fogproject ]; then
                    cd /opt/trunkgit
                    git clone https://github.com/FOGProject/fogproject.git
                    else
                    cd /opt/trunkgit/fogproject
                    git pull
                    fi
                    if [ ! -d /opt/trunksvn ]; then
                    mkdir /opt/trunksvn
                    fi
                    if [ ! -d /opt/trunksvn/fogproject ]; then
                    mkdir /opt/trunksvn/fogproject
                    fi
                    svn co https://svn.code.sf.net/p/freeghost/code/trunk /opt/trunksvn/fogproject
                    

                    My brain is cooked… I spent too much time in the sun at a Canine Agility competition today.

                    [ Standing in between extinction in the cold and explosive radiating growth ]

                    1 Reply Last reply Reply Quote 0
                    • S
                      sudburr
                      last edited by Sep 20, 2015, 2:59 AM

                      This leads me to my next task.

                      How to detect the OS variant. Namely Ubuntu, Debian or CentOS An if then idea.

                      [ Standing in between extinction in the cold and explosive radiating growth ]

                      1 Reply Last reply Reply Quote 0
                      • S
                        sudburr
                        last edited by sudburr Sep 19, 2015, 9:31 PM Sep 20, 2015, 3:25 AM

                        Looks like this might do it:

                        if [ -f /etc/debian_version ]; then
                        fi
                        
                        if [ -f /etc/centos-release ]; then
                        fi
                        

                        [ Standing in between extinction in the cold and explosive radiating growth ]

                        1 Reply Last reply Reply Quote 0
                        • S
                          sudburr
                          last edited by Sep 20, 2015, 3:48 AM

                          Okay, next problem. I can’t get SELINUX to not start.

                          sed -i "s/=enforcing/=disabled/g" /etc/sysconfig/selinux
                          setenforce 0
                          

                          … is not doing it. After reboot, sestatus shows SELINUX is still enabled.

                          [ Standing in between extinction in the cold and explosive radiating growth ]

                          1 Reply Last reply Reply Quote 0
                          • S
                            sudburr
                            last edited by sudburr Sep 19, 2015, 11:07 PM Sep 20, 2015, 3:53 AM

                            I see my mistake now. Though there is a /etc/sysconfig/selinux , I wanted to edit /etc/selinux/config .

                            To cover my bases I’m editing both. I suspect that the first is generated by the second:

                            setenforce 0
                            sed -i "s/=enforcing/=disabled/g" /etc/sysconfig/selinux
                            sed -i "s/=enforcing/=disabled/g" /etc/selinux/config
                            

                            … and checking … yep, that did the trick.

                            Now for an actual Fog install.

                            [ Standing in between extinction in the cold and explosive radiating growth ]

                            W 1 Reply Last reply Sep 20, 2015, 1:11 PM Reply Quote 1
                            • W
                              Wayne Workman @sudburr
                              last edited by Sep 20, 2015, 1:11 PM

                              @sudburr lol you’re so hardcore.

                              What’s wrong with using Vi and just opening the file and changing the “enforcing” to “disabled” ?? lol

                              and for the record, /etc/selinux/config is the only one you need to edit. 🙂

                              There is also a “permissive” mode for SELINUX. something to think about.

                              Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
                              Daily Clean Installation Results:
                              https://fogtesting.fogproject.us/
                              FOG Reporting:
                              https://fog-external-reporting-results.fogproject.us/

                              1 Reply Last reply Reply Quote 0
                              • S
                                sudburr
                                last edited by Sep 20, 2015, 3:32 PM

                                Manually using VI is slow.

                                It’s far easier to simply copy and paste the command code in a single click.

                                Considering that disabling SELINUX is from your horses mouth, what’s the point of permissive?

                                [ Standing in between extinction in the cold and explosive radiating growth ]

                                T W 2 Replies Last reply Sep 20, 2015, 3:52 PM Reply Quote 0
                                • T
                                  Tom Elliott
                                  last edited by Sep 20, 2015, 3:51 PM

                                  VI can do copy and paste, for what it’s worth.

                                  Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                                  Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                                  Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                                  1 Reply Last reply Reply Quote 0
                                  • T
                                    Tom Elliott @sudburr
                                    last edited by Sep 20, 2015, 3:52 PM

                                    @sudburr And you can use sed statements in vi as well to change only the lines you need.

                                    For example, instead of sed -i, in VI/VIM you would type:

                                    :%s/=enforcing/=disabled/g

                                    Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                                    Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                                    Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                                    1 Reply Last reply Reply Quote 0
                                    • T
                                      Tom Elliott
                                      last edited by Sep 20, 2015, 3:58 PM

                                      And to help a bit more in the understanding of SELinux and it’s modes: https://wiki.gentoo.org/wiki/SELinux/Tutorials/Permissive_versus_enforcing

                                      Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                                      Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                                      Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                                      1 Reply Last reply Reply Quote 0
                                      • W
                                        Wayne Workman @sudburr
                                        last edited by Wayne Workman Sep 20, 2015, 11:45 AM Sep 20, 2015, 5:45 PM

                                        @sudburr said:

                                        Considering that disabling SELINUX is from your horses mouth, what’s the point of permissive?

                                        For myself and many other people who have came to the forums in distress, FOG doesn’t fully work with SELinux in “enforcing” mode. However, it’s one of my goals to get fog to work with it turned on fully.

                                        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
                                        Daily Clean Installation Results:
                                        https://fogtesting.fogproject.us/
                                        FOG Reporting:
                                        https://fog-external-reporting-results.fogproject.us/

                                        1 Reply Last reply Reply Quote 0
                                        • S
                                          sudburr
                                          last edited by Sep 23, 2015, 3:32 AM

                                          Well I have FOG running happily on CentOS 7.1 now.

                                          As much as enjoy Debian 8.2 over Ubuntu 14/15 now, I dare say I may prefer CentOS 7.1 now. 😎

                                          [ Standing in between extinction in the cold and explosive radiating growth ]

                                          1 Reply Last reply Reply Quote 1
                                          • 1
                                          • 2
                                          • 1 / 2
                                          1 / 2
                                          • First post
                                            8/22
                                            Last post

                                          160

                                          Online

                                          12.0k

                                          Users

                                          17.3k

                                          Topics

                                          155.2k

                                          Posts
                                          Copyright © 2012-2024 FOG Project