Page Index Toggle Pages: 1
Topic Tools
Normal Topic Installing YaBB on Macintosh OSX through MAMP (Read 4,181 times)
Elfen
Full Member
***
Offline



Posts: 452
Installing YaBB on Macintosh OSX through MAMP
Sep 12th, 2012 at 8:43pm
Post Tools
Excuse the typoes. I was sleep typing again. But to those who profess on the belief of the users installing YaBB on MAMP or any other easy install for Mac OSX, this is for you...

Bare with me, I have to install it in sections: Parts I & II



I: Why Would Anyone Do This?

Really, why? MAMP installs Apache, MySQL, and PHP as an application to a standard non-server server of OSX. But Mac OSX comes already installed with Apache, so this point is already moot. MAMP does not install Perl, which is already installed on Mac OSX. So Installing MAMP to create a YaBB Forum Website is unnecessary.

PHP is also installed on a standard OSX system, but you have to activate it by removing the ‘#’ from the Apache configuration file. In Terminal type ‘su’ to give you SuperUser access, and then ‘pico /etc/httpd/httpd.conf’. This will open a simple text editor which you are now editing the Apache configuration file, find “#AddModule mod_php4.c” and “#LoadModule php4_module libexec/httpd/libphp4.so” and remove the “#” from their lines. Save the file and reboot the machine will activate PHP. But unless you have websites that use PHP, this is a moot point because YaBB uses Perl and not PHP.

Adding MySQL is a simple download and you will get MySQL in its purest for, not something chopped up into an application.  If you are using Apple’s OSX Server Edition, PHP and MySQL will be installed along with Apache and Perl. So installing MAMP in my view is moot and unnecessary.

But to those who do use MAMP, lets say, they are using MySQL, and PHP capabilities to run other websites and not spent the money for OSX Server, then I can see the possibility of using it. But... MAMP is being used as an application, and any attack to the OSX that attacks applications gives it a vulnerability that the Mac OSX Server and Apache/Perl/PHP on OSX does not have. Shut down MAMP and you lose your website in a Denial of Service Attack.

So if you want to run YaBB on MAMP because you need the functionality of MAMP for other reasons, there is how to do it. This is very similar to installing on YaBB on OSX and OSX Server; only the locations of the folders are different.


II: Now, lets build that webserver.

Download MAMP from http://www.mamp.info if you haven’t and install it. Pay all registration and licensing fees that apply to MAMP or else you will be running it Demo mode. If you already have it installed, then you already did all this. You did pay all the registration and licensing fees, right? It really does not matter if MAMP is in Demo mode or not, as it more than enough to run YaBB.

Double clicking the MAMP icon in the MAMP folder will active MAMP. Make sure that Personal Web Sharing in the Sharing control panel is off in OSX. Under OSX Web Server, it’s an application under Server Services that needs to be turned off. Running MAMP while OSX own web services will confuse both and files may not be accessible.

MAMP will be installed in the Applications folder; so all attention will be paid to this area. Under OSX and OSX Server, where attention is paid to the Webserver folder in the Library folder, MAMP accesses it files in its own folder. Inside MAMP will the cgi-bin and htdoc folders – these is where YaBB will be installed into.

From here, installing YaBB is very simple, as stated on most versions of the installation files.
  
Back to top
 
IP Logged
 
Elfen
Full Member
***
Offline



Posts: 452
Re: Installing YaBB on Macintosh OSX through MAMP
Reply #1 - Sep 12th, 2012 at 8:45pm
Post Tools
Installing YaBB on Macintosh OSX through MAMP: Part III and IV

III: Perl

Perl is part of the Macintosh OSX system. But is it not without its problems as I faced on another project, the good thing is, these shortcomings of Mac OSX Perl does not affect YaBB in any way. The problem is simple, according to observations; the Perl on Mac OSX is heavily buffered; only allowing a set size of data to be processed. This buffering only affects data sizes in the gigabyte range. This slows down the data processing of the Perl program, and also limits the output as well. Like I said, it only affects data ranges in the gigabyte range. But with proper programming in data splicing, this problem can be over come, and that is what YaBB does when it generates forum thread and post pages.

This buffering is to prevent Buffer Overflows from attacks. This, with an ultra fast hard drive system and Internet connection, an attack on one of my OSX servers was thwarted years ago. In short, 30 days of flooding, DoS and Directory busting attempts could not take down the server I had. It could not be taken down, period. But on the project I was working on, this buffering limited the access to the Gigabytes of data and its output. It did not cripple the project but it did limit its capabilities. The only solution at the time was to install another version of Perl, by Indigo and Activate State. Though unnecessary for YaBB to install another version of Perl onto the system, this is an option if you need it for other things.

So, with Perl already in OSX, you do not have to waste a step in installing it. You do need to know that the Shebang line of all Perl programs in OSX is: #!/usr/bin/perl This means that you do not have to make changes to the YaBB files.



IV: MAMP and Mac OSX.

OSX is the Apple/Macintosh version of UNIX; OpenBSD UNIX to be precise. Unlike Windows, which allows most files to be executable and users can make files read-only or read/writable; under UNIX and Linux, users can make files executable as well as read/writeable. Under OSX Server, you can do this in a File Information Window by checking off the appropriate check boxes. But under OSX, you need to set these file flags under a terminal window with the CHMOD command.

But before we entangle ourselves with this part, we need to know where MAMP has its webpages and Perl scripts installed. If you installed MAMP, you will notice in your application folder a MAMP and MAMP PRO folders. MAMP PRO is for the configuration applications and other applications to support MAMP. You need to concern yourself with the MAMP and not MAMP PRO folder. Double clicking the MAMP folder will open it, showing several files and folders. You will need to find the ‘cgi-bin’ and ‘htdocs’ folders for these folders are the YaBB files go.
« Last Edit: Sep 12th, 2012 at 8:48pm by Elfen »  
Back to top
 
IP Logged
 
Elfen
Full Member
***
Offline



Posts: 452
Re: Installing YaBB on Macintosh OSX through MAMP
Reply #2 - Sep 12th, 2012 at 8:46pm
Post Tools
Installing YaBB on Macintosh OSX through MAMP: Part V

V: YaBB

Download the latest version of YaBB and put it in your account folder. Under OSX, double clicking the icon will extract the folders and files from the YaBB.zip file (currently at this time it is: YaBB_2.5_AE.zip) in a folder labeled: YaBB_2.5_AE. Opening this folder will give you the files README.txt and VERSION.txt, and folders Quick-Guide, cgi-bin and public_html. It is these last two folders cgi-bin and public_html that has YaBB in them and you need to pay attention to them.

Double-click on public_html and it will open showing another folder: yabbfiles. Hold down the ‘ctrl’ keyboard button while moving the mouse and click on the yabbfiles folder. A menu will open, scroll down to COPY to copy the folder into memory for the time being.

Now open by double clicking your hard drive icon and then the ‘Applications’ folder. There you will see a list of application folders, double-click the MAMP folder. There you will see a folder named or labled ‘htdocs’, double click this folder and past the yabbfiles folder in there. When done, you have completed 30% of the process to install YaBB on MAMP for OSX.

The next step is to go back to the YaBB folder where you copied the yabbfiles folder from, and double-click the cgi-bin folder. When the cgi-bin folder is open, there is a ‘yabb2’ folder in there. Hold down the ‘ctrl’ keyboard button while moving the mouse and click on the yabbfiles folder. A menu will open, scroll down to COPY to copy the folder into memory for the time being.

Now go back to the MAMP folder where the cgi-bin and htdocs folders are in. Double click the cgi-bin folder and paste the yabb2 folder in there. Once the copying is done, you are now 60% done installing YaBB on your Mac with MAMP. The next part is the hard part and is divided in two sections.

Perl’s shebang line for Mac OSX/OSX Server is’ #!/usr/bin/perl’; the same as it is on the the YaBB files. This means that you do not have to go into the files and change them. It is already done for you. This means now 80% of the work is done.

In browser, open page to localhost/cgi-bin/yabb/Setup.pl
When asked for password, type in ‘admin’

In setting the paths for YaBB, click the ‘Insert’ button for Absolute Path and then click on ‘Autofill the forms below’. Make sure that all entries have a full directory and full urls with your domain name in it on the right side. Finally at the bottom of the page, click on ‘Save Settings’.

Give it a while to process.

Note: if you get a blank page at this section, it means that your files and folders are not writable. You need to check your YaBB folders and file permissions and change them into read/writeable files with the chmod command in the terminal. If you get an error like te dreaded “Internal Server Error”, you need to check the FixFile.pl, YaBB.pl, AdminIndex.pl, Paths.pl, and Setup.pl files and make them read/write/executable files. Refreshing the page should bring the section that did not loaded.

Also Note: if you do not have your domain name setup yet, you can use ‘localhost’ as a domain name (not localhost.com, localhost.org, localhost.net, just ‘localhost’). When you get your domain name and have the site online, you can change ‘localhost’ to your domain name in the forum’s administration panel under ‘Path Settings’.

Next page will show you the installed modules on both Perl and YaBB. If there are missing modules, you can always add them later through the Perl CPan Library. With the set up I have, these are the missing modules found:

Net::SMTP:TLS - used to send emails through SMTP:TLS, and not needed to run YaBB unless you want to send emails through Perl. You can use another email system like ‘sendmail’ in OSX to send emails for YaBB. You would need to configure that in the Adminstration Panel later on.

Compress:Bzip2 – used for the back up feature. Its does not effect the forum itself but as a forum administrator and owner, you will need to back up your forum, mainly the: Boards, Members, Messages, Modules, Sources Templates and Variables folders. You also need to back up the Paths.pl and YaBB.pl files.

LWP::UserAgent, HTTP::Request::Common, and Crypt::SSLeay - used for YaBB Spell Checker’s “GoogieSpell.” Without these modules, it just means that your members must do their own spell checking. This does not effect the over forum.

After saving this page, the next page is System Set up. Fill in the options you have for your forum: Forum Name/Title, your email, domain name (if any at this time), etc.

The next page is ‘Checking System Files’ where the forum’s set up is checked. If there is an error or issues, you will be alerted to fix them and maybe hinted on how to fix them. In my installation, there were no issues to fix. Click on the ‘Continue’ button to do ‘Forum Settings’.

Next page will be the forum itself, saying that it is in Maintenance Mode, and asking you to log back in as the administrator. User = admin , Password = admin. Once logged in, you will see the forum as it is - blank. Click on the ‘Admin’ button on the button bar. At this point YaBB is running. You will need to go to the Admin Panel to make changes to the forum and get it out of Maintenance Mode. Also go to the ‘View/Delete Members’ page in the admin panel and give the admin user a new password!

Congratulations – It’s A YaBB Forum Done On MAMP for Mac OSX!

But it is a blank forum. All you have to do is make and shape the forum and its sections with the Forum Configurations and add forum sections and posts to get it stated. Put it online, make a few adjustments like adding the domain name in the administration panel, and tells your friends about it. Then watch it grow. All you have to do is administer it. As its owner, you can give administration and moderator rights to those you trust to help you run the site. At this point do a chmod in the terminal on the YaBB files and the Admin, Modules, Sources, Help folders and set them to ‘Read-only’.

And that’s it.
« Last Edit: Sep 12th, 2012 at 8:48pm by Elfen »  
Back to top
 
IP Logged
 
Elfen
Full Member
***
Offline



Posts: 452
Re: Installing YaBB on Macintosh OSX through MAMP
Reply #3 - Sep 12th, 2012 at 8:47pm
Post Tools
Installing YaBB on Macintosh OSX through MAMP: Part IV

IV: My Notes

This was done on a Mac PowerBook G4 running Mac OSX 10.4 and MAMP 1.0, in under 5 minutes. It is as I said, very similar to installing YaBB on a Mac under OSX, only the locations of the files have been changed from /Library/WebServer/ to /Applications/MAMP. I would say that the average user should learn a little UNIX/Linux with commands like ‘cd’ (the same as Windows/DOS cd – change directory), ‘ls’ (list/show directory) and ‘chmod’ (change mode – read/write/execute options), which may be needed to change YaBB files options.

It was a flawless install.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Topic Tools
 
  « Board Index ‹ Board  ^Top