Host a blog on your ReadyNAS

2008/04/13 by  
カテゴリ: How-To

Have you ever wanted to host your own blog site? Maybe not a real blog but perhaps your own website? Perhaps you’ve pondered but you didn’t really know where to start.

Well, have no fear. We’ll show you how you can use WordPress, perhaps the most popular blogging software available to host your own site. With WordPress, you can use it as a great blogging tool, or use it the way www.readynas.com uses WordPress — as a Content Management System (CMS) to create a personal or business website. If you’d like to find out more about WordPress, take a look at www.wordpress.org — you’ll find all the resource you need to learn about it and the ton of plug-ins available to expand it.

To install WordPress on the ReadyNAS, you’ll need to do the following.

  1. Create a share on the ReadyNAS where you will run WordPress and enable Internet access to the share.
  2. Enable Root SSH on the ReadyNAS.
  3. Install PHP on the ReadyNAS.
  4. Install the PHP5-MySQL package.
  5. Download and install WordPress on the ReadyNAS.
  6. Setup WordPress database.
  7. Complete WordPress installation.

Now, let’s get down to the nitty-gritty details. Make sure you are running RAIDiator 4.01 firmware or above before proceeding.

Step 1 – Create a website share that’s accessible outside your firewall

Follow the instructions in the Create a personal webserver on the ReadyNAS how-to.

Step 2 – Enable Root SSH

Install the EnableRootSSH add-on. Installation instruction is available from the ReadyNAS Add-ons page.

Step 3 – Install PHP

Follow the instructions in the Setting up a PHP CGI Environment how-to.

Step 4 – Install PHP5-MySQL package

From the root shell, run the following:

# apt-get install php5-mysql
# killall apache-ssl
# apache-ssl -f /etc/frontview/apache/httpd.conf

Step 5 – Download and install WordPress

The following contains instructions from www.wordpress.org. We’ve taken the liberty to stream-line it for the ReadyNAS.

# cd /tmp
# wget http://wordpress.org/latest.tar.gz
# tar -xzvf latest.tar.gz

Copy WordPress files to the destination website share from Step 1. Here, we’ll use website as the name of the share.

# mv wordpress/* /c/website/
# rmdir wordpress

Step 6 – Setup WordPress database

Before creating the WordPress MySQL database, you’ll need to first modify the file /etc/mysql/my.cnf. You can use the built-in vi text editor to do this, or copy the file to your PC or Mac, make the change, and copy it back to the ReadyNAS.

Search for the following line in /etc/mysql/my.cnf:

skip-networking

and insert a ‘#’ sign in front of it to comment out the line. The resulting line should look as follows:

#skip-networking

Once you’ve saved the change, you’ll need to restart MySQL as follows:

# mysqladmin shutdown
# mysqld

Now, let’s create the MySQL database for WordPress. When prompted for password, just press Enter. We”ll use wordpress as the database and user name. You can set up the password in the IDENTIFIED BY “password” line to a secure string that you can remember.

# mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 5340 to server version: 3.23.54

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> CREATE DATABASE wordpress;
Query OK, 1 row affected (0.00 sec)

mysql> GRANT ALL PRIVILEGES ON wordpress.* TO "wordpress"@"localhost"
    -> IDENTIFIED BY "password";
Query OK, 0 rows affected (0.00 sec)

mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.01 sec)

mysql> EXIT
Bye
#

We’ll need to let WordPress know what we’ve setup in the database. This requires editing text-format configuration file. If you are not savvy with the built-in vi editing utility, you can copy the file to your client, edit it, and copy it back to the ReadyNAS. Basically, here’s what you need to do:

# cd /c/website
# mv wp-config-sample.php wp-config.php

Modify wp-config.php as follows:

define('DB_NAME', 'wordpress');    // The name of the database
define('DB_USER', 'wordpress');     // Your MySQL username
define('DB_PASSWORD', 'yourpasswordhere'); // ...and password

Step 7 – Complete WordPress installation

Once you’ve saved your file, enter the following in your browser to complete the WordPress setup. Replace readynas_ip appropriately with your ReadyNAS IP address or hostname.

http://readynas_ip/website/wp-admin/install.php

In the future, to make modification, or to create posts or pages in WordPress, just go to:

http://readynas_ip/website/wp-admin

Finishing Touches

Once the installation is complete, you may want to consider the following.

  1. You may experience some slowness with the response with WordPress. Each page may take more than 5 seconds to load. If you’d like to speed this up, there’s a plug-in for WordPress called WP-Cache that you can install. Full download and installation instruction can be found here.
1 Star2 Stars3 Stars4 Stars5 Stars (14 votes, average: 2.43 out of 5)
Loading ... Loading ...

Comments are closed.