CentOS Yum Install high version Php,apache,mysql

Source: Internet
Author: User
Tags install perl

1. Check the currently installed PHP package

Yum List Installed | grep php or Yum list installed php*

If you want to delete, the executable

Yum Remove php.x86_64 php-cli.x86_64

2.RPM Pack

CentOs 6.x
RPM-UVH http://mirror.webtatic.com/yum/el6/latest.rpm

CentOs 7.X
RPM-UVH https://mirror.webtatic.com/yum/el7/epel-release.rpm
RPM-UVH https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

If you want to remove the packages installed above, reinstall
Rpm-qa | grep webtatic
RPM-E The packages found above can be

3. View the version of PHP that can be installed

Yum List php*

4. Installation

Here I have chosen php5.6 to install

Yum-y Install php56w

(Actually, when the PHP is installed, apache2.2 is installed)

Install extensions

Yum Install Php56w-mysql

Yum Install PHP56W-GD

Yum Install php56w-mbstring

Restart Apache

Service httpd Restart

============================================

Installing apache2.4

Perform

cd /etc/yum.repos.d

wget http://repos.fedorapeople.org/repos/jkaluza/httpd24/epel-httpd24.repo

wget http://www.hop5.in/yum/el6/hop5.repo

It is recommended to uninstall the installed (apache2.2)

View installed

Yum List installed httpd*

Unloading

Yum Remove httpd

View Installable httpd

Yum List httpd*

Installation

yum install httpd24-httpd httpd24-httpd-devel httpd24-mod_ssl hhvm

=========================================

Installing mysql5.7.15

Yum mode installation (recommended)

http://dev.mysql.com/downloads/repo/yum/

Taking centos6.x as an example

RPM-UVH http://dev.mysql.com/get/mysql57-community-release-el6-9.noarch.rpm

Search

Yum List mysql*

Now you can see mysql5.7

Yum Install Mysql-community-server

------------------------------------------------------------Split Line---------------------------

RPM Mode Installation

View and uninstall your own MySQL

First with Rpm-qa | Grep-i mysql command to view and then uninstall the corresponding component with RPM-E--nodeps

Official Downloads

http://dev.mysql.com/downloads/mysql/

CD/

wget http://cdn.mysql.com//Downloads/MySQL-5.7/mysql-community-common-5.7.15-1.el6.x86_64.rpm

wget http://cdn.mysql.com//Downloads/MySQL-5.7/mysql-community-libs-5.7.15-1.el6.x86_64.rpm

wget http://cdn.mysql.com//Downloads/MySQL-5.7/mysql-community-client-5.7.15-1.el6.x86_64.rpm

wget http://cdn.mysql.com//Downloads/MySQL-5.7/mysql-community-server-5.7.15-1.el6.x86_64.rpm

Download the above file to/directory

Install dependencies First (mysql5.7 required)

Yum-y Install Numactl

Yum-y Install Perl

Perform the installation sequentially

RPM-IVH mysql-community-common-5.7.15-1.el6.x86_64.rpm
RPM-IVH mysql-community-libs-5.7.15-1.el6.x86_64.rpm
RPM-IVH mysql-community-client-5.7.15-1.el6.x86_64.rpm
RPM-IVH mysql-community-server-5.7.15-1.el6.x86_64.rpm

Start

Service mysqld Start

Boot auto Start

Chkconfig mysqld on

Get MySQL initial password

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

The >GJPJGKB:0CX here is the default password for root.

Log in to MySQL

Mysql-uroot-p ' Password '

namely Mysql-uroot-p

mysql5.7 security enhanced, requires immediate change of password, otherwise cannot continue operation

Modify New Password

ALTER USER ' root ' @ ' localhost ' identified by ' new password ';

Note that passwords are complex enough (8-bit, uppercase letters, lowercase letters, numbers, special symbols), otherwise the modification fails

Allow remote logins

Grant all privileges on * * to ' root ' @ '% ' identified by ' haoabc2016! ' with GRANT option;

flush privileges;

----------------------------------------------------------------------------------------------------------------------- 

How to solve ERROR 1819 (HY000): Your password does not satisfy the current policy requirements it?

Two global parameters must be modified:
First, modify the value of the Validate_password_policy parameter

set global validate_password_policy=0; 

Change the length of the password again

set global validate_password_length=1;

----------------------------------------------------------------------------------------------------------------------- 


Default installation location for MySQL

/etc/my.cnf               #配置文件

/var/lib/mysql/               #数据库目录

/usr/share/mysql              #配置文件目录

/usr/bin                     #相关命令目录

/etc/init.d/mysql            #启动脚本

本文引用:http://blog.csdn.net/buyueliuying/article/details/52535724

CentOS Yum Install high version Php,apache,mysql

Related Article

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.