seguiremo l’installazione di un server LAMP (acronimo di Linux Apache MySQL PHP) su un server CentoS 7 64 bit
Come prima cosa installare il server centos in configurazione base e aggiornarlo.
ussate il comand:
yum update
disabilita SELINUX
nano /etc/sysconfig/selinux
Cambia da enforcing a disabled :
# This file controls the state of SELinux on the system. # SELINUX= can take one of these three values: # enforcing - SELinux security policy is enforced. # permissive - SELinux prints warnings instead of enforcing. # disabled - No SELinux policy is loaded. SELINUX=disabled # SELINUXTYPE= can take one of these two values: # targeted - Targeted processes are protected, # minimum - Modification of targeted policy. Only selected processes are protected. # mls - Multi Level Security protection. SELINUXTYPE=targeted
Installamo MySQL o meglio MariaDB una sua evoluzione
yum -y install mariadb-server mariadb
Rendiamolo autopartente
systemctl start mariadb.service
systemctl enable mariadb.service
Adesso eseguiamo l’installazione
mysql_secure_installation
e premiamo il tasto Invio
al campo “Enter current password for root”.
premiamo
Y
alla richiesta “Set root password?”
scriviamo due volte la password
Dopo confermare a tutte le successive richieste
“Remove anonymous users”
“Disallow root login remotely?”
“Remove test database and access to it?”
“Reload privilege tables now?”
Installiamo Apache con il seguente comando
yum -y install httpd
e rendiamolo autopartente
systemctl start httpd.service
systemctl enable httpd.service
Disabilitiamo il firewall in modo da accettare le connessioni (la configurazione dello stesso verrà trattata a parte)
systemctl disable firewalld
systemctl stop firewalld
Adesso installiamo il PHP
yum -y install php
riavviamo Apache
systemctl restart httpd.service
installiamo i pacchetti tipici per l’uso di WP o altre piattaforme
yum -y install php-gd php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-snmp php-soap curl curl-devel
riavviamo Apache
systemctl restart httpd.service
Il nostro sistema è pronto all’uso