Wednesday, December 19, 2012

Wordpress installation on linux

Installing the Wordpress

sudo apt-get install apache2yum –y install httpd
sudo aptitude install mysql-server-5.1yum –y install mysql-server-5.1
sudo aptitude install php5 phpmyadmin yum –y install php php-mysql
sudo apt-het install unzip wgetyum –y install unzip wget
sudo service apache2 restart
        sudo service mysql restart
chkconfig httpd on
chkconfig mysqld on
/etc/init.d/mysqld start
/etc/init.d/httpd start

sudo mv /var/www
sudo mv wordpress-3.0.1.tar.gz /var/www

cd /var/www

sudo unzip
sudo tar -zxvf latest.tar.gz

ls –al
ps aux | grep apache

You will see the Apache user group on the left.
Now change your WordPress folder to the same user group, you can do this in a parent folder or subfolder but for sanity it usually best for parent folder, use -R to recursively do it

And change the permission

chmod   -R 755 /var/www/<path to word press folser>

Note if www is your wordpress folder then just use the command upto www

sudo rm -f
sudo rm -f wordpress-3.0.1.tar.gz

For creating a database using phpMyAdmin, follow these steps:
o Start by choosing a name for your WordPress database (like ‘wordpress‘ or ‘blog‘), enter it in the Create new database field, and click Create (choose the right Connection Collation for you or use utf8_general_ci).
o Click the Home icon in the upper left to return to the main page, then click Privileges. If a user relating to WordPress does not already exist in the list of users, create one:
o Click Add a new User.
o Chose a username for WordPress (like ‘wordpress‘) and enter it in the User name field. (Be sure Use text field: is selected from the dropdown.)
o Choose a strong password password (use, and enter it in the Password field. (Be sure Use text field: is selected from the dropdown.) Re-enter the password in the Re-type field.
o Write down the username and password you chose.
o Leave all options under Global privileges at their defaults.
o Click Go.
o Return to the Privileges screen and click the Edit privileges icon (on the right-most column) on the user you’ve just created for WordPress. In the Database-specific privileges section, select the database you’ve just created for WordPress under the Add privileges to the following database drop down. The page will refresh with privileges for that database. Click Check All to select all privileges, and click Go.
o On the resulting page, make note of the host name listed after Server: at the top of the page. (This will usually be localhost.)
cd /vacr/www/wordpress
sudo cp wp-config-sample.php wp-config.php

Edit this new file, wp-config.php, with your favorite editor and change the values under the section labeled

MySQL settings

o DB_NAME: Database Name used by WordPress
o DB_USER: Username used to access Database
o DB_PASSWORD: Password used by Username to access Database
o DB_HOST: The hostname of your Database Server
And also put your Authentication Unique Keys and Salts under the section labeled Authentication Unique
Keys using WordPress ’online generator’ to obtain them:
Put all the data in the configuration  file.