As a general rule, you cannot publish anything as original research that has already been published. (You may be able to reprint it in other venues, but most research journals do not do this.)
Of course, the trick is what counts as "already published". Nowadays, many publishers (including all mathematics publishers, for example) do not count informal distribution on the internet as prior publication. It's common not to count extended abstracts from conference proceedings, although the journal may require some revisions or extensions. Nobody counts submitting a dissertation as prior publication, even if the university makes it available for download or purchase, and technical reports are generally in the same category.
On the other hand, publication as a "real book" definitely counts as prior publication and would rule out journals. Of course, this just brings up the question of what a "real book" is. Basically, if it's published by a serious academic publisher, with some nontrivial selection and editorial advice, then that counts as publication. On the other hand, if it's some random publisher printing copies of Ph.D. theses and selling them online, then you could make a strong case that it's not really published (and that this is not so different from ordering a dissertation copy).
However, I think you need to discuss this explicitly when submitting your paper. For example, you could add a sentence to your submission letter along the lines of "This work is based on my thesis from University X, which is available for sale by Y but has not been traditionally published". It's much better to deal with this upfront than to have someone later ask "Wait, why is someone selling copies of this work online?"