You’re probably here because you are finally at the point where you need root access to your web server so that you can install applications like MediaWiki or WordPress or Joomla or any other CMS. If you have a website that you want to move away from a hosted environment, this is how to set yourself up so that you control every aspect of your site.
- Create an account at Rackspace.com. Go to Cloud Servers and create a new server. If you need help with this, though it’s very self-explanatory and easy on their site, you can always chat with their 24-7 online chat support. Note the administrative password and the IP address of the server you have created.
- Open a bash terminal and SSH into your shiny new server. “ssh root@YOURSERVERSIPADDRESS”. Enter the password.
- Create a user for yourself. “useradd -m -s /bin/bash yourname” and create a password for yourself “passwd yourname”.
- Enter “su
yourname”. Now, you are logged in under your name and not as root. - Enter the following:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install tasksel
sudo tasksel install lamp-server
sudo apt-get install php-mail python-software-properties unzip
sudo a2enmod rewrite
sudo apt-get autoclean
sudo apt-get autoremove
mkdir /home/yourname/yourwebsitename
mkdir /home/yourname/yourwebsitename/blog
cd /home/yourname/yourwebsitename/blogsudo
wget http://wordpress.org/latest.tar.gz
sudo tar -zxvf latest.tar.gz . - That has cleaned up your server and installed a web server as well as WordPress. Enter passwords for your MySQL database and record them.
- “sudo service apache2 restart” #You will get an error that local server has not been set up.
echo “ServerName localhost” | sudo tee /etc/apache2/conf.d/$servername
sudo service apache2 restart #Should be no error now - cd /etc/apache2/sites-available/
sudo nano yourwebsitename - Copy this with CTRL+SHIFT+V into the terminal:
ServerAdmin webmaster@localhost
ServerName www.yourwebsitename.com
ServerAlias yourwebsitename.com *.yourwebsitename.com
DocumentRoot /home/yourname/yourwebsitename/
php_value upload_max_filesize 1MOptions +FollowSymLinks
AllowOverride All
Order allow,deny
allow from allOptions Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from allErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warnCustomLog ${APACHE_LOG_DIR}/access.log combined
Alias /doc/ “/usr/share/doc/”
Options Indexes
MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128- CTRL+X and save the file as yourwebsitename.com.
- cd /etc/apache2/sites-enabled/
r
sudo ln -s /etc/apache2/sites-available/yourwebsitename.com /etc/apache2/sites-enabled/yourwebsitename.com
sudo service apache2 restart
- Where have you created your domain name account? If it’s with GoDaddy, login to your GoDaddy account and click on Domain Manager. Click on the website name and enter the dashboard (or follow whatever practice your domain registrar uses to get to where you can edit the zone file). Click on “Edit Zone File”.
- Replace the IP address in the zone file with the IP address of your cloud server. Save the zone file.
- “nano /home/yourname/yourwebsitename/index.php” and copy this into the file.
/**
*
Front to the WordPress application. This file doesn't do anything, but loads
* wp-blog-header.php which does and tells WordPress to load the theme.
*
* @package WordPress
*//**
* Tells WordPress to load the WordPress theme and output it.
*
* @var bool
*/
define('WP_USE_THEMES', true);
/** Loads the WordPress Environment and Template */
require(‘./blog/wp-blog-header.php’);
?>;
- In a few minutes, you should be able to enter your URL into any browser, and see the WordPress installation page. Install using the database name and password you’ve created in PHPMyAdmin or in command line for MySQL.
- I recommend Elegant Themes to get a beautiful and professional look for your site instantly.