Linux中国  设为主页
 收藏本站
 
当前位置: > 首页 ->Linux技术 ->发行版专区 ->CentOS ->CentOS4.4(32位)完美安装过程
·CentOS下用OpenSSH构建SSH服务器 ·入侵监测系统的构建(chkrootkit ) ·在CentOS 4.4上安装配置OpenVZ ·使用Bastille完美加固CentOS Linux系统 ·CentOS系统安装后的初始环境设置 ·CentOS安装及初始环境设置 ·CentOS4.4(32位)完美安装过程 ·centos配置 apache、php、jdk、resin ·《社区企业操作系统》(CentOS (Community
  相关分类: 
CentOS
ubuntu
turbolinux
Suse
slackware
Redhat
Mepis
mandriva
Mandrake
knoppix
Gentoo
Fedora
Debian
红旗
  站内搜索: 
热门文章排行
热门文章排行 CentOS4.4(32位)完美安装过程 (04-22)
《社区操作系统》(CentOS 5)V5.0[ISO(04-20)
CentOS系统安装后的初始环境设置 (04-22)
CentOS安装及初始环境设置 (04-22)
在CentOS 4.4上安装配置OpenVZ (04-22)
精采文章排行
精采文章排行 用SSH客户端软件登录到服务器 (04-22)
CentOS下用OpenSSH构建SSH服务器 (04-22)
入侵监测系统的构建(chkrootkit ) (04-22)
在CentOS 4.4上安装配置OpenVZ (04-22)
使用Bastille完美加固CentOS Linux系(04-22)
 

CentOS4.4(32位)完美安装过程

作者:till on Wed    来源:howtoforge.com   点击:   日期:2007-04-22 [收藏] [投稿]

  IE是否经常中毒?推荐您

Then run

touch /aquota.user /aquota.group
chmod 600 /aquota.*
mount -o remount /
quotacheck -avugm
quotaon -avug

to enable quota.

 

8 Install A Chrooted DNS Server (BIND9)

To install a chrooted BIND9, we do this:

yum install bind-chroot

Then do this:

chmod 755 /var/named/
chmod 775 /var/named/chroot/
chmod 775 /var/named/chroot/var/
chmod 775 /var/named/chroot/var/named/
chmod 775 /var/named/chroot/var/run/
chmod 777 /var/named/chroot/var/run/named/
cd /var/named/chroot/var/named/
ln -s ../../ chroot
chkconfig --levels 235 named on
/etc/init.d/named start

BIND will run in a chroot jail under /var/named/chroot/var/named/. I will use ISPConfig to configure BIND (zones, etc.).

 

9 MySQL (4.1)

To install MySQL, we do this:

yum install mysql mysql-devel mysql-server

The MySQL init script on CentOS might cause problems when you try to restart MySQL. In some cases it tries to start MySQL before the old MySQL process has stopped which leads to a failure. The solution is to edit the restart section of /etc/init.d/mysqld and add a few seconds delay between the stop and the start of MySQL.

Edit /etc/init.d/mysqld:

vi /etc/init.d/mysqld

and change this section:

restart(){
    stop
    start
}

so that it looks like this:

restart(){
    stop
	sleep 3
    start
}

This adds a three second delay between the stop and start of MySQL.

Then we create the system startup links for MySQL (so that MySQL starts automatically whenever the system boots) and start the MySQL server:

chkconfig --levels 235 mysqld on
/etc/init.d/mysqld start

Now check that networking is enabled. Run

netstat -tap

It should show a line like this:

tcp        0      0 *:mysql                     *:*                         LISTEN      2995/mysqld

If it does not, edit /etc/my.cnf and comment out the option skip-networking:

vi /etc/my.cnf

#skip-networking

and restart your MySQL server:

/etc/init.d/mysqld restart

Run

mysqladmin -u root password yourrootsqlpassword
mysqladmin -h server1.example.com -u root password yourrootsqlpassword

to set a password for the user root (otherwise anybody can access your MySQL database!).

10 Postfix With SMTP-AUTH And TLS

Now we install Postfix and dovecot (dovecot will be our POP3/IMAP server):

yum install cyrus-sasl cyrus-sasl-devel cyrus-sasl-gssapi cyrus-sasl-md5 cyrus-sasl-plain postfix dovecot

Next we configure SMTP-AUTH and TLS:

postconf -e 'smtpd_sasl_local_domain ='
postconf -e 'smtpd_sasl_auth_enable = yes'
postconf -e 'smtpd_sasl_security_options = noanonymous'
postconf -e 'broken_sasl_auth_clients = yes'
postconf -e 'smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination'
postconf -e 'inet_interfaces = all'
postconf -e 'mynetworks = 127.0.0.0/8'

We must edit /usr/lib/sasl2/smtpd.conf so that Postfix allows PLAIN and LOGIN logins. On a 64Bit Centos 4.4 you must edit the file /usr/lib64/sasl2/smtpd.conf instead. It should look like this:

vi /usr/lib/sasl2/smtpd.conf

pwcheck_method: saslauthd
mech_list: plain login

mkdir /etc/postfix/ssl
cd /etc/postfix/ssl/
openssl genrsa -des3 -rand /etc/hosts -out smtpd.key 1024
chmod 600 smtpd.key
openssl req -new -key smtpd.key -out smtpd.csr
openssl x509 -req -days 3650 -in smtpd.csr -signkey smtpd.key -out smtpd.crt

 如果您对本文有任何疑问或者建议,请到讨论区发表您的意见: >> 论坛入口 <<

上一页 1 2 3 45 6 7 下一页

上一篇:centos配置 apache、php、jdk、resin   下一篇:CentOS安装及初始环境设置
文章评论】 【收藏本文】 【推荐好友】 【打印本文】 【我要投稿】 【论坛讨论

   相关文章:
·用SSH客户端软件登录到服务器

   文章评论:(1条)
  
 请留名: 匿名评论   点击查看所有评论 论坛讨论
 

 声明:刊登此文章是为了传递更多信息,文章内容仅供参考,转载请注明出处。