centos7.4 Linux Instructions

Source: Internet
Author: User

1. View version

lsb_release -a

2. View MySQL Path

Whereis MySQL

3. View the Encoding

Locale

4. Install FTP

Installation
Yum install-y vsftpd//Installation
Systemctl start Vsftpd.service//Start VSFTPD Service

FTP Permissions configuration:

The configuration directory for VSFTPD is/ETC/VSFTPD and contains the following configuration files:

1, vsftpd.conf//master configuration file

2. Ftpusers//disable access to FTP server user list

3. User_list//user Access control

This is only a simple configuration, it is forbidden to switch directories. To edit the/etc/vsftpd/vsftpd.conf, locate and modify the following two configurations:


Anonymous_enable=no (change to NO)//Disable anonymous users
Chroot_local_user=yes (change to YES)//disable switch root directory

Switch Directory Permissions configuration:

Chroot_list_enable=yes/no (NO)

Sets whether the user list file specified by the Chroot_list_file configuration item is enabled. The default value is No.

Chroot_list_file=/etc/vsftpd/chroot_list

Lets you specify a user list file that controls which users can switch to the parent directory of the user's home directory.

Chroot_local_user=yes/no (NO)

Lets you specify whether users in the user list file are allowed to switch to the parent directory. The default value is No.


The following effects can be achieved by pairing:

1, when Chroot_list_enable=yes,chroot_local_user=yes, in the/etc/vsftpd.chroot_list file listed in the user, you can switch to a different directory, not listed in the file users, You cannot switch to a different directory.

2. When Chroot_list_enable=yes,chroot_local_user=no, users listed in the/etc/vsftpd.chroot_list file cannot switch to a different directory, and users who are not listed in the file You can switch to a different directory.

3, when Chroot_list_enable=no,chroot_local_user=yes, all users can not switch to other directories.

4, when Chroot_list_enable=no,chroot_local_user=no, all users can switch to other directories.

Therefore, the above configuration belongs to the third situation, all users cannot switch to other directories.

If use case 1 or Case 2 o'clock, to create a new chroot_list file under/ETC/VSFTPD, configure the relevant user.

Restart Service:


Systemctl Restart Vsftpd.service

5. Kill Process PID

Kill-9 23754

6. Log in to MySQL

Mysql-u root-p

7 Setting up MySQL encoding

/etc/my.cnf

Enter etc folder >>vim my.cnf

* View current MySQL run status

Mysql>status

All encodings should be UTF-8 at this time.

8.mysql restart

Service mysqld Restart

/etc/inint.d/mysqld start

Problems:

1, local testing no problem, after deploying to the client server reported the following error:

Com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException:Expression #1 of SELECT list is not in GROUP by clause and cont Ains nonaggregated column ' TestID ' which is not functionally dependent on columns in GROUP by clause; This was incompatible with sql_mode=only_full_group_by

Reason: Take a look at the syntax of GROUP by: Select Select Columns in Group + aggregate functions from table name GROUP by grouping columns from the syntax format, there is a grouping, and then determine the retrieved columns, the retrieved columns can only be selected in the column participating in the grouping. My current MySQL version 5.7.17, and then look at only_full_group_by means: for the group by aggregation operation, if the column in the select does not appear in the group by, then this SQL is not legal, because the column is not in the group By clause, that is, the column that is checked out must appear behind group by or it will error, or the field appears in the aggregate function. Workaround: In the, etc/my.cnf file Add (remove only_full_group_by) SET Sql_mode = ' Strict_trans_tables,no_zero_in_date,no_zero_date,error _for_division_by_zero,no_auto_create_user,no_engine_substitution ';

centos7.4 Linux Instructions

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.