Step by step install wpmu in FreeBSD

A client need to install wordpress multi user to teach their employee about blog. They want it installed in their server, running FreeBSD 7 stable.

Here’s step by step install wpmu in FreeBSD, might be useful for someone 🙂

1. Download latest wpmu file.

wget http://mu.wordpress.org/latest.tar.gz

2. Extract and  rename

phantom# pwd
/home/phantom/public_html

phantom# ls
info.php        latest.tar.gz

phantom# rm latest.tar.gz && mv wordpress-mu-1.5.1 wpmu

phantom# ls
info.php        wpmu

3. Login to dns server and change dns entry to alow wildcard dns. Ex :

+blog.bogus.com:172.88.1.4:86400
+*.blog.bogus.com:172.88.1.4:86400

make for update.

dns# make
/usr/local/bin/tinydns-data

Restart dns service
dns# svc -t /var/service/dnscache/
dns# svc -t /var/service/tinydns/

Testing dns.

dns# dig blog.bogus.com

; <<>> DiG 9.4.2 <<>> blog.bogus.com
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 40754
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;blog.bogus.com.           IN      A

;; ANSWER SECTION:
blog.bogus.com.    86400   IN      A       172.88.1.4

;; Query time: 12 msec
;; SERVER: 172.88.1.1#53(172.88.1.1)
;; WHEN: Fri Jun 20 08:44:06 2008
;; MSG SIZE  rcvd: 53

dns# dig alam.blog.bogus.com

; <<>> DiG 9.4.2 <<>> alam.blog.bogus.com
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 42517
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;alam.blog.bogus.com.      IN      A

;; ANSWER SECTION:
alam.blog.bogus.com. 86400 IN      A       172.88.1.4

;; Query time: 6 msec
;; SERVER: 172.88.1.1#53(172.88.1.1)
;; WHEN: Fri Jun 20 08:44:15 2008
;; MSG SIZE  rcvd: 58

4. Switch to blog server and change httpd.conf entry (di 1.4)

phantom# ee /usr/local/etc/apache/httpd.conf

NameVirtualHost 172.88.1.4

<VirtualHost 172.88.1.4 >
ServerAdmin [email protected]
DocumentRoot /home/alam/public_html/wpmu
<Directory /home/alam/public_html/wpmu >
AllowOverride FileInfo Options
</Directory>
ServerName blog.bogus.com
ServerAlias *.blog.bogus.com
</VirtualHost>

save and restart apache.

5. Make database and grant user .

phantom# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 46
Server version: 5.0.51a-log FreeBSD port: mysql-server-5.0.51a

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

mysql> show databases;
+——————–+
| Database           |
+——————–+
| information_schema |
| mysql              |
+——————–+
2 rows in set (0.02 sec)

mysql> create database wpmu;
Query OK, 1 row affected (0.01 sec)

mysql> grant all privileges on wpmu.* to alam@localhost identified by
‘doyanmakan’ with grant option;
Query OK, 0 rows affected (0.02 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql>

6. Starting install, open browser and type  http://blog.bogus.com

chmod message will show up, just type this in the shell :

phantom# chmod 777 /home/phantom/public_html/wpmu /home/pahntom/public_html/wpmu/wp-content/

Refresh the browser.

Follow the steps  :

– Choose subdomain
– Fill information according step 5.
– Server address, let it as is.
– Site details, fill proper entry.

Clik Submit.

If everything work well you’ll see confirmation if installation process succesfully. Username and password generated.

7. Reset file into previous state.

chmod 755 /home/phantom/public_html/wpmu /home/phantom/public_html/wpmu/wp-content/

Done.

Tags: