Quinta-feira Out 02, 2008

Software Freedom Day Report!

Hi everybody,

I know I'm late. I should have written this post last week, but I was quite occupied and forgot about sitting and writing the blog post.

The SFD event on Rio de Janeiro was fine! We had an attendance of 36 people and many of them were excited about what the OpenSource could give them.

About 10 o'clock of the morning we started the event speaking about the Software Freedom Day, Open Source and Sun intentions on this world! Next, we had a really great talk given by Magno Cavalcante, RioJUG's Leader and Sun Java Champion, about the Web 2.0 and people's value, including a lot of important concepts about software freedom, market and development.

After the lunch, we've kept talking about open source, showing great features of OpenSolaris 2008.05, VirtualBox and NetBeans. We explained the Sun Open Source University Meetup initiative to the students and invited them to join it! In the end, we had an OpenSolaris installation inside VirtualBox and we raffled give-aways!

Lots were said about the importance of software freedom! And how much the great companies support it, specially Sun!

That's it!
I will be probably posting something more technical here, like the SFD demo about NetBeans+AJAX that I have done.


Sexta-feira Jun 06, 2008

Self-Healing SAMP with OpenSolaris 2008.05 and it's SMF

Hi Everybody!

     Today I'm doing a review about the new OpenSolaris 2008.05, the one released from project Indiana on 05/05/2008.
     OpenSolaris 2008.05 has all the benefits of Solaris' Kernel and uses ZFS (the greatest file system of the planet) as its native file system. The first impression I had when I installed was its fastness. It's certainly much faster than Ubuntu 8.04, Fedora 9 and, of course, Windows. I'm using it now to do all my work and I'm really satisfied. See my desktop screen:

     OpenSolaris cames with Java installed, Firefox and ThunderBird, Pidgin, GIMP, eVince and many others Gnu Tools.The Flash plug-in is very easy to install, Firefox is prepared to do everything for you... so, no need to download it apart and then configure Firefox yourself to make it work. It just install and work for you.

     One of the greatest features of Solaris, for me, is it's Service Management Facility, aka SMF, that gives Solaris the Self Healing ability. Different from Linux, the services are not started and managed through the RC scripts manually, they are controlled by SMF, that manages dependencies, status, errors and organizes everything. If something goes wrong, SMF takes an attitude to repair the situation automatically. If it has no autonomy to full repair a problem, it gives great feedback, instructions about possibilities to fix the problem and very useful logs. OpenSolaris is smart!

     To challenge the OpenSolaris way of use, I decided to put a full SAMP platform to work on it, integrating that with Solaris SMF Self Healing System.

And the steps I followed to do it will fit on a single blog Post! ;)

     For those that are not familiar with some terminologies, SAMP means: Solaris+Apache+MySql+PHP ... a fast and furious development platform.

     The First Step was to install Apache, MySql and PHP. OpenSolaris cames with a Package Manager that downloads, configures and installs the packages for us, with no troubles and headaches about dependencies. Next is a screen shot:

     First, I searched for apache and asked the Package Manager to Install Apache 2.2 (SUNWapch22), FastCGI plugin (SUNWapch22m-fcgid), and PHP5 module for Apache (SUNWapch22m-php5). Second, I searched for mysql and asked the manager to install MySql 5 (SUNWmysql5), PHP5 Extension module(Core) to connect to MySQL database (SUNWphp524-mysql) and SUNWmysql-base. The last step was the search for php. I asked Package manager to install PHP Server 5.2.4 (SUNWphp524), Core components of PHP server (SUNWphp524core) and SUNWphp524usr.
     All the Packages are available on opensolaris.org repository.

     No headache to install SAMP. The three applications were installed on my system on /usr , /etc and /var directories separating (not that exactly, but...) executables/libs, configuration files and functional data, respectively.

     Then, I stepped to the interesting part: to configure Apache, MySQL and PHP to work together and to be part of SMF! I've started with MySQL.

     Created a my.cnf file at /usr/mysql/5.0 copying the my-small.cnf from /usr/mysql/5.0/share/mysql and renaming it:

# cd /usr/mysql/5.0
#cp ./share/mysql/my-small.cnf .
#mv my-small.cnf my.cnf

     Then, I've run mysql_install_db, running the script inside /usr/mysql/5.0/bin:

#cd /usr/mysql/5.0/bin

After that, just put mysql user as owner of /var/mysql folders:

#cd /var
#chown -R mysql:mysql ./mysql

     So, it was already possible to start MySQL through '/usr/mysql/5.0/bin/mysql_safe &' command. To stop MySQL, we may use 'pkill mysql'. I did it to test if everything was going OK. Then I configured Apache to work with PHP.

     First, I've edited the httpd.conf file on /etc/apache2/2.2 . I've searched on httpd.conf file for ServerName and ServerAdmin variables. I've left the ServerName variable set to, but it can be changed to an specific server name. Then I changed the ServerAdmin value to a valid e-mail.

     Next, I searched for <IfModule mime_module> tag on httpd.conf. And, Near the following lines:
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz

I've added a third line with: AddType application/x-httpd-php .php

It stayed like that:

AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddType application/x-httpd-php .php

     That's all for httpd.conf. Now, there is only php.ini left. I've just copied /etc/php5/5.2.4/php.ini file to /etc/apache2/2.2/:

#cd /etc/apache2/2.2
#cp /etc/php5/5.2.4/php.ini .

And then opened it to edit. I've only needed to find the block:
; Dynamic Extensions ;

And add the following line after the comments:

     So far so good. Everything is configured and working. You can try starting apache through '/usr/apache2/2.2/bin/apacheclt start' and use a little PHP script to test (Start MySQL too). Create a file with these lines:

     echo "Hello World!
     $conexao = mysql_connect('localhost', 'root', '');
     echo $conexao;

and save it inside /var/apache2/2.2/htdocs with a name like myTest.php . Then, open your browser and type "http://localhost/myTest.php" . Apache and MySQL should be running (you may check it using the 'ps' command)! The Browser should display a message like:

     You may see I haven't configured a password for MySQL root user! That's really bad for a real system! You may change root's password on MySQL and create other users to use the databases as you need. But my intention here is just testing.

Now Let's put Apache and MySQL inside SMF!

     To set up a service inside SMF you need a script that knows how to start and stop your service (like the old rc scripts of linux) and a XML manifest file that gives more information about the service to SMF like dependencies and other characteristics. There is not so much headache to create these files. The Method script, as I mentioned, is not very different from an RC script, and for the XML manifest, that could sounds more complicated, there is a tool on opensolaris.org that helps you to generate your manifest file automatically, have a look at EASY SMF - http://es.opensolaris.org/easySMF/.

     Anyway, Apache and MySQL are famous services and, because I was in a hurry, I've just searched the Internet to see if there was something already done. And there it was. I've edited the scripts and manifests files from these links to put my services under SMF management.


Thanks to Chris Miles and William Pool for the files!

     I've had to edit the original method scripts and manifest files because many installation details were different from what I found on the originals, like the paths to many important files. So I've adapted them to work directly for OpenSolaris Package Manager Installations.

     So, you can have the method scripts here. Just copy them into /lib/svc/method :

Apache Method: apache2
MySQL Method: svc-mysql

>> After saving them on method directory, chmod them into 555 permission (read and execute) (( '# chmod 555 apache2 svc-mysql' ))

     And here are the Manifest Files. They will be copied into different directories:

Apache2 Manifest: apache2.xml

>> Save it inside '/var/svc/manifest/site' directory and chmod it to 444 permission (read only) (( '# cdmod 444 apache2.xml' ))

MySQL Manifest: mysql.xml

>> Save it inside '/var/svc/manifest/network' directory and chmod it to 444 permission (read only) (( '# cdmod 444 apache2.xml' ))

Good. Now the last step. Import them into SMF through the commands:

# svccfg -v import /var/svc/manifest/site/apache2.xml
# svccfg -v import /var/svc/manifest/network/mysql.xml

If you have Apache2 and MySQL running on the system, turn them off (you may use 'pkill mysql' and 'apacheclt stop'). To start your services, now you may use:

# svcadm -v enable apache2
# svcadm -v enable mysql


# svcadm -v disable apache2
# svcadm -v disable mysql

To turn them off.

     It's possible to see their status through the command:

# svcs -a | grep apache2
# svcs -a | grep mysql

(svcs command list the enabled services; -a option show all the services, enabled and disabled ones)
You may see if there is any problem with your services running the following command:

# svcs -x

If something weird makes your Apache or MySQL go down killing their processes (try it yourself), SMF will take care of it and put the services up and running again!

Nice, isn't it?? And quite easy too!
That's it. Through few steps, now I have my SAMP platform configured and under OpenSolaris Self-Healing system.


Sexta-feira Mai 30, 2008

OpenSolaris DAY Statistics

Hi Everybody!

It's a pleasure for all Sun Campus Ambassador Team!
I'm here to announce the OpenSolaris Day Numbers!

3 days of presentations.

24 Universities
31 presentations
1819 people heard about OpenSolaris 2008.05 through our event!
- 1732 Students
- 85 Professors / Researchers

The List of Institutions:
Centro Universitário da FEI
Centro Universitário Estadual da Zona Oeste - UEZO
Centro Universitário Salesiano de São Paulo - UNISAL
Faculdade Anhangüera de Taubaté
FATEC - Cruzeiro
FATEC - Zona Sul
Instituto CPTEC/INPE
Pontifícia Universidade Católica do Rio Grande do Sul – PUC RS
Universidade Católica de Brasília
Universidade de Santa Cruz do Sul
Universidade de São Paulo - USP
Universidade do Vale do Rio dos Sinos - UNISINOS
Universidade Estácio de Sá - UNESA
Universidade Estadual Paulista - Rio Claro - UNESP
Universidade Estadual Paulista - S. J. Rio Preto - UNESP
Universidade Estadual Paulista – Bauru - UNESP
Universidade Federal da Bahia - UFBA
Universidade Federal de São Carlos - UFSCar
Universidade Federal do Rio de Janeiro - UFRJ
Universidade Federal do Rio Grande do Norte - UFRN
Universidade Federal do Rio Grande do Sul - UFRGS
Universidade Lemos de Castro
Universidade Paulista - UNIP

And cheers for all Brazil's Sun CAs that made that happen!
Alex Rafael Branti, Douglas Ramiro, Fábio Augusto, Gabriela Souza, João Paulo Samara, Jonas Dias, Leonardo Alves, Leví Silva, Luiz Felipe Aquino, Marcelo Arbore, Oscar Tanner, Pedro Reis, Ramon Lopes, Ricardo Severo, Silveira Neto, Stephania Silva, Thiago Gonzaga, Tom Mix Petreca, Vitorio Sassi!

Segunda-feira Mai 05, 2008

The New OpenSolaris Released!


A great conquest! A Great OS! The release of the future! ;)

Download it NOW!!
The amazing new OpenSolaris!! At www.opensolaris.COM



Sexta-feira Mai 02, 2008

opensolaris DAY BRAZIL Invitation

Hi all! Let's make it HUGE! OpenSolaris DAY BRAZIL!

Nos dias 5, 6 e 7 de maio o Brasil vai parar!

Todos aguardando pela mesma coisa...

Outro Jogo de Futebol?

Certamente não.

opensolaris DAY Brasil

 6 de maio na sua Faculdade

Anfiteatro Maria Irene, NCE - CCMN - UFRJ

Às 12hs

"open" popcorn and "free" source - Bring your appetite for future

Sexta-feira Fev 29, 2008

29 of February

Today the UNIX+OpenSolaris vacation course @ UFRJ ended!
Next week the subscrebers will be doing the test to grant them the UFRJ certification.
I'll post more details latter... I'm just tired by now.


Quinta-feira Nov 01, 2007

Project Indiana Preview

Hi there.

Great news, a preview of Project Indiana is available for downloading at opensolaris.org. I've already run the LiveCD OS... It seems great and is working really fine. I'm thinking about installing it on my hard drive to try better its functions.

I invite you all to test it!



Domingo Out 21, 2007

4 Tech Demos in a Week

Tech Demos Scheduled!

We've already made one last Friday, 19. Next Friday we'll repeat it. In the middle of this week, we will do two more presentations at the Superior Institute of Technology at Quintino (out of our University), still at Rio de Janeiro. There we will do two different tech demos: Today we will present “Innovating with Solaris and open source technologies”. Wednesday will be “Java and NetBeans – Practical development, robust solutions”.

Below is the UFRJ tech demos' poster.


Sábado Out 06, 2007

Pedindo um Starter Kit do OpenSolaris

Vou postar aqui hoje o que fazer para pedir um kit de aprendizado do OpenSolaris pelo Correio!
O Envio é totalmente gratuito!

Basta entrar primeiro na página do projeto OpenSolaris.org e se registrar clicando em Register no canto superior a direita. (Ou clique aqui)

Depois de registrar, voltem na página inicial e cliquem em Request a DVD na caixa laranja entitulada 'OpenSolaris Starter Kit' conforme a figura abaixo:

Ou então cliquem aqui.

Se você não estiver logado, efetue o login. Você será levado para a página de detalhes de envio do DVD, como nome, endereço, email e etc.

Preencham tudo e marquem que vocês são estudantes. Cliquem em 'Submit Address' e depois confirmem.

Pronto, vocês receberão uma mensagem de confirmação e será enviado um e-mail com as confirmações de envio. Os DVDs chegarão dentre 2 a 4 semanas.

Quarta-feira Abr 18, 2007


Preparing my computer to install Nexenta. My first try was not successful. Looking for more instructions to make next try.
I'm sick... :( ... fevering… many medicines...
Many work to do for the University too.

Well... Let's keep this blog updated for now on!!


« Julho 2016