Translation: Japanese » English
Setup Guide OpenPNE
Last Updated: 2007/12/20
Table of Contents
* 0. INTRODUCTION
* 1. Installation files
* 2. Configuration file changes
* 3. Database is set up
o 3-1. MySQL 4.1 (5.x) if
o 3-2. MySQL 4.0 cases
* 4. Server settings
o 4-1. Apache settings
o 4-2.'s mail server settings
o 4-3. cron set
* 5. Module run Setup
* 6. Configuration management screen
o 6-1.'s access to the control panel
o 6-2. module of the control panel to change the name
o 6-3. screen in a separate domain management operations
0. INTRODUCTION
This document, OpenPNE version 2.10 based on the language.
OpenPNE the following server environment to operate in as expected.
Web server
Apache is recommended
PHP
PHP 4.3.x / 5.0.x or later
* PHP available to the mbstring extension
* PHP libraries available from GD (JPEG / GIF / PNG support)
* PHP extension of the use of recommended mcrypt
Database server.
MySQL 4.0 or higher (4.1 or higher recommended)
Mail server (mail from a mobile post)
Postfix 2.1.x or higher recommended (Postfix mail server also works with other reports)
1. Installation files
OpenPNE included in the directory and file to the following Web server set up, please.
-- OPENPNE_DIR
├ bin
├ lib <--- OPENPNE_LIB_DIR ├ var <--- OPENPNE_VAR_DIR │ ├ img_cache │ │ ├ gif [777] │ │ │ ├ w_h [777] │ │ │ ├ w_h_raw [777] │ │ │ ├ w76_h76 [777] │ │ │ ├ w120_h120 [777] │ │ │ ├ w180_h180 [777] │ │ │ └ w240_h320 [777] │ │ ├ jpg [777] │ │ │ ├ w_h [777] │ │ │ ... [777] │ │ └ png [777] │ │ ├ w_h [777] │ │ ... [777] │ ├ log [777] │ ├ rss_cache [777] │ ├ templates_c [777] │ └ tmp [777] ├ webapp <--- OPENPNE_WEBAPP_DIR ├ webapp_biz <--- OPENPNE_WEBAPP_BIZ_DIR └ webapp_ext <--- OPENPNE_WEBAPP_EXT_DIR (Viewed from a browser) -- Public_html (directory name is changed) ├ config.inc.php (OPENPNE_DIR directory specified) ├ index.php ... ※ [777] is an example. Appropriate environment to match the value of replacing please. public_html directory path and you can change the name. OPENPNE_DIR public_html directory path directly under (the default assignment) If you change the outside, public_html config.inc.php immediate renewal of the contents please. public_html directory if you change the name, after "2. configuration file change", OPENPNE_PUBLIC_HTML_DIR to modify the content, please. Also, OPENPNE_DIR / var directory of all the written permission from a web server (for example, 777) to please. $ Chmod-R 0777 var / * OpenPNE 2.2 from the image by placing the public_html directory cache, Apache directly from the load to do it. (OpenPNE set in config.php file, OPENPNE_IMG_CACHE_PUBLIC to true please) If you turn this feature, Apache's mod_rewrite to enable the setting,. Htaccess to be available, or even similar to httpd.conf to be written. -- OPENPNE_DIR ├ bin ├ lib <--- OPENPNE_LIB_DIR ├ var <--- OPENPNE_VAR_DIR │ ├ log [777] │ ├ rss_cache [777] │ ├ templates_c [777] │ └ tmp [777] ├ webapp <--- OPENPNE_WEBAPP_DIR ├ webapp_biz <--- OPENPNE_WEBAPP_BIZ_DIR └ webapp_ext <--- OPENPNE_WEBAPP_EXT_DIR (Viewed from a browser) -- Public_html (directory name is changed) ├ config.inc.php (OPENPNE_DIR directory specified) ├ index.php ├ img │ ├. Htaccess │ ├ index.php │ ├ gif [777] │ │ ├ w_h [777] │ │ ├ w_h_raw [777] │ │ ├ w76_h76 [777] │ │ ├ w120_h120 [777] │ │ ├ w180_h180 [777] │ │ └ w240_h320 [777] │ ├ jpg [777] │ │ ├ w_h [777] │ │ ... [777] │ └ png [777] │ ├ w_h [777] │ ... [777] ... ※ [777] is an example. Appropriate environment to match the value of replacing please. 2. Configuration file changes OPENPNE_DIR / config.php.sample to OPENPNE_DIR / config.php config.php copy of the environment, according to edit it. OPENPNE_URL Based URL (absolute path) DSN (MySQL) database to connect to information. Connecting a user name, password, the host server and database name. ENCRYPT_KEY Members login encryption keys used (56 characters in the ASCII characters) Others can not be easily guessed by a string as you please. MAIL_SERVER_DOMAIN E-mail's domain name server (a mobile version if you use a post-mail) If necessary, please rewrite other settings. Debug settings (OPENPNE_DEBUGGING) is the production operation to migrate to 0 when it is recommended. public_html directory if you change the name, OPENPNE_PUBLIC_HTML_DIR rewritten to change the name of the directory, please. PHP safe mode setting is enabled, MAIL_SET_ENVFROM please set to false. 3. Database is set up 3-1. MySQL 4.1 or later (5.x) if If you create a new database, SQL following query on the database. (※ rental database server, etc. already have been provided if you do not run.) CREATE DATABASE `DBNAME` DEFAULT CHARACTER SET utf8; Preparation of the database (for example: DBNAME) on the following SQL statement to execute the order. 1. OPENPNE_DIR/setup/sql/mysql41/install/install-2.10-create_tables.sql 2. OPENPNE_DIR/setup/sql/mysql41/install/install-2.10-insert_data.sql If you use PNEBIZ In addition, the following SQL statement, please run. * OPENPNE_DIR/setup/sql/mysql41/option/pnebiz-header.sql [Example] (1) Create a database (optional) $ Mysql-u username-p mysql> CREATE DATABASE `DBNAME` DEFAULT CHARACTER SET utf8;
mysql> exit;
(2) OpenPNE setup for running SQL
$ Cd setup/sql/mysql41/install /
$ Mysql-u username-p - default-character-set = utf8 DBNAME CREATE DATABASE `DBNAME`;
mysql> exit;
(2) OpenPNE setup for running SQL
$ Cd setup/sql/mysql40/install /
$ Mysql-u username-p DBNAME
ServerName openpne.example.com
DocumentRoot / home / username / OpenPNE / public_html /
DirectoryIndex index.html index.php
Once you httpd.conf, Apache, please restart.
4-2.'s Mail server settings
If you do not use a mobile version of the following configuration is required.
MAIL_SERVER_DOMAIN to receive e-mail, e-mail address is available for your system.
Old-style format new items
New registration / login URL retrieve get @ MAIL_SERVER_DOMAIN get @ MAIL_SERVER_DOMAIN
Change the profile photo pXXX-YYY @ MAIL_SERVER_DOMAIN pXXX @ MAIL_SERVER_DOMAIN
Community bulletin board posting mail tXXX-YYY @ MAIL_SERVER_DOMAIN tXXX @ MAIL_SERVER_DOMAIN
E-mail posting diary bXXX-YYY @ MAIL_SERVER_DOMAIN blog @ MAIL_SERVER_DOMAIN
Photo diary changes biXXX-YYY @ MAIL_SERVER_DOMAIN biXXX @ MAIL_SERVER_DOMAIN
Community change ciXXX-YYY @ MAIL_SERVER_DOMAIN ciXXX @ MAIL_SERVER_DOMAIN
Events change the topic photo tiXXX-YYY @ MAIL_SERVER_DOMAIN tiXXX @ MAIL_SERVER_DOMAIN
* XXX is a number.
* YYY there are 12 bytes of alphanumeric characters ([0-9 a-f] (12)).
The new format, both old-style mail or accept the setting config.php (MAIL_ADDRESS_HASHED) by the switch.
The new format is the post-e-mail address From an impersonation of security measures for the introduction. From measures to impersonate (IP restrictions etc.) and the mail server side, if the old format of operational problems.
Forward-mail server settings, using these e-mail to the mail, following a set of commands.
"| / usr / bin / php OPENPNE_DIR / bin / mail.php"
4-3. Cron set
In the example set]
cron file additional authority to run.
$ Chmod 0755 bin / *. cron
/ etc / crontab following to describe.
# 6 o'clock to send mail and RSS updates every 20 minutes
00 6 * * * root sh OPENPNE_DIR / bin / tool_send_daily_news.cron OPENPNE_DIR / bin / [bin_path] / php
00 6 * * * root sh OPENPNE_DIR / bin / tool_send_birthday_mail.cron OPENPNE_DIR / bin / [bin_path] / php
00 6 * * * root sh OPENPNE_DIR / bin / tool_send_schedule_mail.cron OPENPNE_DIR / bin / [bin_path] / php
* / 20 * * * * root sh OPENPNE_DIR / bin / tool_rss_cache.cron OPENPNE_DIR / bin / [bin_path] / php
[bin_path] is, PHP executable file is installed in the directory (for example, / usr / bin).
The Daily News sent a script for the Daily News sent notice of the results logged. / etc / crontab described as follows, and to receive e-mail.
00 6 * * * root sh OPENPNE_DIR / bin / tool_send_daily_mail.cron OPENPNE_DIR / bin / [bin_path] / php | mail-s "daily news log" example@example.com
5. Module run Setup
Browser to access the following URL, please. (After completing the setup can not access)
OPENPNE_URL? M = setup
(For example) http://openpne.example.com/?m=setup
The SNS, the initial members of the administrative account.
6. To access the control panel
6-1.'s Access to the control panel
Following URL to access the setup of the control module set for the account name and password to log in, please. After logging in, menu management "SNS" basic information from the SNS can be set up.
OPENPNE_URL? M = admin
(For example) http://openpne.example.com/?m=admin
The menu management "setting the control panel> page randomly generated name" random generation and management to run the screen in the page to change the name because it can improve security for sure you run the setup after it featured on Masu.
6-2. Module of the control panel to change the name (optional)
URL of the control panel changes, in a configuration file config.php ADMIN_MODULE_NAME please change the value.
For example, abcde change,
OPENPNE_URL? M = abcde
(For example) http://openpne.example.com/?m=abcde
From the URL you to access the control panel.
6-3. Manage and operate the domain to another screen (optional)
Usually the control panel to operate as a separate domain, or if you want to use the Basic authentication, for example, if you want to restrict access, Web server to read from the public directory, you may want to divide the operation.
OpenPNE does, public_html following file management screen for the public directory, config.inc.php rewrite the contents of this can be achieved.
The directory structure
-- OPENPNE_DIR
├ bin
├ lib
├ var
├ webapp
├ webapp_ext
├ webapp_biz
└ config.php
[http://sns.example.com/]
-- Public_html (directory name is changed)
├ config.inc.php
├ index.php
...
Copy ↓
[http://admin.example.com/]
-- Admin_public_html (directory name is changed)
├ config.inc.php (← rewrite this file)
├ index.php
...
config.inc.php (emphasis added part of the two items.)
More than in the control panel for the URL (example: http://admin.example.com/) access to the set.
Meanwhile, the usual URL (example: http://sns.example.com/?m=admin) does not manage access to the screen so that, config.php in the following set.
config.php
/ / Disable the module
$ GLOBALS [ '_OPENPNE_DISABLE_MODULES'] = array ( 'admin', 'setup');
This setup is complete. Invite your friends and try and write a diary or to create your own SNS please!