Meine kleine Dokumentation

Die Installationsdokumentation zu MeineKleineFarm.net

Benutzer-Werkzeuge

Webseiten-Werkzeuge


waffeln_am_ententeich

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen RevisionVorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
Nächste ÜberarbeitungBeide Seiten der Revision
waffeln_am_ententeich [2016/10/05 21:42] xenadminwaffeln_am_ententeich [2016/11/02 23:22] xenadmin
Zeile 1: Zeile 1:
-====== Überschrift ====== +====== Wordpress Blog: waffeln-am-ententeich.de ====== 
-Apache2 und PHP5 sind bereits installiert+ 
 +Apache2, MySQL und PHP5 sind bereits installiert -> [[basics|Basics]]
 <code bash> <code bash>
 apt update apt update
-apt install mysql-server -y +apt install php5-mysql -y 
-<mysql root@localhost Passwort setzen> +mysql -u root -p
-mysql_secure_installation+
 </code> </code>
-  * <code>NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL +<code mysql> 
-      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!+CREATE DATABASE wp_waffelente; 
 +CREATE USER wp_waffelente@localhost IDENTIFIED BY 'PASSW0RD1'; 
 +GRANT ALL PRIVILEGES ON wp_waffelente.* TO wp_waffelente@localhost; 
 +FLUSH PRIVILEGES; 
 +exit 
 +</code> 
 +<code bash> 
 +service apache2 restart && service mysql restart
  
-In order to log into MySQL to secure it, we'll need the current +wget https://de.wordpress.org/latest-de_DE.zip 
-password for the root user If you've just installed MySQL, and +mkdir -p /var/www/html/waffeln-am-ententeich.de/ 
-you haven't set the root password yet, the password will be blank, +unzip -q latest-de_DE.zip -d /var/www/html/waffeln-am-ententeich.de/ 
-so you should just press enter here.+mv /var/www/html/waffeln-am-ententeich.de/wordpress /var/www/html/waffeln-am-ententeich.de/root 
 +mkdir /var/www/html/waffeln-am-ententeich.de/root/wp-content/uploads 
 +chown -R www-data:www-data /var/www/html/waffeln-am-ententeich.de/root 
 +chmod -R 755 /var/www/html/waffeln-am-ententeich.de/root 
 +rm latest-de_DE.zip
  
-Enter current password for root (enter for none): +cp /var/www/html/waffeln-am-ententeich.de/root/wp-config-sample.php /var/www/html/waffeln-am-ententeich.de/root/wp-config.php 
-ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) +nano /var/www/html/waffeln-am-ententeich.de/root/wp-config.php 
-Enter current password for root (enter for none): +</code> 
-OK, successfully used password, moving on...+<file php wp-config.php> 
 +<?php 
 +define('FORCE_SSL_ADMIN', true);
  
-Setting the root password ensures that nobody can log into the MySQL +define('DB_NAME', 'wp_waffelente'); 
-root user without the proper authorisation.+define('DB_USER', 'wp_waffelente'); 
 +define('DB_PASSWORD', 'PASSW0RD1'); 
 +define('DB_HOST', 'localhost'); 
 +define('DB_CHARSET', 'utf8'); 
 +define('DB_COLLATE', '');
  
-You already have a root password setso you can safely answer 'n'.+define('AUTH_KEY'        'Füge hier deine Zeichenkette ein'); 
 +define('SECURE_AUTH_KEY',  'Füge hier deine Zeichenkette ein'); 
 +define('LOGGED_IN_KEY',    'Füge hier deine Zeichenkette ein'); 
 +define('NONCE_KEY',        'Füge hier deine Zeichenkette ein'); 
 +define('AUTH_SALT',        'Füge hier deine Zeichenkette ein'); 
 +define('SECURE_AUTH_SALT', 'Füge hier deine Zeichenkette ein'); 
 +define('LOGGED_IN_SALT',   'Füge hier deine Zeichenkette ein'); 
 +define('NONCE_SALT',       'Füge hier deine Zeichenkette ein'); 
 +</file> 
 +Certificate Request und 4096 RSA Key mit [[http://xca.sourceforge.net/|XCA]] erstellt. Certificate bei [[https://startssl.com|StartSSL]] beantragt. Anschließend im Dateisystem speichern.  
 +<code bash> 
 +nano /etc/ssl/certs/waffeln.meinekleinefarm.net.pem 
 +nano /etc/ssl/private/waffeln.meinekleinefarm.net.key
  
-Change the root password? [Y/n] n +nano /etc/apache2/sites-available/waffeln.meinekleinefarm.net.conf 
- ... skipping.+</code> 
 +<file apache waffeln.meinekleinefarm.net.conf> 
 +<VirtualHost *:80> 
 +        ServerName waffeln.meinekleinefarm.net 
 +        Redirect permanent / https://waffeln.meinekleinefarm.net/ 
 +</VirtualHost>
  
-By default, a MySQL installation has an anonymous user, allowing anyone +<IfModule mod_ssl.c> 
-to log into MySQL without having to have a user account created for +        <VirtualHost *:443> 
-them This is intended only for testing, and to make the installation +                ServerAdmin webmaster@meinekleinefarm.net 
-go a bit smoother You should remove them before moving into a +                ServerName waffeln.meinekleinefarm.net 
-production environment.+                ServerAlias waffeln.meinekleinefarm.net
  
-Remove anonymous users? [Y/n] y +                DocumentRoot /var/www/html/waffeln-am-ententeich.de/root/
- ... Success!+
  
-Normally, root should only be allowed to connect from 'localhost' This +                <Directory /var/www/html/waffeln-am-ententeich.de/root/> 
-ensures that someone cannot guess at the root password from the network.+                        AllowOverride All 
 +                </Directory>
  
-Disallow root login remotely? [Y/n] y +                ErrorLog ${APACHE_LOG_DIR}/error.log 
- ... Success!+                CustomLog ${APACHE_LOG_DIR}/access.log combined
  
-By default, MySQL comes with a database named 'test' that anyone can +                SSLEngine on 
-access This is also intended only for testing, and should be removed +                SSLCertificateFile      /etc/ssl/certs/waffeln.meinekleinefarm.net.pem 
-before moving into a production environment.+                SSLCertificateKeyFile   /etc/ssl/private/waffeln.meinekleinefarm.net.key 
 +                SSLCertificateChainFile /etc/ssl/certs/startcom_class1.pem
  
-Remove test database and access to it? [Y/n] y +                <FilesMatch "\.(cgi|shtml|phtml|php)$"> 
- - Dropping test database... +                                SSLOptions +StdEnvVars 
-ERROR 1008 (HY000at line 1: Can't drop database 'test'; database doesn't exist +                </FilesMatch> 
- ... Failed!  Not critical, keep moving... +                <Directory /usr/lib/cgi-bin> 
- Removing privileges on test database... +                                SSLOptions +StdEnvVars 
- ... Success!+                </Directory>
  
-Reloading the privilege tables will ensure that all changes made so far +                BrowserMatch "MSIE [2-6]" \ 
-will take effect immediately. +                                nokeepalive ssl-unclean-shutdown \ 
- +                                downgrade-1.0 force-response-1.0 
-Reload privilege tables now? [Y/ny +                BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
- ... Success! +
- +
-Cleaning up... +
- +
-All done!  If you've completed all of the above steps, your MySQL +
-installation should now be secure. +
- +
-Thanks for using MySQL! +
-</code> +
-<code> +
-mysql -u root -p +
-CREATE DATABASE wp_waffelnamententeich; +
-CREATE USER wp_waffelnamententeich@localhost IDENTIFIED BY 'PASSW0RD1'; +
-GRANT ALL PRIVILEGES ON wp_waffelnamententeich.* TO wp_waffelnamententeich@localhost; +
-FLUSH PRIVILEGES; +
-exit +
-service apache2 restart && service mysql restart +
- +
-wget https://de.wordpress.org/latest-de_DE.zip +
-mkdir /var/www/html/meinekleinefarm.net/waffeln +
-unzip -q latest-de_DE.zip -d /var/www/html/meinekleinefarm.net/waffeln/ +
-mkdir /var/www/html/meinekleinefarm.net/waffeln/wp-content/uploads +
-chown -R www-data:www-data /var/www/html/meinekleinefarm.net/waffeln +
-chmod -R 755 /var/www/html/meinekleinefarm.net/waffeln +
- +
-cp /var/www/html/meinekleinefarm.net/waffeln/wp-config-sample.php /var/www/html/meinekleinefarm.net/waffeln/wp-config.php +
-</code> +
-<file php wp-config.php>+
  
 +        </VirtualHost>
 +</IfModule>
 </file> </file>
 +<code bash>
 +a2ensite waffeln.meinekleinefarm.net.conf
 +service apache2 reload
 +</code>
 +Wordpress 5-minute Setup im Browser aufrufen und fertig stellen.\\
 +https://www.example.com/wp-admin/install.php\\
 +Username\\
 +Password\\
 +E-Mail\\
 +-> Fertig!
  
 +FIXME
 +  * Secure Wordpress, Theme & PlugIn Updates
 +  * Filesystem Permissions
waffeln_am_ententeich.txt · Zuletzt geändert: 2016/11/09 19:48 von xenadmin