General Actions:
| ... | ... | @@ -1,36 +1,30 @@ |
| 1 | -(% class="moz-text-plain" graphical-quote="true" lang="x-unicode" style="font-family: -moz-fixed; font-size: 13px;" wrap="true" %) | |
| 2 | -((( | |
| 3 | -====Introduction==== | |
| 4 | - | |
| 5 | -This guide is dedicated to installing the **Xwiki** architecture on **Solaris 11** using **Glassfish V3**. The setup is meant for 'larger' organizations comprising of a front-end Java container and back-end database server. | |
| 1 | +== Introduction == | |
| 6 | 6 | |
| 7 | - |
|
| 3 | +This guide is dedicated to installing **XWiki** on **Solaris 11** using **Glassfish V3**. The setup is meant for //larger// organizations comprising of a front-end Java container and back-end database server. | |
| 8 | 8 | |
| 5 | +For the purposes of this guide, FreeBSD 8.2 will be used with PostgreSQL 9.1 database server as the backend. | |
| 6 | + | |
| 9 | 9 | For our test purposes the front-end **Glassfish** server will have an IP address of 172.99.99.2 and the back-end database server will have an IP address of 172.99.99.5. |
| 10 | 10 | |
| 9 | +== Network Topology == | |
| 11 | 11 | |
| 12 | - |
|
| 11 | +For the test network, a FreeBSD based router will be used using the dynamic routing protocol **RIPv2** - connected to a Cisco 857W router which will redistribute the ##default## route using the ##default-information originate## command under ##dynamic router## configuration mode in order to redistribute the //gateway of last resort// definition and/or the local subnets of the internal network. | |
| 13 | 13 | |
| 14 | -For the test network, a FreeBSD based router will be used using the dynamic routing protocol **RIPv2** - connected to a Cisco 857W router which will redistribute the 'default' route using the **default-information originate** command under 'dynamic router' configuration mode in order to redistribute the 'gateway of last resort' definition and/or the local subnets of the internal network. | |
| 15 | - | |
| 16 | - | |
| 17 | 17 | The full diagram of our network: |
| 18 | 18 | |
| 19 | -[[ |
|
| 15 | +[[image:Virtual_Xwiki_Topology.png||width=600px]] | |
| 20 | 20 | |
| 17 | +Quick check to show that all is well: | |
| 21 | 21 | |
| 22 | -Quick check to show that **all** is well: | |
| 23 | - | |
| 24 | - | |
| 25 | 25 | {{code language="none"}} |
| 26 | 26 | Cisco 857w: |
| 27 | 27 | |
| 28 | 28 | 172.99.0.0/28 is subnetted, 1 subnets |
| 29 | 29 | R 172.99.99.0 [120/1] via 192.168.0.200, 00:00:17, BVI2 |
| 30 | - | |
| 31 | 31 | {{/code}} |
| 32 | 32 | |
| 33 | 33 | {{code language="none"}} |
| 27 | + | |
| 34 | 34 | FreeBSD 8.2: |
| 35 | 35 | |
| 36 | 36 | gw# netstat -r |
| ... | ... | @@ -46,213 +46,143 @@ |
| 46 | 46 | 192.168.0.200 link#1 UHS 0 0 lo0 |
| 47 | 47 | 192.168.1.0 192.168.0.1 UG1 1 5 em0 |
| 48 | 48 | 192.168.2.0 192.168.0.1 UG1 0 0 em0 |
| 49 | - | |
| 50 | 50 | {{/code}} |
| 51 | 51 | |
| 45 | +== FreeBSD 8.2 Database Server == | |
| 52 | 52 | |
| 53 | -====FreeBSD 8.2 Database Server==== | |
| 54 | - | |
| 55 | 55 | To start with lets setup the backend database server! |
| 56 | 56 | |
| 49 | +{{info}}In order to see a **full install** of XWiki on the **FreeBSD** platform please see [[BSD_Install]].{{/info}} | |
| 57 | 57 | |
| 58 | -**Note** | |
| 59 | -In order to see a **full-install** on the **FreeBSD** platform please see [[BSD_Install]]. | |
| 51 | +First the **PostgreSQL** server needs to be built from the **ports** collection: | |
| 60 | 60 | |
| 61 | - | |
| 62 | -First the **Postgresql** server needs to be built from the **ports** collection: | |
| 63 | - | |
| 64 | - | |
| 65 | 65 | {{code language="none"}} |
| 66 | 66 | cd /usr/ports/databases/postgresql91-server |
| 67 | 67 | make install clean |
| 68 | - | |
| 69 | 69 | {{/code}} |
| 70 | 70 | |
| 58 | +From here we need to //activate// the **PostgreSQL** server on boot by adding to the /etc/rc.conf file: | |
| 71 | 71 | |
| 72 | -From here we need to 'activate' the **Postgresql** server on boot by adding to the /etc/rc.conf file: | |
| 73 | - | |
| 74 | - | |
| 75 | 75 | {{code language="none"}} |
| 76 | -echo "postgresql_enable="YES" >> /etc/rc.conf | |
| 77 | - | |
| 61 | +echo postgresql_enable="YES" >> /etc/rc.conf | |
| 78 | 78 | {{/code}} |
| 79 | 79 | |
| 64 | +Now we are going to initialize the **database** content and create the ##data## directory in order for the postgres service to be able to get configured. The steps being taken are to login as the ##pgsql## user with administrative privileges then run the ##initdb## command: | |
| 80 | 80 | |
| 81 | -Now we are going to initialize the **database** content and create the 'data' directory in order for the **Postgres** service to be able to get configured. The steps being taken are to login as the **Postgresql** user with administrative privileges then run the **initdb** command: | |
| 82 | - | |
| 83 | - | |
| 84 | 84 | {{code language="none"}} |
| 85 | 85 | su - pgsql |
| 86 | 86 | initdb -D /usr/local/pgsql/data |
| 87 | - | |
| 88 | 88 | {{/code}} |
| 89 | 89 | |
| 71 | +PostgreSQL has now been setup in order to use as a full-functional database service. The ##xwiki## role and database must now be created. From the same ##pgsql## user as before, we must access the PostgreSQL CLI ({{warning}}This cannot be done from root login{{/warning}}): | |
| 90 | 90 | |
| 91 | -**Postgresql** has now been setup in order to use as a full-functional database service. The **Xwiki** role and database must now be created with **password** and **login** functionality. From the same 'login' user, pgsql as before we must access the **Postgres** CLI (**NOTE**: This cannot be done from root {su -} login): | |
| 92 | - | |
| 93 | - | |
| 94 | 94 | {{code language="none"}} |
| 95 | -psql |
|
| 74 | +psql | |
| 96 | 96 | >CREATE ROLE xwiki WITH PASSWORD 'xwiki' LOGIN; |
| 97 | ->CREATE DATABASE xwiki OWNER xwiki; | |
| 98 | - | |
| 76 | +>CREATE DATABASE xwiki OWNER xwiki ENCODING 'UTF8'; | |
| 99 | 99 | {{/code}} |
| 100 | 100 | |
| 79 | +In order to be able to login to the database server as either 'local' or 'remote' host the ##pg_hba.conf## file needs to be edited. The file's location on FreeBSD if built from **Ports** is ##/usr/local/pgsql/data/pg_hba.conf##, and the addition that needs to be made is this: | |
| 101 | 101 | |
| 102 | -Currently the database format is in **Postgres ASCII** format however, if special character-sets or languages are needed then using **UTF-8** or **Unicode** maybe more preferable. | |
| 81 | +{{code language="none"}} | |
| 82 | +host xwiki xwiki 172.99.99.2/32 trust | |
| 83 | +{{/code}} | |
| 103 | 103 | |
| 104 | - |
|
| 85 | +The next step is to edit the ##/usr/local/pgsql/data/postgres.conf## file and change the ##listen_addresses## from ##127.0.0.1## to ##*##. Then finally restart the service: | |
| 105 | 105 | |
| 87 | +{{code language="none"}} | |
| 88 | +/usr/local/etc/rc.d/postgresql restart | |
| 89 | +{{/code}} | |
| 106 | 106 | |
| 107 | -** |
|
| 91 | +**PostgreSQL** has now been setup! | |
| 108 | 108 | |
| 93 | +== Solaris 11 == | |
| 109 | 109 | |
| 110 | - |
|
| 95 | +Download Solaris 11 Text based installer from [[the official download page>>http://www.oracle.com/technetwork/server-storage/solaris11/downloads/index.html]]. | |
| 111 | 111 | |
| 97 | +After Solaris 11 has been installed and the **correct** IP address setup and the system booted into full operation-mode, a package refresh needs to be performed in order to ensure that the installed packages are up-to-date. | |
| 112 | 112 | |
| 113 | -!=**host xwiki xwiki 172.99.99.2/32 trust** | |
| 114 | - | |
| 115 | - | |
| 116 | - | |
| 117 | -The next step is to edit the: | |
| 118 | - | |
| 119 | - | |
| 120 | -**/usr/local/pgsql/data/postgres.conf** | |
| 121 | - | |
| 122 | - | |
| 123 | -file and change the **listen_addresses** from **12.0.0.1** to ** * **. Then finaly restart the service: | |
| 124 | - | |
| 125 | - | |
| 126 | -**/usr/local/etc/rc.d/postgresql restart** | |
| 127 | - | |
| 128 | - | |
| 129 | -**Postgresql** has now been setup :-) | |
| 130 | - | |
| 131 | - | |
| 132 | -====Solaris 11==== | |
| 133 | - | |
| 134 | -Download Sun Solaris 11 Text based installer from [[here>>http://www.oracle.com/technetwork/server-storage/solaris11/downloads/index.html]] | |
| 135 | - | |
| 136 | - | |
| 137 | -After Solaris 11 has been installed and the **correct** IP address setup and the system booted into full operation-mode, a package refresh needs to be performed in order to ensure that the 'installed' packages are up-to-date. | |
| 138 | - | |
| 139 | - | |
| 140 | 140 | {{code language="none"}} |
| 141 | 141 | pkg refresh |
| 142 | 142 | pkg update * |
| 143 | - | |
| 144 | 144 | {{/code}} |
| 145 | 145 | |
| 146 | - | |
| 147 | 147 | From here we will now install the GUI (FOR TEST PURPOSES ONLY! A GUI should **NEVER** be installed on a server as it's a huge security risk and wastes valuable RAM for nothing), and additionally the **JDK 6** environment: |
| 148 | 148 | |
| 149 | - | |
| 150 | 150 | {{code language="none"}} |
| 151 | 151 | pkg install slim_install |
| 152 | 152 | pkg install jdk-6 |
| 153 | - | |
| 154 | 154 | {{/code}} |
| 155 | 155 | |
| 156 | - | |
| 157 | 157 | Enable GDM by: |
| 158 | 158 | |
| 113 | +{{code language="none"}} | |
| 114 | +svcadm enable gdm | |
| 115 | +{{/code}} | |
| 159 | 159 | |
| 160 | -**s |
|
| 117 | +Next up we will download the [[**Glassfish V3** installer>>http://www.oracle.com/technetwork/middleware/glassfish/downloads/ogs-3-1-1-downloads-439803.html]] | |
| 161 | 161 | |
| 119 | +{{info}} | |
| 120 | +For my demonstration I downloaded the **ogs-3.1.1-unix-ml.sh** script which needs a GUI in order to run. An alternative method to using Gnome2 with GDM is to enable **X11 login** through **SSH**, the option for this can be found in ##/etc/ssh/sshd_config## towards the bottom. | |
| 121 | +{{/info}} | |
| 162 | 162 | |
| 163 | - |
|
| 123 | +From here we will make the script executable, then run it: | |
| 164 | 164 | |
| 165 | -**Note** | |
| 166 | -For my demonstration I downloaded the **ogs-3.1.1-unix-ml.sh** script which needs a GUI in order to run. An alternative method to using Gnome2 with GDM is to enable **X11 login** through **SSH** of which the option can be found in /etc/ssh/sshd_config towards the bottom :-) | |
| 167 | - | |
| 168 | - | |
| 169 | -From here we will get the script ready to be run, then run it: | |
| 170 | - | |
| 171 | - | |
| 172 | 172 | {{code language="none"}} |
| 173 | 173 | chmod 755 ogs-3.1.1-ml-unix.sh |
| 174 | 174 | ./ogs-3.1.1-ml-unix.sh |
| 175 | - | |
| 176 | 176 | {{/code}} |
| 177 | 177 | |
| 130 | +Choose the ##/opt## directory to install the Glassfishv3 instance in; this will make the system easier to administrate later on. | |
| 178 | 178 | |
| 179 | -Choose the **/opt** directory to install the **Glassfishv3** instance in! - This will make the system easier to administrate later on. | |
| 180 | - | |
| 181 | - | |
| 182 | 182 | The install process should look like this: |
| 183 | 183 | |
| 184 | -[[ |
|
| 134 | +[[image:Screenshot.png||width=600px]] | |
| 185 | 185 | |
| 186 | - | |
| 187 | 187 | Tie Glassfish into the SMF descriptions by creating a 'service': |
| 188 | 188 | |
| 138 | +{{code language="none"}} | |
| 139 | +/opt/glassfish3/bin/asadmin create-service | |
| 140 | +{{/code}} | |
| 189 | 189 | |
| 190 | -**/opt/glassfish3/bin/asadmin create-service** | |
| 191 | - | |
| 192 | - | |
| 193 | 193 | Then enable the default **domain**, hence 'starting' the **Glassfish** server in general: |
| 194 | 194 | |
| 144 | +{{code language="none"}} | |
| 145 | +svcadm enable domain1 | |
| 146 | +{{/code}} | |
| 195 | 195 | |
| 196 | - |
|
| 148 | +We can check from here that the service is running by using the **netstat** command: | |
| 197 | 197 | |
| 150 | +{{code language="none"}} | |
| 151 | +netstat -anP tcp | |
| 152 | +{{/code}} | |
| 198 | 198 | |
| 199 | -We can check from here that the service is running by using the **Netstat** command: | |
| 200 | - | |
| 201 | - | |
| 202 | -**netstat -anP tcp** | |
| 203 | - | |
| 204 | - | |
| 205 | 205 | This should indicate that the **Glassfish** ports: **4848, 8080, and 8181** are 'online' and 'accepting' communications. |
| 206 | 206 | |
| 156 | +Now point Firefox in the **Solaris** GUI to: ##http:/~/127.0.0.1:4848## | |
| 207 | 207 | |
| 208 | -Now point Firefox in the **Solaris** GUI to: **127.0.0.1:4848** | |
| 209 | - | |
| 210 | - | |
| 211 | 211 | The result should be: |
| 212 | 212 | |
| 213 | -[[ |
|
| 160 | +[[image:Screenshot-1.png||width=600px]] | |
| 214 | 214 | |
| 162 | +Download the 'latest' **Postgres JDBC** driver from [[here>>http://jdbc.postgresql.org/download.html]] and copy it to ##/opt/glassfish3/glassfish/domain1/lib/## on the Glassfish server. | |
| 215 | 215 | |
| 216 | -Download the 'latest' **Postgres JDBC** driver from [[here>>http://jdbc.postgresql.org/download.html]] and copy it to: | |
| 164 | +{{info}} | |
| 165 | +The easiest way is to **SSH** into the Solaris instance if working remotely or directly as **root** from the cli within the machine, then use ##wget##. | |
| 166 | +{{/info}} | |
| 217 | 217 | |
| 218 | - | |
| 219 | -**/opt/glassfish3/glassfish/domain1/lib/** | |
| 220 | - | |
| 221 | - | |
| 222 | -on the Glassfish server. | |
| 223 | - | |
| 224 | - | |
| 225 | -**Note:** | |
| 226 | -The easiest way is to **SSH** into the Solaris instance if working remotely or directly as **root** from the cli within the machine use **wget**. | |
| 227 | - | |
| 228 | - | |
| 229 | 229 | Restart the **Glassfish** instance using: |
| 230 | 230 | |
| 170 | +{{code language="none"}} | |
| 171 | +svcadm restart domain1 | |
| 172 | +{{/code}} | |
| 231 | 231 | |
| 232 | -** |
|
| 174 | +Then from the **web GUI**, goto **JDBC Connection Pools** and create a 'new' connection called **postgresql** and save. | |
| 233 | 233 | |
| 176 | +Edit the connection pool (this can be done on creation as well) and choose ##javax.sql.ConnectionPoolDataSource## as the data source, and ##postgresql## as the database driver. | |
| 234 | 234 | |
| 235 | -Then from the **web GUI**, goto **JDBC Connection Pools** and create a 'new' connection called: **postgresql** and save. | |
| 236 | - | |
| 237 | - | |
| 238 | -Edit the connection pool (this can be done on creation, I'm just using the long method for illustration purposes only) and choose: | |
| 239 | - | |
| 240 | - | |
| 241 | -**javax.sql.ConnectionPoolDataSource** | |
| 242 | - | |
| 243 | - | |
| 244 | -as the data source; and: | |
| 245 | - | |
| 246 | - | |
| 247 | -**postgreslql** | |
| 248 | - | |
| 249 | - | |
| 250 | -as the **database** driver. | |
| 251 | - | |
| 252 | - | |
| 253 | 253 | From there edit the **JDBC Pool Properties** and add: |
| 254 | 254 | |
| 255 | - | |
| 256 | 256 | {{code language="none"}} |
| 257 | 257 | ServerName: 172.99.99.5 |
| 258 | 258 | PortNumber: 5432 |
| ... | ... | @@ -259,38 +259,26 @@ |
| 259 | 259 | Password: xwiki |
| 260 | 260 | User: xwiki |
| 261 | 261 | DatabaseName: xwiki |
| 262 | - | |
| 263 | 263 | {{/code}} |
| 264 | 264 | |
| 265 | - | |
| 266 | 266 | to the list. |
| 267 | 267 | |
| 190 | +The pen-ultimate stage is to download the **xwiki.war** file of the 'latest' version and add it to **Glassfish**. This can simply be done by going to the web GUI then, **Applications** and loading an **External** application in to the server. | |
| 268 | 268 | |
| 269 | - |
|
| 192 | +Once that has been completed the last and ultimate stage is to download the **xwiki.xar** file and import that into the **XWiki** instance. | |
| 270 | 270 | |
| 194 | +First of all create a user called **Admin** with whatever password is desired however to keep in line with previous **XWiki** versions where the username and password was pre-set, I have chosen **admin** as the password. | |
| 271 | 271 | |
| 272 | - |
|
| 196 | +Go to the **XWiki** administration panel after logging in, and choose to **Import**; select the **xwiki.xar** file and 'import' the contents. | |
| 273 | 273 | |
| 198 | +When refreshing the browser or re-pointing it to the **XWiki** instance the scene should now look like: | |
| 274 | 274 | |
| 275 | - |
|
| 200 | +[[image:Screenshot-2.png||width=600px]] | |
| 276 | 276 | |
| 202 | +== DNS Server Configuration == | |
| 277 | 277 | |
| 278 | -Go to the **Xwiki** administration panel after logging in, and choose to **Import**; select the **xwiki.xar** file and 'import' the contents. | |
| 279 | - | |
| 280 | - | |
| 281 | -When refreshing the browser or re-pointing it to the **Xwiki** instance the scene should now look like: | |
| 282 | - | |
| 283 | -[[[[image:Screenshot-2.png||width=600px]]>>attach:Screenshot-2.png||rel="__blank"]] | |
| 284 | - | |
| 285 | - | |
| 286 | - | |
| 287 | ----- | |
| 288 | - | |
| 289 | -====DNS Server Configuration==== | |
| 290 | - | |
| 291 | 291 | Just for fun this is the **DNS** zone file that I was using: |
| 292 | 292 | |
| 293 | - | |
| 294 | 294 | {{code language="none"}} |
| 295 | 295 | # cat xwiki-rocks.db |
| 296 | 296 | ; |
| ... | ... | @@ -311,24 +311,20 @@ |
| 311 | 311 | xwiki-rocks.com. IN A 172.99.99.1 |
| 312 | 312 | www.xwiki-rocks.com. IN A 172.99.99.2 |
| 313 | 313 | db.xwiki-rocks.com. IN A 172.99.99.5 |
| 314 | - | |
| 315 | 315 | {{/code}} |
| 316 | 316 | |
| 317 | - | |
| 318 | 318 | Which when put into 'service' should generate a more 'human' style browsing environment: |
| 319 | 319 | |
| 320 | -[[ |
|
| 230 | +[[image:Screenshot-3.png||width=600px]] | |
| 321 | 321 | |
| 322 | - | |
| 323 | 323 | The only real additions now could be a **reverse proxy** service put in place in order to communicate with port **8080** while listening on port **80** or alternatively the 'listening port' of **Glassfish** could be changed to **80** directly. |
| 324 | 324 | |
| 234 | +{{info}} | |
| 235 | +The advantage of using **Squid** as a **reverse proxy** is basically fine control over user access and generic access of 'all' systems behind it. Additionally software such as **Webalizer** and **Awstats** can be used to read the **Squid** log files and give an overall idea of who/how many users are using the Glassfish server. This is great for internet web statistics collections! | |
| 236 | +{{/info}} | |
| 325 | 325 | |
| 326 | -**Note:** | |
| 327 | -The advantage of using **Squid** as a **reverse proxy** is basically fine control over user access and generic access of 'all' systems behind it. Additionally software such as **Webalizer** and **Awstats** can be used to read the **Squid** log files and give an overall idea of who/howmany users are using the Glassfish server. This is great for internet web statistics collections! | |
| 328 | - | |
| 329 | - | |
| 330 | 330 | More information can be found here: |
| 331 | 331 | |
| 332 | 332 | [[Webalizer>>http://www.webalizer.org/]] |
| 333 | 333 | |
| 334 | -[[Awstats>>http://awstats.sourceforge.net/]] |
|
| 242 | +[[Awstats>>http://awstats.sourceforge.net/]] |