WordPress/Installation/CentOS
From r00tedvw.com wiki
(Difference between revisions)
Line 4: | Line 4: | ||
=Download required packages= | =Download required packages= | ||
<nowiki>~$ sudo yum install mysql-server php php-mysql -y </nowiki> | <nowiki>~$ sudo yum install mysql-server php php-mysql -y </nowiki> | ||
+ | |||
+ | =Setup MySQL= | ||
+ | Start MySQL | ||
+ | <nowiki>~$ sudo service mysqld start</nowiki> | ||
+ | Set the root password | ||
+ | <nowiki>~$ sudo /usr/bin/mysql_secure_installation | ||
+ | Enter current password for root (enter for none): | ||
+ | Set root password? [Y/n] y | ||
+ | Remove anonymous users? [Y/n] y | ||
+ | Disallow root login remotely? [Y/n] y | ||
+ | Remove test database and access to it? [Y/n] y | ||
+ | Reload privilege tables now? [Y/n] y | ||
+ | </nowiki> | ||
+ | ==Configure MySQL== | ||
+ | <nowiki>~$ mysql -u root -p | ||
+ | ~$ mysql> CREATE USER 'wordpress'@'localhost' IDENTIFIED BY 'THISpasswordSHOULDbeCHANGED'; | ||
+ | ~$ mysql> CREATE DATABASE wordpress; | ||
+ | ~$ mysql> GRANT ALL PRIVILEGES ON wordpress.* TO 'wordpress'@'localhost' IDENTIFIED BY 'wordpressuserpassword' WITH GRANT OPTION;</nowiki> |
Revision as of 06:05, 5 February 2018
Ubuntu Installation | CentOS Installation
Installation done on CentOS 6.9
Download required packages
~$ sudo yum install mysql-server php php-mysql -y
Setup MySQL
Start MySQL
~$ sudo service mysqld start
Set the root password
~$ sudo /usr/bin/mysql_secure_installation Enter current password for root (enter for none): Set root password? [Y/n] y Remove anonymous users? [Y/n] y Disallow root login remotely? [Y/n] y Remove test database and access to it? [Y/n] y Reload privilege tables now? [Y/n] y
Configure MySQL
~$ mysql -u root -p ~$ mysql> CREATE USER 'wordpress'@'localhost' IDENTIFIED BY 'THISpasswordSHOULDbeCHANGED'; ~$ mysql> CREATE DATABASE wordpress; ~$ mysql> GRANT ALL PRIVILEGES ON wordpress.* TO 'wordpress'@'localhost' IDENTIFIED BY 'wordpressuserpassword' WITH GRANT OPTION;