差異處
這裏顯示兩個版本的差異處。
| 兩邊的前次修訂版 前次修改 下次修改 | 前次修改 | ||
| tech:phplist [2019/03/26 22:07] – jonathan_tsai | tech:phplist [2019/03/27 00:42] (目前版本) – [編輯 phplist 設定檔] jonathan_tsai | ||
|---|---|---|---|
| 行 1: | 行 1: | ||
| + | ====== Centos7 安裝 phplist ====== | ||
| + | * 安裝環境 : CentOS 7 | ||
| + | * phplist : 3.4.0 | ||
| + | |||
| + | |||
| + | ===== 安裝程序 ===== | ||
| + | * 安裝主要套件 <code sh> | ||
| + | yum install epel-release | ||
| + | rpm -Uvh https:// | ||
| + | yum install php72w php72w-cli php72w-common php72w-imap php72w-mbstring php72w-xml php72w-mysqli php72w-gd mariadb mariadb-server httpd wget | ||
| + | </ | ||
| + | * <code sh> | ||
| + | su - root | ||
| + | wget https:// | ||
| + | tar -xvf phplist-3.4.0.tgz | ||
| + | cp -a phplist-3.4.0/ | ||
| + | </ | ||
| + | * 設定與啟動 apache / mariadb <code sh> | ||
| + | vi / | ||
| + | : | ||
| + | [Date] | ||
| + | ; Defines the default timezone used by the date functions | ||
| + | ; http:// | ||
| + | date.timezone = Asia/Taipei | ||
| + | : | ||
| + | </ | ||
| + | vi / | ||
| + | : | ||
| + | IfModule dir_module> | ||
| + | DirectoryIndex index.php index.html | ||
| + | </ | ||
| + | : | ||
| + | </ | ||
| + | systemctl restart httpd | ||
| + | systemctl start mariadb | ||
| + | mysql -u root | ||
| + | </ | ||
| + | CREATE DATABASE phplistdb CHARACTER SET utf8 COLLATE utf8_unicode_ci; | ||
| + | CREATE USER ' | ||
| + | GRANT ALL PRIVILEGES ON phplistdb.* TO ' | ||
| + | FLUSH PRIVILEGES; | ||
| + | exit | ||
| + | </ | ||
| + | |||
| + | ===== 編輯 phplist 設定檔 ===== | ||
| + | * / | ||
| + | : | ||
| + | $default_system_language = " | ||
| + | : | ||
| + | $database_host = ' | ||
| + | // what is the name of the database we are using | ||
| + | $database_name = ' | ||
| + | // what user has access to this database | ||
| + | $database_user = ' | ||
| + | // and what is the password to login to control the database | ||
| + | $database_password = ' | ||
| + | : | ||
| + | define(' | ||
| + | // if TEST is set to 1 (not 0) it will not actually send ANY messages, but display what it would have sent | ||
| + | // this is here, to make sure you edited the config file and mails are not sent " | ||
| + | // on unmanaged systems | ||
| + | define(' | ||
| + | : | ||
| + | $bounce_protocol = ' | ||
| + | // set this to 0, if you set up a cron to download bounces regularly by using the | ||
| + | // commandline option. If this is 0, users cannot run the page from the web | ||
| + | // frontend. Read README.commandline to find out how to set it up on the | ||
| + | // commandline | ||
| + | define(' | ||
| + | // when the protocol is pop, specify these three | ||
| + | $bounce_mailbox_host = ' | ||
| + | $bounce_mailbox_user = ' | ||
| + | $bounce_mailbox_password = ' | ||
| + | : | ||
| + | define(" | ||
| + | define(' | ||
| + | define(' | ||
| + | $phpmailer_smtpuser = ' | ||
| + | $phpmailer_smtppassword = ' | ||
| + | $phpmailer_smtpoptions = array( | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ) | ||
| + | ); | ||
| + | |||
| + | : | ||
| + | </ | ||
| + | * 更改目錄權限 <code sh> | ||
| + | chown -R apache: | ||
| + | mkdir -p / | ||
| + | chown apache: | ||
| + | </ | ||
| + | |||
| + | ===== 進入網頁設定 ===== | ||
| + | * 網址 - http:// | ||
| + | - 看到 < | ||
| + | - 填寫基本表格資料 點 [Continue] 就自動建立資料表 | ||
| + | - 會顯示檢查是否相關 php 套件都有安裝好 點 [Not subscribed] 才會出現繼續設定的按鈕 {{: | ||
| + | |||
| + | ===== 寄信設定 ===== | ||
| + | <note warning> | ||
| + | * config.php 內必須要設定 $phpmailer_smtpoptions 才能通過 SSL 加密協定, | ||
| + | Mar 26 23:42:45 ct-edm postfix/ | ||
| + | Mar 26 23:42:45 ct-edm postfix/ | ||
| + | Mar 26 23:42:45 ct-edm postfix/ | ||
| + | Mar 26 23:42:45 ct-edm postfix/ | ||
| + | </ | ||
| + | * phplist 的 config 設定 person in charge of this system 必須是寄送 Mail Server 內的信箱 Exp. 寄送信箱是 edm.ichiayi.com 則 smtpuser 是 noreply 就要填寫 [email protected] | ||
| + | </ | ||
| + | |||
| + | * config.php 內的 $phpmailer_smtpoptions 範例 < | ||
| + | : | ||
| + | $phpmailer_smtpuser = ' | ||
| + | $phpmailer_smtppassword = ' | ||
| + | |||
| + | $phpmailer_smtpoptions = array( | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ) | ||
| + | ); | ||
| + | : | ||
| + | </ | ||
| + | * phplist config 設定畫面參考 | ||
| + | ===== 參考網址 ===== | ||
| + | * https:// | ||
| + | * https:// | ||
| + | |||
| + | {{tag> | ||