Showing posts with label blog. Show all posts
Showing posts with label blog. Show all posts

Saturday, October 21, 2006

step-by-step: how to host WordPress under Linux (FC5/RHEL4)

Why:
  • on Blogger: missing certain nice features ( static page support, import/export). Or,
  • on WordPress.com: don't like your own html get stripped off. Your little piggy-bank gets left empty since Google Adsense code get stripped or disabled. Or,
  • want your own professional domain name and such. Or,
  • simply love the experience of DIY and the freedom of customization
Assumptions & Prerequisites:
  • Fedora Core 5 stock installation (All should be applicable to CentOS 4 or RHEL 4 as well, unless the FC5 SELinux changes get in your way.)
    • apache (httpd package) installed.
    • php package installed.
    • mysql-server package installed.
  • The stable release (latest.tar.gz) has been downloaded from wordpress.org and extracted under /var/www/html
  • comfortable with MySQL and SQL commands.
  • starter's knowledge of how a blog works.
Steps to follow:
# set up MySQL access
This is to set up a MySQL database dedicated for WordPress and a user to access this database from the Apache/PHP combo. The schema and data for the database itself will be populated by install.php later. The names used below assume you want user 'wp_master' to have all access to a local database named 'wordpressDB'.
  • /etc/init.d/mysqld start
  • /usr/bin/mysqladmin -u root password 'mysqlAdminpassword'
  • /usr/bin/mysqladmin -u root -p create wordpressDB
  • mysql -Uroot -p mysql
    • insert into user (host, user, password) values ('localhost', 'wp_master', password('mastersecret'));
    • insert into db (host, db, user) values ('localhost', 'wordpressDB', 'wp_master');
      • the 'db' table entry should also grant the 'wp_master' user with most of the privileges to the 'wordpressDB' . So, I simply replaced the 'test' database entry therein, since I am lazy, plus I consider a wild-open test db a security risk.
      • update db set host='localhost',db='wordpressDB',user='wp_master' where host='%' and db='test';
    • commit;
    • restart mysqld by '/etc/init.d/mysqld restart'
# set up MySQL PHP extension support (Otherwise you may get this error, "Your PHP installation appears to be missing the MySQL which is required for WordPress. ")
  • yum -y install php-mysql
  • /etc/init.d/httpd restart
# to set up wp-config.php with your own set of credentials for WP to use to access MySQL
cd /var/www/html/wordpress && cp wp-config-sample.php wp-config.php && vi wp-config.php
# RTFM using your favorite browser

point to your browser to http://localhost/wordpress/readme.html

# initialize/populate your new WP database. Do record the 'admin' account information generated.
point to your browser to follow http://localhost/wordpress/wp-admin/install.php

# Now, time to verify. If it worked, you'd see the default 'hello world' post using the 'default' theme.
point to your browser to http://localhost/wordpress/index.php

# to customize the blog right away, click on 'edit' link inside the blog and log on with the 'admin' account

# about them themes:
Only two themes are bundled (classic/default). To add a theme, find ones you like and download from a trustworthy source.
  • wget http://downloads.wordpress.org/theme/pool.zip
  • cd /var/www/html/wordpress/wp-content/themes && unzip pool.zip
  • Now the new theme(s) would just show up if you go back to edit/presentation/themes
# Get them roamers home
  • import existing blogs and comments from Blogger and other top blog sites.
  • if new, register this new blog with technorati.com, weblogs.com
  • new or updated, brief your readers of the changes [advance notice would be appreciated too]

Wednesday, October 18, 2006

Blogger :: a work in progress, beta or not

I joined Technorati and I learned it is supposedly a great thing to have proper label (Blogger's or Google's terminology) or tags (Technorati's term). A few nights back. I started to retrofit my then fifty some posts with labels. I selected a post to edit, added a label or two, then published it again. Back to the main 'edit posts' screen, all the posts looked the same, with or without labels. I said to myself, wouldn't it be great the labels be showed next to the associated post?!

Today I resumed my label-retrofitting task. Lo & behold, the 'edit posts' page has all current labels displayed, just like Gmail does for each messages. Wow, progress!

Editing posts, I noticed the oldest few have hard breaks (
) which broke the lines. The new posts don't have this problem, even if all of them were posted from Gmail.

Saturday, October 14, 2006

Wednesday, October 11, 2006

face lift :: switched to Blogger beta (continued)

Other nice features (some are more like bug fixes) are
  • perma link if you click on the title of any post
  • secondary bullets work now. Before Blogger beta, secondary bullets were automatically promoted, even though the HTML code ( UL embedded inside UL) and WYSIWYG editors on Blogger's 'Post Edit' or Gmail's composer shows proper layout of double indented secondary bullets.
  • the mysterious slice of the text ad link on top of my blog disappeared.
  • The editor used to 'edit posts' has two tabs. One is 'Edit Html'. The other is 'Compose'. Those two should really be 'simple WYSIWYG editing' versus 'advanced HTML coding'. I'll leave it to the legend of creative workers at Google/Blogger to cook up proper pair of names.
  • The use cases for the multi-blog feature are not as thought-through as other features. The profiles(about-me) share the same profile. As a test, I created a private blog. Email post to that blog doesn't work yet. Two emails were returned with permanent error by alpha1.blogger.com or something to that effect. Since the blogger id is the same, I wondered which blog of the two I own under the Google account should the email post be directed to. Since I had only one blog before Blogger beta, so I wouldn't know whether this is an old bug/feature or not.

face lift :: switched to Blogger beta


Experimenting a blog on Wordpress.com, I liked many features. Yet to find time to try the open-source blog hosting software itself from wordpress.org. However, I was very disappointed to find Wordpress.com strips down the Wordpress blog software. Even html code to insert a Google adsense ad for Firefox was stripped out. Blogger has great support for adsense and such. However, it doesn't do static page. It is pretty desirable to have static page to hold, say, some static contents.

Sigh, do I really have to host my own? As a systems engineer by trade, I really don't need the hassle of hosting. Only if I can get the features I need for free. Only if Blogger can do 'page' to hold semi-static content.

Why not?! I googled for it. Among the first links, I found a link to 'Blogger beta' talking about new features with widgets and such. Click through and end up switched this blog to the new Blogger BETA.

Changes that met my eyes are:
  • blogger account is now assimilated to your google account
In other words, now Blogger is yet another Google service, side by side with Gmail, calendar, maps, search, spreadsheets, and such.
  • Template is now widgetized:
    • Pros: You move blocks (widgets) around on a page layout. I guess they copy the behavior of WordPress. I got to say it is such a nice feature.
    • Pros: Arbitrary html/javascript can be used to create a widget of your own.
    • Cons: A custom widget should have an extra label of sort so you can distinguish which is which on the page layout when you come back to edit. Currently, it only has a title, which is displayed on the actual blog. Imagine if you have more than one custom widgets.
    • Cons: Ad-sense widget couldn't be added, generating some error. I wonder if it is because my adsense account has different password. Search-box html code copied to a custom widget doesn't work quite right either. In fact, you can see a text ad link on top of my blog and a image ad link on the right column. I didn't asked for the top link! == as always, Google has wisely branded it as 'BETA'.
  • access control is in place, replacing the current membership. Yet another feature copied from WordPress, I assume.
    • authors can be added to co-own the blog
    • access can be changed from Public (the default) to private

Friday, August 18, 2006

Blog is not part of the Web -- overengineering at Google ?

More often than not, when I search for a non-mainstream topic, I couldn't find it in Web or Group using Google search. However, search by 'blog' may get me a boat-load of results. I wonder why Google doesn't integrate blogs into its web search.

Blogs are mainly addition/appending, just like regular web page. Therefore blogs should be friendly enough to lend themselves to the same storage and indexing algorithms Google uses for web contents. Why bother to separate them into two tab? Even worse, 'blog' is now a few clicks away, instead of just another tab. Is there some over-engineering sprouted at Google ?