Redhat

Version Date Notes By
0.1 2019-19-17 Initial release jfm

Depois de instalar

Executar ip address show para ver qual a interface de rede

Ativar a interface ifup enp0s3

Alterar o ficheiro /etc/sysconfig/network-scripts/ifcfg-enp0s3 colocar ONBOOT=yes

Fazer o registo da subscrição subscription-manager register (Necessário conta na redhat). Seguido de subscription-manager refresh e subscription-manager attach --auto

Atualizar: yum update

Instalar Apache + PHP 7.x + Redis

yum install wget

wget http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

rpm -ivh https://rpms.remirepo.net/enterprise/remi-release-7.rpm

PHP

yum install php72 php72-php php72-php-mysqlnd php72-php-mbstring php72-php-soap php72-php-json php72-php-gd php72-php-ldap php72-php-xml php72-php-curl php72-php-zip

scl enable php72 bash

Apache

yum install httpd mod_ssl

systemctl enable httpd.service

Adicionar regras na firewall

firewall-cmd --permanent --zone=public --add-service=http firewall-cmd --permanent --zone=public --add-service=https firewall-cmd --reload

Adicionar uma pasta ao Contexto do SELinux

Isto para quando é necessário colocar os ficheiro web numa pasta diferente da default

Exemplo:

Acesso Leitura

chcon -R -t httpd_sys_content_t /u01/

Acesso Leitura/Escrita

chcon -R -t httpd_sys_rw_content_t /u01/apps/internal/wemake/sgib/bootstrap/cache/

chcon -R -t httpd_sys_rw_content_t /u01/apps/internal/wemake/sgib/storage/

Redis

sudo yum install -y redis --enablerepo=remi

systemctl enable --now redis

Para permitir que o apache connect ao Redis. De momento tem de ser assim porque não há uma boolean de httpd para redis

sudo /usr/sbin/setsebool -P httpd_can_network_connect=1

ou

semanage port -m -t http_port_t -p tcp 6379 <- Não funciona bem, depois do reboot o redis deixa de conseguir ligar pq a porta fica associada ao httpd :\

Se já foi ativado em cima o httpd_can_network_connect então NÃO há a necessidade de fazer isto: setsebool -P httpd_can_network_connect_db=1

Found errors? Think you can improve this documentation? Simply click the Edit link at the top of the page, and then the icon on Github to make your changes.