1.3. fejezet, CentOS

Verzió ellenőrzése

sudo yum install redhat-lsb-core
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

Upgrade CentOS 6 to CentOS 7

Ifconfig

sudo yum install net-tools

Configure CentOS 6 network settings

Tűzfal megnyitása Wildfly előtt

sudo firewall-cmd --zone=public --add-port=8080/tcp --permanent
sudo firewall-cmd --reload
sudo firewall-cmd --list-all

CentOS 7

Install postgresql:

sudo yum install postgresql-server
sudo postgresql-setup initdb
ls /var/lib/pgsql/data/
sudo systemctl enable --now postgresql 

CentOS Stream 9

PostgreSQL 13 telepítése CentOS Stream 9-re

Install Postgresql on CentOS Stream 9 Server

Adatbázis lokalizáció:

CREATE DATABASE "teszt1" WITH TEMPLATE = template0 ENCODING = 'UTF8' LC_COLLATE = 'hu_HU.UTF8' LC_CTYPE = 'hu_HU.UTF8';

Alapértelmezet Java verzió választása

sudo alternatives --config java
sudo alternatives --config javac
sudo nano /etc/java/maven.conf

PostgreSQL hivatkozások