1.3. fejezet, CentOS

Verzió ellenőrzése

lsb_release -d

CentOS version command

Firewall

Using Firewalls

CentOS 7

sudo system-config-firewall-tui

CentOS 6

firewall-cmd --get-active-zones
firewall-cmd --zone=public --add-port=80/tcp --permanent
firewall-cmd --reload

Docker

Install

sudo yum install docker

Add group and user to group

sudo groupadd docker
sudo usermod -aG docker $(whoami)

Autostart after reboot

sudo systemctl enable docker

Reboot after setup!

Backup data volume

docker ps -a
docker run --rm --volumes-from 9d7edef4dcee -v $(pwd):/backup jariasl/tuleap tar czvf /backup/backup.tgz /data

Restore data volume

docker load -i mynewimage.tgz
sudo setenforce 0 ##(SELinux - share könyvtár olvasási joghoz kell!)
docker run -it --volumes-from e799ba40fbb4 -v tuleap-data:/data -v $(pwd)/shared:/backup mynewimage tar -xvzf /backup/backup.tgz

See disusion on stackoverflow.com

CentOS 6 yum update EOL után

sudo curl https://www.getpagespeed.com/files/centos6-eol.repo --output /etc/yum.repos.d/CentOS-Base.repo
yum update

Vagy CentOS 6.0-nál az ssl 1.2 hiánya miatt (yum [Errno 14] problem making ssl connection):

cat <<-'EOF' > /etc/yum.repos.d/CentOS-Base.repo
[C6.10-base]
name=CentOS-6.10 - Base
baseurl=http://linuxsoft.cern.ch/centos-vault/6.10/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=1
metadata_expire=never
 
[C6.10-updates]
name=CentOS-6.10 - Updates
baseurl=http://linuxsoft.cern.ch/centos-vault/6.10/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=1
metadata_expire=never
 
[C6.10-extras]
name=CentOS-6.10 - Extras
baseurl=http://linuxsoft.cern.ch/centos-vault/6.10/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=1
metadata_expire=never
 
[C6.10-contrib]
name=CentOS-6.10 - Contrib
baseurl=http://linuxsoft.cern.ch/centos-vault/6.10/contrib/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=0
metadata_expire=never
 
[C6.10-centosplus]
name=CentOS-6.10 - CentOSPlus
baseurl=http://linuxsoft.cern.ch/centos-vault/6.10/centosplus/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=0
metadata_expire=never
EOF

getpagespeed.com

mark-gilbert.co.uk

Frissítési kivétel hozzáadása:

javase8 archive downloads

#rpm -i jre-8u152-linux-x64.rpm
rpm -aq | grep -i jdk
rpm -aq | grep -i jre
 
nano /etc/yum.conf
[main]
...
exclude=jre*

Install Java 8 on CentOS

Fejlesztői csomagok telepítése

sudo yum install kernel-devel gcc