Solana programs are built in Rust! If you don't know Rust, you can read The Book here.
To install Rust just follow up this documentation.
We'll be using a nice CLI created by Solana, you can see installation instruction by looking here.
After installing the Solana CLI, run this command:
solana config set --url localhost
And now run this to make sure if we can get a local node up and running:
solana-test-validator
Archor is like Hardhat for Solana, and to install you can just run this:
cargo install --git https://github.com/project-serum/anchor anchor-cli --locked
solana config set --url devnet
// Make sure you're on devnet.
solana config get
anchor build
// Get the new program id.
solana address -k target/deploy/myepicproject-keypair.json
// Update Anchor.toml and lib.rs w/ new program id.
// Make sure Anchor.toml is on devnet.
// Build again.
anchor build
// Deploy
anchor deploy