WordPress hosting in centos-7

[root@wordpress ~]# yum install httpd mariadb mariadb-server php php-common php-mysql php-gd php-xml php-mbstring php-mcrypt
[root@wordpress ~]# mysql_secure_installation

[root@wordpress ~]# systemctl start mariadb

[root@wordpress ~]# systemctl enable mariadb

[root@wordpress ~]# mysql -u root -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 10
Server version: 5.5.52-MariaDB MariaDB Server

Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

MariaDB [(none)]> CREATE USER wordpress@localhost IDENTIFIED BY “redhat”;
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> create database wordpress;
Query OK, 1 row affected (0.00 sec)

MariaDB [(none)]> GRANT ALL ON wordpress.* TO wordpress@localhost;
Query OK, 0 rows affected (0.01 sec)

MariaDB [(none)]> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> exit
Bye
—————–
[root@wordpress ~]# vim /etc/httpd/conf/httpd.conf
<VirtualHost *:80>
ServerAdmin root@localhost
DocumentRoot /var/www/html/wordpress
ServerName wordpress
ErrorLog /var/log/httpd/wordpress-error-log
CustomLog /var/log/httpd/wordpress-acces-log common

[root@wordpress ~]# systemctl start httpd
[root@wordpress ~]# systemctl enable httpd
Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.

[root@wordpress ~]#  wget http://wordpress.org/latest.tar.gz

[root@wordpress ~]#  tar -xvzf latest.tar.gz -C /var/www/html
[root@wordpress ~]# cd /var/www/html/wordpress
[root@wordpress wordpress]# cp wp-config-sample.php wp-config.php

wordpress1

wprdpress2.pngwordpress3wordpress4wordpress5

[root@wordpress wordpress]# vim wp-config.php
define(‘DB_NAME’, ‘wordpress’);

/** MySQL database username */
define(‘DB_USER’, ‘wordpress’);

/** MySQL database password */
define(‘DB_PASSWORD’, ‘redhat’);

————–
MariaDB [(none)]> show databases;
+——————–+
| Database |
+——————–+
| information_schema |
| mysql |
| performance_schema |
| wordpress |
+——————–+
4 rows in set (0.00 sec)

MariaDB [(none)]> use wordpress;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
MariaDB [wordpress]> show tables;
+———————–+
| Tables_in_wordpress |
+———————–+
| wp_commentmeta |
| wp_comments |
| wp_links |
| wp_options |
| wp_postmeta |
| wp_posts |
| wp_term_relationships |
| wp_term_taxonomy |
| wp_termmeta |
| wp_terms |
| wp_usermeta |
| wp_users |
+———————–+
12 rows in set (0.00 sec)

MariaDB [wordpress]> describe wp_posts;
+———————–+———————+——+—–+———————+—————-+
| Field | Type | Null | Key | Default | Extra |
+———————–+———————+——+—–+———————+—————-+
| ID | bigint(20) unsigned | NO | PRI | NULL | auto_increment |
| post_author | bigint(20) unsigned | NO | MUL | 0 | |
| post_date | datetime | NO | | 0000-00-00 00:00:00 | |
| post_date_gmt | datetime | NO | | 0000-00-00 00:00:00 | |
| post_content | longtext | NO | | NULL | |
| post_title | text | NO | | NULL | |
| post_excerpt | text | NO | | NULL | |
| post_status | varchar(20) | NO | | publish | |
| comment_status | varchar(20) | NO | | open | |
| ping_status | varchar(20) | NO | | open | |
| post_password | varchar(255) | NO | | | |
| post_name | varchar(200) | NO | MUL | | |
| to_ping | text | NO | | NULL | |
| pinged | text | NO | | NULL | |
| post_modified | datetime | NO | | 0000-00-00 00:00:00 | |
| post_modified_gmt | datetime | NO | | 0000-00-00 00:00:00 | |
| post_content_filtered | longtext | NO | | NULL | |
| post_parent | bigint(20) unsigned | NO | MUL | 0 | |
| guid | varchar(255) | NO | | | |
| menu_order | int(11) | NO | | 0 | |
| post_type | varchar(20) | NO | MUL | post | |
| post_mime_type | varchar(100) | NO | | | |
| comment_count | bigint(20) | NO | | 0 | |
+———————–+———————+——+—–+———————+—————-+
23 rows in set (0.00 sec)

MariaDB [wordpress]> show processlist;
+—-+——+———–+———–+———+——+——-+——————+———-+
| Id | User | Host | db | Command | Time | State | Info | Progress |
+—-+——+———–+———–+———+——+——-+——————+———-+
| 60 | root | localhost | wordpress | Query | 0 | NULL | show processlist | 0.000 |
+—-+——+———–+———–+———+——+——-+——————+———-+
1 row in set (0.00 sec)

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s