Monday July 07, 2008
Jyri Virkki
Sun Tech Days Demo Transcripts
Earlier I mentioned I'd post the transcripts from the three demos I gave at both the Mexico City and Manila Sun Tech Days. Each demo was just under 5 minutes. Here's the transcript of the commands I ran, taken from my recording (I added only brief commentary in the text, enclosed in square brackets):
Installing Apache and PHP on OpenSolaris
[check that apache2 is not yet installed, then install it] % cd /etc/apache2 % pfexec pkg install SUNWapch22 % cd /etc/apache2 % cd 2.2 % ls [bug in pkg, it does not import the smf manifest, so do it manually and then enable apache] % ls /var/svc/manifest/network/http-apache22.xml % pfexec svccfg import /var/svc/manifest/network/http-apache22.xml % svcadm enable apache22 [run firefox: load http://localhost to show Apache is working] [check that php5 is not yet installed, then install it] % cd /etc/php5 % pfexec pkg install SUNWphp524 SUNWphp524man % cd /etc/php5 % ls % cd 5.2.4 % ls -la [let's look at apache docs dir and create a simple php script in there] % cd /var/apache2 % ls % cd 2.2 % ls -la % cd htdocs % ls -la % su # cat > test.php <?php phpinfo(); ?> ^D [go to firefox: load http://localhost/test.php doesn't work, shows source, because apache2-php5 connector not yet installed; so install the connector package and show that it also installs its config] # pkg install SUNWapch22m-php5 # cd /etc/apache2/2.2/conf.d # ls # more php5.conf # svcadm restart apache22 [go to firefox, reload page, now it worked!]
Web Stack Project Repository
[show currently known (default) authority; add webstack repository and show it] # pkg authority # pkg set-authority -O http://pkg.opensolaris.org/webstack webstack # pkg authority [refresh package list and check what's available from webstack] # pkg refresh # pkg list -a | grep webstack [let's install and take a quick look at two packages (varnish and lighttpd) # pkg install SUNWvarnish # cd /usr/varnish # more README # pkg install SUNWlighttpd14r SUNWlighttpd14u # cd /usr/lighttpd # cd 1.4 # ls -la # ls -la sbin
Install and Configure Wordpress
Thanks to Sriram
[check that neither apache nor mysql is yet installed, then install them] # cd /usr/apache2 # cd /usr/mysql # pkg insall amp-dev [bug in pkg, it does not import the smf manifests, so do both manually and then enable them] # svccfg import /var/svc/manifest/application/database/mysql.xml # svccfg import /var/svc/manifest/network/http-apache22.xml # svcadm enable apache22 # svcadm enable database/mysql:version_50 [create database for wordpress in mysql] # /usr/mysql/bin/mysql -u root mysql> create database wordpress; mysql> grant all privileges on wordpress.* to wp@localhost identified by 'wp'; mysql> flush privileges; mysql> quit; [retrieve the latest wordpress code, install and configure it] # cd /tmp # wget http://wordpress.org/latest.zip # cd /var/apache2/2.2/htdocs/ # unzip /tmp/latest.zip # cd wordpress # cp wp-config-sample.php wp-config.php # vi wp-config.php DB_NAME = wordpress DB_USER= wp DB_PASSWORD = wp [go run firefox; http://localhost/wordpress]
Posted at 02:18PM Jul 07, 2008 by jyri in WebStack |