Initial VPS setup
From HostThyself
Upon signing up for a VPS account, you will be presented with a bare system. Depending on the server provider and package, you may have different degree of customisation available to you.
The standard VPS setup that I had been using is a CentOS system with Webmin control panel.
This article describe the first few things that I do upon receiving an account.
Contents |
[edit] Create a new user
Normally a root account will be provided with a VPS server. However it is a good practice not to do everything with the root account. Instead, create a normal user and you could use the su or sudo command to do administrator tasks.
Add user and password
useradd username passwd username
Add as trusted admin to "wheel" group:
usermod -G wheel username
Permits only root and users in group wheel to run /bin/su. Make sure the users are in the wheel group first!
chgrp wheel /bin/su chmod 4750 /bin/su
[edit] Restrict root login
As a further security measure, you should restrict remote root login.
Test for su before turning off root login!
vi /etc/ssh/sshd_config
Locate and change the line "#PermitRootLogin yes" to: "PermitRootLogin no" Save the file.
Reload SSH
/etc/init.d/sshd reload
[edit] Update Packages with yum
Depending now how upto date your provider's VPS image, you would want to upgrade you system packages with yum.
yum update
Additional you may want to remove unnecessary packages.
yum erase package-name
Example of packages to remove
- samba
- samba-common
- finger
- finger-server
[edit] Customise Webmin
See Customizing Webmin.
[edit] Adjust Timezone
If you VPS is not in the same timezone as your location, you may want to adjust timezone to your localtime.
Alternatively you can set timezone to UTC or GMT.