大概是從上周四晚上開始,託管的伺服器就無法訪問。周五請機房重啟後,仍然無法登入,乾脆拔掉網線,過乙個不插電的週末。
週六中午,趕到機房,嘗試重啟幾次,發現硬碟已經無法引導了(grub error 17)。聯絡機器的提供商提供了塊新硬碟(才用了半年),在機房現刻安裝光碟,重新安裝系統……這就是大概的經過了。雖然平時做了完整的apache和mysql的備份,但是恢復還是花了半天的時間。這就是用虛擬主機的好處:雖然dreamhost偶爾有掉鍊子的時候,可是至少不用跑機房啊……
新系統使用的是fedora core 4。回家學習使用了一下yum,和debian的apt-get差不多了:而且軟體包的依賴關係整理的比較好。
以下是應用的安裝備忘:2023年7月30日 星期日 00時18分
用awk生成關閉服務的指令碼:關閉不需要的服務
sudo /sbin/chkconfig --list| grep 3:on | awk ''
/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
安裝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
wget
sudo yum install xinetd
啟用rsync
下次要把root的crontab和使用者的crontab也一起備份下來,還有/etc/的一些設定
車東 發表於:2006-07-30 22:07 最後更新於:2007-04-22 21:04
伺服器硬碟故障恢復備忘 的原始出處和作者資訊及
[再編輯]
伺服器備忘
沒網 ifconfig 檢視網絡卡是否正常,若eno1,eno2消失 ifconfig eno1 up 用ubuntu20 netplan消失並且沒法上網,設定臨時 ip 新增臨時ip ip addr add 192.168.30.100 24 dev eno3 新增閘道器 ip route add...
伺服器掛載硬碟!
前言 linux伺服器要掛載硬碟的原因主要有以下幾點 1 linux伺服器在預設情況下,所有的東西都是裝在系統盤。系統盤的空間有限,如果站點和資料較多很容易把空間撐滿,導致環境和資料庫等等服務啟動不了。2 linux伺服器掛載磁碟可以避免因為系統損壞導致 資料丟失。3 linux伺服器掛載硬碟可以更...
hp伺服器 新增硬碟 HP伺服器增加硬碟實施方案
hp 伺服器增加硬碟實施方案 一 raid 配置 進機房操作 停止伺服器上的程序 用xsmgss 使用者登入,執行 停資料庫 oracle 使用者 home oracle sqlplus nolog sql conn as sysdba sql shutdown immediate sql exit...