To install LAMP in your jaunty or infact any linux distro...these steps may come in handy. But i suggest you go through the entire process before you start working on them as this might give you a better insight on getting LAMP installed efficiently
Steps for installing LAMP
sudo apt-get install apache2
sudo apt-get install php5
sudo apt-get install mysql-server
Note this could cause problems such as
roshan@roshan:~$ sudo apt-get install mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libclucene0ldbl libgtkhtml3.8-15 libqt4-opengl kdebase-runtime-data-common
postfix mysql-gui-tools-common librasqal1 kdelibs5-data libao2
libstreamanalyzer0 cdrdao bsd-mailx libstreams0 mailx portmap
kdebase-runtime-data
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
libdbd-mysql-perl libdbi-perl libnet-daemon-perl libplrpc-perl
mysql-client-5.0 mysql-server-5.0 mysql-server-core-5.0
Suggested packages:
dbishell mysql-doc-5.0 tinyca
The following NEW packages will be installed:
libdbd-mysql-perl libdbi-perl libnet-daemon-perl libplrpc-perl
mysql-client-5.0 mysql-server mysql-server-5.0 mysql-server-core-5.0
0 upgraded, 8 newly installed, 0 to remove and 2 not upgraded.
Need to get 0B/35.8MB of archives.
After this operation, 110MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Preconfiguring packages ...
Selecting previously deselected package libnet-daemon-perl.
(Reading database ... 184316 files and directories currently installed.)
Unpacking libnet-daemon-perl (from .../libnet-daemon-perl_0.43-1_all.deb) ...
Selecting previously deselected package libplrpc-perl.
Unpacking libplrpc-perl (from .../libplrpc-perl_0.2020-1_all.deb) ...
Selecting previously deselected package libdbi-perl.
Unpacking libdbi-perl (from .../libdbi-perl_1.607-1_i386.deb) ...
Selecting previously deselected package libdbd-mysql-perl.
Unpacking libdbd-mysql-perl (from .../libdbd-mysql-perl_4.008-1_i386.deb) ...
Selecting previously deselected package mysql-client-5.0.
Unpacking mysql-client-5.0 (from .../mysql-client-5.0_5.1.30really5.0.75-0ubuntu10.2_i386.deb) ...
Selecting previously deselected package mysql-server-core-5.0.
Unpacking mysql-server-core-5.0 (from .../mysql-server-core-5.0_5.1.30really5.0.75-0ubuntu10.2_i386.deb) ...
Unpacking mysql-server-5.0 (from .../mysql-server-5.0_5.1.30really5.0.75-0ubuntu10.2_i386.deb) ...
Aborting downgrade from (at least) 5.1 to 5.0.
dpkg: error processing /var/cache/apt/archives/mysql-server-5.0_5.1.30really5.0.75-0ubuntu10.2_i386.deb (--unpack):
subprocess pre-installation script returned error exit status 1
Selecting previously deselected package mysql-server.
Unpacking mysql-server (from .../mysql-server_5.1.30really5.0.75-0ubuntu10.2_all.deb) ...
* Stopping MySQL database server mysqld [ OK ]
Processing triggers for man-db ...
Errors were encountered while processing:
/var/cache/apt/archives/mysql-server-5.0_5.1.30really5.0.75-0ubuntu10.2_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Its a serious downgrade problem:
After running the above command:
sudo rm -rf /var/lib/mysql
sudo apt-get install mysql-server-5.0
sudo apt-get install libapache2-mod-auth-mysql
sudo apt-get install php5-mysql
sudo apt-get install phpmyadmin
Now, after the installation is finished, we will check this, whether already installed correctly or not. Checking is as follows :
1. Restart your apache server : sudo /etc/init.d/apache2 restart
2. Check the apache service via the browser, type the following address : http://localhost
3. Check PHP whether the services are integrated correctly or not. This can be done by creating an index.php file in /var/www /. The program to be put into this file is:
Save, and open the browser and run http://localhost/index.php
If you get an output which contains the version of PHP your are using in a somewhat purple colored background..then PHP is working
4. Check Mysql whether the services are integrated with PHP or not. Create any file with .php file extension in /var/www/. The program is:
After saving, open the file in the browser as http://localhost/filename.php.
If successful, then a post appears which indicates that PHP and Mysql are integrated successfully0. If any posts appear to fail, then the PHP and Mysql has not been properly integrated.
5.Check phpmyadmin (optional) whether or not already running. Go to the following address in the browser:
http://localhost/phpmyadmin
Enter root for the user, while the password does not need to fill in, because the default password Mysql installation has not been set, so do not need a password. If successful the log, phpmyadmin already installed correctly.
If you still encounter some problems...drop in here as your comments....We'll sort it out
No comments:
Post a Comment