A much easier way to do the same is by using YUM (stands for Yellowdog Updater, Modified) is an open-source command-line package-management utility for RPM-compatible Linux operating systems released under the GNU General Public License. It's job is to basically make installing of Software on Linux easier for us, and it does a very good job of that. Please note that this will work on all RHEL Redhat based Linux Distros:
Follow the instructions below to install LAMP using YUM.
1. Connect to your Server either physically or using SSH, and bring up a Terminal Window.
2. Run the following command to update the YUM Database with the latest versions of Software:
yum update
Note that if you don't have YUM installed by default you will have to run this command to install YUM first:
sudo apt-get install yum
3. Once that's done, run the following command to install LAMP:
yum install httpd mysql mysql-server php php-devel php-mysql
4. Start MySQL by running the following command:
systemctl start mysqld.service /usr/bin/mysql_secure_installation
Press enter when you are asked for password, then set a root password for MySQL.
5. Run this command to make Apache start on system load:
systemctl start httpd.service
systemctl enable httpd.service
6. Run this command to make sure MySQL always runs on system load:
systemctl enable mysqld.service
7. Enter an exception into your Server Firewall by running this command:
/usr/bin/system-config-firewall
The firewall wizard is pretty straight forward, but you can find some screenshots on how to work the Firewall Wizard HERE. At the very least, you want to enable access for the following Services:
- FTP
- IMAP over SSL
- Mail (SMTP
- POP-3 over SSL
- Secure WWW (HTTPS)
- SSH
- WWW (HTTP)
If you are on Ubuntu or LinuxMint or other Debian Distros it's even easier, but there is no YUM to use. Instead you will have to use "apt-get". The Advanced Packaging Tool, or APT, is a free user interface that works with core libraries to handle the installation and removal of software on the Debian GNU/Linux distribution and its variants. Take the following steps instead:
1. Install and run tasksel:
sudo apt-get install tasksel
sudo tasksel
2. You will be prompted with a software selection wizard. Select "LAMP Server" and hit Ok to install.
3. When prompted for MySQL password, enter a password for it and hit "OK".
4. Restart Apache to finish:
sudo /etc/init.d/apache2 restart
5. Configure your firewall as before.
That's all it takes! No manual configuration, no back and forth testing the integration of Apache, MySQL and PHP, it configures it all. Enjoy!
Pete Soheil
DigiOz Multimedia, Inc.
www.digioz.com
I am presented with a screen to install various software after typing sudo tasksel into a Terminal.
ReplyDeleteI select Lamp server, I then have to tab for the OK. Then I'm returned to the Terminal and nothing is installed.
Hello Robert,
ReplyDeleteCan you post a screenshot of the various screens on our Forum at http://www.digioz.com/forum/? I will be happy to help you further as much as I can.
Great post thanks...
ReplyDeleteThese might help others..
install Lamp on linux mint 13
install Lamp on ubuntu 12.04
install Lamp on Centos 6
Good links. Thank you krizna.
ReplyDeleteAnyone who thinks that trying to install software via a command line is "easy" is deluding themselves.
ReplyDeleteThere are millions of humans out there that would really appreciate a GUI based install for a Linux web server. For some sick reason Linux people think that typing obscure incomprehensible white text into a little black box is somehow is intuitive. It must be some special mental defect that affects them.
20 years ago Redhat would install all of the GUI tools and servers at install and by using their admin tools you could confirm their versions and that they were installed. You could start and stop without memorizing a single command.
Note that I said its "easier" not "easy". It sounds like you are not a fan of command line, which is fine. However, this is meant to show how it is done using command line. I am sure there are other ways to accomplish the same thing through GUI.
Delete