服务器 硬盘 恢复,服务器硬盘故障恢复备忘

本文记录了在Fedora Core 4中使用yum进行软件包管理,并详细列举了关闭多余服务的脚本,包括gcc、Apache、MySQL、PHP等的安装步骤,以及cron、perl模块、GeoIP等的安装。还提到了数据备份和恢复的重要注意事项。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

新系统使用的是Fedora Core 4。回家学习使用了一下yum,和debian的apt-get差不多了:而且软件包的依赖关系整理的比较好。

以下是应用的安装备忘:2006年7月30日 星期日 00时18分

用awk生成关闭服务的脚本:关闭不需要的服务

sudo /sbin/chkconfig --list| grep 3:on | awk '{print "/sbin/chkconfig "$1" off"}'

/sbin/chkconfig acpid off

/sbin/chkconfig anacron off

/sbin/chkconfig apmd off

/sbin/chkconfig auditd off

/sbin/chkconfig autofs off

/sbin/chkconfig bluetooth off

/sbin/chkconfig cpuspeed off

/sbin/chkconfig cups off

/sbin/chkconfig gpm off

/sbin/chkconfig haldaemon off

/sbin/chkconfig iptables off

/sbin/chkconfig isdn off

/sbin/chkconfig kudzu off

/sbin/chkconfig mDNSResponder off

/sbin/chkconfig mdmonitor off

/sbin/chkconfig messagebus off

/sbin/chkconfig netfs off

/sbin/chkconfig nfslock off

/sbin/chkconfig nifd off

/sbin/chkconfig pcmcia off

/sbin/chkconfig portmap off

/sbin/chkconfig rhnsd off

/sbin/chkconfig rpcgssd off

/sbin/chkconfig rpcidmapd off

/sbin/chkconfig sendmail off

/sbin/chkconfig xfs off

安装gcc(居然忘记了……)

sudo yum install gcc

sudo yum install gcc-c++

sudo yum install flex zlib curl zlib-devel curl-devel bzip2 bzip2-devel

apache的安装:

./configure --prefix=/home/apache --enable-shared=max --enable-module=most

mysql的安装:

./configure --prefix=/home/mysql --without-innodb --with-mysqld-user=apache

php的安装:

./configure --with-apxs=/home/apache/bin/apxs --enable-track-vars --with-mysql=/home/mysql --with-curl --enable-iconv --enable-mbstring

cronolog:

wget http://cronolog.org/download/cronolog-1.6.2.tar.gz

安装MT需要的perl模块

sudo yum install mysql-devel

sudo yum install perl-DBI

sudo yum install perl-DBD-mysql

安装awstats需要的GeoIP模块:

perl -MCPAN -e 'install GeoIP'

sudo yum install GeoIP

安装awstats需要的GeoIP数据包:

wget http://www.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz

wget http://www.maxmind.com/download/geoip/database/GeoIP.dat.gz

sudo yum install xinetd

启用rsync

下次要把root的crontab和用户的crontab也一起备份下来,还有/etc/的一些设置

# time sync

0 5 * * 1 (/usr/bin/rdate -s 202.106.196.19)

# awstats

5 0 * * * (cd /home/apache/chedong.com/cgi-bin/awstats; ./awstats_updateall.pl -configdir=./ now )

# remove old logs

2 2 * * * (/usr/bin/find /home/apache/logs -mtime +7 -name "*log.*" |/usr/bin/xargs rm -f)

# backup

12 2 * * * (cd /home; tar czf /home/backup/apache.`date +\%w`.tgz apache)

13 2 * * * (/home/mysql/bin/mysqldump --all-databases -u*** -p*** -S/tmp/mysql.sock | gzip -f > /home/backup/mysql.`date +\%w`.gz)

作者:车东 发表于:2006-07-30 22:07 最后更新于:2007-04-22 21:04

版权声明:可以转载,转载时请务必以超链接形式标明文章 服务器硬盘故障恢复备忘 的原始出处和作者信息及本版权声明。

http://www.chedong.com/blog/archives/001169.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值