LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   How I installed LAMP & then Drupal 7.7 on my Slackware 13.37 system. (http://www.linuxquestions.org/questions/slackware-14/how-i-installed-lamp-and-then-drupal-7-7-on-my-slackware-13-37-system-899809/)

Robert.Thompson 08-27-2011 11:36 AM

How I installed LAMP & then Drupal 7.7 on my Slackware 13.37 system.
 
Moderator: Please move or delete this post if it is inappropriate for this forum.

NB: I am an inexperienced Slackware user and I know even less about Apache, Mysql & php.

I finally was able to install Drupal 7.7 on my Slackware 13.37 PC. Note: When I installed Slackware, I did a full, complete install.

I was unable to get any where when I tried to install XAMPP from www.apachefriends.org but that is probably because I don’t know what I am doing – a real newbie to linux etc.

So, I followed a link to manually set up LAMP on my PC and then another link to install Drupal 7.7.

I did have to do things a little differently at certain points.

Here is how I did it:

To manually install LAMP, I followed this link: http://www.linuxquestions.org/questi...12-2-a-693708/... to the point where it says: “#### install phpMyAdmin 3.1.1”.

At this point, I went to Slackbuilds.org and downloaded and installed ‘phpmyadmin’.

I did not do any of the steps following ‘#### install phpMyAdmin 3.1.1’ - I do not know if I should have or not. I just assumed that using the Slackbuild took care of all that was required – and, I could be very wrong.

Next, I followed this link to install Drupal 7.7:
http://www.basicconfig.com/linuxsoft...linux-tutorial

At the point where the tutorial say to do this:

root@slackware:/var/www/htdocs/testdrupal# mv sites/default/default.settings.php sites/default/settings.php
I had to use the linux copy command (cp) instead of mv. So, I did:

root@slackware:/var/www/htdocs/testdrupal# cp sites/default/default.settings.php sites/default/settings.php
It seems that the Drupal 7.7 installer requires that the original ‘default.settings.php’ file to exist as well.

At the point where the tutotial says to add the following lines to the httpd.conf file:
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
I got errors, so I removed the lines, i.e. I did not add them to the httpd.conf file.

I then followed the rest of the tutorial and was successful in installing Drupal 7.7.

I cannot attest to the 'correctness' of what I did as I simply do not know.

HTH,

Hannes Worst 08-27-2011 12:59 PM

I am glad you've got it working. Congratulations!

Robert.Thompson 08-27-2011 03:29 PM

Fixed the links for LAMP & Drupal tutorials.

wildwizard 08-28-2011 02:22 AM

Here is my simple routine for setting up the LAMP system on a full install of Slackware (assuming 13.37 or current)

As root of course :-
1. Setup mysql

# mysql_install_db --user=mysql
# cp /etc/my-small.cnf /etc/my.cnf
# chmod a+x /etc/rc.d/rc.mysqld
# /etc/rc.d/rc.mysqld start
# mysqladmin -u root password 'new-password'

2. Setup apache
# chmod a+x /etc/rc.d/rc.httpd
# editor-of-choice /etc/httpd/httpd.conf
-> Uncomment this line "#Include /etc/httpd/mod_php.conf"
-> Uncomment & configure this line "#ServerName www.example.com:80"
-> Append index.php to this line "DirectoryIndex index.html"
# /etc/rc.d/rc.httpd start

3. For drupal installation
# mv /var/www/htdocs /var/www/htdocs-dist
# mkdir /var/www/htdocs
-> extract drupal to /var/www/htdocs
# chown apache.apache -R /var/www/htdocs
# mysqladmin -p create drupal-database-name
-> Point web browser at http://localhost/install.php
-> Follow drupal install instructions in web browser

NB Items in red need user input for what they should be.

wildwizard 08-28-2011 03:16 AM

Extra features enableing drupals .htaccess file

edit /etc/httpd/httpd.conf

and go to line 216 and change
AllowOverride None
to
AllowOverride All

Robert.Thompson 08-28-2011 07:29 AM

Quote:

Originally Posted by wildwizard (Post 4455290)
Extra features enableing drupals .htaccess file

edit /etc/httpd/httpd.conf

and go to line 216 and change
AllowOverride None
to
AllowOverride All

wildwizard, thanks for the posts! :)

SeRi@lDiE 08-28-2011 09:22 AM

Robert,

I would harden as much as I can a LAMP setup. If you dont know what you are doing they can be very burnable to exploits and if you have it facing to the public it wont be long before you get hacked.

Please finish the phpmyadmin install by going to http://localhost/phpmyadmin given that you have phpmyadmin in your web srv root dir. If you leave it without finishing the setup you will get hack 100% guaranteed. disable dir listing, I would be careful with AllowOverride, understand your options and what you are doing with your srv... learn how to apply patches and keep up with them specially in php/drupal/mysql.

My 2 centavos:

Do not become like most of the people out there I called them robots because all they do is just copy and paste what they read in a forum, blog, tutorial and they do not understand what they are doing all they care and know is that it worked.
Please take the time and learn.

Dont become a victim.

Take Care.

mRgOBLIN 08-28-2011 07:09 PM

@ SeRi@lDiE,

++
Good advice =)

Robert.Thompson 08-29-2011 11:59 AM

Quote:

Originally Posted by SeRi@lDiE (Post 4455426)
Robert,

I would harden as much as I can a LAMP setup. If you dont know what you are doing they can be very burnable to exploits and if you have it facing to the public it wont be long before you get hacked.

Please finish the phpmyadmin install by going to http://localhost/phpmyadmin given that you have phpmyadmin in your web srv root dir. If you leave it without finishing the setup you will get hack 100% guaranteed. disable dir listing, I would be careful with AllowOverride, understand your options and what you are doing with your srv... learn how to apply patches and keep up with them specially in php/drupal/mysql.

My 2 centavos:

Do not become like most of the people out there I called them robots because all they do is just copy and paste what they read in a forum, blog, tutorial and they do not understand what they are doing all they care and know is that it worked.
Please take the time and learn.

Dont become a victim.

Take Care.

Hi SeRi@lDiE:

In this case, I am most certainly a 'robot'.

I do not see a option to 'disable dir listing' in the phpmyadmin menu system - is there a different terminology?

Thanks,

(a victim in-waiting)

SeRi@lDiE 08-29-2011 12:37 PM

Robert,

To disable dir listing you have to edit your httpd.conf

http://httpd.apache.org/docs/1.3/misc/FAQ.html#indexes

Code:

How do I turn automatic directory listings on or off?
If a client requests a URL that designates a directory and the directory does not contain a filename that matches the DirectoryIndex directive, then mod_autoindex can be configured to present a listing of the directory contents.

To turn on automatic directory indexing, find the Options directive that applies to the directory and add the Indexes keyword. For example:

<Directory /path/to/directory>
  Options +Indexes
</Directory>
To turn off automatic directory indexing, remove the Indexes keyword from the appropriate Options line. To turn off directory listing for a particular subdirectory, you can use Options -Indexes. For example:

<Directory /path/to/directory>
  Options -Indexes
</Directory>

By the way phpmyadmin is really not need it unless you need a gui/web page interface to manage your mysql instances or create new DB's etc....
phpmyadmin by no means is used to work or configure apache.
Just thought I let you know.

Robert.Thompson 08-30-2011 08:52 AM

Quote:

Originally Posted by SeRi@lDiE (Post 4456282)
Robert,

To disable dir listing you have to edit your httpd.conf

http://httpd.apache.org/docs/1.3/misc/FAQ.html#indexes

Code:

How do I turn automatic directory listings on or off?
If a client requests a URL that designates a directory and the directory does not contain a filename that matches the DirectoryIndex directive, then mod_autoindex can be configured to present a listing of the directory contents.

To turn on automatic directory indexing, find the Options directive that applies to the directory and add the Indexes keyword. For example:

<Directory /path/to/directory>
  Options +Indexes
</Directory>
To turn off automatic directory indexing, remove the Indexes keyword from the appropriate Options line. To turn off directory listing for a particular subdirectory, you can use Options -Indexes. For example:

<Directory /path/to/directory>
  Options -Indexes
</Directory>

By the way phpmyadmin is really not need it unless you need a gui/web page interface to manage your mysql instances or create new DB's etc....
phpmyadmin by no means is used to work or configure apache.
Just thought I let you know.

Hi SeRi@lDiE:

My httpd.conf does not contain the lines that you have indicated, i.e. there is neither 'Options -Indexes' nor 'Options +Indexes'.

Should I just add 'Options -Indexes' to the area started by:
DocumentRoot "/srv/httpd/htdocs"

or should it be placed somewhere else?

Thanks,

SeRi@lDiE 08-30-2011 09:23 AM

Robert,

All httpd.conf files have it by default.

root@oscuridad:~# cat /etc/httpd/httpd.conf | grep Indexes
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
Options -Indexes FollowSymLinks
root@oscuridad:~#

Just do a search on your httpd.conf file for "Indexes"

Robert.Thompson 08-30-2011 09:36 AM

Quote:

Originally Posted by SeRi@lDiE (Post 4457078)
Robert,

All httpd.conf files have it by default.

root@oscuridad:~# cat /etc/httpd/httpd.conf | grep Indexes
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
Options -Indexes FollowSymLinks
root@oscuridad:~#

Just do a search on your httpd.conf file for "Indexes"

Sorry SeRi@lDiE, I when I saw 'FollowSymLinks' on the same line, I thought that I was not in the correct place.

I added '-' to the word 'Indexes.

Thank you! :)


All times are GMT -5. The time now is 03:04 PM.