Ethereum provides the solc compiler, which provides a command-line interface to compile .sol
files. Visit http://solidity.readthedocs.io/en/develop/installing-solidity.html#binary-packages to find instructions on how to install it and visit https://Solidity.readthedocs.io/en/develop/using-the-compiler.html to find instructions on how to use it. We won't be using the solc compiler directly; instead, we will be using browser Solidity. Browser Solidity is an IDE, which is suitable for small contracts.
For now, let's just compile the preceding contract using browser Solidity. Learn more about it at https://Ethereum.github.io/browser-Solidity/. You can also download the browser Solidity source code for offline use: https://github.com/Ethereum/browser-Solidity/tree/gh-pages.
A major advantage of using browser Solidity is that it provides an editor and also generates code to deploy the contract.
In the editor, copy and paste the preceding contract code. You will see...