wordpress-custom:wordpress_custom
Différences
Ci-dessous, les différences entre deux révisions de la page.
| wordpress-custom:wordpress_custom [2018/09/10 07:51] – créée ronan | wordpress-custom:wordpress_custom [2019/01/14 14:12] (Version actuelle) – rguyader | ||
|---|---|---|---|
| Ligne 7: | Ligne 7: | ||
| ===== Pour wordpress, a renseigner dans keepass mysql/ | ===== Pour wordpress, a renseigner dans keepass mysql/ | ||
| - | | + | <code bash> |
| - | export PMYDBUSER="< | + | export PMYDBNAME="< |
| - | export PMYDBPW="< | + | export PMYDBUSER="< |
| + | export PMYDBPW="< | ||
| + | </ | ||
| ===== FQDN du site ===== | ===== FQDN du site ===== | ||
| - | | + | <code bash> |
| - | export DOMAINWP=" | + | export HOTNAMEWP=" |
| - | export FQDNWP=" | + | export DOMAINWP=" |
| - | echo "FQDN du serveur : $FQDNWP" | + | export FQDNWP=" |
| + | echo "FQDN du serveur : $FQDNWP" | ||
| + | </ | ||
| ===== Email de l' | ===== Email de l' | ||
| + | <code bash> | ||
| export ADMINMAIL=" | export ADMINMAIL=" | ||
| + | </ | ||
| ===== installation des paquets requis ===== | ===== installation des paquets requis ===== | ||
| - | + | <code bash> | |
| - | # | + | apt-get install apache2 apache2.2-common curl mysql-common mysql-server mysql-client php5 libjs-cropper libphp-phpmailer libphp-snoopy php5-gd php5-mysql tinymce ssl-cert |
| + | </ | ||
| ===== Nouveau mot de passe du superutilisateur de MySQL ===== | ===== Nouveau mot de passe du superutilisateur de MySQL ===== | ||
| Ligne 32: | Ligne 39: | ||
| ===== Installation de Wordpress ===== | ===== Installation de Wordpress ===== | ||
| - | # cd /var/www | + | <code bash> |
| - | # | + | cd /var/www |
| - | # cd $FQDNWP | + | mkdir -p $FQDNWP |
| - | # | + | cd $FQDNWP |
| - | # | + | wget --content-disposition http:// |
| - | # | + | tar xfzp wordpress*.tar.gz |
| - | # | + | rm wordpress*.tar.gz |
| - | # | + | mv ./ |
| - | # | + | rmdir ./ |
| - | # | + | chown -R www-data: |
| - | < | + | cat << ' |
| - | deny from all | + | < |
| - | </ | + | deny from all |
| - | EOF | + | </ |
| - | # | + | EOF |
| - | # | + | chown www-data: |
| + | chmod 640 / | ||
| + | </ | ||
| ==== Initialisation tables mysql ==== | ==== Initialisation tables mysql ==== | ||
| - | # export MAKENEWDBFILE="/ | + | <code bash> |
| - | # | + | export MAKENEWDBFILE="/ |
| - | CREATE DATABASE _DBNAME_; | + | cat << ' |
| - | GRANT SELECT, | + | CREATE DATABASE _DBNAME_; |
| - | ON _DBNAME_.* | + | GRANT SELECT, |
| - | TO _DBUSER_@localhost | + | ON _DBNAME_.* |
| - | IDENTIFIED BY ' | + | TO _DBUSER_@localhost |
| - | # | + | IDENTIFIED BY ' |
| - | EOF | + | FLUSH PRIVILEGES; |
| - | # | + | EOF |
| - | # | + | sed -i " |
| - | # | + | sed -i " |
| - | # | + | sed -i " |
| - | # | + | cat $MAKENEWDBFILE | mysql --defaults-extra-file=/ |
| + | rm $MAKENEWDBFILE | ||
| + | </ | ||
| **/!\ suivre le howto staging apache2 /!\** | **/!\ suivre le howto staging apache2 /!\** | ||
| Ligne 70: | Ligne 81: | ||
| ==== host apache2 pour wordpress ==== | ==== host apache2 pour wordpress ==== | ||
| - | # cat << ' | + | <code bash> |
| - | < | + | cat << ' |
| - | ServerName _FQDN_ | + | < |
| - | ServerAdmin _ADMINMAIL_ | + | ServerName _FQDN_ |
| - | Options -All | + | ServerAdmin _ADMINMAIL_ |
| - | DocumentRoot / | + | Options -All |
| - | php_admin_value open_basedir / | + | DocumentRoot / |
| + | php_admin_value open_basedir / | ||
| | | ||
| - | | + | |
| - | AllowOverride None | + | AllowOverride None |
| - | Order Deny, | + | Order Deny, |
| - | Deny from all | + | Deny from all |
| - | <Limit POST GET> | + | <Limit POST GET> |
| - | Order allow, | + | Order allow, |
| - | allow from all | + | allow from all |
| - | </ | + | </ |
| - | < | + | < |
| - | Order deny, | + | Order deny, |
| - | deny from all | + | deny from all |
| - | </ | + | </ |
| - | </ | + | </ |
| | | ||
| - | | + | |
| - | < | + | < |
| - | deny from all | + | deny from all |
| - | </ | + | </ |
| - | AllowOverride Limit FileInfo Options | + | AllowOverride Limit FileInfo Options |
| - | Options +SymLinksIfOwnerMatch | + | Options +SymLinksIfOwnerMatch |
| - | DirectoryIndex index.php | + | DirectoryIndex index.php |
| - | Order allow, | + | Order allow, |
| - | Allow from all | + | Allow from all |
| - | </ | + | </ |
| | | ||
| - | | + | </ |
| - | EOF | + | EOF |
| - | # sed -i " | + | sed -i " |
| - | # | + | sed -i " |
| - | # | + | a2ensite $FQDNWP |
| - | # | + | a2enmod rewrite |
| - | # | + | service apache2 stop |
| - | # | + | service apache2 start |
| **RQ : | **RQ : | ||
| Ligne 117: | Ligne 129: | ||
| ===== config wordpress ===== | ===== config wordpress ===== | ||
| - | # export WPCONFFILE="/ | + | <code bash> |
| - | # | + | export WPCONFFILE="/ |
| - | <?php | + | cat << ' |
| - | define(' | + | <?php |
| - | define(' | + | define(' |
| - | define(' | + | define(' |
| - | define(' | + | define(' |
| - | define(' | + | define(' |
| - | define(' | + | define(' |
| - | define(' | + | define(' |
| - | define(' | + | define(' |
| - | define(' | + | define(' |
| - | define(' | + | define(' |
| - | define(' | + | define(' |
| - | define(' | + | define(' |
| - | define(' | + | define(' |
| - | define(' | + | define(' |
| - | $table_prefix | + | define(' |
| - | ?> | + | $table_prefix |
| - | EOF | + | ?> |
| - | # | + | EOF |
| - | # | + | export SALT1=$(cat / |
| - | # | + | export SALT2=$(cat / |
| - | # | + | export SALT3=$(cat / |
| - | # | + | export SALT4=$(cat / |
| - | # | + | export SALT5=$(cat / |
| - | # | + | export SALT6=$(cat / |
| - | # | + | export SALT7=$(cat / |
| - | # | + | export SALT8=$(cat / |
| - | # | + | export DBTBPREFIX=$(cat / |
| - | # | + | sed -i " |
| - | # | + | sed -i " |
| - | # | + | sed -i " |
| - | # | + | sed -i " |
| - | # | + | sed -i " |
| - | # | + | sed -i " |
| - | # | + | sed -i " |
| - | # | + | sed -i " |
| - | # | + | sed -i " |
| - | # | + | sed -i " |
| - | # | + | sed -i " |
| - | # | + | sed -i " |
| - | # | + | sed -i " |
| - | # | + | chmod 640 $WPCONFFILE |
| + | chown root: | ||
| + | </ | ||
| ===== Configuration php ===== | ===== Configuration php ===== | ||
| - | # sed -i " | + | <code bash> |
| - | # | + | sed -i " |
| + | sed -i " | ||
| + | </ | ||
| ===== Configuration interne de wordpress ===== | ===== Configuration interne de wordpress ===== | ||
wordpress-custom/wordpress_custom.1536565896.txt.gz · Dernière modification : 2018/09/10 07:51 de ronan