[root@installwordpress ~]# cat /etc/os-release
NAME=”CentOS Linux”
VERSION=”7 (Core)”
…
[root@installwordpress ~]# ls /var/lib/mysql
auto.cnf ibdata1 ib_logfile0 ib_logfile1 mysql mysql.sock performance_schema
[root@installwordpress ~]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 13
Server version: 5.6.33 MySQL Community Server (GPL)
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
mysql> CREATE DATABASE yourdatabasename;
Query OK, 1 row affected (0,01 sec)
mysql> GRANT ALL ON yourdatabasename.* TO ‘userone’ IDENTIFIED by ‘1234567’;
Query OK, 0 rows affected (0,00 sec)
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0,00 sec)
mysql> SHOW DATABASES;
+——————–+
| Database |
+——————–+
| information_schema |
| mysql |
| performance_schema |
| yourdatabasename |
+——————–+
4 rows in set (0,00 sec)
mysql> SELECT User FROM mysql.user;
+———+
| User |
+———+
| userone |
| root |
| root |
| root |
+———+
4 rows in set (0,00 sec)
mysql> QUIT;
Bye
[root@installwordpress ~]# ls /var/lib/mysql
auto.cnf ibdata1 ib_logfile0 ib_logfile1 mysql mysql.sock performance_schema yourdatabasename
[root@installwordpress ~]# ls /var/lib/mysql/yourdatabasename
db.opt
[root@installwordpress ~]# cd /var/www
[root@installwordpress www]# wget https://wordpress.org/latest.zip
-bash: wget: command not found
[root@installwordpress www]# yum -y install wget
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Resolving Dependencies
–> Running transaction check
—> Package wget.x86_64 0:1.14-10.el7_0.1 will be installed
…
[root@installwordpress www]# wget https://wordpress.org/latest.zip
–2016-10-12 07:13:56– https://wordpress.org/latest.zip
Resolving wordpress.org (wordpress.org)… 66.155.40.249, 66.155.40.250
Connecting to wordpress.org (wordpress.org)|66.155.40.249|:443… connected.
HTTP request sent, awaiting response… 200 OK
Length: 8650308 (8,2M) [application/zip]
Saving to: ‘latest.zip’
100%[=====================================================================================================>] 8.650.308 3,61MB/s in 2,3s
2016-10-12 07:13:59 (3,61 MB/s) – ‘latest.zip’ saved [8650308/8650308]
[root@installwordpress www]# ls /var/www/
cgi-bin html latest.zip
[root@installwordpress www]# unzip latest.zip
-bash: unzip: command not found
[root@installwordpress /]# yum -y install epel-release
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Resolving Dependencies
–> Running transaction check
—> Package epel-release.noarch 0:7-6 will be installed
…
[root@installwordpress www]# yum -y install zip unzip
Loaded plugins: fastestmirror
base | 3.6 kB 00:00:00
epel/x86_64/metalink
…
Installed:
unzip.x86_64 0:6.0-15.el7 zip.x86_64 0:3.0-10.el7
Complete!
[root@installwordpress www]# unzip latest.zip
Archive: latest.zip
creating: wordpress/
…
[root@installwordpress www]# ls /var/www/wordpress -al
total 184
…
[root@installwordpress www]# cp /var/www/wordpress/wp-config-sample.php /var/www/wordpress/wp-config.php
[root@installwordpress www]# vi /var/www/wordpress/wp-config.php
…
// ** MySQL settings – You can get this info from your web host ** //
/** The name of the database for WordPress */
define(‘DB_NAME’, ‘yourdatabasename’);
/** MySQL database username */
define(‘DB_USER’, ‘userone’);
/** MySQL database password */
define(‘DB_PASSWORD’, ‘1234567’);
…
/**#@+
* Authentication Unique Keys and Salts.
*
* Change these to different unique phrases!
* You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}
* You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
*
* @since 2.6.0
*/
define(‘AUTH_KEY’, ‘cIS`3ue[~|jx>K]MHWE,25Ql:3<5Ma3,CnD3tT6r |K8*0_+MyL*-BZPAvg@-P|2’);
define(‘SECURE_AUTH_KEY’, ‘QVAW8~7NZx3sjl,}-x7N75+U$lkfj(KmU_Np4e`<%(7(yq[a-UY*i3ZrV5_m|jPu’);
define(‘LOGGED_IN_KEY’, ‘ _,J7(1n UJcfOwCTID+[|4v,K=GBP!3Q-(T;)p_Yd@j&My5:dUz4APwGp:#W2{$’);
define(‘NONCE_KEY’, ‘3(V]>qOmx8q-d }L7#b5 }JXX f=>7< voemQlBG&0NiVDlx&:gWy@c|k4H!_;lK’);
define(‘AUTH_SALT’, ‘.(*sUm7+Ls<s;4aK~XoqztC2s]R<6Ld$+G[zcS(H9Tf ^Y+@NFP34]N@*-9F4R.Z’);
define(‘SECURE_AUTH_SALT’, ‘8-PPfrF5`tF*T#lkFNyqVeM9iWG8+kQ=UViGn0NRLvh[3CUkcw-|B^$?ioH}-!p#’);
define(‘LOGGED_IN_SALT’, ‘dh0uys-+/v%V>GQa&V?kX.@ox+1j*s^l&pW2k6WA9||=?UV#Sni+|oUQ-x7z5m;S’);
define(‘NONCE_SALT’, ’10)gq7eWzDUMdKIT:VsN.L)6BQoLk5-Tw({vK./9^V?+cW@wr;{/&F?Ur|RDs9c%’);
/**#@-*/
/**
* WordPress Database Table prefix.
*
* You can have multiple installations in one database if you give each
* a unique prefix. Only numbers, letters, and underscores please!
*/
$table_prefix = ‘kfjght_’;
…
[root@installwordpress www]# vi /etc/httpd/conf.d/virtualhostforwordpress.conf
<VirtualHost *:80>
ServerName yourdomain.com
ServerAlias www.yourdomain.com
ServerAdmin youraddress@gmail.com
DocumentRoot /var/www/wordpress/
<Directory “/var/www/wordpress”>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
[root@installwordpress www]# systemctl restart httpd
Go to web browser and type http://yourdomain.com/wp-admin/install.php