Prérequis
- Machine Virtuelles Centos7
- Linux Centos7
- Apache
- PHP
- Mariadb
- WordPress (Dernière Version)
La machine sera une machine virtuelle sur l’hyperviseur PROXMOX
Nom machine : sysbreak
- IP : 192.168.1.200
- VCPU : 1
- HDD : 10G
- RAM :2G
Installer la version « Minimale »
Se connecter à votre machine via votre client SSH
/home/mobaxterm# ssh -l root 192.168.1.200
Mise à jour Centos7 sur les dépôts Centos
[root@sysbreak ~]# yum update && yum upgrade -y
Désactiver SELinux
[root@sysbreak ~]# sed s+SELINUX=enforcing+SELINUX=disabled+ /etc/selinux/config > /etc/selinux/config.bak && mv -f /etc/selinux/config.bak /etc/selinux/config
[root@sysbreak ~]# reboot
Installation Package/Middleware
[root@sysbreak ~]# yum install -y qemu-guest-agent wget
Installation Apache
[root@sysbreak ~]# yum install -y httpd
[root@sysbreak ~]# systemctl enable httpd && systemctl start httpd
Activer les rules Firewall pour Apache
[root@sysbreak ~]# firewall-cmd --permanent --zone=public --add-service=http
[root@sysbreak ~]# firewall-cmd --permanent --zone=public --add-service=https
[root@sysbreak ~]# firewall-cmd --reload
[root@sysbreak ~]# iptables -L
Vérifions Apache is UP
Installation Mariadb
[root@sysbreak ~]# yum install -y mariadb mariadb-server
[root@sysbreak ~]# systemctl enable mariadb && systemctl start mariadb
Set Password Root MariaDB
[root@sysbreak ~]# mysql_secure_installation
Enter current password for root (enter for none): « ENTER »
Set root password? [Y/n] Y
New password: « Votre password »
Re-enter new password: « retaper password »
Remove anonymous users? [Y/n] Y
Disallow root login remotely? [Y/n] Y
Remove test database and access to it? [Y/n] Y
Reload privilege tables now? [Y/n] Y
Création User et Database pour WordPress
[root@sysbreak ~]# mysql -u root -p
Enter password: « Votre mot de passe »
MariaDB [(none)]> CREATE DATABASE wordpress;
Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]> GRANT ALL PRIVILEGES on wordpress.* to 'worduser'@'localhost' identified by 'votre password';
MariaDB [(none)]> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> SELECT User, Host, Password FROM mysql.user;
MariaDB [(none)]> exit;
Bye
Installation PHP5.6 et Modules
[root@sysbreak ~]# yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
[root@sysbreak ~]# yum install -y http://rpms.remirepo.net/enterprise/remi-release-7.rpm
[root@sysbreak ~]# yum install -y yum-utils
[root@sysbreak ~]# yum-config-manager --enable remi-php56
[root@sysbreak ~]# yum install php php-common php-mysql php-gd php-xml php-mbstring php-mcrypt php-xmlrpc
[root@sysbreak ~]# php -v
Installer WordPress.
[root@sysbreak ~]# cd /home/
[root@sysbreak home]# wget http://wordpress.org/latest.tar.gz
[root@sysbreak home]# tar -xzvf latest.tar.gz
[root@sysbreak home]# cp -avr wordpress/* /var/www/html/ && rm -rf wordpress
Création répertoire Upload des images
[root@sysbreak home]# mkdir -p /var/www/html/wp-content/uploads
Appliquer les changements de droits
[root@sysbreak home]# chown -R apache:apache /var/www/html/
[root@sysbreak home]# chmod -R 755 /var/www/html/
Configuration WordPress Mariadb
[root@sysbreak home]# cd /var/www/html/
[root@sysbreak html]# mv wp-config-sample.php wp-config.php
[root@sysbreak html]# cp wp-config.php{,.sauv}
[root@sysbreak html]# vi wp-config.php
Configuration WordPress Apache
[root@sysbreak home]# cd /etc/httpd/conf.d
[root@sysbreak conf.d]# mv welcome.conf{,.sauv}
[root@sysbreak conf.d]# mv userdir.conf{,.sauv}
[root@sysbreak conf.d]# mv autoindex.conf{,.sauv}
[root@sysbreak conf.d]# vi sysbreak.conf
<VirtualHost *:80>
ServerName sysbreak.house.cpb
ServerAlias house.cpb
DocumentRoot /var/www/html
ErrorLog /var/log/sysbreak/error.log
CustomLog /var/log/sysbreak/access.log combined
DirectoryIndex index.php
<Directory /var/www/html/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
[root@sysbreak conf.d]# mkdir /var/log/sysbreak/
[root@sysbreak conf.d]# systemctl stop httpd && systemctl start httpd
Installation Application Web WordPress
« Français » puis « Continuer »
Remplir et faire « Installer WordPress »
Reste à vous connecter
Views: 15