Resources attached to the Road To DevOps tutorial
https://blog.noobtoroot.xyz/road-to-devops/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
1.4 KiB
54 lines
1.4 KiB
2 years ago
|
# --------------------------------------------------------------------------------------------------
|
||
|
# 1/ Installation BDD
|
||
|
|
||
|
# Installation packages Mariadb
|
||
|
yum install mariadb-server
|
||
|
|
||
|
# Mise en place règles firewall
|
||
|
firewall-cmd --add-service=mysql --permanent
|
||
|
firewall-cmd --reload
|
||
|
|
||
|
systemctl enable mariadb
|
||
|
systemctl start mariadb
|
||
|
|
||
|
mysql -u root -p
|
||
|
CREATE DATABASE wordpress;
|
||
|
CREATE USER wordpressuser@localhost IDENTIFIED BY 'password';
|
||
|
GRANT ALL PRIVILEGES ON wordpress.* TO wordpressuser@localhost;
|
||
|
FLUSH PRIVILEGES;
|
||
|
|
||
|
# --------------------------------------------------------------------------------------------------
|
||
|
# 2/ Installation WEBSERVER
|
||
|
|
||
|
# Installation de Apache
|
||
|
yum install httpd php php-mysql wget
|
||
|
|
||
|
# Mise en place règles firewall
|
||
|
firewall-cmd --add-service=http --permanent
|
||
|
firewall-cmd --reload
|
||
|
|
||
|
systemctl enable httpd
|
||
|
systemctl start httpd
|
||
|
|
||
|
# Configuration de Apache
|
||
|
...
|
||
|
|
||
|
# Déploiement du wordpress :
|
||
|
cd /var/www/html && wget https://wordpress.org/latest.tar.gz
|
||
|
|
||
|
# Décompression du wordpress
|
||
|
tar -xzf /var/www/html/latest.tar.gz -C /var/www/html
|
||
|
rm -f /var/www/html/latest.tar.gz
|
||
|
|
||
|
#create wp config
|
||
|
cp /var/www/html/wordpress/wp-config-sample.php /var/www/html/wordpress/wp-config.php
|
||
|
|
||
|
#set database details
|
||
|
vi /var/www/html/wordpress/wp-config.php
|
||
|
|
||
|
#define('DB_NAME', 'wordpress');
|
||
|
#define('DB_USER', 'wordpressuser');
|
||
|
#define('DB_PASSWORD', 'password');
|
||
|
#define('DB_HOST', 'localhost');
|
||
|
|