Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 13 Dec 2017, 22:06
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Unsorted
Apache/PHP/MySQL server package (alpha test)
Moderators: deshlab, Flash, GuestToo, Ian, JohnMurga, Lobster
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 2 [26 Posts]   Goto page: 1, 2 Next
Author Message
Nathan F


Joined: 08 Jun 2005
Posts: 1760
Location: Wadsworth, OH (occasionally home)

PostPosted: Sat 18 Mar 2006, 22:18    Post subject:  Apache/PHP/MySQL server package (alpha test)  

I know that there has already been a good deal of work done in this area but most of the projects fell a little short for my use, so I went ahead and compiled the big three of Apache/PHP/MySQL. This is an alpha package mainly for testers, and I'd rather not see anyone try and run a production server with it just yet. It installs as an alien package using PupGet. You will be prompted for s password for the mysql user during the installation, this is not the password that is used to administer mysql but only the password for the system user that the server runs as. The install will then create the user 'mysql' with no home directory and no login priviledges, for security reasons.

There is a relatively simple control panel interface included that allows for starting and stopping the server and a few administration tasks. You will need gxmessage installed on your system in order to use it. Gxmessage can be found on the dotpups wiki page. There will be an icon in /usr/local/apps that you can drag to the desktop for a shortcut to the control panel. Your web documents go in /root/htdocs. There will be no root password for MySQL by default and the database will be available via a network, so it's best to change that right away if you have any plans to use it on the public internet. You can set the password with:
Code:
/usr/local/mysql/bin/mysqladmin password new_password -p

Where 'new_password' is the password you want to use. There will be no password set at first so just hit return at the prompt.

One of the biggest problems I had with some of the other server packages was tha lack of GD support, which is an imaging library used by PHP. Without it PHP is partially crippled. This package has it enabled and can perform functions on png, gif, and jpeg images. I've successfully installed phpmyadmin and a phpBB using it with relatively little problem.

Still on the todo list is some documentation for it. I also want to beef up security a little bit more and add a few more options to the control panel for administering MySQL. The total installed size is around 27 megs.

New package with updated MySQL:
ftp://texasangel.org/pub/unleashed_packages/grafpup_lamp.tar.gz

Nathan

_________________
Bring on the locusts ...

Last edited by Nathan F on Fri 24 Mar 2006, 19:15; edited 1 time in total
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger 
Nathan F


Joined: 08 Jun 2005
Posts: 1760
Location: Wadsworth, OH (occasionally home)

PostPosted: Sun 19 Mar 2006, 01:20    Post subject:  

A couple wrinkles here. MySQL also depends on libstdc++.so.6, so you will also need that library (which is also available in a dotpup by Guest Too). Also, I need to modify the package to give the user mysql write permissions to /tmp, otherwise the daemon won't start since it can't set it's socket there. I intended to do that earlier but forgot about it. For now the easiest workaround is to chmod 777 the /tmp directory, or chown it to mysql.

I'll fix the package and upload a new one soon. Don't know if anyone's even interested at this point anyway but hopefully someone will find it useful.

Nathan

_________________
Bring on the locusts ...
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger 
Nathan F


Joined: 08 Jun 2005
Posts: 1760
Location: Wadsworth, OH (occasionally home)

PostPosted: Mon 20 Mar 2006, 09:59    Post subject:  

(sigh) Next time I will package a bunch of flashy icon sets for some exotic windowmanager and maybe people will be excited to give it a try. Evil or Very Mad

My apologies to anyone who did try the last version, somehow a few of the more important Apache modules were missing somehow. It really beats me how that happened but it's now fixed and the fix is on the server.

I've actually recompiled PHP yet again to enable the calendar function. It seems that the developers of PHP have decided that in order to make compilation more fun you have to explicitly enable every useful function at compile time if you want to run more than a simple 'Hello Word' program. This version will go into the next tarball I release along with some documentation for the package, a nicer index page for the htdocs folder, and a few useful example scripts.

Nathan

_________________
Bring on the locusts ...
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger 
dvw86


Joined: 04 May 2005
Posts: 636
Location: Washington State

PostPosted: Mon 20 Mar 2006, 10:36    Post subject:  

Nathan F wrote:
This version will go into the next tarball I release along with some documentation for the package, a nicer index page for the htdocs folder, and a few useful example scripts.

Has this version been posted yet? I would like to give it a try, but was waiting until you had kind of ironed a few things out. Acctually, what you are working on here is perfect for my needs. I need a LAMP server for a web application at work. It needs to be "production" ready since it will be used for more than development and testing. GD support is needed as well. Thanks for all your time and effort.
Back to top
View user's profile Send private message 
Nathan F


Joined: 08 Jun 2005
Posts: 1760
Location: Wadsworth, OH (occasionally home)

PostPosted: Mon 20 Mar 2006, 11:21    Post subject:  

The only difference in functionality between what is on the server and what I haven't posted yet is that I enabled the calendar function in PHP. It would not be too difficult to harden it for production use from this point. The mysql user cannot log in and has no home directory, ditto Apache which runs as nobody. Basically the things you would want locked down are:

1) Make sure MySQL is not accessible over a network
2)Set a root password for MySQL
3)Make absolutely sure you've set a root password for your Puppy PC, and make sure it's different from the MySQL password
4)You can also change the MySQL root account's name to something other than 'root' in order to further confuse hackers

As this package is going to be targeted in large part at developers I'd rather not make security too restrictive out of the box, but I will try to include very specific instructions for hardening it in the final release. There are quite a few other things that can be done in this regard if you are very paranoid, the following links are a great starting place.

http://www.lamphowto.com/ An excellent tutorial on setting up a Lamp server from scratch, including some sound advice on security. These instructions are for a Fedora installation but most of it still applies.
http://www.securityfocus.com/infocus/1726 An in depth article that focuses on MySQL security.
http://dev.mysql.com/doc/refman/5.0/en/privilege-system.html The official MySQL docs on the subject.

It's also a very good idea to make use of .htaccess files for Apache, and set up a good working Robots.txt to keep the bots from using all your bandwidth. Also, I didn't compile this with SSL so if you need that you'll have to look elsewhere. No Perl at this time either. But taking into account everything I mentioned the package should be pretty good already. I'll let you know when what I feel is the 'final' package is ready.

Nathan

_________________
Bring on the locusts ...
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger 
IvanF

Joined: 12 Dec 2005
Posts: 15
Location: W. Australia

PostPosted: Mon 20 Mar 2006, 20:49    Post subject:  

Natham
I find Puppy very exciting although Linux has been a steep learning curve for me. Right now I'm sticking to the easy stuff to build up my skills but I'm itching to try out your work.
Don't get disheartened, I plan to give your work a try and I'm sure there are plenty of others who will discover your work over time.

Keep up the good work

Ivan
Back to top
View user's profile Send private message 
raffy

Joined: 25 May 2005
Posts: 4839
Location: Manila

PostPosted: Tue 21 Mar 2006, 02:54    Post subject: Great!  

This is great - something that a lot of teachers can benefit from. I've been looking for a small LAMP solution since my day 1 in Puppy. It's been that long of waiting, Nathan, as I wasn't really successful at compiling. Thanks for this Very Happy

(If ever few people noticed, it's maybe because of the weekend Wink Hey, did you know I've been watching since your first attempt at packaging Lampp at Grafpup, but for some reason my comment couldn't get in.)
Back to top
View user's profile Send private message 
Nathan F


Joined: 08 Jun 2005
Posts: 1760
Location: Wadsworth, OH (occasionally home)

PostPosted: Tue 21 Mar 2006, 13:02    Post subject:  

I've come pretty far with this but I've got the flu right now so I really am going to have to take it easy for a couple days. Hope you can wait just a little bit longer.

Nathan

_________________
Bring on the locusts ...
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger 
Nathan F


Joined: 08 Jun 2005
Posts: 1760
Location: Wadsworth, OH (occasionally home)

PostPosted: Wed 22 Mar 2006, 18:40    Post subject:  

Well, feeling a little better today. I did manage to get the updates up on the server, so if you download the package it is now the latest version with all the fixins'. I set the networking to 'skip' in the mysql main configuration, wrote a help file, added a few simple php scripts as examples, and added a link to libmysqlclient. I'd forgotten it would be needed since the base Puppy distro does not have the ldconfig command.

Anyway, the installation for Puppy would be something like this.
1) Use the dotpup downloader to install gxmessage and libstdc++so.6
2) Download the grafpup_lampp.tar.gz package from the above link
3) Install the package as an alien package using PupGet
4) Start the control panel by clicking the Lamp icon in /usr/local/apps
5) Start the server and read the documentation

I've tested it in Grafpup-102 and 103alpha, Puppy-108r1, and Puppy2-current, so far it seams to run fine in all. I may tweak things a little more but in my opinion it's pretty well ready for use. If there are any issues whatsoever don't hesitate to ask.

Nathan

_________________
Bring on the locusts ...
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger 
Rhino


Joined: 04 May 2005
Posts: 262
Location: Cincinnati, OH, USA

PostPosted: Thu 23 Mar 2006, 08:00    Post subject:  

This is cool. I'm going to see if I can get a Moodle server running with it.

Moodle is an open-source educational networking software that allows teachers and students to interact with lessons, forums, tests and homework. It looks like there are lots of modules available to play with.

http://moodle.org/

_________________
Visit the Puppy Linux Video Tutorials @ http://rhinoweb.us
Back to top
View user's profile Send private message Yahoo Messenger 
raffy

Joined: 25 May 2005
Posts: 4839
Location: Manila

PostPosted: Thu 23 Mar 2006, 08:25    Post subject: File numbers  

Sorry, am on trip and working in iCafe. Do I get these dotpups right?

libstdc++-libc6.2-2.so.3.pup

Gxmessage 2.4.4.pup
Back to top
View user's profile Send private message 
MU


Joined: 24 Aug 2005
Posts: 13648
Location: Karlsruhe, Germany

PostPosted: Thu 23 Mar 2006, 08:45    Post subject:  

raffy, I think this one:
http://dotpups.de/dotpups/Libraries/libstdc6.pup
Mark
Back to top
View user's profile Send private message Visit poster's website 
billstclair

Joined: 26 Feb 2006
Posts: 106
Location: Upstate New York

PostPosted: Thu 23 Mar 2006, 08:48    Post subject:  

Works great. Much easier to install, and smaller than the other LAMPP package. Haven't tried the two big PHP apps I use in it yet (SMF and Drupal). Want to separate MySQL's data directory out to a separate volume first. Even the existing databases that ship with MySQL take 20 megs. My blog database is over 100 megs.

Download speeds this morning were quite good, but last night I was getting less than a 56K modem. So I uploaded a copy to http://s3.amazonaws.com/puppy/grafpup_lampp.tar.gz?torrent . You can remove the trailing ?torrent to directly download the file instead of getting it as a torrent. I'm collecting the Puppy packages that I use at http://s3.amazonaws.com/puppy/index.html . Sizes to come on the index page as I flesh out my S3 tools.
Back to top
View user's profile Send private message Visit poster's website 
Nathan F


Joined: 08 Jun 2005
Posts: 1760
Location: Wadsworth, OH (occasionally home)

PostPosted: Thu 23 Mar 2006, 10:32    Post subject:  

I've uploaded the package to grafpup.com also, unfortunately it appears there is a problem with anonymous ftp on that site right now. I was seeding several torrents last night and that probably took most of the bandwidth from my server at texasangel.biz. I throttled it way back so download speeds from the ftp server should be in the neighborhood of 50KB/sec, provided you're not halfway around the world.

Nathan

_________________
Bring on the locusts ...
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger 
billstclair

Joined: 26 Feb 2006
Posts: 106
Location: Upstate New York

PostPosted: Fri 24 Mar 2006, 08:51    Post subject:  

I moved /root/htdocs and /usr/local/mysql/data to a dedicated data volume (mounted on /mnt/data at boot time by /etc/rc.d/rc.local and dismounted by /temp/rc.reboot, which I had already modified to use rsync to quickly copy /root to /mnt/pupxxx). I installed my Drupal PHP code in the new htdocs, then ran my standard script to backup my Drupal database and copy it down from my web service provider. It didn't load into the local MySQL. Seems that it's an old version.

Web host:
Code:
mysql  Ver 14.7 Distrib 4.1.16, for portbld-freebsd4.11 (i386) using readline 5.0

Local puppy:
Code:
mysql  Ver 12.22 Distrib 4.0.26, for pc-linux-gnu (i686)

It may work to call mysqldump on the web host with a compatibility option. That's what I'll try next. But why did you use such an old MySQL version?
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 2 [26 Posts]   Goto page: 1, 2 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Unsorted
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0602s ][ Queries: 11 (0.0073s) ][ GZIP on ]