LAMP+Wordpress build blog

       As a technology controller, seeing that others have their own blogs, Xiaoye couldn't help but create his own blog. Interested children's shoes should practice comparison carefully next. If there is a mistake, don't rush to get angry, we can communicate and learn. Our slogan is: Build a bridge when you meet water, and dig a mountain when you meet mountains.

 

lab environment:

vmware virtual machine

ubuntu-14.04.5-server-amd64

wordpress

 

In order to achieve the goal, Xiaoye finally knows the experimental environment we need after inquiring from all parties, and finds the download address of the environment file needed to build it, and secretly shares it with everyone, everyone must keep it well!

 

download link:

Download link: http://releases.ubuntu.com/14.04/ubuntu-14.04.5-server-amd64.iso.torrent

Download link: https://wordpress.org/latest.zip

 

Fortunately, Xiaoye's network is good, and the required files will be downloaded soon, but I need to remind everyone that it must be placed in a folder that is convenient for you to remember and search, so as not to find it when you need to use it, which is a waste of time. Download it again. Remember remember!

Next, we must carefully follow the correct operation steps to install the environment. After the installation, make sure that the environment has been installed correctly. After that, we can perform the following operations.

 

Specific steps are as follows:

 

1. WordPress environment construction

 

1.1. Perform source backup, configuration and upgrade operations on Ubuntu .

Backup sources: sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak

Configure sources: sudo vim /etc/apt/sources.list

Upgrade source: sudo apt-get update

sudo apt-get upgrade

 

sources.list add the following sources:

#中科大源:

deb http://debian.ustc.edu.cn/ubuntu/ trusty main restricted universe multiverse

deb http://debian.ustc.edu.cn/ubuntu/ trusty-security main restricted universe multiverse

deb http://debian.ustc.edu.cn/ubuntu/ trusty-updates main restricted universe multiverse

deb http://debian.ustc.edu.cn/ubuntu/ trusty-proposed main restricted universe multiverse

deb http://debian.ustc.edu.cn/ubuntu/ trusty-backports main restricted universe multiverse

deb-src http://debian.ustc.edu.cn/ubuntu/ trusty main restricted universe multiverse

deb-src http://debian.ustc.edu.cn/ubuntu/ trusty-security main restricted universe multiverse

deb-src http://debian.ustc.edu.cn/ubuntu/ trusty-updates main restricted universe multiverse

deb-src http://debian.ustc.edu.cn/ubuntu/ trusty-proposed main restricted universe multiverse

deb-src http://debian.ustc.edu.cn/ubuntu/ trusty-backports main restricted universe multiverse

 

#aliyuan :

deb http://mirrors.aliyun.com/ubuntu/ trusty main multiverse restricted universe

deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main multiverse restricted universe

deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main multiverse restricted universe

deb http://mirrors.aliyun.com/ubuntu/ trusty-security main multiverse restricted universe

deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main multiverse restricted universe

deb-src http://mirrors.aliyun.com/ubuntu/ trusty main multiverse restricted universe

deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main multiverse restricted universe

deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main multiverse restricted universe

deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main multiverse restricted universe

deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main multiverse restricted universe

 

As shown in the figure:

 

 

1.2, Apache installation

apache install

Installation: sudo apt-get install apache2 #install apache2

sudo apt-get install libapache2-mod-php5

sudo apt-get install libapache2-mod-auth-mysql

Start: sudo service apache2 start

As shown in the figure:

 

 

1.3 Install the MySQL database

Installation: sudo apt-get install mysql-client mysql-server  

#In the middle, you will be prompted to enter the root password :

 

 

Install:  sudo apt-get install php5

sudo apt-get install php5-gd

sudo apt-get install php5-mysql

 

Second, the installation and construction of WordPress

 

2.1 Download, install and configure WordPress.

Download: sudo wget https://wordpress.org/latest.zip // Download the WordPress.zip file

Install the unzip tool: sudo apt-get install unzip 

Move the source code to the website root directory: sudo mv wordpress /var/www/html

Change root directory permissions:

sudo chown -R www-data:www-data /var/www/html/wordpress

sudo chmod -R 755 /var/www/html/wordpress

#Extras :

read permission r = 4

write permission w = 2

execute permission x = 1

 

The three numbers 775 represent the permissions of the owner, group users, and other users.

E.g:

7 The owner has read, write, and execute permissions

7 groups of users have read, write, execute permissions

5 Other users have read, execute permissions (4+1 = 5)

 

 

 

Configure virtual host:

sudo vim /etc/apache2/sites-enabled/000-default.conf       

  

 sudo service apache2 restart

 

 

2.2 Establish a connection between Wordpress and MySQL database

Connect to the database: mysql u root p

#root 's default password: 123456

Create database: create database wordpress;

#WordPress here is the name of the database created

 

 

2.3 Basic configuration of WordPress

2.3.1   Open the browser and enter the IP address of the computer where the environment is located:

http://X.X.X.X/wp-admin/setup-config.php

Select "Simplified Chinese" and click "Continue".

 

 2.3.2 Carefully read the loaded page and click "Start Now" again.

 

 

2.3.3  After the following page appears, fill in the database name configured on the terminal and the user name and password set in the following list accurately, and click "Submit".

 

 2.3.4   After completing the above operations, you can install WordPress on the page .

 

2.3.5 Fill in the site information according to the content of the website you want to build.

 

 

2.3.6 After the installation is complete, the following completion confirmation page will appear.

 

#Note that the user password is saved in each step for easy memory.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325994624&siteId=291194637