Centos 7

You like a certain distro? Tell us why here

Moderators: b1o, jkerr82508

Forum rules
Try to avoid "fanboyism" Spam is strictly forbidden. The general rules apply: viewtopic.php?f=8&t=568
User avatar
viking60
Über-Berserk
Posts: 9279
Joined: 14 Mar 2010, 16:34

Centos 7

Postby viking60 » 02 Feb 2015, 11:48

Image
I decided to download the minimal ISO and install Centos 7. This version will have systemd which is a big change.
So I fired it up and installed it pretty much like described here.

(If you get an error when doing yum update just run dhclient - that will get your network up so you can reach the repos)

Centos has this security thing about not activating network by default so running

Code: Select all

sudo dhclient
will bring the network up - but you get tired of doing that every time.
To make it stick run

Code: Select all

nmtui
in a terminal and select your interface ->Edit and set "Automatically connect"
Image
....
I downloaded and added the epel repo:

Code: Select all

wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm

and installed it like this

Code: Select all

rpm -ivh epel-release-7-5.noarch.rpm

I think that a simple

Code: Select all

sudo yum install epel-release
would have taken care of this too.

So far so good, now I could install Xfce4 which I prefer over Gnome.

Code: Select all

sudo yum groupinstall xfce

That went fine but when I try to start it there is no X server - I think that was different in Centos 6.5 where the X server was pulled (I think).
So I had to install the X server:

Code: Select all

sudo yum groupinstall "X Window System"

After that I could start Xfce4 with

Code: Select all

startxfce4


Then I installed the GUI package manager yumex

Code: Select all

sudo yum install yumex


Now some of the changes are affecting the Centos Howto's. to start the graphical environment on every boot we need to do it systemd style:
To switch to graphical target:

Code: Select all

sudo systemctl isolate graphical.target

This will present Gdm which is the login manager used with xfce4, and pretty much the default login manager of Centos7 since the default DE is Gnome3.
To start the GUI at every boot:

Code: Select all

sudo systemctl set-default graphical.target


This is different from Centos 6.5 and frankly not intuitive at all. A simple

Code: Select all

sudo systemctl start gdm
followed by a

Code: Select all

sudo systemctl enable gdm

..would have made more sense to me :confused

But it works and that is the main thing.

This is probably only necessary on the minimal iso; if you take the "normal" iso's this will probably work out of the box...and you will be stuck with Gnome3.

To install the flash plugin in firefox we need to add some repos
the nux repo:

Code: Select all

sudo yum -y install http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm

You need to have the epel repo because some of the nux programs depend on apps there.

The adobe repo:

Code: Select all

sudo yum -y install http://linuxdownload.adobe.com/linux/x86_64/adobe-release-x86_64-1.0-1.noarch.rpm


After that I could install the flash plugin:

Code: Select all

sudo yum install flash-plugin

...
and it does not work :wall:
Then I installed the java plugin:

Code: Select all

sudo yum install icedtea-web

...and it does not work...
Then I noticed in yumex that I only had the i686 version of firefox installed, so I installed x86_64 and everything worked :whistle:
Image
So after an install with the minimal iso I have arrived at a fully functional Xfce4 desktop:
Image
Manjaro 64bit on the main box -Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz and nVidia Corporation GT200b [GeForce GTX 275] (rev a1. + Centos on the server - Arch on the laptop.
"There are no stupid questions - Only stupid answers!"

jkerr82508
Guru-Berserk
Posts: 209
Joined: 16 Oct 2010, 21:45
Location: Fife, Scotland

Re: Centos 7

Postby jkerr82508 » 02 Feb 2015, 15:18

Your post has prompted me to fire up my centos 7 installation. I hadn't booted it very often since my original post:
viewtopic.php?f=14&t=3377#p18882

Yumex as you say is now working. I realised that I had not installed flash-player (I don't really need it since I have google chrome installed) and so I added the adobe repo and used yumex to install the flash-plugin.

When I installed Centos 7 I used the DVD and chose KDE as the desktop. I haven't done a lot of testing but everything that I need seems to be working.

I have this only as a backup in case Mageia ever implodes. :)

Jim

User avatar
viking60
Über-Berserk
Posts: 9279
Joined: 14 Mar 2010, 16:34

Re: Centos 7

Postby viking60 » 02 Feb 2015, 18:20

Yes the new noticable thing is systemd. I am pretty used to it now, so I do not find it that hard to use.

As with version 6.5 installing a LAMP server went just, fine including phpmyadmin.
The repos seem to be in place and stuff like yumex is there so Centos7 is usable as a desktop now.

This is a solid workhorse if Mageia should implode. Mageia is holding good quality these days though. I am helping some computer greenhorns with Mageia and they do not complain that much - because it works.

Centos 7 uses the XFS filesystem - not the common EXT4. This is good for huge computers and makes Centos "container ready" for docker and its likes.

According to marketing; future upgrades will be easier too - which is good news.

In terms of Network; Centos 7 is more stable here. In Centos 6.5 I frequently needed to start the network manually.

Now I have to figure out why the salt-minion will not report to the master - I heavily suspect SELinux...

Code: Select all

getenforce

clearly shows that my system is "Enforcing" the SElinux policies "out of the box" ...
Edit
It turns out that SELinux is innocent - I kept the old salt-key and the same name but naturally this new Centos install generated a new key that the master did not accept.
Starting the salt-minion in debug mode revealed this:

Code: Select all

sudo salt-minion -l debug

So I had to delete the centos key on the master

Code: Select all

sudo salt-key centos_server -d

Restarting the salt-minion will then send a new key to the master - for acceptance.... :pray:
... and that is exactly what happened - I love it when a plan comes together :-D

Code: Select all

~/ sudo salt -v 'centos_server' test.ping
Executing job with jid 20150202222409643681
-------------------------------------------

centos_server:
    True
:jackpot
So now Centos 7 in Virtualbox is in my server park that I administer from my main Manjaro box.
I will now start to enforce the SELinux rules again:

Code: Select all

setenforce enforcing

This will only work when SELinux is running, which it is here - in permissive mode. You can alter the status of SELinux "on the fly" with setenforce permissive ..and back again with setenforce enforcing it will last until you boot.

The config file is in /etc/sysconfig/selinux here I set it back to "enforcing" to make SELinux start enforcing on each boot.
With the SELinux policies enforced the salt-minion did still work just fine :-D

The repos that yumex will reveal nicely, can easily be added:
Centos-7 Extras contains goodies that do not break upstream compatibility.
Centos plus contains "the latest" but does remove you away from upstream compatibility.
Centos fasttrack is a upstream patch and fix repo that otherwise will come as upgrades later.
Manjaro 64bit on the main box -Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz and nVidia Corporation GT200b [GeForce GTX 275] (rev a1. + Centos on the server - Arch on the laptop.
"There are no stupid questions - Only stupid answers!"

User avatar
viking60
Über-Berserk
Posts: 9279
Joined: 14 Mar 2010, 16:34

Re: Centos 7

Postby viking60 » 02 Feb 2015, 23:28

So to round this up:
Sound works
Movies play
Java works
inxi is there and does show the repos with

Code: Select all

inxi -r

The Apache web server PHP and MariaDB (Mysql) with PHPmyadmin do work.
Remote control with Salt works.

I do not miss much software and Centos 7 has a better "quality feel" than Centos 6.5 in my book. It boots and works without intervention.

That pretty much qualifies for:
:drummer
:drummer
:S "It Works"

And yes I mean as a desktop - as a server it has always worked and continues to do so.

The heavy duty competition is Suse, but also Debian and maybe Ubuntu. I am not sure of Windows in the big server segment but they have the ambitions and the means, but not the OS.
Manjaro 64bit on the main box -Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz and nVidia Corporation GT200b [GeForce GTX 275] (rev a1. + Centos on the server - Arch on the laptop.
"There are no stupid questions - Only stupid answers!"

User avatar
viking60
Über-Berserk
Posts: 9279
Joined: 14 Mar 2010, 16:34

Re: Centos 7

Postby viking60 » 16 Nov 2015, 01:54

I decided to set up a cloud on Centos 7 and picked Seafile
I prefer it due to the good privacy and that I - the admin - cannot see the stuff others store on my server. This is possible in Owncloud because the encryption key is stored on the server - not so with Seafile.

That is how it should be.
I will not go in details but it was OK to set up. You need some Mysql experience. In any case here is my Seafile server
:A
Image

Installation done - now I only have to figure out how it works :think:
Manjaro 64bit on the main box -Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz and nVidia Corporation GT200b [GeForce GTX 275] (rev a1. + Centos on the server - Arch on the laptop.
"There are no stupid questions - Only stupid answers!"

User avatar
viking60
Über-Berserk
Posts: 9279
Joined: 14 Mar 2010, 16:34

Re: Centos 7

Postby viking60 » 08 Jan 2016, 09:58

After several updates the Virtualbox guest additions stopped working on my Centos 7 in Virtualbox under Manjaro.

I had it all working and could drag my Centos 7 to whatever size I wanted and copy and paste etc...(I have installed dkms)

This could be Xorg related (Manjaro) or Centos 7 related and it could be kernel related, so I checked out the "competition" Debian 8 - and there everything still works!
I can resize on the fly and copy and paste between my Manjaro Desktop and Debian 8 - not so with Centos 7 anymore.

So In terms of stability Debian 8 just is better than Centos 7 on this point.

This is somewhat surprising since Redhat is the biggest and most supported Linux solution out there with Billions to back it.
Here are some Links to prove that Centos users have problems with Centos as a VB-client:
https://www.centos.org/forums/viewtopic ... c&start=10
https://forums.virtualbox.org/viewtopic.php?f=3&t=66317

It works just as it should but the interaction with my main desktop is gone and the resolution is not adjustable.

I am sure it is fixable with some manual intervention this time too - but that is just the point:

A stable server distro should be installed and then work "forever" without extra efforts.

...And Windows XP still works just fine in my VirtualBox :-D
Image
Manjaro 64bit on the main box -Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz and nVidia Corporation GT200b [GeForce GTX 275] (rev a1. + Centos on the server - Arch on the laptop.
"There are no stupid questions - Only stupid answers!"

User avatar
viking60
Über-Berserk
Posts: 9279
Joined: 14 Mar 2010, 16:34

Re: Centos 7

Postby viking60 » 08 Jan 2016, 11:03

The fix:
I had to reinstall the Virtualbox guest additions. I installed exactly the same version that was already installed and rebooted...and everything was fine again :jackpot
(I shouldn't have to though - XP and Debian kept working without intervention).

So to recapitulate how this is done:
I removed my Viking.iso from the CD slot (All good berserks always have that there +1 ) and put in VBoxGuestaddditions_4.3.24.iso.
then I checked where the cd was mounted with df and navigated there:

Code: Select all

cd /run/media/root/VBOX....

and ran the script as root:

Code: Select all

su -
./VBoxLinuxAdditions.run

..and life is good again.
Here you see Centos 7 on the left and Windows XP on the right on two of my four desktops.
:A
Image

Shown with Window manager Compiz on the host; Manjaro Linux.
Manjaro 64bit on the main box -Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz and nVidia Corporation GT200b [GeForce GTX 275] (rev a1. + Centos on the server - Arch on the laptop.
"There are no stupid questions - Only stupid answers!"

User avatar
viking60
Über-Berserk
Posts: 9279
Joined: 14 Mar 2010, 16:34

Re: Centos 7

Postby viking60 » 14 Jun 2016, 10:16

Image
I have now installed Centos 7 on real hardware (I need that SELinux experience since that is the one that always fubars stuff - if you are blank on it).
Since I had a running server with Arch that got a bit to "bleeding" with the php7 update I decided to replace it with Centos 7.

I partitioned manually and kept the old /home
That way I could preserve the ssh login keys and bash settings and aliases and the websites.

That went fine. So I had to install LAMP -server which is also OK but when setting up my php scripts and indeed this forum - nothing would show.
This is due to SELinux so a simple:

Code: Select all

setenforce 0
will make the scripts show up magically.

After some tweaking I managed to make them work even with SElinux set to enforcing:

Code: Select all

setenforce 1

To make the phpBB forum work with SElinux (replace the path with your server path):

Code: Select all

chcon -t httpd_sys_content_rw_t /var/www/html/forum/cache/
chcon -t httpd_sys_content_rw_t /var/www/html/forum/files/
chcon -t httpd_sys_content_rw_t /var/www/html/forum/store/
chcon -t httpd_sys_content_rw_t /var/www/html/forum/config.php
chcon -t httpd_sys_content_rw_t /var/www/html/forum/images/avatars/upload

This process would have been less painful in Debian, but since the production site is running on Centos I decided to set up the same backup environment.

I decided to drop X entirely so there is no GUI - that is safer and I really don't need it either since I manage this server from my main Manjaro box via ssh.

While I like yum (Redhat is about to drop it for DNF) I installed Pacapt so that I can use my good old pacman commands that I am used to.

I also had to compile noip and install it manually to make the backup forum accessible to you.
That worked but that is where I noticed that I had been a bit spoiled by Arch there I would simply install it from AUR with yaourt.

The good thing with Centos7 is that there are lots of tutorials on the web - but you may need some experience to understand them.

As a server there is no distro more "proven" than Centos so it should be running stable after the setup (which can be a bit painful). The security of it is probably top notch.

I installed Monitorix and it worked right out of the box since I had kept the old Arch /home so the config was taken care of.
Manjaro 64bit on the main box -Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz and nVidia Corporation GT200b [GeForce GTX 275] (rev a1. + Centos on the server - Arch on the laptop.
"There are no stupid questions - Only stupid answers!"

User avatar
viking60
Über-Berserk
Posts: 9279
Joined: 14 Mar 2010, 16:34

Re: Centos 7

Postby viking60 » 15 Jun 2016, 17:52

I installed owncloud with a Mysql backend. and it works just fine when I disable SElinux.
But it won't work with Selinux i did follow the instructions here

But that did not help.

I can live with turning SElinux off for the house internal synchronization byt you guys are missing out on the 10 G I had planed to offer you :-D
Edit:
Looks like I managed by doing a:

Code: Select all

 sudo setsebool -P httpd_unified 1

and then:

Code: Select all

chown -R apache.apache /home/viking/public_html/owncloud/

So here is the viking,iso shared from my owncloud

....
SElinux makes Centos another ballgame than other distros and it is hardly necessary on a desktop but on a server it makes sense hardening Linux.

I have installed LMD - Linux Malware Detection - and use ClamAV as antivirus engine.

Naturally I have nmap to check the ports and MTR is also a favorite tool and rkhunter actually works on Centos7 (It has to many false positives in Manjaro).
Manjaro 64bit on the main box -Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz and nVidia Corporation GT200b [GeForce GTX 275] (rev a1. + Centos on the server - Arch on the laptop.
"There are no stupid questions - Only stupid answers!"

User avatar
viking60
Über-Berserk
Posts: 9279
Joined: 14 Mar 2010, 16:34

Re: Centos 7

Postby viking60 » 18 Jun 2016, 16:57

As you may have noticed I have installed some third party stuff.
To keep track of "strangers" i do a:

Code: Select all

rpm -qa --qf '%{NAME} %{VENDOR}\n' | grep -v CentOS

That lists everything that is not standard Centos.

Code: Select all

iftop Fedora Project
kernel-headers (none)
perl-HTTP-Server-Simple Fedora Project
perl-MIME-Types Fedora Project
monitorix Fedora Project
gpg-pubkey (none)
python-perf (none)
clamav-data Fedora Project
epel-release Fedora Project
libtomcrypt Fedora Project
clamav-server-systemd Fedora Project
clamav-devel Fedora Project
nethogs Fedora Project
salt-minion Fedora Project
gpg-pubkey (none)
kernel-tools-libs (none)
kernel-tools (none)
grub2 (none)
kernel (none)
libtommath Fedora Project
python2-crypto Fedora Project
openpgm Fedora Project
python-zmq Fedora Project
php-php-gettext Fedora Project
php-tidy Fedora Project
php-tcpdf-dejavu-sans-fonts Fedora Project
kernel (none)
python-psutil Fedora Project
glances Fedora Project
phpMyAdmin Fedora Project
perl-Email-Date-Format Fedora Project
perl-Config-General Fedora Project
perl-MIME-Lite Fedora Project
webmin Jamie Cameron
ntfs-3g Fedora Project
clamav-filesystem Fedora Project
clamav-lib Fedora Project
python-pip Fedora Project
hddtemp Fedora Project
clamav-server Fedora Project
clamav-scanner-systemd Fedora Project
clamav-update Fedora Project
atop Fedora Project
salt Fedora Project
gpg-pubkey (none)
aria2 Fedora Project
figlet Fedora Project
grub2-tools (none)
links Fedora Project
p7zip Fedora Project
rkhunter Fedora Project
gpg-pubkey (none)
python2-msgpack Fedora Project
inxi Fedora Project
clamav-scanner Fedora Project
zeromq3 Fedora Project
clamav Fedora Project
nmon Dag Apt Repository, http://dag.wieers.com/apt/
libtidy Fedora Project
php-tcpdf Fedora Project
rpmforge-release Dag Apt Repository, http://dag.wieers.com/apt/
sl Fedora Project
Manjaro 64bit on the main box -Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz and nVidia Corporation GT200b [GeForce GTX 275] (rev a1. + Centos on the server - Arch on the laptop.
"There are no stupid questions - Only stupid answers!"

User avatar
viking60
Über-Berserk
Posts: 9279
Joined: 14 Mar 2010, 16:34

Re: Centos 7

Postby viking60 » 13 Sep 2016, 08:47

Just another small tip:
I wanted to check out my ports and what listens to them +1

I usually do that with

Code: Select all

netstat -lnp
but I had no netstat and I could not install it with "yum install netstat" :wall:

I found out that the one to install was net-tools so:

Code: Select all

yum install net-tools
toke care of it.
Manjaro 64bit on the main box -Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz and nVidia Corporation GT200b [GeForce GTX 275] (rev a1. + Centos on the server - Arch on the laptop.
"There are no stupid questions - Only stupid answers!"

User avatar
viking60
Über-Berserk
Posts: 9279
Joined: 14 Mar 2010, 16:34

Re: Centos 7

Postby viking60 » 15 Sep 2016, 12:57

I Looked in on my Vbox install again today:
Since my install on the hardware is a GUI less server there is not much to show :-D
Updated everything!
Image
..and everything works!
Manjaro 64bit on the main box -Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz and nVidia Corporation GT200b [GeForce GTX 275] (rev a1. + Centos on the server - Arch on the laptop.
"There are no stupid questions - Only stupid answers!"


Return to “Distro talk”