Saturday 5 January 2013

Simple Steps to install wordpress on Centos


Wordpress Installation steps:-

1) [root@linuxnotes~] # wget http://wordpress.org/latest.tar.gz
2) [root@linuxnotes~] #  tar -xvzf latest.tar.gz
3) [root@linuxnotes~] # cd wordpress/
4) [root@linuxnotes~] # rpm –qa mysqld*

Note:- If showing mysql package then no need to install otherwise refer the step no 5.

5) [root@linuxnotes~] # yum install mysqld* -y
6) [root@linuxnotes~] # /etc/init.d/mysqld status

Note:-  If mysql status showing stopped  then first start the service and then refer the step no 7.

7) [root@linuxnotes~] # mysql –u root –p
8) Enter password:  ******
9) Mysql> show databases;
10) Mysql > mysql> show databases;   // To check whether  existing database-name  is  worpress.
                +--------------------+
                | Database           |
               +--------------------+
                | information_schema |
                | collage               |
                | Employee           |
                | Alfresco           |
                | Asterisk           |
                | MySQL              |
                | Test               |
                |  Account               |
                +--------------------+
                8 rows in set (0.12 sec)

11) mysql> CREATE DATABASE wordpress;
12) mysql> CREATE USER wordpressuser@localhost;
Note :- To verify  created  wordpressuser by using following  steps no 13,14 and 15.
13) mysql> use mysql;
14) mysql> show tables;
15) mysql> select * from user;
16) mysql> set password for wordpressuser@localhost=password('*******');
17) mysql> GRANT ALL PRIVILEGES ON wordpress.* TO wordpressuser@localhost IDENTIFIED BY '******';
18) mysql> flush privileges;
19) mysql> show databases;
               +--------------------+
                | Database           |
               +--------------------+
                | information_schema |
                | collage              |
                | Employee           |
                | Alfresco           |
                | Asterisk           |
                | MySQL              |
                | Test               |
                | Wordpress          |
                | Account               |
                +--------------------+
                9 rows in set (0.12 sec)

         
20) mysql> exit
21) [root@linuxnotes~] # cd  /downloads/wordpress
22) [root@linuxnotes~] # ls
23) [root@linuxnotes~] # cp  -r  wp-config-sample.php  wp-config.php
24) [root@linuxnotes~] # vi  wp-config.php

Note:- Edit wp-config.php file and  change the following lines
/** The name of the database for WordPress */  
define('DB_NAME', 'wordpress');

/** MySQL database username */
define('DB_USER', 'wordpressuserName');

/** MySQL database password */
define('DB_PASSWORD', '*******');

save and exit.

25) [root@linuxnotes~] # cp –r  wordpress/*  /var/www/html

Check the network config file:-

26)  [root@linuxnotes~] #  Vi /etc/hosts
#127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
 ::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
“Your  ip address ”  localhost localhost.localdomain

27) [root@linuxnotes~] #  /et c/init.d/network  restart
28)    [root@linuxnotes~] #  /et c/init.d/mysqld  restart
29) [root@linuxnotes~] #  /etc/init.d/httpd   restart
30) Finally check  in browser :-  http://ipaddress

No comments:

Post a Comment