Server/WordPress: Unterschied zwischen den Versionen
Zeile 18: | Zeile 18: | ||
pkg install -y wordpress | pkg install -y wordpress | ||
<pre></pre> | |||
<pre> | <pre> | ||
The following 35 package(s) will be affected (of 0 checked): | The following 35 package(s) will be affected (of 0 checked): |
Version vom 19. April 2016, 07:27 Uhr
- Achtung
Dieser Artikel ist ein exemplarischer Artikel.
Installation
- OS
- FreeNAS 9.3
- Paketverwaltung
- freebsd-man:pkgng
Randbedingungen
Methoden der Installation
Installation mit pkg
pkg upgrade -y
pkg install -y wordpress
The following 35 package(s) will be affected (of 0 checked): New packages to be INSTALLED: wordpress: 4.4.2,1 php56-curl: 5.6.20_1 php56: 5.6.20_1 libxml2: 2.9.3 pcre: 8.38_1 php56-gd: 5.6.20_1 libXpm: 3.5.11_4 xproto: 7.0.28 libXt: 1.1.5,1 libSM: 1.2.2_3,1 libICE: 1.0.9_1,1 libX11: 1.6.3,1 libXdmcp: 1.1.2 libxcb: 1.11.1 libpthread-stubs: 0.3_6 libXau: 1.0.8_3 kbproto: 1.0.7 libXext: 1.3.3_1,1 xextproto: 7.3.0 png: 1.6.21 t1lib: 5.1.2_4,1 libXaw: 1.0.13,2 printproto: 1.0.5 libXmu: 1.1.2_3,1 libXp: 1.0.3,1 freetype2: 2.6.3 jpeg-turbo: 1.4.2 php56-hash: 5.6.20_1 php56-xml: 5.6.20_1 php56-tokenizer: 5.6.20_1 php56-mysqli: 5.6.20_1 php56-zip: 5.6.20_1 libzip: 1.1.2 php56-ftp: 5.6.20_1 php56-zlib: 5.6.20_1
Message from wordpress-4.4.2,1: **** NOTE **** Before the first use of WordPress, copy wp-config-sample.php to wp-config.php in /usr/local/www/wordpress and modify it to fit your MySQL. Maybe you need 'mysqladmin create wordpress' first. If you are upgrading from 1.x or 2.x or 3.x to 4.x, please run http://your.site/wordpress/wp-admin/upgrade.php to upgrade to WordPress 4.x
pkg install -y apache24
New packages to be INSTALLED: apache24: 2.4.20_1
===> Creating users and/or groups. Using existing group 'www'. Using existing user 'www'.
Message from apache24-2.4.20_1: To run apache www server from startup, add apache24_enable="yes" in your /etc/rc.conf. Extra options can be found in startup script. Your hostname must be resolvable using at least 1 mechanism in /etc/nsswitch.conf typically DNS or /etc/hosts or apache might have issues starting depending on the modules you are using. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - apache24 default build changed from static MPM to modular MPM - more modules are now enabled per default in the port - icons and error pages moved from WWWDIR to DATADIR If build with modular MPM and no MPM is activated in httpd.conf, then mpm_prefork will be activated as default MPM in etc/apache24/modules.d to keep compatibility with existing php/perl/python modules! Please compare the existing httpd.conf with httpd.conf.sample and merge missing modules/instructions into httpd.conf! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
sysrc apache24_enable=yes
service apache24 start
pkg install -y mysql56-server
New packages to be INSTALLED: mysql56-server: 5.6.27 mysql56-client: 5.6.27 libedit: 3.1.20150325_2
===> Creating users and/or groups. Creating group 'mysql' with gid '88'. Creating user 'mysql' with uid '88'.
Message from mysql56-client-5.6.27: * * * * * * * * * * * * * * * * * * * * * * * * Please be aware the database client is vulnerable to CVE-2015-3152 - SSL Downgrade aka "BACKRONYM". You may find more information at the following URL: http://www.vuxml.org/freebsd/36bd352d-299b-11e5-86ff-14dae9d210b8.html Although this database client is not listed as "affected", it is vulnerable and will not be receiving a patch. Please take note of this when deploying this software. * * * * * * * * * * * * * * * * * * * * * * * * Message from mysql56-server-5.6.27: ************************************************************************ Remember to run mysql_upgrade the first time you start the MySQL server after an upgrade from an earlier version. ************************************************************************
sysrc mysql_enable=yes
service mysql-server start
mysql_secure_installation
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY! In order to log into MySQL to secure it, we'll need the current password for the root user. If you've just installed MySQL, and you haven't set the root password yet, the password will be blank, so you should just press enter here. Enter current password for root (enter for none): OK, successfully used password, moving on... Setting the root password ensures that nobody can log into the MySQL root user without the proper authorisation. Set root password? [Y/n] y New password: Re-enter new password: Password updated successfully! Reloading privilege tables.. ... Success! By default, a MySQL installation has an anonymous user, allowing anyone to log into MySQL without having to have a user account created for them. This is intended only for testing, and to make the installation go a bit smoother. You should remove them before moving into a production environment. Remove anonymous users? [Y/n] y ... Success! Normally, root should only be allowed to connect from 'localhost'. This ensures that someone cannot guess at the root password from the network. Disallow root login remotely? [Y/n] y ... Success! By default, MySQL comes with a database named 'test' that anyone can access. This is also intended only for testing, and should be removed before moving into a production environment. Remove test database and access to it? [Y/n] y - Dropping test database... ... Success! - Removing privileges on test database... ... Success! Reloading the privilege tables will ensure that all changes made so far will take effect immediately. Reload privilege tables now? [Y/n] y ... Success! All done! If you've completed all of the above steps, your MySQL installation should now be secure. Thanks for using MySQL! Cleaning up...
pkg install -y php56-mysql
php56-mysql: 5.6.20_1
cp /usr/local/etc/php.ini-production /usr/local/etc/php.ini
$EDITOR /usr/local/etc/apache24/Includes/php.conf
<IfModule dir_module> DirectoryIndex index.php index.html <FilesMatch "\.php$"> SetHandler application/x-httpd-php </FilesMatch> <FilesMatch "\.phps$"> SetHandler application/x-httpd-php-source </FilesMatch> </IfModule>
service apache24 restart
---
…
Installation als FAMP
pkg upgrade -y
pkg install -y apache24
sysrc apache24_enable=yes
service apache24 start
pkg install -y mysql56-server
sysrc mysql_enable=yes
service mysql-server start
mysql_secure_installation
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY! In order to log into MySQL to secure it, we'll need the current password for the root user. If you've just installed MySQL, and you haven't set the root password yet, the password will be blank, so you should just press enter here. Enter current password for root (enter for none): OK, successfully used password, moving on... Setting the root password ensures that nobody can log into the MySQL root user without the proper authorisation. Set root password? [Y/n] y New password: Re-enter new password: Password updated successfully! Reloading privilege tables.. ... Success! By default, a MySQL installation has an anonymous user, allowing anyone to log into MySQL without having to have a user account created for them. This is intended only for testing, and to make the installation go a bit smoother. You should remove them before moving into a production environment. Remove anonymous users? [Y/n] y ... Success! Normally, root should only be allowed to connect from 'localhost'. This ensures that someone cannot guess at the root password from the network. Disallow root login remotely? [Y/n] y ... Success! By default, MySQL comes with a database named 'test' that anyone can access. This is also intended only for testing, and should be removed before moving into a production environment. Remove test database and access to it? [Y/n] y - Dropping test database... ... Success! - Removing privileges on test database... ... Success! Reloading the privilege tables will ensure that all changes made so far will take effect immediately. Reload privilege tables now? [Y/n] y ... Success! All done! If you've completed all of the above steps, your MySQL installation should now be secure. Thanks for using MySQL! Cleaning up...
pkg install -y mod_php56 php56-mysql php56-mysqli
cp /usr/local/etc/php.ini-production /usr/local/etc/php.ini
rehash
pkg search php56
pkg install -y php56
$EDITOR /usr/local/etc/apache24/Includes/php.conf
<IfModule dir_module> DirectoryIndex index.php index.html <FilesMatch "\.php$"> SetHandler application/x-httpd-php </FilesMatch> <FilesMatch "\.phps$"> SetHandler application/x-httpd-php-source </FilesMatch> </IfModule>
service apache24 restart
echo '<?php phpinfo(); ?>' > /usr/local/www/apache24/data/info.php
http://<IP>/info.php
rm /usr/local/www/apache24/data/info.php
pkg install -y php56-mysql php56-xml php56-hash php56-gd php56-curl php56-tokenizer php56-zlib php56-zip
mysql -u root -p
CREATE DATABASE wp;
CREATE USER wpu@localhost IDENTIFIED BY 'w0rdpr3ss';
GRANT ALL PRIVILEGES ON wp.* TO wpu@localhost;
FLUSH PRIVILEGES;
exit
cd /tmp
fetch http://wordpress.org/latest.tar.gz
tar xvf latest.tar.gz
rm latest.tar.gz
cd /tmp/wordpress
cp wp-config-sample.php wp-config.php
$EDITOR wp-config.php
// ** MySQL settings - You can get this info from your web host ** // /** The name of the database for WordPress */ define('DB_NAME', 'wp'); /** MySQL database username */ define('DB_USER', 'wpu'); /** MySQL database password */ define('DB_PASSWORD', 'w0rdpr3ss');
cp -rp /tmp/wordpress/* /usr/local/www/apache24/data/
chown -R www:www /usr/local/www/apache24/data/*
http://<IP>/
http://<IP>/index.html
http://<IP>/index.php
rm /usr/local/www/apache24/data/
http://<IP>/
$EDITOR /usr/local/etc/apache24/httpd.conf
LoadModule rewrite_module libexec/apache24/mod_rewrite.so #LoadModule rewrite_module libexec/apache24/mod_rewrite.so
<Directory "/usr/local/www/apache24/data">
AllowOverride All
service apache24 restart
touch /usr/local/www/apache24/data.htaccess
chown www:www /usr/local/www/apache24/data.htaccess