使apachectl在所有目录下都可执行:
echo $PATH :查看当前命令执行的默认查找目录
cp /usr/local/apache2/bin/apachectl /usr/local/bin
将apachectl命令复制到环境变量下。
应该导入的文件 :
1号服务器:
/var/lib/mysql
/usr/local/apache2/conf
/www
/usr/local/apache2/htdocs
2号服务器:
/usr/red5/webapps
应该修改的文件:
1、/usr/local/apache2/conf/http.conf
2、vim /usr/red5.0.8/webapps/tclivep2p_my120_red5_chat/webConfig.xml
3、vim /usr/red5.0.8/webapps/tclivep2p_my120_red5_chat/WEB-INF/red5-web.properties
4、/usr/red5/webapps/tclivep2p_my120_red5_video/WEB-INF/red5-web.properties
应该数据同步的目录:
1 -- 3:
/www/cmstest/my120 ---- /www/cmstest/my120
/www/cmstest/coreseek ---- /www/cmstest/coreseek
2 -- 3 :
/storage --- /www/cmstest/my120/storage
/usr/red5 --- /usr/red5
/storage --- /storage
网站所做改动:
vim /usr/local/php5/lib/php.ini 修改
经常查看的配置:
date
/usr/bin/rsync --daemon
/root/lsyncd.sh restart
ps aux | grep lsync
ps auxfwww | grep red
将光盘之做成镜像文件,然后自动挂载:
mkdir /cdrom
cp /dev/cdrom /cdrom/mydisk.iso
mount -o loop -t iso9660 /cdrom/mydisk.iso /opt
清空squid缓存 :
squidclient -h 219.232.231.68 -p 8080 -m PURGE FlashURL
squidclient -m PURGE -p 80 ""
vim /usr/bin/clear_squid_cache.sh
#!/bin/sh
squidcache_path="/var/cache"
squidclient_path="/usr/sbin/squidclient"
grep -a -r $1 $squidcache_path/* | strings | grep "http:" | awk -F'http:' '{print "http:"$2;}' > cache_list.txt
for url in `cat cache_list.txt`; do
$squidclient_path -m PURGE -p 80 $url
done
保存退出。
/etc/init.d/squid restart
两个文件夹777权限,所属用户与组 daemon;daemon:
/www/cmstest/my120/public/scripts/jpgraph
/www/cmstest/my120/public/uploads
/www/cmstest/my120/public/hospic(不用777,只需要daemon)