PHPList 安装
邮件发送开源软件 PHPList 安装介绍
1:安装基本信息
官网地址 地址:https://www.phplist.com/ 其他:https://www.d-ip.jp/phplist/ 官网手册 https://www.phplist.org/manual/books/phplist-manual/page/installing-phplist-manually 下载URL 地址1:http://www.d-ip.jp/download/images/phplist-3.0.8_ja_dip_20140927.tar.gz 地址2:www.phplist.com/download
OS |
Linux Windows(XP / Vista / 7 / Server2003 / Server2008) |
WEB server | Apache2.x 以上 |
DB | MySQL5.x 以上 |
PHP | 5.x 以上(mbstring 必须) |
系统环境需求列表: phpList system requirements MySQL or MariaDB Apache Note: phpList optionally uses Apache environment variables PHP 5.3.3 or later with the following PHP extensions: pcre imap Core date hash SPL filter openssl mbstring session curl xml iconv json gettext SimpleXML mysqli mysql GD (required by CKEditor Plugin only)
注意: 确认 session.save_path 是否设置正确,web账户是否有权限保存。 如果设置不正确会导致系统登录后跳出等问题。 一般情况下需要确认 php.ini 配置文件, [Session] session.save_handler = files session.save_path = "/tmp" 如果是php-fpm则需要确认 /etc/php-fpm.d/www.conf 中 php_value[session.save_handler] = files php_value[session.save_path] = /tmp 更改配置后注意需要重启相关的服务!
httpd 或 php-fpm
2 安装流程简介
- Download & Unzip phpList
- Upload to your server using FTP
- Create a database
- Add the database details to the config.php file
- Configure using web interface.
2.1 下载解压后把lists子目录移动到web指定目录下
# tar zxvf phplist-3.0.8_ja_dip_20140927.tar
# mv phplist-3.0.8_ja_dip/public_html/public_html/lists /data/webroot/phplist
2.2 访问WEBURL地址会提示数据库信息未提供
http://xxx.com/phplist/lists/admin/
Cannot connect to database, Sql server is not running.
Please check your configuration or contact the administrator.
2.3 创建数据库和用户
2.4 编辑配置文件
# vi /data/webroot/phplist/lists/config/confg.php
# 1 数据库配置内容: what is your Mysql database server hostname $database_host = "localhost"; what is the name of the database we are using $database_name = "phplistdb"; what user has access to this database $database_user = "phplist"; and what is the password to login to control the database $database_password = 'phplist'; # 2 注意下面第三方邮件服务器地址为空,注意屏蔽或设置: ### define("PHPMAILERHOST",''); # 3 默认 TEST 1 不会发任何邮件,需要改成 0 define ("TEST",1); # 4 在最后添加SMTP发件信息 office365 例子如下 # 注意加密端口可能是465 ssl 根据邮件供应商信息填写 define('PHPMAILERHOST', 'smtp.office365.com'); $phpmailer_smtpuser = 'user@company.com'; $phpmailer_smtppassword = 'user_password'; define("PHPMAILERPORT",'587'); define("PHPMAILER_SECURE",'tls'); # 阿里云邮箱例子 define("PHPMAILERHOST",'smtp.qiye.aliyun.com'); $phpmailer_smtpuser = 'user@company.com'; $phpmailer_smtppassword = 'user_password'; define("PHPMAILERPORT",'465'); define("PHPMAILER_SECURE",'ssl');
注意: 数据库配置后再次访问如仅显示logo,请确认php模块以及是否重启了web / php-fpm服务
注意: 加密发送的时候系统可能要确认根证书
根证书查看命令:php -r "print_r(openssl_get_cert_locations());" [default_cert_file] => /etc/pki/tls/cert.pem Array ( [default_cert_file] => /etc/pki/tls/cert.pem [default_cert_file_env] => SSL_CERT_FILE [default_cert_dir] => /etc/pki/tls/certs [default_cert_dir_env] => SSL_CERT_DIR [default_private_dir] => /etc/pki/tls/private [default_default_cert_area] => /etc/pki/tls [ini_cafile] => [ini_capath] => ) 如果没有需要下载根证书后放在指定路径 /etc/pki/tls/cert.pem 根证书下载地址:https://curl.haxx.se/ca/cacert.pem
5.4 web界面初始化
choose Initialize database under the Config option
Click Initialise Database and fill out the form.
注意:这边的email地址必须和config配置文件中的地址相同,不同的话发不了邮件
Finally click to continue with phpList seutp.
You have now finished installation, and the next step is configuration.