LAMPPD-Linux-Apache-MySQL-PHP-phpMyAdmin-Drupal-Installation-Tutorial

Submitted by admin on Fri, 12/03/2010 - 05:08

This is to help people setup and install a LAMPPD (Linux-Apache-MySQL-PHP-phpMyAdmin-Drupal) server in Ubuntu or other Linux distro, including Apache 2, PHP 5 (optionally PHP 4 in Ubuntu 10.10 and lower), and MySQL 4.1 or 5.0.

  1. sudo apt-get install lampserver^
    OR
    sudo apt-get install php5 mysql-server apache2
    OR
    sudo tasksel install lamp-server
  2. sudo apt-get install phpmyadmin
  3. echo "ServerName localhost" | sudo tee /etc/apache2/conf.d/fqdn
  4. Copy the default website as a starting point. sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/mysite
  5. sudo gedit /etc/apache2/sites-available/mysite
  6. Change DocumentRoot from /var/www to new location /home/user/public_html/
  7. Change the Directory directive, replace <Directory /var/www/>  to <Directory /home/user/public_html/>
  8. Now, we must deactivate the old site, and activate our new one. Ubuntu provides two small utilities that take care of this a2ensite (apache2enable site) and a2dissite (apache2disable site).
    then run: sudo a2dissite default && sudo a2ensite mysite
    then restart apache: sudo /etc/init.d/apache2 restart
  9. If you have not created /home/user/public_html/, you will receive an warning message
    To test the new site, create a file in /home/user/public_html/
    echo '<b>Hello! It is working!</b>' > /home/user/public_html/index.html
    Finally, browse to http://localhost/
  10. gksudo "gedit /etc/mysql/my.cnf"
    and change the line
    bind-address           = localhost
  11. set mysql root password: mysql -u root -p (if you had set root password at the time of phpmyadmin installation then write that or if no any password then just hit Enter)
  12. mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('yourpassword');
  13. [Create a mysql database] mysql> CREATE DATABASE database1;
  14. [Create a mysql user] mysql> GRANT ALL PRIVILEGES ON *.* TO 'yourusername'@'localhost' IDENTIFIED BY 'yourpassword' WITH GRANT OPTION;
  15. [For creating a new user with fewer privileges (should work for most web applications) which can only use the database named "database1", at mysql prompt type:]
    mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON database1.* TO 'yourusername'@'localhost' IDENTIFIED BY 'yourpassword';
  16. If you get a 404 error upon visiting http://localhost/phpmyadmin  You will need to configure apache2.conf to work with Phpmyadmin.
    sudo gedit /etc/apache2/apache2.conf
    Include the following line at the bottom of the file, save and quit.
    Include /etc/phpmyadmin/apache.conf
  17. (a) i done this
    sudo mkdir /usr/lib/php5/ext
    /usr/lib/php5/20090626
    -Copy the extension file to the new directory
    $ sudo cp /usr/lib/php5/20090626/mysql.so /usr/lib/php5/ext/mysql.so
    $ sudo cp /usr/lib/php5/20090626/mysqli.so /usr/lib/php5/ext/mysqli.so

    Run, Stop, Test, And Restart Apache
    $ sudo /usr/sbin/apache2ctl start
    $ sudo /usr/sbin/apache2ctl stop
    $ sudo /usr/sbin/apache2ctl configtest
    $ sudo /usr/sbin/apache2ctl restart

    OR

    10) Edit PHP Configuration to Work With MYSQL (Ubuntu Dapper)

    In Dapper Drake, "extension=mysql.so" and "extension=mysqli.so" are enabled in the php.ini file out-of-the-box. However, sometimes php is not looking for those files in the right directory. You have then to move your files or modify the php.ini configuration.

    * First solution

    locate the directory where the extension files are placed
     locate mysql.so
    (change mysql.so in mysqli.so if you want to install the mysqli functions)
    -then modify the php.ini file to indicate the right place for the extension directory
    $ gksudo "gedit /etc/php4/apache2/php.ini"

    or if you are using php5

    $ gksudo "gedit /etc/php5/apache2/php.ini"
    Look for the 'extension_dir' property, and set it to the directory where you found the mysql(i).so file
        * extension_dir= "/usr/lib/php5/20051025/"
    Restart apache, and test if your mysql(i) functions are working.

    * Second solution

    -locate the directory where the extension files are placed

     locate mysql.so
    (change mysql.so in mysqli.so if you want to install the mysqli functions)
    Let's say that you found the file in '/usr/lib/php5/20051025/'
    -then check in the php.ini file for the extension directory

    $ gksudo "gedit /etc/php4/apache2/php.ini"
    or if you are using php5

    $ gksudo "gedit /etc/php5/apache2/php.ini"
    Look for the 'extension_dir' property. It should be by default '/usr/lib/php5/ext'. If it's not, change it for this value.

    -Now create the default directory for extensions
    $ sudo mkdir /usr/lib/php5/ext

    -Copy the extension file to the new directory
    $ sudo cp /usr/lib/php5/20051025/mysql.so /usr/lib/php5/ext/mysql.so

    Change the first path to the one you found with the locate function, and change mysql.so into mysqli.so if you want to use mysqli functions.
    -Restart apache (see below), and test if your mysql(i) functions are working.

    Run, Stop, Test, And Restart Apache

    Use the following command to run Apache
    $ sudo /usr/sbin/apache2ctl start

    To stop it, use
    $ sudo /usr/sbin/apache2ctl stop

    To test configuration changes, use
    $ sudo /usr/sbin/apache2ctl configtest

    Finally, to restart it, run
    $ sudo /usr/sbin/apache2ctl restart
     

Drupal Installation :

  1. ubuntu@ubuntu-desktop:~$ mkdir drupal
  2. ubuntu@ubuntu-desktop:~$ cd drupal/
  3. ubuntu@ubuntu-desktop:~/drupal$ wget http://ftp.drupal.org/files/projects/drupal-6.19.tar.gz
  4. ubuntu@ubuntu-desktop:~/drupal$ tar -zxvf drupal*
  5. ubuntu@ubuntu-desktop:~/drupal$ mv drupal-6.19 /home/user/public_html/
  6. ubuntu@ubuntu-desktop:~/drupal$ cd /home/user/public_html/drupal-6.19/
  7. ubuntu@ubuntu-desktop:~/public_html/drupal-6.19$ sudo cp sites/default/default.settings.php /home/user/public_html/drupal-6.19/sites/default/settings.php
  8. ubuntu@ubuntu-desktop:~/public_html/drupal-6.19$ sudo /etc/init.d/apache2 restart
  9. ubuntu@ubuntu-desktop:~/public_html/drupal-6.19$ sudo chmod o+w sites/default/settings.php
  10. ubuntu@ubuntu-desktop:~/public_html/drupal-6.19$ sudo chmod o+w sites/default
  11. ubuntu@ubuntu-desktop:~/public_html/drupal-6.19$ sudo mkdir sites/default/files
  12. ubuntu@ubuntu-desktop:~/public_html/drupal-6.19$ sudo chmod o+w sites/default/files
  13. ubuntu@ubuntu-desktop:~/public_html/drupal-6.19$ mysql -u root -p
  14. Enter Password: ****
  15. mysql> CREATE DATABASE drupal;
  16. mysql> CREATE USER 'drupal'@localhost IDENTIFIED BY 'password';
  17. mysql> GRANT ALL ON *.* TO 'drupal'@'localhost';
  18. mysql> exit
  19. ubuntu@ubuntu-desktop:~/public_html/drupal-6.19$ sudo service mysql restart
  20. go to browser type this URL: http://localhost/drupal-6.19/
  21. Install Drupal in English
  22. type database name, username, Password click Continue
  23. ubuntu@ubuntu-desktop:~/public_html/drupal-6.19$ sudo chmod o-w sites/default/settings.php
  24. Site name: , Site e-mail address: , Username: , Password: , Enable Clean URL then Click on Continue.
  25. Bingo Your Site Finally ready!

63 comments

An impressive share, I simply

Submitted by paulhorzi (not verified) on Tue, 11/15/2011 - 09:07.

An impressive share, I simply given this onto a colleague who was doing somewhat evaluation on this. And he in reality purchased me breakfast because I found it for him.. smile. So let me reword that: Thnx for the treat! But yeah Thnkx for spending the time to debate this, I really feel strongly about it and love reading extra on this topic. If potential, as you become experience, would you thoughts updating your weblog with extra details? It is extremely useful for me. Huge thumb up for this weblog put up!

Nice post. I be taught one

Submitted by paulhorzi (not verified) on Tue, 11/15/2011 - 06:07.

Nice post. I be taught one thing more difficult on different blogs everyday. It'll always be stimulating to read content material from different writers and follow just a little something from their store. I’d prefer to use some with the content material on my weblog whether you don’t mind. Natually I’ll provide you with a hyperlink in your net blog. Thanks for sharing.

After examine a number of of

Submitted by arlenebwg (not verified) on Sat, 11/12/2011 - 16:48.

After examine a number of of the weblog posts in your web site now, and I really like your way of blogging. I bookmarked it to my bookmark website record and will likely be checking again soon. Pls try my web page as nicely and let me know what you think.

The subsequent time I read a

Submitted by paulhorzi (not verified) on Fri, 11/11/2011 - 20:19.

The subsequent time I read a blog, I hope that it doesnt disappoint me as much as this one. I imply, I do know it was my option to learn, however I really thought youd have one thing fascinating to say. All I hear is a bunch of whining about one thing that you might repair in case you werent too busy on the lookout for attention.

Nice post. I be taught

Submitted by philipbxn (not verified) on Sun, 11/06/2011 - 05:41.

Nice post. I be taught something more difficult on different blogs everyday. It would at all times be stimulating to read content from different writers and apply somewhat something from their store. I’d favor to use some with the content on my weblog whether you don’t mind. Natually I’ll provide you with a hyperlink on your net blog. Thanks for sharing.

That is the precise weblog

Submitted by philipbxn (not verified) on Fri, 11/04/2011 - 23:13.

That is the precise weblog for anybody who desires to search out out about this topic. You notice so much its nearly arduous to argue with you (not that I truly would need…HaHa). You positively put a new spin on a topic thats been written about for years. Great stuff, just nice!

You made some decent factors

Submitted by philipbxn (not verified) on Fri, 11/04/2011 - 20:58.

You made some decent factors there. I regarded on the internet for the difficulty and found most people will go along with along with your website.

I’d must examine with you

Submitted by philipbxn (not verified) on Fri, 11/04/2011 - 18:57.

I’d must examine with you here. Which isn't something I often do! I enjoy reading a post that will make individuals think. Additionally, thanks for permitting me to comment!

This is the proper weblog for

Submitted by paulhorzi (not verified) on Fri, 11/04/2011 - 18:11.

This is the proper weblog for anybody who needs to find out about this topic. You understand a lot its almost onerous to argue with you (not that I really would want…HaHa). You undoubtedly put a brand new spin on a subject thats been written about for years. Great stuff, just nice!

I found your weblog website

Submitted by paulhorzi (not verified) on Wed, 11/02/2011 - 10:01.

I found your weblog website on google and verify a couple of of your early posts. Proceed to keep up the very good operate. I simply further up your RSS feed to my MSN News Reader. Searching for forward to reading more from you later on!

very good put up, i actually

Submitted by arlenebwg (not verified) on Wed, 11/02/2011 - 09:32.

very good put up, i actually love this web site, carry on it

Aw, this was a really nice

Submitted by arlenebwg (not verified) on Fri, 10/28/2011 - 09:16.

Aw, this was a really nice post. In concept I wish to put in writing like this moreover – taking time and actual effort to make an excellent article… however what can I say… I procrastinate alot and certainly not seem to get one thing done.

Oh my goodness! an amazing

Submitted by arlenebwg (not verified) on Fri, 10/28/2011 - 05:09.

Oh my goodness! an amazing article dude. Thank you Nonetheless I am experiencing difficulty with ur rss . Don’t know why Unable to subscribe to it. Is there anyone getting equivalent rss problem? Anyone who is aware of kindly respond. Thnkx

Would you be occupied with

Submitted by arlenebwg (not verified) on Mon, 10/24/2011 - 06:38.

Would you be occupied with exchanging hyperlinks?

Nice post. I study something

Submitted by philipbxn (not verified) on Sun, 10/23/2011 - 03:31.

Nice post. I study something more difficult on different blogs everyday. It should at all times be stimulating to read content material from different writers and practice somewhat one thing from their blog.

I’m impressed, I must say.

Submitted by philipbxn (not verified) on Sun, 10/23/2011 - 03:08.

I’m impressed, I must say. Really hardly ever do I encounter a weblog that’s both educative and entertaining, and let me let you know, you might have hit the nail on the head. Your idea is excellent; the difficulty is one thing that not enough individuals are talking intelligently about. I'm very completely satisfied that I stumbled throughout this in my seek for one thing referring to this.

There are some interesting

Submitted by paulhorzi (not verified) on Sun, 10/23/2011 - 02:21.

There are some interesting points in time in this article but I don’t know if I see all of them middle to heart. There is some validity however I'll take maintain opinion until I look into it further. Good article , thanks and we want more!

I used to be more than happy

Submitted by paulhorzi (not verified) on Fri, 10/21/2011 - 21:57.

I used to be more than happy to find this web-site.I wished to thanks in your time for this wonderful read!! I positively having fun with each little little bit of it and I've you bookmarked to check out new stuff you weblog post.

Oh my goodness! a tremendous

Submitted by philipbxn (not verified) on Thu, 10/20/2011 - 07:50.

Oh my goodness! a tremendous article dude. Thanks However I am experiencing concern with ur rss . Don’t know why Unable to subscribe to it. Is there anyone getting an identical rss drawback? Anybody who is aware of kindly respond. Thnkx

Would you be thinking about

Submitted by arlenebwg (not verified) on Thu, 10/20/2011 - 06:07.

Would you be thinking about exchanging hyperlinks?

This actually answered my

Submitted by paulhorzi (not verified) on Thu, 10/20/2011 - 05:47.

This actually answered my downside, thanks!

I found your weblog website

Submitted by paulhorzi (not verified) on Wed, 10/19/2011 - 21:48.

I found your weblog website on google and test a few of your early posts. Proceed to maintain up the very good operate. I just additional up your RSS feed to my MSN Information Reader. Seeking ahead to studying extra from you afterward!

Howdy! I just want to give an

Submitted by paulhorzi (not verified) on Mon, 10/17/2011 - 18:51.

Howdy! I just want to give an enormous thumbs up for the great data you've gotten right here on this post. I will probably be coming back to your weblog for more soon.

Aw, this was a very nice

Submitted by philipbxn (not verified) on Sun, 10/16/2011 - 22:06.

Aw, this was a very nice post. In idea I would like to put in writing like this moreover – taking time and precise effort to make a very good article… however what can I say… I procrastinate alot and under no circumstances seem to get one thing done.

Good day! I simply would like

Submitted by paulhorzi (not verified) on Sun, 10/16/2011 - 09:13.

Good day! I simply would like to give a huge thumbs up for the great info you may have here on this post. I will be coming again to your weblog for more soon.

This is the suitable blog for

Submitted by philipbxn (not verified) on Sat, 10/15/2011 - 21:28.

This is the suitable blog for anybody who desires to find out about this topic. You understand so much its virtually arduous to argue with you (not that I actually would want…HaHa). You undoubtedly put a new spin on a topic thats been written about for years. Nice stuff, just nice!

you've gotten an awesome

Submitted by paulhorzi (not verified) on Sat, 10/15/2011 - 01:15.

you've gotten an awesome weblog right here!

Good post. I study one thing

Submitted by philipbxn (not verified) on Fri, 10/14/2011 - 23:10.

Good post. I study one thing tougher on totally different blogs everyday. It can all the time be stimulating to learn content from other writers and apply just a little one thing from their store. I’d choose to make use of some with the content material on my weblog whether or not you don’t mind. Natually I’ll give you a link on your net blog. Thanks for sharing.

This is the appropriate blog

Submitted by paulhorzi (not verified) on Tue, 10/11/2011 - 08:20.

This is the appropriate blog for anybody who needs to seek out out about this topic. You realize a lot its virtually exhausting to argue with you (not that I truly would want…HaHa). You positively put a brand new spin on a subject thats been written about for years. Nice stuff, simply great!

After study a couple of of

Submitted by philipbxn (not verified) on Tue, 10/11/2011 - 06:18.

After study a couple of of the weblog posts in your web site now, and I really like your manner of blogging. I bookmarked it to my bookmark website checklist and will likely be checking again soon.

A formidable share, I simply

Submitted by philipbxn (not verified) on Tue, 10/11/2011 - 05:56.

A formidable share, I simply given this onto a colleague who was doing a bit of evaluation on this. And he in truth bought me breakfast as a result of I found it for him.. smile. So let me reword that: Thnx for the treat! But yeah Thnkx for spending the time to discuss this, I feel strongly about it and love studying more on this topic. If potential, as you develop into experience, would you thoughts updating your blog with extra particulars? It's highly useful for me. Massive thumb up for this weblog publish!

It’s hard to seek out

Submitted by arlenebwg (not verified) on Sun, 10/09/2011 - 12:28.

It’s hard to seek out knowledgeable individuals on this subject, but you sound like you understand what you’re speaking about! Thanks

WONDERFUL Post.thanks for

Submitted by paulhorzi (not verified) on Fri, 10/07/2011 - 03:30.

WONDERFUL Post.thanks for share..more wait ..

I’d have to test with you

Submitted by philipbxn (not verified) on Thu, 10/06/2011 - 23:47.

I’d have to test with you here. Which is not something I usually do! I take pleasure in reading a submit that will make people think. Also, thanks for allowing me to comment!

It’s exhausting to find

Submitted by lisabenlh (not verified) on Thu, 10/06/2011 - 00:02.

It’s exhausting to find educated people on this subject, but you sound like you know what you’re talking about! Thanks

After I initially commented I

Submitted by lisabenlh (not verified) on Tue, 10/04/2011 - 15:07.

After I initially commented I clicked the -Notify me when new feedback are added- checkbox and now every time a comment is added I get 4 emails with the identical comment. Is there any manner you can take away me from that service? Thanks!

I’m impressed, I need to say.

Submitted by philipbxn (not verified) on Sun, 10/02/2011 - 15:29.

I’m impressed, I need to say. Actually not often do I encounter a weblog that’s each educative and entertaining, and let me tell you, you have got hit the nail on the head. Your thought is excellent; the issue is one thing that not sufficient individuals are talking intelligently about. I'm very comfortable that I stumbled across this in my seek for something regarding this.

Your place is valueble for

Submitted by arlenebwg (not verified) on Thu, 09/29/2011 - 10:48.

Your place is valueble for me. Thanks!

I am typically to blogging

Submitted by arlenebwg (not verified) on Thu, 09/29/2011 - 10:01.

I am typically to blogging and i really recognize your content. The article has really peaks my interest. I am going to bookmark your site and hold checking for new information.

Spot on with this write-up, I

Submitted by kristin18 (not verified) on Tue, 09/20/2011 - 14:28.

Spot on with this write-up, I actually suppose this website wants far more consideration. I’ll most likely be again to read far more, thanks for that info.

This is the precise blog for

Submitted by billiedkv (not verified) on Tue, 09/20/2011 - 10:48.

This is the precise blog for anybody who desires to seek out out about this topic. You notice so much its almost laborious to argue with you (not that I really would want…HaHa). You undoubtedly put a brand new spin on a subject thats been written about for years. Great stuff, just nice!

Spot on with this write-up, I

Submitted by kristin18 (not verified) on Tue, 09/20/2011 - 09:33.

Spot on with this write-up, I truly assume this web site wants way more consideration. I’ll probably be once more to learn much more, thanks for that info.

It’s hard to search out

Submitted by kristin18 (not verified) on Tue, 09/20/2011 - 08:01.

It’s hard to search out educated individuals on this matter, however you sound like you already know what you’re speaking about! Thanks

That is the fitting weblog

Submitted by billiedkv (not verified) on Thu, 09/15/2011 - 22:21.

That is the fitting weblog for anybody who desires to find out about this topic. You understand so much its virtually arduous to argue with you (not that I truly would need…HaHa). You positively put a brand new spin on a subject thats been written about for years. Nice stuff, just nice!

After study a couple of of

Submitted by billiedkv (not verified) on Thu, 09/15/2011 - 21:59.

After study a couple of of the weblog posts on your web site now, and I really like your manner of blogging. I bookmarked it to my bookmark website checklist and can be checking back soon. Pls try my web site as effectively and let me know what you think.

A powerful share, I simply

Submitted by kristin18 (not verified) on Thu, 09/15/2011 - 01:11.

A powerful share, I simply given this onto a colleague who was doing a bit of evaluation on this. And he in truth purchased me breakfast as a result of I found it for him.. smile. So let me reword that: Thnx for the deal with! However yeah Thnkx for spending the time to discuss this, I feel strongly about it and love reading extra on this topic. If potential, as you turn into expertise, would you mind updating your blog with extra particulars? It is extremely useful for me. Massive thumb up for this blog put up!

I’m impressed, I have to say.

Submitted by billiedkv (not verified) on Tue, 09/13/2011 - 05:15.

I’m impressed, I have to say. Actually not often do I encounter a blog that’s both educative and entertaining, and let me let you know, you have got hit the nail on the head. Your thought is excellent; the difficulty is something that not sufficient people are talking intelligently about. I am very happy that I stumbled across this in my seek for one thing regarding this.

The subsequent time I read a

Submitted by kristin18 (not verified) on Mon, 09/12/2011 - 14:19.

The subsequent time I read a weblog, I hope that it doesnt disappoint me as much as this one. I imply, I know it was my option to read, however I truly thought youd have something fascinating to say. All I hear is a bunch of whining about something that you can fix if you werent too busy searching for attention.

Can I just say what a relief

Submitted by billiedkv (not verified) on Sun, 09/11/2011 - 04:49.

Can I just say what a relief to seek out someone who truly knows what theyre speaking about on the internet. You positively know how you can carry an issue to mild and make it important. Extra people must learn this and perceive this side of the story. I cant imagine youre not more standard because you positively have the gift.

I’m impressed, I need to say.

Submitted by kristin18 (not verified) on Thu, 09/08/2011 - 12:50.

I’m impressed, I need to say. Really hardly ever do I encounter a weblog that’s each educative and entertaining, and let me let you know, you may have hit the nail on the head. Your thought is outstanding; the issue is one thing that not sufficient individuals are speaking intelligently about. I'm very completely happy that I stumbled throughout this in my seek for something relating to this.

Drupal theme by Kiwi Themes.