How to install WordPress on FreeBSD 10

As one of the famous content management system WordPress is one my favourite since 2007 (this blog use serendipity , blogspot custom domain then change to wordpress) and stick to it till now. For me this software is simple to use and I can handle the maintenance.

This time I’ll show how to install wordpress on FreeBSD 10 using two methods : ports and pkg way.

For this purpose I use FreeBSD 10 provided by vultr. I use 768 MB VPS located on New Jersey.

Update FreeBSD

# freebsd-update fetch

# freebsd-update install

# uname -a

FreeBSD wordpress.rasyid.net 10.0-RELEASE-p9 FreeBSD 10.0-RELEASE-p9 #0: Mon Sep 15 14:35:52 UTC 2014     [email protected]:/usr/obj/usr/src/sys/GENERIC  amd64

Install Pkg

# pkg info

Install WordPress on FreeBSD 10 Using ports

Pkg installed before installation from ports

# pkg info
pkg-1.3.8_3                    Package manager

Get latest ports

# portsnap fetch

# portsnap extract

Install WordPress from ports

FreeBSD ports provide wordpress that located in /usr/ports/www/wordpress/

You can install it straight from command line;

# cd /usr/ports/www/wordpress/

# make install

You’ll see a few question like this

install_wordpress_freebsd1

Just press OK. But you’ll see many question and if you don’t like it you can hit CTRL+C then reissue the command:

# cd /usr/ports/www/wordpress/ && make rmconfig

# make install clean BATCH=yes

If you do this way you get many package installed like this one

# pkg info

autoconf-2.69                  Automatically configure source code on many Un*x platforms
autoconf-wrapper-20131203      Wrapper script for GNU autoconf
bigreqsproto-1.1.2             BigReqs extension headers
ca_root_nss-3.17.2             The root certificate bundle from the Mozilla Project
cmake-3.0.2                    Cross-platform Makefile generator
cmake-modules-3.0.2            Modules and Templates for CMake
curl-7.38.0_2                  Non-interactive tool to get files from FTP, GOPHER, HTTP(S) servers
dialog4ports-0.1.5_2           Console Interface to configure ports
expat-2.1.0_1                  XML 1.0 parser written in C
freetype2-2.5.3_2              Free and portable TrueType font rendering engine
gettext-0.18.3.1_1             GNU gettext package
gmake-4.1                      GNU version of ‘make’ utility
gmake-lite-4.1                 Minimalist version of gnu make
help2man-1.43.3_1              Automatically generating simple manual pages from program output
indexinfo-0.2                  Utility to regenerate the GNU info page index
inputproto-2.3.1               Input extension headers
jpeg-8_5                       IJG’s jpeg compression utilities
kbproto-1.0.6                  KB extension headers
libICE-1.0.9,1                 Inter Client Exchange library for X11
libSM-1.2.2_2,1                Session Management library for X11
libX11-1.6.2_2,1               X11 library
libXau-1.0.8_2                 Authentication Protocol library for X11
libXdmcp-1.1.1_2               X Display Manager Control Protocol library
libXext-1.3.2_2,1              X11 Extension library
libXpm-3.5.11_2                X Pixmap library
libXt-1.1.4_2,1                X Toolkit library
libcheck-0.9.14                Unit test framework for C
libgcrypt-1.6.1_5              General purpose crypto library based on code used in GnuPG
libgpg-error-1.16              Common error values for all GnuPG components
libpthread-stubs-0.3_6         This library provides weak aliases for pthread functions
libxcb-1.10_2                  The X protocol C-language Binding (XCB) library
libxml2-2.9.1_1                XML parser library for GNOME
libxslt-1.1.28_4               The XSLT C library for GNOME
m4-1.4.17_1,1                  GNU m4
p5-Locale-gettext-1.05_3       Message handling functions
pcre-8.35_1                    Perl Compatible Regular Expressions library
perl5-5.16.3_11                Practical Extraction and Report Language
php5-5.4.33_1                  PHP Scripting Language
php5-curl-5.4.33_1             The curl shared extension for php
php5-gd-5.4.33_1               The gd shared extension for php
php5-hash-5.4.33_1             The hash shared extension for php
php5-mysql-5.4.33_1            The mysql shared extension for php
php5-tokenizer-5.4.33_1        The tokenizer shared extension for php
php5-xml-5.4.33_1              The xml shared extension for php
php5-zip-5.4.33_1              The zip shared extension for php
php5-zlib-5.4.33_1             The zlib shared extension for php
pkg-1.3.8_3                    Package manager
pkgconf-0.9.7                  Utility to help to configure compiler and linker flags
png-1.5.18                     Library for manipulating PNG images
py27-Babel-1.3_2               Collection of tools for internationalizing Python applications
py27-Jinja2-2.7.3              Fast and easy to use stand-alone template engine
py27-MarkupSafe-0.23           Implements a XML/HTML/XHTML Markup safe string for Python
py27-docutils-0.12             Python Documentation Utilities
py27-pygments-1.6_2            Syntax highlighter written in Python
py27-pytz-2014.7,1             World Timezone Definitions for Python
py27-setuptools27-5.5.1        Python packages installer
py27-sphinx-1.2.3              Python documentation generator
python2-2_3                    The “meta-port” for version 2 of the Python interpreter
python27-2.7.8_5               Interpreted object-oriented programming language
t1lib-5.1.2_4,1                Type 1 font rasterization library for Unix/X11
wordpress-4.0_1,1              State-of-the-art semantic personal publishing platform
xcb-proto-1.10_1               The X protocol C-language Binding (XCB) protocol
xcmiscproto-1.2.2              XCMisc extension headers
xextproto-7.3.0                XExt extension headers
xf86bigfontproto-1.2.0         XFree86-Bigfont extension headers
xorg-macros-1.19.0             X.Org development aclocal macros
xproto-7.0.26                  X11 protocol headers
xtrans-1.3.4_1                 Abstract network code for X

 

Wow, a lot of package installed. Specially X11 related package. To avoid this package you can put this lines :

#echo 'WITHOUT_X11=yes' >> /etc/make.conf

#echo 'WITHOUT=X11' >> /etc/make.conf

Ok, now let start over by delete all package.

# pkg delete -a

# cd /usr/ports/www/wordpress/ && make rmconfig
===> Removing user-configured options for wordpress-4.0_1,1

Clean all

# make install clean BATCH=yes

Reinstall again using the above command give me this package list

# pkg info

autoconf-2.69 Automatically configure source code on many Un*x platforms
autoconf-wrapper-20131203 Wrapper script for GNU autoconf
ca_root_nss-3.17.2 The root certificate bundle from the Mozilla Project
cmake-3.0.2 Cross-platform Makefile generator
cmake-modules-3.0.2 Modules and Templates for CMake
curl-7.38.0_2 Non-interactive tool to get files from FTP, GOPHER, HTTP(S) servers
expat-2.1.0_1 XML 1.0 parser written in C
freetype2-2.5.3_2 Free and portable TrueType font rendering engine
gettext-0.18.3.1_1 GNU gettext package
gmake-4.1 GNU version of ‘make’ utility
gmake-lite-4.1 Minimalist version of gnu make
help2man-1.43.3_1 Automatically generating simple manual pages from program output
indexinfo-0.2 Utility to regenerate the GNU info page index
jpeg-8_5 IJG’s jpeg compression utilities
libxml2-2.9.1_1 XML parser library for GNOME
m4-1.4.17_1,1 GNU m4
p5-Locale-gettext-1.05_3 Message handling functions
pcre-8.35_1 Perl Compatible Regular Expressions library
perl5-5.16.3_11 Practical Extraction and Report Language
php5-5.4.33_1 PHP Scripting Language
php5-curl-5.4.33_1 The curl shared extension for php
php5-gd-5.4.33_1 The gd shared extension for php
php5-hash-5.4.33_1 The hash shared extension for php
php5-mysql-5.4.33_1 The mysql shared extension for php
php5-tokenizer-5.4.33_1 The tokenizer shared extension for php
php5-xml-5.4.33_1 The xml shared extension for php
php5-zip-5.4.33_1 The zip shared extension for php
php5-zlib-5.4.33_1 The zlib shared extension for php
pkg-1.3.8_3 Package manager
pkgconf-0.9.7 Utility to help to configure compiler and linker flags
png-1.5.18 Library for manipulating PNG images
py27-Babel-1.3_2 Collection of tools for internationalizing Python applications
py27-Jinja2-2.7.3 Fast and easy to use stand-alone template engine
py27-MarkupSafe-0.23           Implements a XML/HTML/XHTML Markup safe string for Python
py27-docutils-0.12             Python Documentation Utilities
py27-pygments-1.6_2            Syntax highlighter written in Python
py27-pytz-2014.7,1             World Timezone Definitions for Python
py27-setuptools27-5.5.1        Python packages installer
py27-sphinx-1.2.3              Python documentation generator
python27-2.7.8_5               Interpreted object-oriented programming language
t1lib-5.1.2_4,1                Type 1 font rasterization library for Unix/X11
wordpress-4.0_1,1              State-of-the-art semantic personal publishing platform

Less package after implement WITHOUT=X11 in /etc/make.conf

At this stage wordpress installed successfully.

Location of wordpress is /usr/local/www/wordpress

Install WordPress on FreeBSD 10 Using pkg

I try to reinstall the machine to give me clean install.

install_wordpress_freebsd2

This time I start with editing /etc/make.conf

# ee /etc/make.conf

Fill these lines

WITHOUT_X11=yes
WITHOUT=X11

save.

Find wordpress

# pkg search wordpress
de-wordpress-3.9.1
ja-wordpress-3.9.1
p5-WordPress-XMLRPC-1.23
ru-wordpress-4.0
wordpress-4.0,1
zh-wordpress-zh_CN-3.9
zh-wordpress-zh_TW-3.9.1

Install wordpress using pkg

# pkg install wordpress-4.0,1
Updating FreeBSD repository catalogue…
FreeBSD repository is up-to-date.
All repositories are up-to-date.
Updating database digests format: 100%
The following 33 packages will be affected (of 0 checked):

New packages to be INSTALLED:

wordpress: 4.0,1
php5-xml: 5.4.33_1
libxml2: 2.9.1_1
php5: 5.4.33_1
pcre: 8.35_1
php5-gd: 5.4.33_1
libXpm: 3.5.11_2
xproto: 7.0.26
libXext: 1.3.2_2,1
xextproto: 7.3.0
libXau: 1.0.8_2
libX11: 1.6.2_2,1
libxcb: 1.10_2
libXdmcp: 1.1.1_2
libpthread-stubs: 0.3_6
kbproto: 1.0.6
libXt: 1.1.4_2,1
libSM: 1.2.2_2,1
libICE: 1.0.9,1
freetype2: 2.5.3_2
png: 1.5.18
jpeg: 8_5
t1lib: 5.1.2_4,1
libXaw: 1.0.12_2,2
printproto: 1.0.5
libXp: 1.0.2_2,1
libXmu: 1.1.2_2,1
php5-curl: 5.4.33_1
curl: 7.38.0_2
ca_root_nss: 3.17.1
php5-tokenizer: 5.4.33_1
php5-mysql: 5.4.33_1
php5-zip: 5.4.33_1

The process will require 72 MB more space.
16 MB to be downloaded.

Proceed with this action? [y/N]: y

Wow, the process takes less than a minute. Impressive 🙂

Check the package installed using that command

# pkg info

ca_root_nss-3.17.1             The root certificate bundle from the Mozilla Project
curl-7.38.0_2                  Non-interactive tool to get files from FTP, GOPHER, HTTP(S) servers
freetype2-2.5.3_2              Free and portable TrueType font rendering engine
jpeg-8_5                       IJG’s jpeg compression utilities
kbproto-1.0.6                  KB extension headers
libICE-1.0.9,1                 Inter Client Exchange library for X11
libSM-1.2.2_2,1                Session Management library for X11
libX11-1.6.2_2,1               X11 library
libXau-1.0.8_2                 Authentication Protocol library for X11
libXaw-1.0.12_2,2              X Athena Widgets library
libXdmcp-1.1.1_2               X Display Manager Control Protocol library
libXext-1.3.2_2,1              X11 Extension library
libXmu-1.1.2_2,1               X Miscellaneous Utilities libraries
libXp-1.0.2_2,1                X print library
libXpm-3.5.11_2                X Pixmap library
libXt-1.1.4_2,1                X Toolkit library
libpthread-stubs-0.3_6         This library provides weak aliases for pthread functions
libxcb-1.10_2                  The X protocol C-language Binding (XCB) library
libxml2-2.9.1_1                XML parser library for GNOME
pcre-8.35_1                    Perl Compatible Regular Expressions library
php5-5.4.33_1                  PHP Scripting Language
php5-curl-5.4.33_1             The curl shared extension for php
php5-gd-5.4.33_1               The gd shared extension for php
php5-mysql-5.4.33_1            The mysql shared extension for php
php5-tokenizer-5.4.33_1        The tokenizer shared extension for php
php5-xml-5.4.33_1              The xml shared extension for php
php5-zip-5.4.33_1              The zip shared extension for php
pkg-1.3.8_3                    Package manager
png-1.5.18                     Library for manipulating PNG images
printproto-1.0.5               Print extension headers
t1lib-5.1.2_4,1                Type 1 font rasterization library for Unix/X11
wordpress-4.0,1                State-of-the-art semantic personal publishing platform
xextproto-7.3.0                XExt extension headers
xproto-7.0.26                  X11 protocol headers

Little more than ports version. No perl, python, cmake etc.

I think I fell in love with pkg now.

Off course this install is not fully working of WordPress, no webserver, no database. I’ll continue this post for making it run well.

Stay tune 🙂

Update : the post is here.