Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Sunday, 28 February 2016

How To Configure Wordpress on CentOS/RHEL 6x

How To Configure Wordpress on CentOS/RHEL 6x


Q. What Is WordPress?

Ans: WordPress is an open source and free blogging application and a dynamic CMS (Content Management System) developed using MySQL and PHP.

Step: 1. Install Apache Server :

# yum -y install httpd httpd-devel

Step: 2. Install & Configure Mysql Server :

# yum -y install mysql mysql-server

# service mysqld restart
# chkconfig mysqld on

# mysql_secure_installation (To Set Root Password for Mysql)

Step: 3. Create "wordpress" Database :

# mysql -u root -predhat

mysql> create database wordpress character set utf8 collate utf8_bin;
mysql> grant all privileges on wordpress.* to wordpress@'localhost' identified by 'password';
mysql> flush privileges;
mysql> exit

Step: 4. Install PHP :

# yum -y install php php-mysql php-common php-gd php-mbstring php-mcrypt \
  php-devel php-xml php-imap php-ldap php-mbstring php-odbc php-pear \
  php-xmlrpc php-soap php-cli php-intl mod_ssl

Step: 5. Downloading WordPress Package :

# cd /var/www/html
# wget http://wordpress.org/latest.tar.gz
# tar -xvzf latest.tar.gz

Step: 6. Configure Wordpress :

# cd wordpress
# cp wp-config-sample.php wp-config.php
# vi wp-config.php

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'database_name_here');

-- Give DB_NAME (wordpress)

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

-- Give DB_USER (wordpress)

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

-- Give DB_PASSWORD (password)

/** MySQL hostname */
define('DB_HOST', 'localhost');

/** Database Charset to use in creating database tables. */
define('DB_CHARSET', 'utf8');

/** The Database Collate type. Don't change this if in doubt. */
define('DB_COLLATE', '');

-- Save & Quit (:wq)

Step: 7. Creating Apache VirtualHost for WordPress :

# vi /etc/httpd/conf/httpd.conf

<Directory /var/www/html/wordpress>
    Options +Indexes +Multiviews
        DirectoryIndex index.php index.html
    AllowOverride All
    Allow from all
</Directory>

-- Save & Quit (:wq)

# vi /etc/httpd/conf.d/wordpress.conf

Add The Following Lines :

Alias /wordpress /var/www/html/wordpress

<Directory /var/www/html/wordpress>
  AllowOverride Options
  <IfModule mod_authz_core.c>
    # Apache 2.4
    Require local
  </IfModule>
  <IfModule !mod_authz_core.c>
    # Apache 2.2
    Order Deny,Allow
    Deny from All
    Allow from all
    Allow from ::1
 </IfModule>
</Directory>

<Directory /var/www/html/wordpress/wp-content/plugins/akismet>
  <FilesMatch "\.(php|txt)$">
    Order Deny,Allow
    Deny from all
  </FilesMatch>
</Directory>

-- Save & Quit (:wq)


Step: 8. Restart the Apache Service :

# service httpd restart
# chkconfig httpd on

Step: 9. Finishing WordPress Installation :

http://192.168.72.139/wordpress

Give your Site Title, Create Admin User, Create Admin Password, Enter Your E-Mail and then click on Install button.

Click on Login -> Enter your WordPress Login details.

User: admin
Password: Passw0rd

Thanks For Visiting on My Blog, For More Tutorials Keep Visiting My Blog

0 comments:

Post a Comment

Copyright © 2016 Kousik Chatterjee's Blog