OpenSeaMap-dev:Server FreeBSD Forum: Unterschied zwischen den Versionen

Aus OpenSeaMap-dev
Wechseln zu: Navigation, Suche
K (Markus verschob Seite Server FreeBSD Forum nach OpenSeaMap-dev:Server FreeBSD Forum, ohne dabei eine Weiterleitung anzulegen)
(Add mysql configuration.)
Zeile 3: Zeile 3:
 
Connect to the jail. Either via <tt>'ejzail-admin console <jail-name>'</tt> or via SSH.
 
Connect to the jail. Either via <tt>'ejzail-admin console <jail-name>'</tt> or via SSH.
  
=== nginx, php ===
+
=== nginx, php, mysql ===
  
 
Configure ports.
 
Configure ports.
Zeile 17: Zeile 17:
 
  portmaster -d -B www/nginx lang/php5 archivers/php5-zlib \
 
  portmaster -d -B www/nginx lang/php5 archivers/php5-zlib \
 
     ftp/php5-ftp graphics/php5-gd textproc/php5-xml \
 
     ftp/php5-ftp graphics/php5-gd textproc/php5-xml \
     graphics/php-magickwand
+
     graphics/php-magickwand databases/mysql56-server \
 +
    php5-mysqli
 
  exit
 
  exit
  
Zeile 25: Zeile 26:
 
   nginx_enable="YES"
 
   nginx_enable="YES"
 
   php_fpm_enable="YES"
 
   php_fpm_enable="YES"
 +
  mysql_enable="YES"
  
 
Configure php-fpm.
 
Configure php-fpm.
Zeile 75: Zeile 77:
 
   }
 
   }
 
   
 
   
Start service.
+
Start services.
  
 +
  service mysql-server start
 
   service php-fpm start
 
   service php-fpm start
 
   service nginx start
 
   service nginx start
 +
 +
Create database.
 +
 +
mysql -u root
 +
  CREATE DATABASE forum;
 +
  GRANT ALL ON forum.* TO forum@<local-jail-ip> IDENTIFIED BY '<password>';
 +
  \q
  
 
=== phpBB ===
 
=== phpBB ===

Version vom 17. März 2013, 16:27 Uhr

Installation

Connect to the jail. Either via 'ejzail-admin console <jail-name>' or via SSH.

nginx, php, mysql

Configure ports.

vi /etc/make.conf
  .if ${.CURDIR:M*/lang/php*}
  WITH_FPM=yes
  .endif

Install ports.

screen -S ports
portmaster -d -B www/nginx lang/php5 archivers/php5-zlib \
    ftp/php5-ftp graphics/php5-gd textproc/php5-xml \
    graphics/php-magickwand databases/mysql56-server \
    php5-mysqli
exit

Configure services to startup at boot.

vi /etc/rc.conf
  nginx_enable="YES"
  php_fpm_enable="YES"
  mysql_enable="YES"

Configure php-fpm.

vi /usr/local/etc/php-fpm.conf
  listen = /var/run/php.sock
  chroot = /var/www

Configure nginx.

vi /usr/local/etc/nginx/nginx.conf
  user  nobody;
  worker_processes  1;
  
  events {
      worker_connections  1024;
  }
  
  http {
      include       mime.types;
      default_type  application/octet-stream;
  
      server_tokens off;
  
      sendfile        on;
  
      keepalive_timeout  65;
  
      server {
          listen       80;
          server_name  forum.openseamap.org;
  
          location / {
              root   /var/www;
              index  index.php index.html index.htm;
          }
  
          error_page   500 502 503 504  /50x.html;
          location = /50x.html {
              root   /usr/local/www/nginx-dist;
          }
  
          location ~ \.php$ {
              fastcgi_pass   unix:/var/run/php.sock;
              fastcgi_index  index.php;
              fastcgi_param  SCRIPT_FILENAME  $fastcgi_script_name;
              include        fastcgi_params;
          }
      }
  }

Start services.

 service mysql-server start
 service php-fpm start
 service nginx start

Create database.

mysql -u root
  CREATE DATABASE forum;
  GRANT ALL ON forum.* TO forum@<local-jail-ip> IDENTIFIED BY '<password>';
  \q

phpBB

Fetch and unzip source files.

cd /var/www
fetch 'https://www.phpbb.com/files/release/phpBB-3.0.11.zip'
unzip phpBB-3.0.11.zip
mv phpBB3/* .
mv phpBB3/.htaccess .
rmdir phpBB3
rm phpBB-3.0.11.zip

Change owner for writeable folders.

chown -R www cache files store config.php images/avatars/upload/

Maintenance