Skip to content

[运维]centos管理 #64

@mic101

Description

@mic101

1、禁root加账户
加账户:
adduser test1
passwd test1
加sudo权限:
chmod u+w sudoers(先添加写权限)
wangli ALL=(ALL) ALL
chmod u-w sudoers(先添加写权限)
禁止root:
vi /etc/ssh/sshd_config 添加
PermitRootLogin no
重启服务:#service sshd restart
2、 配置ssh
ssh-keygen
chmod 600 authorized_keys
3、memcache自启动添加 mysql php自启动
方式1:vim /etc/rc.d/rc.local
方式2:cd /etc/rc.d/init.d/
chkconfig --list memcached
4、ftp管理
useradd -d /home/wwwroot/folder -g ftp -s /sbin/nologin ftpuser
passwd ftpuser
cd /folder
chown -R ftpuser *

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions