Vagrantbox Mount Centos-7.1.1503-x86_64-netboot Installation Experience

Source: Internet
Author: User

Copyright NOTICE: This article is the main original article, without the owner's permission to reprint operation: (Operating system 64-bit) 1. Install VirtualBox and vagrant default path
2.vagrant box Add Centosmix centos-7.1.1503-x86_64-netboot.box
3.vagrant Box List
4, initialize the virtual machine in XX folder under the Establishment of workspace folder
Run command: Vagrant init centosmix ("Remember: Run command under Workspace path"; Centosmix is the name of the virtual machine you just viewed in the list)
After the execution completes, workspace a vagrantfile file
5, start the virtual machine
Run command: Vagrant up
After the above operation, the virtual machine has been installed, open the VirtualBox tool, you can see that there is a running virtual machine.

"Prepare your own material tools as follows: Virtualbox-5.1.4-110228-win.exe,vagrant_1.9.0.msi,centos-7.1.1503-x86_64-netboot.box" again, install MYSQL5.7 Nginx and PHP7.0 have encountered many problems themselves.
Configure local project mappings in Vagrantfile set as shown:



1. Install PHP7.0.22 "http://blog.csdn.net/hel12he/article/details/51107236" 2. Installation Nginx Note:

1 2 1 2 install Epel and Remi Source "attention"

The source above has not been used recently. Please find the corresponding version here yourself
http://dl.fedoraproject.org/pub/

HTTP://DL.FEDORAPROJECT.ORG/PUB/EPEL/EPEL-RELEASE-LATEST-7.NOARCH.RPM "This is the place to select this."
If you can't cross the wall, please use the domestic mirror.
HTTP://MIRRORS.SOHU.COM/FEDORA-EPEL/7/X86_64/E/EPEL-RELEASE-7-8.NOARCH.RPM 3. Install MySQL5.7

# download MySQL source installation package
shell> wget http://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm
# Install MySQL source
shell> Yum Localinstall mysql57-community-release-el7-8.noarch.rpm

Check that the MySQL source is installed successfully

shell> Yum Repolist enabled | grep "Mysql.*-community.*"


See the image above shows that the installation was successful.
You can modify the Vim/etc/yum.repos.d/mysql-community.repo source to change the MySQL version installed by default. For example, to install the 5.6 version, the 5.7-source enabled=1 to Enabled=0. Then the 5.6-source enabled=0 can be changed into enabled=1. The effect after the change is as follows:
2, install MySQL

shell> Yum Install Mysql-community-server
3. Start MySQL service
Shell> systemctl Start mysqld

To view the startup status of MySQL

shell> systemctl status mysqld
mysqld.service-mysql Server
   loaded:loaded (/usr/lib/systemd/system/ Mysqld.service; Disabled Vendor preset:disabled)
   Active:active (running) since v 2016-06-24 04:37:37 CST 35min ago
 Main pid:2888 (MySQL d)
   Cgroup:/system.slice/mysqld.service
           └─2888/usr/sbin/mysqld--daemonize--pid-file=/var/run/mysqld/ Mysqld.pid

June 04:37:36 localhost.localdomain systemd[1]: Starting MySQL Server ...
June 04:37:37 Localhost.localdomain systemd[1]: Started MySQL Server.
4, boot up
Shell> systemctl enable mysqld
shell> Systemctl daemon-reload
5. Modify root Local login password

After the MySQL installation is complete, a default password is generated for root in the/var/log/mysqld.log file. Locate the root default password in the following manner, and then log in to MySQL to modify it:

shell> grep ' temporary password '/var/log/mysqld.log

Shell> mysql-uroot-p

Or

Note: mysql5.7 The password security check plugin (Validate_password) is installed by default, and the default password checking policy requires that the password must contain: uppercase and lowercase letters, numbers, and special symbols, and not less than 8 bits in length. Otherwise, you will be prompted for error 1819 (HY000): Your password does not satisfy the "current policy requirements errors, as shown in the following illustration:

You can view information about password policies through the MSYQL environment variable:

Mysql> Show variables like '%password% ';


Validate_password_policy: Password policy, default to Medium policy
Validate_password_dictionary_file: Password policy file, policy is strong required
Validate_password_length: Minimum Password length
Validate_password_mixed_case_count: Uppercase and lowercase characters length, at least 1
Validate_password_number_count: A number of at least 1
Validate_password_special_char_count: At least 1 special characters
The above parameter is the password check rule for the default policy medium.

There are several password policies:

Policy Check Rules
0 or Low Length
1 or MEDIUM Length; Numeric, lowercase/uppercase, and special characters
2 or strong Length; Numeric, lowercase/uppercase, and special characters; Dictionary file

MySQL official website Password Policy detailed description: Http://dev.mysql.com/doc/refman/5.7/en/validate-password-options-variables.html#sysvar_ Validate_password_policy Modify Password Policy

To add a validate_password_policy configuration to the/etc/my.cnf file, specify a password policy

# Select 0 (Low), 1 (MEDIUM), 2 (strong) One of them, select 2 need to provide password dictionary file
validate_password_policy=0

If you do not need a password policy, add the following configuration disable in the My.cnf file:

Validate_password = Off

Restart the MySQL service for the configuration to take effect:

Systemctl Restart Mysqld
6. Add Telnet user

By default, only the root account is allowed to log on locally, if you want to connect MySQL on another machine, you must modify root to allow remote connections, or add an account that allows remote connections, and for security reasons, I add a new account:

Mysql> GRANT all privileges in *.* to ' yangxin ' @ '% ' identified by ' yangxin0917! ' With GRANT OPTION;
7, configure the default encoding for UTF8

Modify the/ETC/MY.CNF configuration file and add the encoding configuration under [Mysqld] as follows:

[Mysqld]
Character_set_server=utf8
init_connect= ' Set NAMES UTF8 '

Restart the MySQL service and view the database default encoding as follows:





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.