CentOS installation 1

1, install epel-release

Enter the command: yum -y install epel-release

Enter and wait for the installation to succeed

p>

Share a picture

Share a picture

2, install PHP7.0

First, let’s get the yum source of PHP7.0 and execute the following command:

rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

share picture

After the acquisition is successful, we can check the extension name of php7.0 through the following command. You can install it according to your own requirements.

Check the extension name command: yum search php70w

Share pictures

After checking the extension name, you can choose a few of your own requirements to install. I recommend installing below These are general-purpose ones, please direct instructions. If you want any extension, you can install it later, don’t worry, the instruction is the same, yum install {write extension}.

Installation instruction: yum install php70w php70w-fpm php70w-cli php70w-common php70w-devel php70w-gd php70w-pdo php70w-mysql php70w-mbstring php70w-bcmath

When installing You have to enter Y twice to continue the installation. Just enter it obediently.

Share a picture

Share a picture

Share pictures

share picture

The installation is successful, let me check if the installation is successful, enter the command below to see the version and try it!

Command: php -v

If you can see the content of the following figure, the installation is successful!

Share a picture

The following are some operating instructions:

Systemctl start php-fpm.service Start

Systemctl Stop php-fpm.service Stop

Systemctl Restart php-fpm.service restart

Systemctl reload php-fpm.service Restart to modify the configuration

Teach you another installation method, which is to download the MySQL repo source for installation , Let’s do the actual operation:

First, we execute the following command to get the repo source

Command: wget http://dev.mysql.com/get/mysql-community- release-el7-5.noarch.rpm

share picture

< p>

After downloading, we will install the downloaded mysql-community-release-el7-5.noarch.rpm package.

Execute command: rpm -ivh mysql-community-release-el7-5.noarch.rpm

Share pictures

After installing the mysql-community-release-el7-5.noarch.rpm package, let’s install MySQL.

Execute command: yum install mysql-community-server

Operate as follows

Share picture

Share a picture

share picture

share Picture

The installation is successful, in fact, the installation can be completed with three instructions , The same is also very simple.

There are also the following commands to remember:

Start MySQL command: systemctl start mysqld (the first time to start the service)

Restart MySQL command: systemctl restart mysqld

Stop MySQL command: systemctl stop mysqld

Now let’s do some basic configuration of MySQL:< /p>

First of all, of course, set the password, and I don’t know how to use the password.

The initial MySQL login does not require a password, and you can enter directly by using the following command.

Command: mysql -u root

share picture< /p>

Modify the local password

First log in to MySQL.
mysql> use mysql;
mysql> update user set password=password(‘123′) where user=’root’ and host=’localhost’;
mysql> flush privileges;

< h1>Remote authorization

1. First login with localhost (enter MySQL) mysql -u root -p
Enter password: (input password)
2. Execute authorization command
mysql> grant all privileges on *.* to [email protected]’%’ identified by ‘123’; (note the “;” after the sentence)
Query OK, 0 rows affected (0.07 sec)
3. Exit again Try: mysql> quit
4. Try to log in again: mysql -u root -h 192.168.194.142 -p
Enter password:
The result shows: Welcome to the MySQL monitor. Commands end with; or \g .
Your MySQL connection id is 3
Indicates success

Start MySQL configuration at boot

Let’s execute this command vi /etc/ rc.local will become an editing area. We will add service mysqld start, as shown in the figure, it is best to save and close it.

Share a picture

That’s it for MySQL installation and basic configuration.

4, Install apache

Finally, we will install apache and we are done.

This is very simple, just execute the following instructions directly.

Command: yum install httpd

share picture

share picture

The installation is successful Then we need to execute the following command to start it,

Command: systemctl start httpd

share picture

After we are finished, we come to visit our address below, and the page with the picture below will appear, proving that the installation has been successful

share picture

This way we PHP, MySQL, and apache have been installed.

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 4881 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.