積累些常用的命令
1 find / -name lrims2 查找根路徑下名字為lrims2的文件夾
2 tail -f catalina.out 查看tomcat log
改為LANG="zh_CN.GB18030"
LANGUAGE="zh_CN.GB18030:zh_CN.GB2312:zh_CN"
SUPPORTED="zh_CN.GB18030:zh_CN:zh"
SYSFONT="lat0-sun16"
SYSFONTACM="8859-15"
6 配置ssh端口
vi /etc/ssh/sshd_config 修改Port 屬性。
重啟服務 service sshd restart
7 用戶管理
adduser 添加用戶 passwd 修改密碼
8 安裝ftp
如果出現another app is currently holding the yum lock;waiting for it to exit...
可以強制關掉yum進程:#rm -f /var/run/yum.pid
啟動服務 service vsftpd start
ftp配置
http://lianj-lee.iteye.com/blog/519027
9 解壓 tar.gz
tar -xvzf filename.tar.gz
10 安裝nginx
tar -zxvf nginx-1.1.2.tar.gz
cd nginx-1.1.2
yum -y install pcre-devel openssl openssl-devel
./configure --prefix=/usr/local/nginx
make
make install
11 卸載centos自帶apache
1、[root@localhost etc]# rpm -qa|grep httpd,查看與httpd相關軟件包。
httpd-2.2.3-11.el5_2.centos.4
2、然后刪除httpd:
[root@localhost etc]# rpm -e httpd
出現問題:
error: Failed dependencies:
httpd >= 2.2.0 is needed by (installed) gnome-user-share-0.10-6.el5.i386
3、還有一個相關的軟件包沒有刪除,清除之,即:
[root@localhost etc]# rpm -e gnome-user-share
4、再刪除httpd
[root@localhost etc]# rpm -e httpd
#可以使用參數–nodeps的意思就是不管各個程序包間的依賴關系。
[root@localhost etc]#rpm -e –nodeps httpd //這樣不需要刪除gnome-user-share了.
12 查看文件數量 ls -l |grep "^-"|wc -l
posted on 2012-01-03 18:54
周磊 閱讀(183)
評論(0) 編輯 收藏