1) Log onto server as root
2) Download the latest version of the script using wget:
3) Set the script to be executable:
4) Execute the script:
Follow the scripts prompts and when it completes, reboot the server.
Once the server is rebooted, it will now no longer permit the root user to login through SSH. You will need to login using your admin user you created. Also, if you changed the SSH port, be sure to connect to the new port!
Note: There are further notes in the script on how to do initial configuration for Apache, MySQL and PHP. There is an 'exit' in the script before these notes, so if you want to use any of the commands there you will need to do so manually.
wget https://gist.github.com/dirte/5328929/raw/bd45dba4195147e026ffdd1d7557172bdcb72edb/provision_centos_server.sh
3) Set the script to be executable:
chmod +x ./provision_centos_server.sh
4) Execute the script:
./provision_centos_server.sh
Follow the scripts prompts and when it completes, reboot the server.
reboot
Once the server is rebooted, it will now no longer permit the root user to login through SSH. You will need to login using your admin user you created. Also, if you changed the SSH port, be sure to connect to the new port!
Note: There are further notes in the script on how to do initial configuration for Apache, MySQL and PHP. There is an 'exit' in the script before these notes, so if you want to use any of the commands there you will need to do so manually.
No comments:
Post a Comment