Unless you use Sphider
http://www.sphider.eu or a similar script then implementing a search engine is non trivial.
What you want to do can't be achieved by Sphider because the indexing, weighting and ranking of sites based upon keywords and inbound links is a resource intensive task.
Sphider does not support ranking based on inbound links, however Nutch will as will some other open source search platforms.
Implementing such a thing is non trivial. You could develop your own solution and run it's crawler on Amazon EC2 instances to save having to invest in hardware, however you still need somewhere to house your database.