In this tutorial, I would like to guide you about configuring LAMP on Linux server with a few simple steps. You don’t have to be a pro in coding to perform this action and with this simple tutorial you’d be able to accomplish this easily.
Steps to install Apache:
1) To install Apache use the command
2) To configure the apache start time at system boot
3) To start Apache
You’re done with it! You have installed Apache successfully
Now ensure your IP address. It will be displayed as below
e.g.: http://192.168.1.1..
Steps to install Mysql on your server:
1) To configure the mysql start time at system boot
2) To start Mysql
3) To set password for mysql page (http://hostname/phpmyadmin):
Run the command
mysql_secure_installation
Press y and enter
You will be asked for new password. Enter your password and press enter key
Note: The password you entered will not be visible in the command mode.
Now re-enter the password and press enter key.
By this, you have set password for mysql successfully.
Steps to install PHP:
1) Use this command to install the latest PHP version on your server
2) Once you installed PHP, you need to restart the Apache using the following command
You’re done with it! Now the LAMP is installed successfully on your server. Now you can run PHP in your server.
Steps to install ftp access:
There are certain setting needs to be modified.
To perform that use the below command to edit the vsftp configuration file.
And press ctrl + w and find “anonymous_enable” and modify the value to “NO”
Find “ascii_upload_enable” and modify like the below.
ascii_upload_enable=YES
ascii_download_enable=YES
Find “chroot_list_enable” and Uncomment the below lines by removing #.
chroot_list_enable=YES
chroot_local_user=YES
Find “chroot_list_file” and Uncomment the below lines.
chroot_list_file=/etc/vsftpd/chroot_list
Find “ls_recurse_enable” and Uncomment the below lines.
Add the below code at the bottom of configuration file. Specify the directory path for “local_root” which you want to enable to the user as home directory. If you are not specifying any value then the ftp home directory will be assigned to user also.
local_root=public_html
use_localtime=YES
Once you have done all the changes, press ctrl + e followed by “Y” and press enter key.
Run the command
By now you’d have enabled FTP as well.
So, in short, you’d have configured LAMP on Linux server with no cost also in few minutes. If you’ve some other ways of configuring the same, add the coding via comments as it will be beneficial to readers.
December 24, 2013
September 26, 2012