1、centos7.0启动mysql

1、centos7.0启动mysql

systemctl start mariadb.service 启动mysql服务命令
systemctl enable mariadb.service
mysql_secure_installation


systemctl start httpd.service 启动apace服务器命令

systemctl restart vsftpd.service 重启vsftpd命令

systemctlstartvsftpd.service 启动vsftpd命令



chown -R ftptest:ftp html/ 设置用户权限,改变文件夹所属


grant all privileges on *.* to 'root'@'%' identified by 'xxxxxx'; 给mysql赋权限


一.安装FTP

1.检测是否安装了FTP:

[root@localhost ~]# rpm -q vsftpd 如果安装了会显示版本信息:[root@localhost ~]# vsftpd-2.0.5-16.el5_5.1 否则显示:[root@localhost ~]# package vsftpd is not installed

2. 安装FTP

[root@localhost ~]# yum install vsftpd

2.1 完成ftp安装后,将/etc/vsftpd/user_list文件和/etc/vsftpd/ftpusers文件中的root这一行用#注释掉

# root

2.2 执行以下命令

#setsebool -P ftpd_disable_trans=1

修改/etc/vsftpd/vsftpd.conf,在最后一行处添加local_root=/

2.3 重启ftp进程

#service vsftpd restart

**注:每次修改过ftp相关的配置文件,都需要重启ftp进程来生效。 ftp服务器就可以使用了。**


二. 配置FTP

1.创建一个账号为test的账户:

#mkdir /tmp/test //首先创建好目录#adduser -d /tmp/test -g ftp -s /sbin/nologin test //-s /sbin/nologin是让其不能登陆系统,-d是指定用户目录为/opt/srsman,即该账户只能登陆ftp,却不能用做登陆系统用。

1.1 为test设置密码

#passwd testChanging password for user beinan.//接下来会出现让你设置新的密码New password: Retype new password: passwd: all authentication tokens updated successfully

2. 限制用户目录,不得改变目录到上级

2.1 修改/etc/vsftpd/vsftpd.conf

将这两行#chroot_list_enable=YES#chroot_list_file=/etc/vsftpd.chroot_list注释去掉 chroot_list_enable=YES chroot_list_file=/etc/vsftpd/chroot_list

2.2 新增一个文件: /etc/vsftpd/chroot_list

内容写需要限制的用户名: test 重新启动vsftpd#service vsftpd restart

3. 设置开机启动

(1)找到/etc/rc.local文件

(2)打开该文件,在最后一行添加:service vsftpd start

(3)保存,退出

4. 用FTP客户端(我用的是XFTP)快速连接

为什么我用xFTP呢,因为xftp和xshell属于同一系列,只要登陆一个xftp和xshell可以通过其各自的快捷按钮互相直接打开

http://blog.csdn.net/qq_32835907/article/details/73201403

http://blog.sina.com.cn/s/blog_459ced7a0102v2ms.html

相关文章

linux下开机自启: 在/etc/init.d目录下新建文件elasticsear...
1、因为在centos7中/etc/rc.d/rc.local的权限被降低了,所以...
最简单的查看方法可以使用ls -ll、ls-lh命令进行查看,当使用...
ASP.NET Core应用程序发布linux在shell中运行是正常的。可一...
设置时区(CentOS 7) 先执行命令timedatectl status|grep &...
vim /etc/sysconfig/network-scripts/ifcfg-eth0 B...