LAMP is an acronym which stands for Linux, Apache, MySQL and PHP. The letter P also stands for Perl and Python programming languages. LAMP is a free software stack which powers, primarily, web servers. Most GNU/Linux distributions bundle these packages in the install media and repositories. Let us take a look at how to install LAMP using Fedora. I will restrict the P in LAMP to PHP only for this article. Perl and Python fans, bear with me.
While installing Fedora you can choose to install “Web Sever” which contains these packages. You can install them later also. Let me walk you through the actual steps to get LAMP working on your computer. I assume you are running Fedora 13 on your computer with graphical user interface. If you have CLI then the software which we use to connect with server is called PuTTy will be different other things will be same.
1. Launch the terminal by clicking
GUI users
Applications > System Tools > Terminal
CLI Users
Just connect to your server via SSH using PuTTy
2. Switch to SU (Super User) mode. You will be required root password for it.
su - (Press Enter)
Enter Password: (enter your root password here then press Enter key)
3. Check if Apache HTTP Server, php and mysql is installed already
rpm -q httpd rpm -q php rpm -q mysql
If you see the package names httpd-x.x.x-x, php-x.x.x-x and mysql-x.x.x-x. It means Apache web server, php and MySQL is already installed on your machine. If it is not you can install it using yum command. I'll tell you how to install it in few moments.
4. Now install the necessary packages on machine using YUM
yum install httpd php php-pdo php-mysql php-gd mysql mysql-server
The YUM PACKAGE MANAGEMENT TOOL resolves dependencies and displays the packages that are available for installation with their version numbers, architectures and repository details. You can choose to say YES or NO when it asks for your confirmation to proceed. If you choose YES, yum downloads the necessary packages and installs them for you. You can sit back and relax for a while until all the packages are installed on your machine. If some of the packages are already installed on your machine then yum will skip them or if installed packages are outdated then yum will upgrade them automatically.
5. After successful installation of packages you must start the services in order to use them.
service mysqld start
service httpd start
6. You can set these services to start when your machine boot using the chkconfig command.
chkconfig httpd on
chkconfig mysqld on
To print the list of services with the runlevel information type the following command in terminal.
chkconfig --list
Runlevel 5 is the technical name for graphical multiuser mode and runlevel 3 for command line multiuser mode on Red Hat like systems. Check if mysqld and httpd are set to runlevel 3 and 5. Alternatively you can use the graphical tool ntsysv to start or stop services at system start-up.
ntsysv --level 5
ntsysv --level 3
PHP runs as an apache HTTP server module. PHP starts when httpd starts.
7. Verify the LAMP installation. Open up your web browser.
GUI users type http://lcoalhost/ and CLI users type http://your_server_ip/ If you see the Fedora Test page you have done everything correctly.
CONGRATULATIONS and PAT on your back.
The default document root for apache server is “/var/www/html/” directory. Place your HTML and php scripts in “/var/www/html/” and view them in action on your web browser by typing http://lcoalhost/. You can change the document root and even run multiple websites simultaneously using name-based-virtual-hosts.
The phpinfo() function in the php scripting language is very useful and prints important information about the LAMP stack. In terminal/putty type the following command to open up text editor to create a test file.
nano /var/www/html/test.php
And paste following lines in it.
<?php phpinfo(); ?>
Now save the file and point your web browser to http://localhost/test.php (GUI Users) http://your_server_ip/test.php (CLI Users)
By default MySQL’s root password is set to blank. Which is total risky. You’d change it. Type the following command in terminal.
mysql -u root -p
The screen looks something like;
[root@localhost test]# mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 60 Server version: 5.0.45 Source distribution Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql>
In the MySQL client (where you see “mysql>” before the blinking cursor), use the below SQL to change the root password.
SET PASSWORD FOR 'root'@'localhost' = password('newpassword');
8. Install phpmyadmin for managing databases from your web browser graphically. Type the following command in Terminal;
yum install phpmyadmin system-config-httpd
Once phpmyadmin installed you can open it by pointing your web browser to http://localhost/phpmyadmin/
Now your server is fully prepared.
Enjoy



















[...] LAMP Server or any other server solution. I recommend LAMP Server [...]
[...] That’s It. If you are looking for LAMP installation on Fedora / RHEL / CentOS then follow this link. asd ddd s d affasd dsafds About the [...]
[...] NO. That’s It. If you are looking for LAMP installation on Fedora / RHEL / CentOS then follow this link. About the [...]