centos学习笔记(6)--关机和重启命令与安装ftp

查看当前日期:

[root@localhost ~]# date (虚拟机日期和实际日期会有所不同)

重启相关:

[root@localhost ~]#  shutdown -r  22:00  -->系统将会在十点重启

[root@localhost ~]#  shutdown -c  -->取消重启

[root@localhost ~]# shutdown -r now -->立即重启

关机:

[root@localhost ~]# shutdown -h now -->立即关机


安装vsftp:

[root@localhost ~]# yum install -y vsftpd  -->下载

[root@localhost ~]# systemctl enable vsftpd -->设置开机启动

[root@localhost ~]# systemctl start vsftpd.service  -->启动ftp服务

[root@localhost ~]# firewall -cmd --zone=public --add-port=21/tcp --permanent -->永久添加tcp21端口

[root@localhost ~]#  firewall-cmd --permanent --zone=public --add-service=ftp -->添加ftp服务

[root@localhost ~]# firewall -cmd --reload -->重启防火墙

[root@localhost ~]# useradd  -g root /home/data -s /sbin/nologin yang  -->

新建yang用户,添加到root组,但不允许用户登录,仅仅可以ftp登录,ftp登录后默认目录是/home/data

[root@localhost ~]# passwd yang  -->设置用户密码

[root@localhost ~]# chown -R yang:root/home/data -->设置yang用户权限

[root@localhost ~]# vi /etc/vsftp/vsftpd.conf -->修改vsftp配置文件,禁止匿名登录

把anonymous_enable=YES改为:anonymous_enable=NO

安装ftpRush(360软件即可)

填写端口,用户名,密码即可用











猜你喜欢

转载自blog.csdn.net/maonian1762/article/details/79983843
今日推荐