• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
sharadchhetri

sharadchhetri

Tutorials On Linux, Unix & Open Source

  • Home
  • Linux Commands
  • Resources
    • Learn Linux
  • My WordPress plugins

How to change Port number for Octopress rake preview

January 14, 2014 by Sharad Chhetri 1 Comment

In this post,we are sharing a tip to change Port number for Octopress. By-default when we run the command rake preview in Octopress setup ,it runs on port number 4000 .
Here in this practical we will change the default port no. 4000 of Octopress to some other port no.

Note: Always select custom port number above well known port number (1 to 1024). If two or more application/service has same port number then it will not work properly.

To change the port number for Octopress,follow the given below steps

Step 1: First check,the port number which you have decided,should not be used by any service/application in system. To know about in used port number, run netstat command

netstat -tanp |grep new-port-number (For TCP based Protocol)

netstat -uanp |grep new-port-number (For UDP based Protocol)

Example : Here,in this example we are checking is port number 4400 free.

netstat -tanp |grep 4400 (For TCP based Protocol)

netstat -uanp |grep 4400 (For UDP based Protocol)

Step 2: Change the port number in file called Rakefile
Change Directory to path where you have saved the code of Octopress in your system.

Edit the Rakefile and replace the value in server_port = "4000" to server_port = "4400"

vi Rakefile

server_port     = "4400" 

Step 3: Now stop and start the command rake preview .
Now open the Web Browser and type the system IP address along with new port number.

example: http://ip-address:4400

See the below screenshot

Octopress Port change

Project URL : http://octopress.org/

Share this:

  • Twitter
  • Facebook
  • More
  • Print
  • Email
  • LinkedIn
  • Reddit
  • Tumblr
  • Pinterest
  • Pocket
  • Telegram
  • WhatsApp
  • Mastodon

Related posts:

  1. How to change smtp port number 25 in postfix
  2. Change the default port number of ssh server
  3. Change mysql default port number in linux
  4. Change telnet server port number on CentOS 7 / RHEL 7
  5. CentOS 7 / RHEL 7 : change OpenSSH port number ( SELINUX enabled )
  6. How to install Octopress in CentOS 6 and RHEL 6
  7. show post excerpt in atoms feed of octopress
  8. Print double hyphen sign simultaneously in post of Octopress
  9. Octopress : Could not find a JavaScript runtime
  10. How to install Octopress on Ubuntu 14.04 LTS

Filed Under: Linux Tagged With: Octopress

Reader Interactions

Comments

  1. Quilty says

    November 23, 2015 at 2:41 am

    hi. I am running my Octopress server remotely and was wondering if you know how to access your preview page remotely within a LAN. For example, if the hostname that your rake preview is being run on is “foo”, can you go to another computer in your network and view the preview page by typing “foo:4400” in a browser? I can’t do this and would love any insight on this. I am able to view it locally via localhost:4400 just fine however. Thank you.

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Our Social Media Presence

  • Facebook
  • GitHub
  • Twitter

Linux Command

What is Linux Internal And External Command

Linux Basic Commands With Examples For Every Beginner

tr command to convert lines to space , tab and vertical tab

smbpasswd command not found on CentOS 7 and RHEL 7

Solution : semanage command not found

Unix / Linux : How to print duplicate lines from file

More Posts from this Category

You Might Like These Articles!

simplecodesyntax wordpress plugin

SimpleCodeSyntax : My Another WordPress Plugin

Install Nginx

How To Install Nginx On Ubuntu 22.04 LTS

Install Latest Git package in Ubuntu Operating System

How To Always Install Latest Git Package In Ubuntu Operating System

Bash script for installing VirtualBox on Ubuntu 22.04 LTS Desktop

Install VirtualBox On Ubuntu 22.04 LTS Desktop (Bash Script)

libfuse

dlopen(): error loading libfuse.so.2 – Got Error On Ubuntu

Failed to open/create the internal network

VirtualBox Error: Failed to open/create the internal network

Always Useful Tips And Tricks

shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory

Forgot root password ,Reset it in Run level 1

How to change hostname in Ubuntu 12.04 and 12.10 without system restart

error could not configure a c compiler Linux

How to change smtp port number 25 in postfix

Agent admitted failure to sign using the key ssh

Set GRUB password after installation of CentOS/Red Hat

Explore 90+ Article On "Linux Tips And Tricks"

Copyright © 2023 ยท
The material in this site cannot be republished either online or offline, without our permission.
Proudly Blogging From Bharat.

  • Contact
  • About Me
  • My WordPress plugins
  • Privacy Policy