centos技巧
1)yum慢:

yum -y install wget 
sudo wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

2)添加用户,删除用户userdel -r username

useradd test -d /home/www/test
passwd test
// 加权限:
chmod -R 755 /home/www/test

给用户额外文件夹加权限:chown -R user:user aaa
3)卸载vsftp

// 查找
rpm -aq vsftpd
// 删除
rpm -e vsftpd-3.0.2-27.el7.x86_64

service vsftpd restart重启vsftpd服务
4) sh脚本加入开机启动
加入到 rc.local ,一般为/etc/rc.d/rc.local 在其中加入以下行:sh /path/to/test.sh
或者sudo sh /root/gogz/start.sh,记住别漏了前面的rudo和sh命令。
start.sh里面这样写

wpath=$(cd $(dirname ${BASH_SOURCE[0]}); pwd )
wp=$wpath"/gogz"
nohup $wp >log.log 2>&1 &

5) unzip xxx.zip -d abc
6)

标签: none

添加新评论