ux发行版创建用户时不会创建同名组,这需要单独执行groupadd来创建所需 组. 下面是我们需要创建的用户和组,及其说明. 用户名 组名 作用 备注 [root@mail ~]# useradd extmail [root@mail ~]# useradd postfix
[root@mail ~]# groupadd postdrop [root@mail ~]# usermod -G postfix,postdrop postfix [root@mail ~]# useradd mysql mysql mysql 数据库mysql运行用户 extmail extmail 虚拟邮件帐号所使用用户及组 uid:501,gid:501 postfix postfix postfix主
程序使用帐号和组 postdrop postfix setid_group setgid_group=postdrop #这里有 2 个值得注意的地方,他们是 extmail 用户,组及 postdrop.在 postfix 邮件系统中,有 好 几 个 程 序 是 以 extmail 来 运 行 ,postdrop 是 postfix 主 配 置 文 件 main.cf 里 标 明 的 , setgid_group=postdrop. 三 安装软件包 3.1 Mysql安装和配置 3.1.1 编译安装mysql [root@mail /]# cd /home/src [root@mail src]# tar zvxf mysql-5.1.55.tar.gz [root@mail src]# cd mysql-5.1.55 [root@mailmysql-5.1.36]# ./configure --prefix=/usr/local/mysql --enable-assembler --with-mysqld-ldflags=-all-static --with-extra-charsets=all --with-low-memory --with-charset=utf8 --with-collation=utf8_unicode_ci --enable-thread-safe-client --enable-local-infile
#我在这里出错了,提示: configure: error: No curses/termcap library found #google说是缺少ncurses包,挂载安装盘, 安装ncurses-devel-*.rpm安装 [root@mailmysql-5.1.36]#make [root@mailmysql-5.1.36]#make install make[4]: Entering directory `/data0/software/mysql-5.1.36/mysql-test' 3.1.2 MySQL配置文件 如果你想要设置一个选项文件,使用support-files目录中的一个作为 模板。在这个目录中有4个模板文件,是根据
不同机器的内存定制的。 [root@mail mysql-5.1.36]# cp support-files/my-mediumf /etc/myf [root@mail mysql-5.1.36]# cp support-files/mysql.server /etc/rc.d/init.d/mysqld 3.1.3设置开机自动启动 [root@mail mysql-5.1.55]# cp support-files/my-mediumf /etc/myf [root@mail mysql-5.1.55]# cp support-files/mysql.server /etc/rc.d/init.d/mysqld [root@mail mysql-5.1.55]# chmod 700 /etc/rc.d/init.d/mysqld [root@mail mysql-5.1.55]# chkconfig --add mysqld [root@mail mysql-5.1.55]# chkconfig --l
evel 345 mysqld on [root@mail mysql-5.1.55]# cd /usr/local/mysql/ 3.1.4初始化授权表 用mysql_install_db创建MySQL [root@mail mysql]# ./bin/mysql_install_db --user=mysql 设定目录访问权限,并设置mysql,root帐号访问权限。 [root@mail my
sql]# chown -R root . [root@mail
mysql]# chgrp -R mysql . [root@mail mysql]# chown -R mysql var 3.1.5 运行mysql [root@mail mysql]# bin/mysqld_safe --user=mysql &; (如果没有问题的话,应该会出现类似这样的提示: #Starting mysqld daemon with databases from /usr/local/mysql/var 如果出现 mysql ended这样的语句,表示Mysql没有正常启动,你可以到log中查找
问题,Log 文件的通常在 /etc/myf中配置,大多数问题是权限设置不正确引起的. 日志文件路径 mysql安装路径(/usr/local/mysql)./var/主机名.err 我的错误日志路径 /usr/local/mysql/var/mail.drvial.err 3.1.6 测试mysql [root@mail mysql]# bin/mysqladmin ping mysqld is alive
[root@mail mysql]# bin/mysqladmin version bin/mysqladmin Ver 8.42 Distrib 5.1.55, for pc-linux-gnu on i686 Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. This software comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to modify and redistribute it under the GPL license Server version Proto