XMission Control Panel/Server Tab/LAMP
Contents
What is a LAMP or LAMPstack?
LAMP stands for Linux, Apache, MySQL, and PHP which are commonly used for the majority of web hosting and development servers. Each of the four have their own uses for your server, as Linux will be the operating system, Apache will act as the web server, MySQL handles databases, and PHP takes care of your scripts.
Where to start
Step 1: Linux
Our servers run on Ubuntu or CentOS depending on your needs and preferences. This will take care of the Linux portion of your LAMP stack.
Step 2: Apache2
The next step will be to install Apache. You will want to have an open shell session in a terminal for your server to preform this task.
Depending on your Linux Distribution you will want to follow either of the following
Ubuntu:
sudo apt-get update sudo apt-get install apache2
CentOS:
sudo yum update sudo yum install apache2
After that, you can simply navigate to your server IP in a web browser to see a prompt telling you apache2 was successfully installed!
Step 3: MySQL
MySQL is an industry standard database system that is used for organizing and utilizing data through tables.
To install MySQL, in the same terminal:
Ubuntu:
sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql
CentOS:
sudo yum install mysql-server libapache2-mod-auth-mysql php5-mysql
During the installation your terminal will prompt you for a root password. Be sure to use a strong password that you do not share with any other services, as this is a common vulnerability in modern web hosting.
Once it has completed, enter this command to “activate” the recently installed MySQL
sudo mysql_install_db
Followed by
sudo /usr/bin/mysql_secure_installation
After that it will ask you a series of questions that you will want to read over and decide on
By default, a MySQL installation has an anonymous user, allowing anyone to log into MySQL without having to have a user account created for them. This is intended only for testing, and to make the installation go a bit smoother. You should remove them before moving into a production environment. Remove anonymous users? [Y/n] y ... Success! Normally, root should only be allowed to connect from 'localhost'. This ensures that someone cannot guess at the root password from the network. Disallow root login remotely? [Y/n] y ... Success! By default, MySQL comes with a database named 'test' that anyone can access. This is also intended only for testing, and should be removed before moving into a production environment Remove test database and access to it? [Y/n] y - Dropping test database... ... Success! - Removing privileges on test database... ... Success! Reloading the privilege tables will ensure that all changes made so far will take effect immediately Reload privilege tables now? [Y/n] y ... Success! Cleaning up...
Step 4: PHP
A great open source scripting language is PHP, which is used for building webpages.
To install PHP, in the same terminal
Ubuntu
sudo apt-get install php5 libapache2-mod-php5 php5-mcrypt
CentOS
sudo yum install php5 libapache2-mod-php5 php5-mcrypt