Sunteți pe pagina 1din 3

How to Install WordPress Blog on CentOS 5.

5
by ehowstuff on April 24, 2011 WordPress is an open source blog tool and publishing platform powered by PHP and MySQL. It can be install on Windows server or Linux server. It is the famous Content Management System (CMS) and it has many features including the plug-in that can make your blog look modern and powerful.Below are the simple steps to install the wordpress blog on CentOS server. This tutorial assume that you already installed LAMP ( Linux, Apache, Mysql and PHP) server. 1.Go t your web server root directory.
[root@server ~]# cd /var/www

2. Download the latest wordpress using wget command:


[root@server www]# wget http://wordpress.org/latest.tar.gz

3. Extract the compressed archives with below command:


[root@server www]# tar xzvf latest.tar.gz

4. The extracted file name will be wordpress. Rename it to anything you want. Normally we put it blog since your url will be like this: http://servername/blog
root@server www]# cp wordpress blog

5. Create the Database and database user:


mysql> CREATE DATABASE blogdb; Query OK, 1 row affected (0.00 sec) mysql> CREATE USER 'bloguser'@'localhost' IDENTIFIED BY 'blogpassword'; Query OK, 0 rows affected (0.00 sec) mysql> GRANT ALL PRIVILEGES ON blogdb.* to bloguser@localhost; Query OK, 0 rows affected (0.00 sec)

6. Navigate the browser to http://servername/blog

There doesnt seem to be a wp-config.php file. I need this before we can get started. Need more help? We got it. You can create a wp-config.php file through a web interface, but this doesnt work for all server setups. The safest way is to manually create the file. Click Create a Configuration File 7. You will be redirect to WordPress > Setup Configuration File: Welcome to WordPress. Before getting started, we need some information on the database. You will need to know the following items before proceeding.

Database name = any_db (User define as step 5) Database username = any_user (User define as step 5) Database password = any_password (User define as step 5) Database host = localhost (if apache and mysql on the same server) Table prefix (if you want to run more than one WordPress in a single database)

Click Lets Go! to proceed 8. Fill in below form and Click Submit

Database name = blogdb Database username = bloguser Database password = blogpassword Database host = localhost Table prefix = wp_

You will be redirect to this page. Please leave the page and proceed below steps. Sorry, but I cant write the wp-config.php file. You can create the wp-config.php manually and paste the following text into it. 9. Go to your web server terminal or ssh to web server. Copy and rename wp-configsample.php to wp-config.php:
[root@server ~]# cp /var/www/blog/wp-config-sample.php /var/www/blog/wp-config.php

10. Modify the wp-config.php:


root@server ~]# vi /var/www/blog/wp-config.php

Change below line to above:


/** The name of the database for WordPress = Line 19 */ define('DB_NAME', 'database_name_here'); /** MySQL database username = Line 22 */

define('DB_USER', 'username_here'); /** MySQL database password = Line 25 */ define('DB_PASSWORD', 'password_here'); /** MySQL hostname = Line 28 */ define('DB_HOST', 'localhost');

Save the wp-config.php file and exit from web server 11. Continue to this URL: http://servername/blog/wp-admin/setup-config.php?step=2 Click Run the install 12. Please complete the form Click Install WordPress

Site Title : Blog Title Username : Prefered username Password, twice : Your password Your E-mail : Your Email

13. To login Navigate the browser to http://servername/blog/wp-login.php

S-ar putea să vă placă și