CentOS Install PHP and MySQL

Source: Internet
Author: User
Tags install php php and mysql

Freshmen in the case of not compiling:

1、安装PHP5

yum install php 根据提示输入Y直到安装完成 2、安装PHP组件,使 PHP5 支持 MySQL yum install php-mysql php-gd libjpeg* php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-mcrypt php-bcmath php-mhash libmcrypt2. Install mysql:** The first time the installation occurs:

[[Email protected]_18_87_centos ~]# service MySQL start
Redirecting To/bin/systemctl start Mysql.service
Failed to start Mysql.service:Unit mysql.service Failed to load:no such file or directory.

[[Email protected]_18_87_centos mysql-5.5.3-m3]# service MySQL Status
Redirecting To/bin/systemctl status Mysql.service
* Mysql.service
Loaded:not-found (reason:no such file or directory)
Active:inactive (Dead)

* * Find solutions on the Web:

sudo rpm-uvh http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm

* * Once you have removed the installed MySQL, install it again:

Yum install MySQL mysql-server mysql-libs mysql-server

Finally, restart the MySQL service:

[[Email protected]_18_87_centos ~]# service MySQL start
Redirecting To/bin/systemctl start Mysql.service

Yes, it is.

[[email protected]_18_87_centos ~]# service MySQL status
redirecting to/bin/systemctl status mysql.service
* mysqld.service-mysql Community Server
loaded:loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset:disabled)
Active:active ( Running) since Sun 2016-11-20 16:02:08 CST; 3s ago
process:16986 Execstartpost=/usr/bin/mysql-systemd-start Post (code=exited, status=0/success)
Process: 16923 Execstartpre=/usr/bin/mysql-systemd-start Pre (code=exited, status=0/success)
Main pid:16985 (Mysqld_safe)
CGroup:/system.slice/mysqld.service
|-16985/bin/sh/usr/bin/mysqld_safe
' -17139/usr/sbin/mysqld-- BASEDIR=/USR--datadir=/var/lib/mysql--plugin-...

Nov 16:02:07 Vm_18_87_centos mysql-systemd-start[16923]: support for MySQL by buying s ...
Nov 16:02:07 Vm_18_87_centos mysql-systemd-start[16923]: note:new Default Config ...
Nov 16:02:07 Vm_18_87_centos mysql-systemd-start[16923]: Please make sure your con ...
Nov 16:02:07 Vm_18_87_centos mysql-systemd-start[16923]: Warning:default config f ...
Nov 16:02:07 Vm_18_87_centos mysql-systemd-start[16923]: This file is being read by ...
Nov 16:02:07 Vm_18_87_centos mysql-systemd-start[16923]: If You don't want to use ...
Nov 16:02:07 Vm_18_87_centos mysql-systemd-start[16923]:--defaults-file argument ...
Nov 16:02:07 Vm_18_87_centos mysqld_safe[16985]: 161120 16:02:07 mysqld_safe Logg ....
Nov 16:02:07 Vm_18_87_centos mysqld_safe[16985]: 161120 16:02:07 mysqld_safe STAR...L
Nov 16:02:08 Vm_18_87_centos systemd[1]: Started MySQL Community Server.
Hint:some lines were ellipsized, use-l to show on full.

CentOS Install PHP and 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.