歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux綜合 >> Linux資訊 >> 更多Linux >> FREEBSD5.4的系統安裝與服務器配置手冊(四)

FREEBSD5.4的系統安裝與服務器配置手冊(四)

日期:2017/2/27 14:27:19   编辑:更多Linux

這裡使用編譯的方式安裝Perl,可以從http://www.perl.com獲得perl的最新版本,名字為stable.tar.gz5.8.7/按默認的方式安裝Perl#sh Configure –de這裡會出現很多提示,直接按回車就可以了!#make這裡花費的時間較長,可要有點耐心(不過別向我一樣機子死了還在那裡傻傻的等待,後來發現是電源風扇壞了導致死機!怎一個郁悶了得啊!希望您不會遇到我這樣的問題)#make test#make install#reboot登陸系統後運行perl –v查看Perl版本信息#perl –v 點擊查看大圖

5.2安裝mysql4.0.x

為了與系統的軟件系統區分開,這裡將所有我們手動編譯軟件安裝在/usr/server中。

#tar -zxvf mysql-4.0.26.tar.gz#cd mysql-4.0.26#./configure--prefix=/usr/server/mysql--localstatedir=/usr/server/mysql/db--with-unix-socket-path=/tmp/mysql.sock--with-mysqld-user=mysql--with-charset=gb2312--with-extra-charsets=all# make# make install接下來安裝mysql數據庫# scripts/mysql_install_db# pw groupadd mysql# pw useradd mysql -g mysql# chown -R mysql:mysql /usr/server/mysql/db最後需要設置mysql的root口令# /usr/server/mysql/bin/mysqld_safe &# /usr/server/mysql/bin/mysqladmin -uroot passWord '密碼'檢查密碼修改是否正確#/usr/server/mysql/bin/mysql -u root –p輸入密碼提示符為如果有mysql>則表示登陸成功在此輸入,回車繼續mysql>show databases;在下兔可以看到MYSQL中的兩個數據庫

輸入mysql>quit;回車退出此時您的MSYQL安裝完畢口令設置完成後,暫時關閉mysql服務:# kill %1

5.3安裝Cyrus-sasl2

因為要查詢MySQL數據庫,所以我們需要在編譯cyrus-sasl2時加上對MySQL的支持,同時我們打開了對plain和login兩種驗證方式的支持:




$ tar -zxvf cyrus-sasl-2.1.21.tar.gz$ cd cyrus-sasl-2.1.21$ ./configure --disable-anon -enable-plain --enable-login --enable-sql --with-mysql=/usr/server/mysql --with-mysql-includes=/usr/server/mysql/include/mysql --with-mysql-libs=/usr/server/mysql/lib/mysql$ make# make install按照sasl的安裝說明,需要建立一個symblink:# ln -s /usr/local/lib/sasl2 /usr/lib/sasl2

5.4安裝Postfix2.1.x

首先,按照postfix的安裝說明,建立postfix、postdrop組和postfix用戶:

# pw groupadd postfix# pw groupadd postdrop# pw useradd postfix -g postfix -G postdrop

用戶和組建立好後,我們就可以開始編譯Postfix了:

$ tar -zxvf postfix-2.2.5.tar.gz$ cd postfix-2.2.5$ make tidy$ make makefiles 'CCARGS=-DHAS_MYSQL -I/usr/server/mysql/include/mysql -DUSE_SASL_AUTH -I/usr/local/include/sasl' 'AUXLIBS=-L/usr/server/mysql/lib/mysql -lmysqlclient -lm -lz -L/usr/local/lib -lsasl2'$ make

因為我們的mysql不是安裝在默認目錄中的,所以需要告訴postfix應該到哪裡去找libmysqlclient.so.12,使用ldconfig就可以達到這個目的:

# ldconfig -m /usr/server/mysql/lib/mysql# make install

執行make install這裡會出現很多問題,但postfix已經為我們設置好了默認的答案,直接使用這些答案就可以使postfix正常工作了,所以我們只要直接按回車就可以了。

到這裡,支持mysql和sasl認證的postfix就已經安裝成功了。

5.5安裝Courier-imap

這裡要進入普通用戶身份才可以安裝

$ tar -jxvf courier-imap-3.0.7.tar.bz2$ cd courier-imap-3.0.7

因為courier-imap會使用mysql_config來取得一些編譯參數(include、libs、cflags、socket等),但我們是將mysql安裝在非/usr/server中,所以默認的PATH就不起作用,需要我們來使courier-imap能夠搜索到mysql_config

$ eXPort PATH="$PATH:/usr/server/mysql/bin"$ ./configure --prefix=/usr/server/courier-imap --with-authmysql --enable-unicode$ make

此時進入ROOT身份執行make install



# make install

5.6建立用戶數據表結構

這裡,我們直接使用postfixadmin-2.2.5的表結構,現在我們來解開postfixadmin:

$ tar -zxvf ?postfixadmin-2[1].1.0.tgz$ cd postfixadmin-2.1.0/

將表結構導入到mysql前需要啟動MYSQL:

$/usr/server/mysql/bin/mysqld_safe &$ /usr/server/mysql/bin/mysql -u root -p < DATABASE_MYSQL.TXT

5.7配置postfix

首先需要更改/etc/postfix/main.cf中的一些基本參數,請按照自己的實際情況修改,本例以域名mgpc.com.cn為例:

#ee /etc/postfix/main.cfmyhostname = mail.mgpc.com.cnmydomain = mgpc.com.cnmyorigin = $mydomainmydestination = $myhostname, localhost.$mydomain, localhost  (這裡沒有使用$mydomain是因為我們將使用virtualhost)inet_interfaces = all

在設置好以上基本參數後就需要設置支持virtualhost了,在本例中我們將所有的郵件全部存放在/var/mailbox中,同時因為iGENUS要在用戶郵箱目錄(Maildir)中建立文件和存放信息,所以就要求web服務器的用戶要對用戶郵箱目錄有寫的權限,所以我們在這裡就將用戶郵箱的uid和gid設置成web服務器的uid和gid以確保iGENUS正常工作,本例中web服務器的uid和gid都為80。在/etc/postfix/main.cf中加入:

virtual_mailbox_domains = mysql:/etc/postfix/mysql/mysql_mailbox_domains.cfvirtual_mailbox_base = /var/mailbox/virtual_mailbox_maps = mysql:/etc/postfix/mysql/mysql_mailbox_maps.cfvirtual_minimum_uid = 80virtual_uid_maps = static:80virtual_gid_maps = static:80virtual_alias_maps = mysql:/etc/postfix/mysql/mysql_alias_maps.cf

虛擬域名支持的配置比較簡單,根據字意就可以看明白,不過有一點需要注意,/var/mailbox/最後的"/"字符不能省略。

在設置好虛擬域名的基本參數後,就需要設置每個MySQL查詢配置文件了,我們將所有的MySQL查詢配置文件統一存放在/etc/postfix/mysql中,每個查詢配置文件的內容分別如下:

在/etc/postfix/建立mysql目錄#mkdir /etc/postfix/mysql#ee /etc/postfix/mysql/mysql_mailbox_domains.cf加入user = postfixpassword = postfixdbname = postfix

table = domainselect_field = domainwhere_field = domainadditional_conditions = and active='1'

加入#ee /etc/postfix/mysql/mysql_mailbox_maps.cfuser = postfixpassword = postfixdbname = postfix



table = mailboxselect_field = maildirwhere_field = usernameadditional_conditions = and active='1'

加入#ee /etc/postfix/mysql/mysql_alias_maps.cfuser = postfixpassword = postfixdbname = postfix

table = aliasselect_field = gotowhere_field = addressadditional_conditions = and active='1'

接下來開啟sasl認證(為了與舊的MUA兼容所以加入broken_sasl_auth_clients的支持),在/etc/postfix/main.cf中加入:#ee /etc/postfix/main.cfsmtpd_sasl_auth_enable = yessmtpd_sasl_application_name = smtpdbroken_sasl_auth_clients = yessmtpd_sasl_local_domain = mgpc.com.cnsmtpd_recipient_restrictions= permit_sasl_authenticated permit_auth_destination reject

接下來設置alias_maps,在/etc/postfix/main.cf中加入:alias_maps = hash:/etc/postfix/aliases現在用postalias生成aliases.db# cd /etc/postfix# postalias aliases

最後就是建立/var/mailbox目錄:# mkdir /var/mailbox# chown -R www:www /var/mailbox

5.8配置sasl認證

在配置postfix的時候,我們設置了postfix使用的sasl配置文件為smtpd,所以現在我們需要配置sasl讓它知道怎麼從MySQL中讀取認證信息:

# ee /usr/local/lib/sasl2/smtpd.conf在其中加入pwcheck_method: auxpropmech_list: plain loginauxprop_plugin: sqlsql_engine: mysqlsql_hostnames: localhostsql_user: postfixsql_passwd: postfixsql_database: postfixsql_select: SELECT password FROM mailbox WHERE username='%u@%r' and domain='%r' and active='1'

上面的選項中根本字意就可以了解它的意思,其中sql_select中的%u表示是用戶名,%r表示是realm,通常為用戶的域名(如果用戶名中沒有包含域名,則默認為服務器的域名),因為postfixadmin生成的用戶名是[email protected]的形式,而非標准的user形式,所以我們需要設置WHERE語句為username='%u$%r'即'用戶名@域名'。

5.9配置courier-imap

要讓courier-imap能夠正確的讀取MySQL中的認證信息,就需要配置authmysql的配置文件/usr/server/courier-imap/etc/authmysqlrc,本例中其內容如下:

# cd /usr/server/courier-imap/etc/# cp /usr/server/courier-imap/etc/authmysqlrc.dist /usr/server/courier-imap/etc/authmysqlrc# ee authmysqlrcMYSQL_SERVER localhostMYSQL_SOCKET /tmp/mysql.sockMYSQL_USERNAME postfixMYSQL_PASSWORD postfixMYSQL_DATABASE postfixMYSQL_USER_TABLE mailboxMYSQL_LOGIN_FIELD usernameMYSQL_CLEAR_PWFIELD passwordMYSQL_UID_FIELD '80'MYSQL_GID_FIELD '80'MYSQL_HOME_FIELD '/var/mailbox/'MYSQL_MAILDIR_FIELD maildirMYSQL_NAME_FIELD nameMYSQL_QUOTA_FIELD quotaMYSQL_WHERE_CLAUSE active='1'同postfix中的配置一樣,/var/mailbox/最後的"/"字符不能省略。

注釋掉MYSQL_CRYPT_PWFIELD

接下來配置authdaemonrc:# cp /usr/server/courier-imap/etc/authdaemonrc.dist /usr/server/courier-imap/etc/authdaemonrc

因為我們這裡只使用了authmysql模塊,所以我們可以把其它驗證模塊去掉,編輯authdaemonrc文件,將其中的:

authmodulelist="authcustom authcram authuserdb authmysql authpam"

改成:

authmodulelist="authmysql"

最後就是配置pop3d和imapd了,這裡我們直接使用其默認設置:

# cp /usr/server/courier-imap/etc/pop3d.dist /usr/server/courier-imap/etc/pop3d# cp /usr/server/courier-imap/etc/pop3d-ssl.dist /usr/server/courier-imap/etc/pop3d-ssl# cp /usr/server/courier-imap/etc/imapd.dist /usr/server/courier-imap/etc/imapd# cp /usr/server/courier-imap/etc/imapd-ssl.dist /usr/server/courier-imap/etc/imapd-ssl

5.10測試系統

按以下步驟啟動服務

啟動MySQL

# /usr/server/mysql/share/mysql/mysql.server start

為了確保postfix以及以後的進程能夠正確的搜索到libmysqlclient,在這裡將mysql的lib設置到ldconfig的搜索路徑中:# ldconfig -m /usr/server/mysql/lib/mysql

啟動Postfix# /usr/sbin/postfix start

啟動Courier-imap# /usr/server/courier-imap/libexec/authlib/authdaemond start# /usr/server/courier-imap/libexec/pop3d.rc start# /usr/server/courier-imap/libexec/imapd.rc start

首先建立一個測試用戶:$ /usr/server/mysql/bin/mysql -upostfix -pmysql> use postfix;mysql> insert into domain(domain,active) values('mgpc.com.cn','1');mysql> insert into mailbox(username,password,name,maildir,domain,active) values('[email protected]','123456','TESTER','mgpc.com.cn/daifubing/Maildir/','mgpc.com.cn','1');mysql> quit;

測試postfix:$ echo "hello world" mail [email protected]



$ ls -al /var/mailboxdrwx------ 3 www www 512 Oct 16 23:15 mgpc.com.cn$ ls -al /var/mailbox/mgpc.com.cndrwx------ 3 www www 512 Oct 16 23:15 .drwxr-xr-x 7 www www 512 Oct 16 23:24 ..drwx------ 3 www www 512 Oct 16 23:15 test$ ls -al /var/mailbox/mgpc.com.cn/daifubingdrwx------ 3 www www 512 Oct 16 23:15 .drwx------ 3 www www 512 Oct 16 23:15 ..drwx------ 5 www www 512 Oct 16 23:15 Maildir$ ls -al /var/mailbox/mgpc.com.cn/daifubing/Maildirdrwx------ 5 www www 512 Oct 16 23:15 .drwx------ 3 www www 512 Oct 16 23:15 ..drwx------ 2 www www 512 Oct 16 23:15 curdrwx------ 2 www www 512 Oct 16 23:18 newdrwx------ 2 www www 512 Oct 16 23:18 tmp

上面ls反回的結果可以看到,一個名為mgpc.com.cn的目錄已經被postfix建立,同時可以看到目錄結構為/var/mailbox/DOMAIN.LTD/USERNAME/Maildir/,這與我們設置的完全相同。

測試SMTP認證:$ telnet localhost 25Trying 127.0.0.1...Connected to localhost.Escape character is '^]'.220 mail.mgpc.com.cn ESMTP PostfixEHLO mgpc.com.cn250-mail.mgpc.com.cn250-PIPELINING250-SIZE 10240000250-VRFY250-ETRN250-AUTH LOGIN PLAIN250-AUTH=LOGIN PLAIN250 8BITMIMEAUTH LOGIN334 VXNlcm5hbWU6輸入用戶名的Base64位編碼334 UGFzc3dvcmQ6輸入密碼的Base64位編碼235 Authentication sUCcessful測試中使用的用戶名是[email protected]密碼是123456,我們的測試成功了。

測試pop3$ telnet localhost 110Trying 127.0.0.1...Connected to localhost.Escape character is '^]'.+OK Hello there.USER [email protected]+OK Password required.PASS 123456+OK logged in.上面的提示表示我們的pop3登錄也成功了。

5.11安裝Apache

下載源代碼包www#cd /usr/home/peng/srcwww#tar –zvxf httpd-2.0.47.tar.gzwww#cd httpd-2.0.47www#./configure --prefix=/usr/local/apache --enable-sowww#makewww#make install

5.12安裝PHP

下載源代碼包www#tar –zxvf php-4.4.0.tar.gzwww#cd php-4.4.0www#./configure --with-mysql=/usr/server/mysql --with-apxs2=/usr/local/apache/bin/apxs --enable-track-vars --enable-force-cgi-redirect --enable-pic --enable-inline-optimiation --enable-memory-limit --enable-bcmath --enable-shmop --enable-versioning --enable-calendar --enable-dbx --enable-dio --enable-mcal --with-config-file-path=/usr/local/apache/conf?www#makewww#make installwww#cp php.ini-dist /usr/local/apache/conf/php.ini



#ee /usr/local/apache/conf/httpd.conf更改httpd.conf中的user和group為www

找到DocumentRoot將路徑改為/usr/local/www/加入

AddType application/x-httpd-php .phpAddType application/x-httpd-php .php3AddType application/x-httpd-php .pHtmlAddType application/x-httpd-php-source .phps

更改igenus的權限為#chown -R www:www igenus更改mailbox權限為www?#chown -R www:www / var/mailbox

5.13安裝postfixadmin-2.0.5

postfixadmin可以在http://high5.net/postfixadmin處得到,下載後是一個名為postfixadmin-2.0.5.tgz的文件$ tar -zxvf postfixadmin-2.0.5.tgz$ mv postfixadmin-2.0.5 postfixadmin$ cd postfixadmin為了讓postfixadmin正常工作,需要進行一些小的設置,將postfixadmin目錄中的config.inc.php.sample復制為config.inc.php,然後編輯其中的參數:$ cp config.inc.php.sample config.inc.php$ vi config.inc.php本例中的配置如下:// Language config// Language files are located in './languages'.$CONF['default_language'] = 'cn';

// Database Config// 'database_type' is for future reference.$CONF['database_type'] = 'mysql';$CONF['database_host'] = 'localhost';$CONF['database_user'] = 'postfixadmin';$CONF['database_password'] = 'postfixadmin';$CONF['database_name'] = 'postfix';

$CONF['encrypt'] = 'cleartext';

// Mailboxes// If you want to store the mailboxes per domain set this to 'YES'.// Example: /usr/local/virtual/domain.tld/[email protected]$CONF['domain_path'] = 'YES';// If you don't want to have the domain in your mailbox set this to 'NO'.// Example: /usr/local/virtual/domain.tld/username$CONF['domain_in_mailbox'] = 'NO';

// Quota// When you want to enforce quota for your mailbox users set this to 'YES'.$CONF['quota'] = 'YES';$CONF['quota_multiplier'] = '1048576';

為了兼容性,所以我們在這裡使用明文口令方式($CONF['encrypt']='cleartext';),郵箱的存儲格式使用domain.ltd/username的形式,所以設置:$CONF['domain_path'] = 'YES';$CONF['domain_in_mailbox'] = 'NO';

按照上面的設置,在postfixadmin建立新的虛擬用戶的時候,其maildir的格式為domain.ltd/username,但iGENUS是在domain.ltd/username/Maildir中進行操作,所以我們需要對postfixadmin做一點小的修改以使其與iGENUS兼容。

首先修改postfixadmin目錄中的create-mailbox.php,找到該文件中的:



if ($CONF['domain_path'] == "YES"){if ($CONF['domain_in_mailbox'] == "YES"){$maildir = $fDomain . "/" . $fUsername . "/";}else{$maildir = $fDomain . "/" . $_POST['fUsername'] . "/";}}else{$maildir = $fUsername . "/";}

在其後面增加:// Compat for iGENUS$maildir .= "Maildir/";同時修改postfixadmin/admin目錄中的create-mailbox.php,找到該文件中的:if ($CONF['domain_path'] == "YES"){if ($CONF['domain_in_mailbox'] == "YES"){$maildir = $fDomain . "/" . $fUsername . "/";}else{$maildir = $fDomain . "/" . $_POST['fUsername'] . "/";}}else{$maildir = $fUsername . "/";}

在其後面增加:// Compat for iGENUS$maildir .= "Maildir/";

到這裡我們的postfixadmin就修改基本完成,另外,在這裡我們使用了postfixadmin的中文語言包($CONF['default_language'] = 'cn';),由於這個語言包是在postfixadmin2.0.4的基礎上制作的,所以在2.0.5中使用需要做一個小的修改,以使其能夠正確的顯示中文編碼:$ vi languages/cn.lang找到該文件最前面的如下行:$PALANG['YES'] = '是';在該行前面加入:$PALANG['charset'] = 'gb2312';

保存退出,到此,postfixadmin的修改就已經全部完成,現在可以將postfixadmin這個目錄復制或上傳到你的web目錄中了,然後打開浏覽器,進入postfixadmin的管理界面http://www.yourdomain.com/postfixadmin/admin/index.php,這裡就可以新建域名和管理員了(注意,通過應該先建域名,再建立管理員)。然後用新建立的管理員登錄到http://www.yourdomain.com/postfixadmin/index.php中就可以建立該域的郵箱了。

5.14安裝iGENUS_2.0.2

從www.igenus.org處得到igenus_2.0.2_20040901_release.tgz,將其解開:$ tar -zxvf igenus_2.0.2_20040901_release.tgz$ cd igenus

由於igenus使用了自己的表結構,所以要在postfix的基礎上使用igenus的所有功能,還需要進行比較大的修改,這裡我們就不再討論,本文中我們就向大家介紹如何使用戶能夠登錄到igenus中,並且正常的發郵件和收郵件,其它功能就不再介紹。

首先需要修改igenus的配置文件,讓其它知道如何與MySQL連接:

$ cd config$ vi config_inc.php根據你的實際情況修改以下內容(配置中的中文為筆者說明):$CFG_BASEPATH = "/htdocs/mail/igenus";   //iGENUS的絕對路徑

// Mysql$CFG_MYSQL_HOST = 'localhost';$CFG_MYSQL_USER = 'postfixadmin';      //因為用戶需要在igenus中更改密碼等,所以需要使用對數據庫具有寫權限的postfixadmin用戶,而非擁有只讀權限的postfix用戶$CFG_MYSQL_PASS = 'postfix';$CFG_MYSQL_DB = 'postfix';

// Temp Directory for maildir listing,mail body decodeing etc.$CFG_TEMP = $CFG_BASEPATH."/temp";     //這裡我們將igenus的臨時目錄設置為igenus安裝目錄下的temp目錄

現在需要建立temp文件夾,並使其可被web服務器的用戶讀寫: $ mkdir igenus/temp$ chmod 777 igenus/temp

同時要使igenus使用Postfixadmin的表結構,我們需要修改igenus目錄中的login.php文件,以使用戶能夠正常登錄。$ vi login.php修改其中的:$query = "SELECT * FROM vpopmail WHERE pw_name='$Post_name' and pw_domain='$Post_domain'";為:$query = "SELECT * FROM mailbox WHERE username='$Post_name@$Post_domain' and active='1'";將:$home = $data['pw_dir'];$Post_passwd2 = $data['pw_passwd'];$pw_id = $data['pw_id'];$pw_shell = $data['pw_shell'];$pw_gecos = $data['pw_gecos'];$pw_gid = $data['pw_gid'];$pw_domain = strtolower($data['pw_domain']);$pw_name = strtolower($data['pw_name']);修改為:$home = "/var/mail/" . $data['maildir'] . "../";$Post_passwd2 = $data['password'];$pw_shell = $data['quota'];$pw_gecos = $data['name'];$pw_domain = strtolower($data['domain']);$pw_name = strtolower($data['username']);其中$home = "/var/mail/" . $data['maildir'] . "../";是告訴iGENUS郵件存儲的路徑,"/var/mail/"為我們的郵件存放目錄,同時因為iGENUS進行讀寫郵件時會在$home變量後面加上字符串"Maildir/",但我們的MySQL數據表mailbox中的maildir字段中已經包含"Maildir/",所以為了讓iGENUS得到正確的路徑,我們在最後加上了字符串"../"

修改:if ($pw_gid & 0x04){PutLogs($pw_id, 'login', "no priv to login","$Post_name@$Post_domain", $sql);ErrorExit(-2); // 用戶無權登錄}

if ($home !="" && ($Post_passwd2 == crypt($Post_passwd,$Post_passwd2))){為:if ($pw_gid & 0x04){PutLogs($pw_id, 'login', "no priv to login","$Post_name@$Post_domain", $sql);ErrorExit(-2); // 用戶無權登錄}

if ($home !="" && ($Post_passwd2 == $Post_passwd)){

注釋或者刪除:$_SESSION['G_ID'] = $pw_id;

在提示的地方將mysql_fetch_object()改成@mysql_fetch_object()即可



1、也就是在mailbox.php的253和274行2、在add2addr.php的94和109行(通訊錄)3、在pubaddr.php的第65和85行(通訊錄中的公共)4、在address.php的第59和73行(通訊錄中的個人)5、在personal.php的第82行(系統設置的個人資料)6、在card.php的第162\179行(名片夾)7、在stow.php的第119\138行(收藏夾)8、在message.php的第106\126行(內部通知)

在以下的PHP文件中將$OUT['EMAIL']= "$SG_USERNAME@$SG_DOMAIN";更改成:$OUT['EMAIL']=$SG_USERNAME";mailbox.php、logo.php、file.php、forword.php、list.php、message.php、reply.php、scheduler.php、send.php、sendagain.php、sendmail.php裡面的setfrom行、sendok.php、writeagain.php、personal.php 、設置網絡硬盤路徑可以修改igenus/config下的config_inc.php中的$CFG_NETDISK_PATH = "/home/netdisk";#mkdir /home/netdisk#chmod –R www:www? /home/netdisk請改成你這節的路徑比如:$CFG_NETDISK_PATH = " /var/netdisk";前提是你必須有這個目錄

5.15安裝phpmyadmin

#tar –zxvf phpmyadmin2.0.6.tar.gz#mv phpmyadmin2.0.6.tar.gz /usr/local/www/

5.16導入IGENUS的數據表

編輯igenus下的docs目錄裡的iGENUS.sql文件,刪除# --------------------------------------------------------## Table structure for table `address`#CREATE TABLE `address` (`id` int(11) unsigned NOT NULL auto_increment,`pw_id` int(5) NOT NULL default '0',`name` varchar(64) NOT NULL default '',`email` varchar(128) NOT NULL default '',UNIQUE KEY `id` (`id`),KEY `pw_id` (`pw_id`)) TYPE=MyISAM PACK_KEYS=1 ;

# --------------------------------------------------------## Table structure for table `vpopmail`#CREATE TABLE `vpopmail` (`pw_id` int(5) unsigned NOT NULL auto_increment,`pw_name` varchar(32) NOT NULL default '',`pw_domain` varchar(64) NOT NULL default '',`pw_passwd` varchar(40) NOT NULL default '',`pw_uid` int(11) default NULL,`pw_gid` int(11) default NULL,`pw_gecos` varchar(48) default NULL,`pw_dir` varchar(255) default NULL,`pw_shell` varchar(20) default NULL,`createtime` timestamp(14) NOT NULL,PRIMARY KEY? (`pw_id`),KEY `pw_name` (`pw_name`,`pw_domain`)) TYPE=MyISAM PACK_KEYS=1 ;

打開浏覽器輸入http://你的IP地址/phpmyadmin/登陸後,選擇postfix>sql>浏覽(找到iGENUS.sql)>執行

5.17設置自動啟動



#ee /etc/rc.local加入/usr/server/mysql/share/mysql/mysql.server startldconfig -m /usr/server/mysql/lib/mysql/usr/sbin/postfix start/usr/server/courier-imap/libexec/authlib/authdaemond start/usr/server/courier-imap/libexec/pop3d.rc start/usr/server/courier-imap/libexec/imapd.rc start/usr/local/apache/bin/apachectl start重新啟動計算機#reboot

5.18管理郵箱和登陸WEB郵箱

在浏覽器中輸入http://你的IP地址或域名/postfixadmin/admin/

在這裡您可以進行開設郵箱等操作在浏覽器中輸入http://你的IP地址或域名/igenus/出現下圖

登陸後如下圖所示:



Copyright © Linux教程網 All Rights Reserved