没有合适的资源?快使用搜索试试~ 我知道了~
首页Postfix邮件服务器+Web界面安装全过程.doc
Postfix邮件服务器+Web界面安装全过程.doc
5星 · 超过95%的资源 需积分: 18 40 下载量 113 浏览量
更新于2023-03-03
评论
收藏 172KB DOC 举报
Postfix最先配置,cyrus-sasl 2.1.23+postfix 2.6.2+postfixadmin 2.3.2+Courier-imap 4.5.0+Courier-maildrop 2.5.2
资源详情
资源评论
资源推荐
Postfix 邮件服务器 + Web 界面安装全过程
环境是 centos5.4 最小化安装,只选择了开发工具与开发库
# uname -a
Linux mail.kswu.com 2.6.18-164.el5 #1 SMP Thu Sep 3 03:33:56 EDT 2009 i686 i686 i386 GNU/Linux
关闭 SELINUX
# system-config-securitylevel-tui
或
# vi /etc/selinux/config
把 SELINUX=enforcing 注释掉:#SELINUX=enforcing ,然后新加一行为:
SELINUX=disabled
保存,关闭。
注:只提供参考,实际配置请根据系统环境做修改,本文为手动编写,如有命令或文本编辑错误请
谅解,相关配置文件可从以下地址下载;如有问题可发邮件到 kswu1983@126.com
# wget http://www.3gunite.com/postfix/conf.tar.gz
垃圾邮件过滤 Clamav; amavisd-new; Spamassassin 后续
1.安装 mysql 5.0.70
# groupadd mysql
# useradd -g mysql mysql
#wget http://down1.chinaunix.net/distfiles/mysql-5.0.70.tar.gz
# tar -zxvf mysql-5.0.70.tar.gz
# cd mysql-5.0.70
# ./configure \
--prefix=/usr/local/mysql \
--with-charset=gb2312 \
--enable-thread-safe-client
# make
# make install
# cp support-files/my-medium.cnf /etc/my.cnf
设置自启动
# cp support-files/mysql.server /etc/rc.d/init.d/mysqld
# chmod 700 /etc/rc.d/init.d/mysqld
# chkconfig --add mysqld
安装完以后要初始化数据库,要是升级安装的请跳过
# cd /usr/local/mysql
# /usr/local/mysql/bin/mysql_install_db --user=mysql
# chown -R root .
# chown -R mysql var
# chgrp -R mysql .
# /usr/local/mysql/bin/mysqld_safe --user=mysql &
好了,至此 mysql 安装完毕,你可以这样起动你的 mysql 服务
# /etc/rc.d/init.d/mysqld start
# ln -s /usr/local/mysql/bin/mysql /sbin/mysql
# ln -s /usr/local/mysql/bin/mysqladmin /sbin/mysqladmin
为了能让系统找到 mysql,请运行如下命令
# PATH=$PATH:/usr/local/mysql/bin
# export PATH
# echo "/usr/local/mysql/lib/mysql" >;>; /etc/ld.so.conf
# ldconfig
日志管理
开启错误日志 (在[safe_mysqld]项下添加)
# vi /etc/my.cnf
[safe_mysqld]
err-log=/var/log/mysqld/err.log
开启常规日志和更新日志 (在[mysqld]项下添加)
# vi /etc/my.cnf
[mysqld]
log=/var/log/mysqld/log.log
log-update=/var/log/mysqld/update.log
创建日志文件并设置权限
# mkdir /var/log/mysqld
# touch /var/log/mysqld/err.log /var/log/mysqld/log.log /var/log/mysqld/update.log
# chown -R mysql.mysql /var/log/mysqld
# service mysqld restart
说明:
错误日志包含了服务器写入标准错误输出设备的所有消息,同时还包括了 mysql 服务的启动和关闭
事件
常规日志用来记录有关 mysql 服务器运行的常规信息,包括用户的连接、查询及其他各种时间
更新日志用来记录修改数据库的查询信息,包括所有涉及数据库修改的 SQl 语句的查询记录
建议调试结束后关闭日志
2.安装 apache 2.2.12
# wget http://apache.freelamp.com/httpd/httpd-2.0.54.tar.bz2
# tar jxvf httpd-2.2.12.tar.bz2
# cd httpd-2.2.12
# ./configure --prefix=/usr/local/apache
# make
# make install
设置自启动
# cp support/apachectl /etc/init.d/httpd
修改/etc/init.d/httpd
# vi /etc/init.d/httpd(在第两行之后添加如下内容)
#!/bin/sh
#
# Startup script for the Apache Web Server
# chkconfig: - 85 15
# description: Apache is a World Wide Web server. It is used to serve \
# HTML files and CGI.
# processname: httpd
# pidfile: /usr/local/apache/log/httpd.pid
# config: /usr/local/apache/conf/httpd.conf
# chkconfig --add httpd
# chmod 755 /etc/init.d/httpd
# chkconfig httpd on
创建网页根目录
# mkdir /web/www
# vi /usr/local/apache/conf/httpd.conf
//存放网页的目录,原来为 DocumentRoot "",改成:
DocumentRoot "/web/www"
//这句应该和 DocumentRoot 的目录保持一致,原来为<Directory "">;,改成:
<Directory "/web/www">;
//Indexes:当在目录中找不到 DirectoryIndex 列表中指定的文件就生成当前目录的文件列表
//FollowSymlinks:允许符号链接跟随,访问不在本目录下的文件
Options Indexes FollowSymLinks
//禁止读取.htaccess 配置文件的内容
AllowOverride None
//指定先执行 Allow(允许)访问规则,再执行 Deny(拒绝)访问规则
Order allow,deny
//设置 Allow(允许)访问规则,允许所有连接
Allow from all
</Directory>;
启动服务:
# /usr/local/apache/bin/apachectl start
或
# service httpd start
3.安装 php 5.2.10
A 先安装支持包(注意安装顺序)
建立初始目录:
#mkdir /usr/local/modules
建立 jpeg 目录
#mkdir /usr/local/modules/jpeg7
#mkdir /usr/local/modules/jpeg7/bin
#mkdir /usr/local/modules/jpeg7/lib
#mkdir /usr/local/modules/jpeg7/include
#mkdir /usr/local/modules/jpeg7/man
#mkdir /usr/local/modules/jpeg7/man/man1
A1、安装 zlib
#tar xzvf zlib-1.2.3.tar.gz
#cd zlib-1.2.3
#不要用--prefix 自定义安装目录,影响 gd 的安装
#./configure --prefix=/usr/local/modules/zlib
#make
#make install
A2、安装 freetype
#tar jxvf freetype- 2.3.8.tar.bz2
#cd freetype- 2.3.8
#./configure --prefix=/usr/local/modules/freetype
#make
#make install
A3、安装 libpng
#tar xzvf libpng-1.2.10.tar.gz
#不要用--prefix 自定义安装目录,影响 gd 的安装
#cd libpng-1.2.10
#cp scripts/makefile.std makefile
#make test
#make install
A4、安装 jpeg
#tar xzvf jpegsrc.v7.tar.gz
#./configure --prefix=/usr/local/modules/jpeg7 --enable-shared --enable-static
#make
#make install
A5 安装 libxml2
#tar xzvf libxml2-2.7.4.tar.gz
#./configure --prefix=/usr/local/modules/libxml2
#make
#make install
#cp xml2-config /usr/bin
A6 安装 libmcrypt
#tar zxvf libmcrypt-2.5.7.tar.gz
#./configure
#make
#make install
A7、安装 GD
#tar xzvf gd-2.0.35.tar.gz
#./configure --prefix=/usr/local/modules/gd --with-jpeg=/usr/local/modules/jpeg7 --with-png --with-zlib --
with-freetype=/usr/local/modules/freetype
#make
#make install
B、安装 PHP
# tar -jxvf php-5.2.10.tar.bz2
# cd php-5.2.10
# ./configure \
--prefix=/usr/local/php \
--with-apxs2=/usr/local/apache/bin/apxs \
--with-mysql=/usr/local/mysql \
--with-libxml-dir=/usr/local/modules/libxml2 \
--with-gd=/usr/local/modules/gd \
--with-jpeg-dir=/usr/local/modules/jpeg7 \
--with-zlib \
--with-png-dir=/usr/local/lib/ --with-freetype-dir=/usr/local/modules/freetype
# make
# make install
# cp php.ini-dist /usr/local/php/lib/php.ini
# vi /usr/local/php/lib/php.ini
;default_charset = "iso-8859-1"
在这行下面加一行
default_charset = "gb2312"
# vi /usr/local/apache/conf/httpd.conf
找到#AddType application/x-tar .tgz 这行,在下面加两行。
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
找到下面一行在后面加上 index.php,这表示网站的默认页也能够为 index.php
DirectoryIndex index.html index.html.var index.php
注意:改变了 http.conf 后,要重启 apache 服务器,否则不会生效!
php 常用配置
max_execution_time = 30 ; // 改为 600 (增加处理脚本的时间限制)
max_input_time = 600 ; //最大输出时间 600 秒
memory_limit = 8M ; //改为 40M (这样才能发 10M 的附件)
register_global =On
post_max_size = 2M ; //php 可接受的 post 方法大小 2M
file_uploads = On ; //允许上载文件
upload_max_filesize = 2M ; //最大上载文件 2M
session.auto_start = 1 ; //session 自动启动
设置 safe_mode=Off
剩余21页未读,继续阅读
wks_bj
- 粉丝: 1
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 收起
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
会员权益专享
最新资源
- c++校园超市商品信息管理系统课程设计说明书(含源代码) (2).pdf
- 建筑供配电系统相关课件.pptx
- 企业管理规章制度及管理模式.doc
- vb打开摄像头.doc
- 云计算-可信计算中认证协议改进方案.pdf
- [详细完整版]单片机编程4.ppt
- c语言常用算法.pdf
- c++经典程序代码大全.pdf
- 单片机数字时钟资料.doc
- 11项目管理前沿1.0.pptx
- 基于ssm的“魅力”繁峙宣传网站的设计与实现论文.doc
- 智慧交通综合解决方案.pptx
- 建筑防潮设计-PowerPointPresentati.pptx
- SPC统计过程控制程序.pptx
- SPC统计方法基础知识.pptx
- MW全能培训汽轮机调节保安系统PPT教学课件.pptx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论2