As developers we are all pretty comfortable with standard hosting GUIs like Cpanel and Plesk, most of us use these systems everyday. But we should also be familiar with some of the basics of working with SSH and the command line. Recently, a client provided NYC HelpDesk with a Debian hosting environment that had no GUI installed. Our task was to install a database and Joomla! without the use of a GUI. Here are the steps we took. Hopefully this helps some of you out there in a similar situation.
1. If you are in a Windows environment fire up PUTTY or your favorite telnet client. If you are on a MAC use OpenSSH and Terminal.app which should have shipped with your system.
2. Once you have connected to the server it will prompt you for your user password. Enter the password for the user you connected with. This is not the root password.
3. Once the login is complete let’s set up a new database for your Joomla! install. For this step you will need the MySQL root password:
Open MySQL using the command below you will be prompted for the root password.
mysql -u root -p
Once you are in MySQL set up the new MySQL Database using the following commands:
CREATE DATABASE new_database;
Now you have a new database you need to grant rights to user. Use the following command:
GRANT ALL ON new_database.* to user@localhost
Your database should now be set up with permissions assigned to the user specified in the last step. Make a note of the database and user for use during the Joomla! install process later on.
4. Once your database is set up you will need to FTP the Joomla! zip file to the directory where you will be installing Joomla!. This will probably be the default www directory.
5. Once the files are over you will need to extract them. In our case we used unzip to extract the files. It may be the case that you will have to install unzip. To do so you will need the root password. Once you have the server root password take the following steps.
a. Su or Sudo- using the root password. This will give you the permissions you need to install the unzip app.
b. Once you have root privileges type the following command at the prompt:
apt-get install unzip
Now navigate to the www folder where your Joomla! zip file is installed and run the unzip program on that file using the unzip command:
unzip Joomla_latestversion.zip
The files will extract.
6. Now navigate in your browser to the folder where Joomla! has been extracted. You should see the standard Joomla! installation screen. Run through the prompts using the database information you created in steps 1-3. Once you are done, depending on how your server permissions are configured you may need to manually delete the installation folder before proceeding.
a. Navigate to the folder you installed Joomla! in and remove the installation directory using the following command:
rm -rf installation
You should now be able to finish the installation process and navigate to your freshly installed Joomla! site. Feel free to let us know how it goes in the comment section below. Thanks for reading!