——启动extmail和extman的相关程序
1)修改dispatch-initSU_UID和SU_GID
[root@node1 docs]# vi /var/www/extsuite/extmail/dispatch-init
SU_UID=postfix
SU_GID=postfix
2)启动dispatch-init并添加到/etc/rc.local [不启动dispatch-init]
[root@node1 docs]# /var/www/extsuite/extmail/dispatch-init start
[root@node1 docs]# echo "/var/www/extsuite/extmail/dispatch-init start" >> /etc/rc.local
注意:不启动dispatch-init 连接extmail时候会报502错误。
3)启动cmdserver并添加到/etc/rc.local
[root@node1 docs]# /data/www/extman/daemon/cmdserver -v -d
[root@node1 docs]# echo "/var/www/extsuite/extman/daemon/cmdserver -v -d " >> /etc/rc.local
注意:不启动cmdserver的话,extmail登录管理后台,系统信息里会报Connection refused错误
如果出现如下错误:Undefined subroutine &Ext::Utils::sort2name called at /var/www/extsuite/extmail/libs/Ext/App/Folders.pm line 387.
解决办法:
[root@node1 Ext]# cd /var/www/extsuite/extmail/libs/Ext
[root@node1 Ext]# cp Utils.pm /var/www/extsuite/extman/libs/
[root@node1 Ext]# cd /var/www/extsuite/extman/libs/Ext
[root@node1 Ext]# mv Utils.pm ManUtils.pm
[root@node1 Ext]# /var/www/extsuite/extmail/dispatch-init stop
[root@node1 Ext]# /var/www/extsuite/extmail/dispatch-init start
——Extmail虚拟主机配置 [这里用的是nginx]
1)配置extmail虚拟主机
[root@node1 ~]# vi /usr/local/nginx/conf/conf.d/extmail.conf
server {
listen 8080;
server_name mail.test.com;
index index.html index.htm index.php index.cgi;
root /var/www/extsuite/extmail/html/;
location /extmail/cgi/ {
fastcgi_pass 127.0.0.1:8888;
fastcgi_index index.cgi;
fastcgi_param SCRIPT_FILENAME /var/www/extsuite/extmail/cgi/$fastcgi_script_name;
include fcgi.conf;
}
location /extmail/ {
alias /var/www/extsuite/extmail/html/;
}
location /extman/cgi/ {
fastcgi_pass 127.0.0.1:8888;
fastcgi_index index.cgi;
fastcgi_param SCRIPT_FILENAME /var/www/extsuite/extman/cgi/$fastcgi_script_name;
include fcgi.conf;
}
location /extman/ {
alias /var/www/extsuite/extman/html/;
}
access_log /usr/local/nginx/logs/extmail_access.log;
}
2)创建fcgi.conf
12345678910111213141516 [root@node1 ~]# vi /usr/local/nginx/conf/fcgi.conf
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
3)重启nginx
[root@node1 ~]# service nginx restart