View Source

*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....

h2. 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:

h2. install the IPS pkg tools:

_cd /_
_hg clone ssh://anon@hg.opensolaris.org/hg/pkg/gate_
_cd gate/src_
_make_
_make install_
_make link_

h2. 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      \---\-
 

h2. 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-directories{_}reboot to install all the smf services.
\\

h2.


h2. 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. 

h2. 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:
\\
\\

!ishot-30.png|align=left!\\
\\

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

 
  !ishot-29.png!\\
\\

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: !ishot-21.png!
 
\\
\\
\\
\\

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