linux笔记-常用命令操作

php环境配置:
http://www.wdlinux.cn/wdcp/install.html
wdcp一键安装:



重启阿帕奇: /etc/rc.d/init.d/httpd restart

重启nginx:/etc/rc.d/init.d/nginx restart
模拟重启nginx(测试nginx是否有错误):nginx -t


给dede下面的所有文件设置为777.不加-R的时候是只针对该文件下:
chmod -R 777 dede


拷贝到另一个机器(a)
scp 111.tar.gz root@222.222.222.222:/website/ ---》这个是a的账号


CentOS安装zip unzip命令 :
yum install zip unzip

把/home目录下面的wwwroot.zip直接解压到/home目录里面
unzip wwwroot.zip



删除ceshi目录 rm -rf /svell 1.php
删除svell目录下的wtweb文件夹 rm -rf /svell/wtweb2


将压缩文件text.zip在当前目录下解压缩:unzip text.zip




打包命令(压缩 ):tar -zcvf vanto20150801.tar.gz vanto/

解压缩
tar -zxvf 111.tar.gz



创建a和special文件夹:
mkdir a special



把website转移到dlidata1下面:
 mv website /alidata1/


如将/test1目录下的file1复制到/test3 目录,并将文件名改为file2,可输入以下命令:
mv /test1/file1 /test3/file2



进入vim以后,输入I或O进入编辑模式,
按“esc”退出编辑,
:wq   保存退出




httpd的解析例子:
<VirtualHost *:80>
ServerName shouyin-test.svell.cn
DocumentRoot /website/shouyin-test.svell.cn/htdocs

Alias "/shop" "/website/shouyin-test.svell.cn/shop"
Alias "/store" "/website/shouyin-test.svell.cn/store"
Alias "/weixin" "/website/shouyin-test.svell.cn/weixin"

ErrorLog "logs/shouyin-test.svell.cn-error.log"
CustomLog "logs/shouyin-test.svell.cn-access.log" common
</VirtualHost>


<VirtualHost *:80>
ServerName xcgp.net
ServerAlias www.xcgp.net
DocumentRoot /website/xcgp.com/htdocs
ErrorLog "logs/xcgp.com-error.log"
CustomLog "logs/xcgp.com-access.log" common
</VirtualHost>




reids:
关闭redis:redis-cli -h 127.0.0.1 -p 6379 shutdown

开启redis:redis-server /etc/redis.conf

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值