When I previously installed Composer on my dev server, I made the mistake of doing so while logged in as root. This caused all sorts of permissions-related problems.
I recently decided it was time to sort this out by re-installing Composer properly. Although this should be a no-brainer, I decided to research best practices all the same. I’m glad that I did.
The best tutorial I could find was from DigitalOcean: https://www.digitalocean.com/community/tutorials/how-to-install-and-use-composer-on-ubuntu-16-04. What I like most about their approach, is that it includes instructions for a security check on the installer file.
I also found a lot of very good guidance on the Sitepoint website:
Due to some security upgrades over at Stripe, the CentOS servers need to be updated so they can handle SHA-2 and TLS1.2. This turns out to be quite simple.
First, log in to the server and run:
This will list the updates that are available. It’s possible to select some or all of these for updating. For the sake of simplicity, I decided to update everything at once.
Before running the update, power down the droplet via putty:
sudo shutdown -h now
Now go to DigitalOcean and use their console to create a snapshot of the server. (FYI, it might take a moment for DO to register that the server is actually powered down.) This snapshot will be used for recovery in case anything goes sideways. Creating a snapshot can take from 15 to 30 minutes or more.
When the snapshot is completed, power up the server using the DO console. Now log in via Putty and run the following:
sudo yum -v update
This will take a few moments to finish. Note that I’ve added the ‘verbose’ option, so this will echo a lot of info about the process.
Once the update is completed, the server will need to be restarted. Follow the instructions in this post: http://18.104.22.168/tutorials/?p=86
Now load up the app in a browser and make sure things are working properly.
In my case, I was doing this at the behest of Stripe: next I ran the script they provided to confirm the server is now capable of handling SHA-2 and TLS1.2. All is now good:-)
Every once in a while, the OS software should be updated.
When logging in to the terminal, there is often a message stating updates are available. To install these, use the following commands:
sudo apt-get update # Fetches the list of available updates
sudo apt-get upgrade # Strictly upgrades the current packages
sudo apt-get dist-upgrade # Installs updates (new ones)
Once the updates are done, it’s necessary to clean up any old stuff that isn’t used any longer. Use this command:
sudo apt-get autoremove
And finally, it’s necessary to restart the server. The best way to do this is from the console — just shutdown and reboot the machine and you’re good to go.
This article is one of the top tutorials covering SSH on the Internet. It was originally written back in 1999 and was completely revised in 2006 to include new and more accurate information. As of October, 2008, it has been read by over 473,600 people and consistently appears at the top of Google’s search results for SSH Tutorial and Linux SSH.