WebStack setup before B79

WebStack internal setup as of 11/08/2007.

Hopefully, *none* of these steps will be necessary for b79, except step number 1
Sorry for the internal links, this is the current status so far....

Get the latest SXDE build 77

 http://nana.sfbay/solaris_media/nv/77/; and install it and log as root in the desktop

Then either read all the following steps, or get the following script and execute is as root user:

webstack.sh

Separate steps:

install the IPS pkg tools:

cd /
hg clone ssh://anon@hg.opensolaris.org/hg/pkg/gate
cd gate/src
make
make install
make link

setup the IPS repository:

cd /
pkg image-create -a webstack=http://htpasswd.red.iplanet.com:10000  /
pkg refresh
pkg status -a

You should see something similar to

bash-3.2# pkg status -a
FMRI                                               STATE      UFIX
pkg://webstack/SUNWapch22d@0-1                     known      ----
pkg://webstack/SUNWapch22m-php5@0-1                known      ----
pkg://webstack/SUNWapch22r@0-1                     known      ----
pkg://webstack/SUNWapch22r-php5@0-1                known      ----
pkg://webstack/SUNWapch22u@0-1                     known      ----
pkg://webstack/SUNWmysql5r@0-1                     known      ----
pkg://webstack/SUNWmysql5test@0-1                  known      ----
pkg://webstack/SUNWmysql5u@0-1                     known      ----
pkg://webstack/SUNWphp524-mysql@0-1                known      ----
pkg://webstack/SUNWphp524-mysql-root@0-1           known      ----
pkg://webstack/SUNWphp524-pgsql@0-1                known      ----
pkg://webstack/SUNWphp524-pgsql-root@0-1           known      ----
pkg://webstack/SUNWphp524core@0-1                  known      ----
pkg://webstack/SUNWphp524doc@0-1                   known      ----
pkg://webstack/SUNWphp524man@0-1                   known      ----
pkg://webstack/SUNWphp524root@0-1                  known      ----
pkg://webstack/SUNWphp524usr@0-1                   known      ----
pkg://webstack/SUNWruby18r@0-1                     known      ----
pkg://webstack/SUNWruby18u@0-1                     known      ----
pkg://webstack/SUNWsquidr@0-1                      known      ----
pkg://webstack/SUNWsquidu@0-1                      known      ----
pkg://webstack/WebStackTooling@0-1                 known      ----
 

Install all the packages you need   -apache2.2, php5.2.4, mysql5, WebStackTooling,...

pkg install SUNWapch22d SUNWapch22u SUNWapch22r SUNWmysql5r SUNWmysql5u SUNWmysql5test

For the WebStack Options UI (see bottow of this document, if you want the latest package, get it from IPS as well (B77 contains an obsolete version of this package)

pkg install WebStackTooling 

 
for PHP, it is in b76 or b77, but if you want xdebug and the correct configuration for mysql usage in PHP, you need to do that:

(For Indiana as well: get the php support:
pkg install SUNWphp524core SUNWphp524root SUNWphp524usr SUNWphp524doc SUNWphp524man SUNWapch22m-php5 SUNWapch22r-php5
)

complete list:

pkg install SUNWapch22d
pkg install SUNWapch22r
pkg install SUNWapch22u

pkg install SUNWphp524core
pkg install SUNWphp524doc
pkg install SUNWphp524man
pkg install SUNWphp524root
pkg install SUNWphp524usr

pkg install SUNWmysql5r
pkg install SUNWmysql5u
pkg install SUNWmysql5test

pkg install SUNWphp524-mysql
pkg install SUNWphp524-pgsql

pkg install SUNWruby18r
pkg install SUNWruby18u
pkg install SUNWsquidr
pkg install SUNWsquidu

pkg install SUNWapch22m-php5
pkg install SUNWapch22r-php5
pkg install SUNWphp524-pgsql-root
pkg install SUNWphp524-mysql-root

pkg install WebStackTooling

install the first global start menus (done automatically in B79 package installation:

cp /opt/webstack/globalmenus/applications.menu /etc/xdg/menus
cp  /opt/webstack/globalmenus/webstack-initialize.desktop /usr/share/applications
cp  /opt/webstack/globalmenus/webstack-viewdevtools.desktop /usr/share/applications
cp  /opt/webstack/globalmenus/webstack.director/usr/share/desktop-directoriesreboot to install all the smf services.

Configure MySQL users and missing dirs

1) Make sure you have a user 'mysql' belonging to group 'mysql'.

If you do not have this user:group (mysql:mysql), create one

/usr/sbin/groupadd mysql
/usr/sbin/useradd -g mysql mysql

then create a missing directory and give the ownership to mysql user
mkdir -p /var/mysql/5.0/data
chown -R mysql:mysql /var/mysql

Then create a mysql password for user root if you want or keep it empty: (I picked root as the password as well)

 /usr/mysql/5.0/bin/mysqladmin -u root password root

/usr/mysql/5.0/bin/mysqladmin -u root -h localhost password root

to start mysql:

 /usr/sbin/svcadm -v enable svc:/application/database/mysql:version_50 

to create a database:

/usr/mysql/5.0/bin/mysql -h localhost -u root -p 

create database ludo; 

that you can get from Nb 6 beta 2(included in B77) via jdbc:mysql://localhost:3306/ludo in the services tab using the nb bundled mysql jdbc driver. 

WebStack Options UI

 When you install B77 or later, you'll see a "Initialize" start menu under the Developers Tools menu item...When you select this initialize menu, a post configuration script is run to add the apache and mysql privileges to the user running the Desktop (asking for root password).

Here is the current script ran as root for initialize action: (Should we do the add user/group mysql/mysql there?) (It is enough, or not secure enough? Need feedback there)

USERNAME=$1

echo "adding apache22 and mysql privileges to user ${USERNAME}"
usermod -P 'Apache 22 Administration','MySql 5 Administration' ${USERNAME}

echo "allowing RW access to httpd.conf, php.ini and my.cnf to user ${USERNAME}"

setfacl -m user:${USERNAME}:rw- /etc/apache2/2.2/httpd.conf
setfacl -m mask:rw- /etc/apache2/2.2/httpd.conf
setfacl -m user:${USERNAME}:rw- /etc/php5/5.2.4/php.ini
setfacl -m mask:rw- /etc/php5/5.2.4/php.ini
setfacl -m user:${USERNAME}:rw- /etc/mysql/5.0/my.cnf
setfacl -m mask:rw- /etc/mysql/5.0/my.cnf

Once the Initialize menu is called you'll see many more menus under the Developer Tools/WebStack Admin menu as shown below:



If you select the "Options menu" a simple UI for viewing/editing apache port number, location or php debug will be displayed:

 
 

NetBeans PHP integration: Starting B77, NetBeans 6.0 Beta 2 and the NetBeans PHP modules Early Access are pre-installed in SXDE.

If you configure PHP with Debug flag, then you can debug PHP apps via NetBeans 60 PHP modules:
 



Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

Sign up or Log in to add a comment or watch this page.


The individuals who post here are part of the extended Sun Microsystems community and they might not be employed or in any way formally affiliated with Sun Microsystems. The opinions expressed here are their own, are not necessarily reviewed in advance by anyone but the individual authors, and neither Sun nor any other party necessarily agrees with them.

Copyright 1994-2009 Sun Microsystems, Inc.
Powered by Atlassian Confluence
Sun Guidelines on Public Discourse Privacy Policy Terms of Use Trademarks Site Map Employment Investor Relations Contact