Check in the all the following files for the port:

/opt/solr-5.2.1/server/solr/solr.xml

change port here: ${jetty.port:8983}

/var/solr/data/solr.xml
change port here: ${jetty.port:8983}

/var/solr/solr.in.sh
change port here: SOLR_PORT=8983