Opening:
Do not know that this is the first time to deploy such a test environment (N>50), once young, a day at home repeatedly reload Windows98 nine times! As for the reason is the system installed and then install other third-party software is always easy to appear all kinds of blue screen, I have a system neat, not perfect like push to repeat, the key must be pure! (Windows was a mix of 16-bit and 32-bit at that time) okay, all at once exposed to age. Because of this cleanliness, then I can put windows, Offfice serial number completely back out, install the system speed no one can and ~, haha. In fact, the greatest advantage is that in the process of constantly torturing themselves, your understanding of the system is from unfamiliar, familiar, proficient process. Eventually you will have a troubleshooting of thinking ability! To begin today's sharing.
Adapting reader: Beginner who has just finished reading "The Linux private dish of Brother Bird"
实验环境: Centos:6.9 | Mysql5.7 | PHP5.6 | PHPMyAdmin4.8
First, install MySQL
Visit the MySQL website https://dev.mysql.com/downloads/repo/yum/
Download and install the official Yum Repository, note the version here, the system used in this article is centos6.x, if you are using the 7 distribution, please use the corresponding 7 version ": 1"
Note that the red font below is the Yum source for the site.
[Email protected]/]# cd/tmp
[Email protected] tmp]# RPM-IVH https://dev.mysql.com/get/mysql80-community-release-el6-1.noarch.rpm
To edit the Yum source file, note that only the proper installation of the official Yum source file will have the red file below.
[Email protected] tmp]# Vim/etc/yum.repos.d/mysql-community.repo
Currently the latest official MySQL version is 8.0, so the default profile enabled is 8.0 yum, here we need to change the corresponding version of the enabled switch, so that the Yum source support version 5.7 issued. Modified ": 3"
Save exit: Wq, start installing MySQL.
[email protected] tmp]# yum install MySQL mysql-server mysql-devel
Start MySQL
[[Email protected] tmp]# service mysqld start
Initializing mysql database:initializing mysql database: [OK]
Starting mysqld: [OK]
Baidu to find the posts hundred percent this time will let you enter:
[Email protected] tmp]# mysql-u root-p
The official initialization password is no longer "empty", the first execution of MySQL will randomly generate a password to/var/log/mysql.log here. We'll go and see it right now.
[Email protected] tmp]# Cat/var/log/mysqld.log | grep password
The red part is the randomly generated password:
2018-04-28t06:55:24.341605z 1 [Note] A temporary password is generated for [email protected]: qmr;4kt! Wxkl
Execute MySQL Security Wizard
[Email protected] tmp]# mysql_secure_installation
Log in to MySQL background
[Email protected] tmp]# mysql-u root-p
Enter Password:
[Email protected] tmp]# chkconfig mysqld on #添加开机启动
This is the end of MySQL installation!
Second, install Nginx
Visit Nginx official website http://nginx.org/en/linux_packages.html#stable, create Nginx.repo file under/etc/yum.repos.d/under document
[Email protected] tmp]# Vim/etc/yum.repos.d/nginx.repo
[[email protected] tmp]# Yum install Nginx
Create a dedicated profile for the phpMyAdmin you need to use later
[Email protected] tmp]# cp/etc/nginx/conf.d/default.conf/etc/nginx/conf.d/phpmyadmin.conf
Nginx Installation
Third, install PHP
Because PHP officially only provide binary source package, here we still choose the third party Yum Scheme install RPM package, Access http://www.webtatic.com, add Yum source.
[Email protected] tmp]# RPM-IVH http://mirror.webtatic.com/yum/el6/latest.rpm
Install the required PHP modules
Yum install php56w.x86_64 php56w-cli.x86_64 php56w-common.x86_64 php56w-gd.x86_64 php56w-ldap.x86_64 php56w-mbstring.x86_64 php56w-mcrypt.x86_64 php56w-mysql.x86_64 php56w-pdo.x86_64 php56w-fpm
[[Email protected] ~]# service PHP-FPM start
[Email protected] ~]# chkconfig php-fpm on
PHP installation is complete!
Iv. installation of phpMyAdmin
To access https://www.phpmyadmin.net/downloads/, download the tar package to the local/tmp directory.
[Email protected] tmp]# wget https://files.phpmyadmin.net/phpMyAdmin/4.8.0.1/phpMyAdmin-4.8.0.1-all-languages.tar.gz
Extract:
[Email protected] tmp]# TAR-ZXVF phpmyadmin-4.8.0.1-all-languages.tar.gz
To create a phpMyAdmin virtual directory:
[Email protected] tmp]# mkdir/www
Move extract files to/www/phpmyadmin
[Email protected] tmp]# MV Phpmyadmin-4.8.0.1-all-languages/www/myphpadmin
Create the Temp directory required for PHP to run/tmp, and give other rwx permissions
[Email protected] tmp]# cd/www/myphpadmin/
[Email protected] myphpadmin]# mkdir tmp
[Email protected] myphpadmin]# chmod o+rwx tmp
Copy the sample configuration file and edit it
[email protected] myphpadmin]# CP config.sample.inc.php config.inc.php
[Email protected] myphpadmin]# vim config.inc.php
Modify the secret phrase password $cfg[' Blowfish_secret ']
phpMyAdmin End of installation configuration
Five, Nginx for phpMyAdmin virtual site configuration
Edit previously created phpmyadmin.conf "pre-edit" with vim
"After editing"
Save exit, perform service Nginx reload, reload configuration
[[Email protected] tmp]# service Nginx Reload
Reloading nginx: [OK]
VI. Verification
Visit http://192.168.18.232:8081
Enter MySQL username and password to enter
End of full text
2018.04.28
Linux Deployment NGINX+MYSQL+PHP+PHPMYADMIN4 Environment