Archive for the ‘Mac OS X Server’ Category

Installing Joomla in OS X Server

Tuesday, July 4th, 2006

1. Enable MySQL.
2. Create a database in MySQL called joomladb.
3. Create a new user called jadmin that has full priviledges to this database (the user does not need to be called jadmin, but that is the username we will be using for this walkthrough).
4. Download the latest stable release of Joomla.
5. Extract the tar files into a new folder (for this example we are going to call it joomla to keep things easy).
6. Make the following folders writeable for Joomla
administrator/backups/
administrator/components/
administrator/modules/
administrator/templates/
cache/
components/
images/
images/banners/
images/stories/
language/
mambots/
mambots/content/
mambots/editors/
mambots/editors-xtd/
mambots/search/
media/
modules/
templates/
7. Move the joomla folder onto a web server.
8. From your web server, visit the site 127.0.0.1/joomla or the subfolder that you placed the joomla files into.
9. Make sure PHP is enabled for the domain and globally.
10. At the Joomla Pre-Installation check page, you will either see a notice that you can install Joomla or a notice that your system does not meet the minimum requirements for installion. If your system does not meet the requirements, install the modules that are listed in Red, or make Joomla work and click on the Check Again button. Once the dependencies are all installed click Next.
11. Read the license agreement and click on Next.
12. Fill in the appropriate fields for your MySQL environment and click Next >>. The fields that are used:
a. Host Name: If the server you are currently using is a MySQL server then enter localhost. Otherwise enter the name or IP of your MySQL server.
b. MySQL User Name: Either enter the root User Name for your MySQL server or another username if desired.
c. MySQL User Name: Either enter the root password for your MySQL server or the password for another user if desired.
d. MySQL Database Name: The name of the database on the MySQL server you would like the Joomla files saved to. In our example, we will use joomladb.
13. Enter the name you would like to use for your Joomla site. This will be the name users will see when logging into your Joomla site and click on the Next button.
14. At the next screen you will be asked to enter some site specific information and then click Next.
a. URL: Enter the URL that users will use to access your site.
b. Path: Enter the full path to the Joomla directory on your server.
c. Email: This will be used for administrative logins.
d. Admin password: This will be the administrative password used to access your Joomla site.
15. cd into the Joomla directory and remove the directory called installation.
16. Click on the View Site button. If you see the Default Joomla site then you are almost done.
17. Go back to the previous screen and click on the Administration button.
18. Enter admin as your username and the administrative password you gave Joomla in field 14.d.
19. You now have Joomla configured and are now ready to customize it.

Mac Tiger Server Little Black Book Review

Monday, June 19th, 2006

Title: Mac Tiger Server Little Black Book, Author: Charles Edge Publisher: Paraglyph Press, distributed by O’Reilly Published: 2006 Price: $34.99 URL: http://www.oreilly.com/catalog/1933097140/

Roger Smith, SVMUG, June 18, 2006.

Audience: Users and system administrators trying to get the most out of Mac networking with Tiger Server.

Content: The book is divided into 18 chapters, each focused on some aspect of server functionality.

My opinion: Very much task-oriented, this would get a lot of use next to the console of a Tiger server. It is setting next to my server and will stay there.

There is an embarrassment of riches these days when it comes to OS X Server books. Until 10.2 there was nothing except some material on the Apple Web site.

Then Schoun Regan came out with Mac OS X Server Essentials, the first good book on Mac servers (Peachpit Press, Apple Training Series). But with each new edition, Schoun’s book is more oriented towards the budding Apple Consultant who wants to understand the various components of OS X Server and then pass his or her Apple certification exam. Several sections of Mac OS X Server Essentials are titled “Understanding this” and “Understanding that”. It is thorough book, but not suitable as a reference. It is also physically very heavy.

In contrast, “Mac Tiger Server Little Black Book” is intended as a handy reference for whatever task is at hand. Most chapters have an introductory “In brief” section that is two or three pages long. It is assumed that you understand, for example, the basics of networking. The rest of each chapter is “Immediate Solutions”, checklists and screen shots of how to accomplish the task at hand. Even the planning and installation chapter has “Immediate Solutions” like Choosing your Network infrastructure, Creating a Maintenance Plan, etc. Each chapter ends with a page or two of “Tips from the Trenches”, real world experience of these previous solutions in practice. The author has been there and done that, in the real world. “Troubleshooting …” is also a frequent topic heading.

The major Chapters are: Planning, Directory Services, Windows Services (I did mention it is real-world based, right?) Sharing Files, Network Services, Printing, Web, Mail and Streaming Servers, etc. Subjects also get into the more advanced area like VPNs, WebObjects, MySQL, Java Server Pages and Collaboration.

The Little Black book isn’t tiny at 377 pages, but is a convenient 6 by 9 inch format and is printed on light weight paper. It has index tabs on the margin so you can quick locate the section, and then the 2 or 3 page solution to your problem. The book was actually designed to be used!

— Roger Smith Complete System & Network Administration Windows, Mac, Sun, Cisco Apple Authorized Business Agent Microsoft Registered Partner 408-736-7200

Installing AWStats on Mac OS X Server

Friday, February 3rd, 2006

Here are the steps for setting up AWStats on Mac OS X 10.4 Tiger Server.

1. Download the last stable release of AWStats from www.awstats.org to your desktop.
2. In the Finder, navigate to /var/log/httpd
3. Backup and remove any old web logs.
4. Open Server Admin.
5. Select Web:Settings:Modules
6. Make sure the “perl_module” and “php4_module” are enabled.
7. Click Save.
8. Select the “Sites” pane.
9. Double-click the entry for the site you are going to enable stats on.
10. Select the “Options” pane.
11. Enable CGI Execution and Server Side Includes (SSI).
12. Click Save.
13. Select the “Realms” pane.
14. Create a new Realm called “awstats_data” in the site’s root directory or “Web Folder”. If necessary, within the Finder, navigate to the /Library/WebServer/Documents directory and create a new folder called “awstats_data”. (i.e. /Library/WebServer/Documents/awstats_data).
15. Enable Browse/Author access for the local Administrator and the “www” user only.
16. Click Save.
17. Select the “Logging” pane.
18. Change the access logging Format to “combined”
19. Change the access log Location to /var/log/httpd/awstats_access_log
20. Change the error log Location to /var/log/httpd/awstats_error_log
21. Click Save.
22. Select the “Aliases” pane and add 127.0.0.1 as an alias.
23. Click Save.
24. Click the left-arrow icon to exit Editing the site.
25. Make sure the site is enabled and Web Services are running.
26. Open Workgroup Manager.
27. Verify ACLs are enabled on the volume containing the “awstats_data” directory you created earlier.
28. Change the posix permissions of the “awstats_data” directory to allow Read/Write access for the admin group.
29. Create an ACL to allow Read/Write access for the “www” user.
30. Click Save.
31. Close Server Admin and Workgroup Manager.
32. Expand the awstats.zip downloaded from awstats.org to your desktop.
33. Create a new folder named “awstats” in the /Library/WebServer directory.
34. Copy the contents of ~/Desktop/awstats-6.5/ to /Library/WebServer/awstats
35. Open a Terminal session.
36. Type cd /Library/WebServer/awstats/tools
37. Press Return
38. Type sudo perl awstats_config.pl
39. Follow the prompts…

—– AWStats awstats_configure 1.0 (build 1.6) (c) Laurent Destailleur —–
This tool will help you to configure AWStats to analyze statistics for
one web server. You can try to use it to let it do all that is possible
in AWStats setup, however following the step by step manual setup
documentation (docs/index.html) is often a better idea. Above all if:
- You are not an administrator user,
- You want to analyze downloaded log files without web server,
- You want to analyze mail or ftp log files instead of web log files,
- You need to analyze load balanced servers log files,
- You want to ‘understand’ all possible ways to use AWStats…
Read the AWStats documentation (docs/index.html).

—–> Running OS detected: Mac OS

—–> Check for web server install
Found Web server Apache config file ‘/etc/httpd/httpd.conf’

—–> Check and complete web server config file ‘/etc/httpd/httpd.conf’
AWStats directives already present.

—–> Update model config file ‘/Library/WebServer/awstats/wwwroot/cgi-bin/awstats.model.conf’
File awstats.model.conf updated.

—–> Need to create a new config file ?
Do you want me to build a new AWStats config/profile
40. file (required if first install) [y/N] ? y

—–> Define config file name to create
What is the name of your web site or profile analysis ?
Example: www.mysite.com
Example: demo
Your web site, virtual server or profile name:
41. site.domain.com

—–> Create config file ‘/Library/WebServer/awstats/wwwroot/cgi-bin/awstats.site.domain.com.conf’
Config file /Library/WebServer/awstats/wwwroot/cgi-bin/awstats.site.domain.com.conf created.

—–> Add update process inside a scheduler
Sorry, configure.pl does not support automatic add to cron yet.
You can do it manually by adding the following command to your cron:
/Library/WebServer/CGI-Executables/awstats.pl -update -config=site.domain.com
Or if you have several config files and prefer having only one command:
/Library/WebServer/Documents/tools/awstats_updateall.pl now
42. Press ENTER to continue…

A SIMPLE config file has been created: /Library/WebServer/awstats/wwwroot/cgi-bin/awstats.site.domain.com.conf
You should have a look inside to check and change manually main parameters.
You can then manually update your statistics for site.domain.com’ with command:
> sudo perl awstats.pl -update -config=site.domain.com
You will also read your statistics for ‘site.domain.com’ with URL:
> http://localhost/cgi-bin/awstats.pl?config=site.domain.com

43. Press ENTER to finish…
44. Edit the awstats.site.domain.com.conf file (in your favorite text editor, as root) and add these lines or augment existing lines for these variables.
LogFile=”/var/log/httpd/awstats_access_log”
LogType=W
LogFormat=1
SiteDomain=”site.domain.com”
DirData=”/Library/WebServer/Documents/awstats_data”
DirCgi=”/Library/WebServer/CGI-Executables”
DirIcons=”/icon”
AllowToUpdateStatsFromBrowser=1
AllowFullYearView=3
46. Move the remaining contents of /Library/WebServer/awstats/wwwroot to /Library/WebServer/Documents
47. Move the “tools” directory of /Library/WebServer/awstats to /Library/WebServer/Documents
48. Open Terminal
49. Type cd /Library/Webserver/CGI-Executables/
50. Type sudo perl awstats.pl -update -config=site.domain.com
51. From the server, open a browser and go to the site http://localhost/cgi-bin/awstats.pl?config=site.domain.com
52. If you see the data then you know that both your configuration and log file format is good.
53. Now it’s time to tell the system to update awstats on a regular basis.
Create a CRON job to run the command /Library/WebServer/CGI-Executables/awstats.pl -update -config=site.domain.com

Installing MediaWiki on Mac OS X

Wednesday, August 17th, 2005

Installing MediaWiki

1. Create a database in MySQL called wikidb.
2. Create a new user called wikiserver that has full priviledges to this database (the user does not need to be called wikiserver, but that is the username we will be using for this walkthrough).
3. Download the latest stable release of MediaWiki from http://mediawiki.sourceforge.net.
4. Extract the tar files into a new folder (for this example we are going to call it wiki to keep things easy). This can be done using the tar -xvzf mediawiki.tar.gz (or subsititute your file name for mediawiki.tar.gz
5. Make the configuration files writeable using the command chmod a+w config while in the new wiki folder
6. Move the wiki folder onto a web server
7. From your web server, visit the site 127.0.0.1/wiki or the subfolder that you placed the wiki files into
8. At the MediaWiki Installation page, you will either see a notice that you can install MediaWiki or a notice that your system does not meet the minimum requirements for installion. If your system does not meet the requirements, install the modules that are listed. If it does, move on to the next steps
9. At the MediaWiki Installation page, scroll down to the Site Config section. Here, fill in the fields for:
a. Wiki name: The name assigned to your wiki.
b. Conact e-mail: Displayed when error notices are encountered.
c. Language: The language to be used for your Wiki
d. Copyright: The copyright type, typically leave this as the default setting
e. Admin Username: The username to use for administering the Wiki
f. Admin Password: The password to use for administering the Wiki
g. Shared Memory caching: Decide whether to use memcached
10. Fill in the appropriate values for the Email and authentication setup section:
a. Email (General): Enable or disable the global use of email for your Wiki
b. User-to-User email: Allow users to email one another
c. Email Notification: Allows users to be notified if there is a change in a folder or page
d. Email Authentication: Enable email authentication for the wiki. Sends request for users to click a link to authenticate into the wiki.
11. Database Configuration options:
a. Database Type: Most users use MySQL, but Oracle is an option as well, although experimental.
b. SQLServerHost: The address of the MySQL Server. If MySQL is on the system you are currently using then leave this field as localhost.
c. Database Name: The name of the database you will be using in MySQL to store your wiki’s data.
d. DB Username: If you used wikiserver in step 2 then use wikiserver here; otherwise use the username you chose in step 2.
e. DB Password: The password you assigned for your wikidb user.
f. Database Table Prefix: Use this option if you would like to share you will be using other tables within the wiki database for other applications.
g. Database Character set: leave this as defualt unless you will be using
h. Superuser account: The MySQL SuperUser account – typically root
i. Superuser Password: The MySQL SuperUser or root account password
12. Click on Install MediaWiki!
13. Move the LocalSettings.php file from the /config directory of the wiki installation into the root directory of the wiki installation
14. Go to the http://127.0.0.1/wiki folder and the default Main MediaWiki page will open
15. Customize the wiki to work for your organization

Link Aggregation and Tiger

Sunday, August 7th, 2005

Link Aggregate Networking

Mac OS X 10.4 includes support for link aggregate networking. Link aggregate networking shares network traffic over two or more bonded Ethernet controllers, giving them one IP address for communication. This can allow the servers controllers to run at speeds of 2Gbps. Link aggregation is configured using the Network System Preference Pane.

To enable Link Aggregate Networking
1. Open the Network Pane from System Preferences
2. Click the Show: box and select Network Port Configurations
3. Click New
4. In the Name: box enter a name for the new aggregate port
5. In the Port: box select Link Aggregate
6. Places check marks in the boxes for each port you would like to aggregate
7. Click OK
8. Configure the Port as you would any other network port

Troubleshooting
Link Aggregate Ports must be used in conjunction with an Ethernet Switch.
Link Aggregate Port status can be viewed for each en adapter using the status tab in Network Preferences for the controller.
Assigning multiple LAN IP addresses to a Link Aggregate port can be tricky. I’d stay away from this if possible.
Do not assign two LAN IP addresses to a Link Aggregate port if they are not in the same IP scheme/subnet.

Apple Market Share

Friday, April 8th, 2005

According to a report by JupiterMedia Corp, Mac OS X is becoming more and more of a standard in the small to Enterprise business categories. The report states that in organizations with 10,000 or more employees, 21% use Mac OS X on their desktops in the office. In businesses with 250 employees or more, 17% of the employees run Mac OS X on their desktop computers at work.

Mac OS X is taking market share aware from traditional Linux and Unix installations. One explanation for this is that Mac OS X is easier to use than Linux and Unix, especially for desktop computers. Another explanation is that the number of software packages available for Mac OS X is growing, with a focus on Enterprise applications such as Oracle. It has also become possible to buy corporate support packages through Apple, something that Enterprise customers typically require before allowing production deployment of software. Companies that were once considering Linux are now more likely to move forward with Mac OS X.

Although to a smaller degree, Mac OS X is taking market share away from Windows as well. Microsoft saw a slight decrease in its installation base last year. Although it is difficult to tell exactly why this shift is occurring, it is possible that in the server market this has a lot to do with software licensing costs.

Apple’s licensing scheme can, in some cases, save companies tens of thousands of dollars in licensing over traditional Windows servers. Nine percent of companies with 250 employees or more are now using Mac OS X Server. 14 percent of companies with 10,000 employees or more are now running Mac OS X Server. These are strong numbers for a relatively young Network Operating System. With the latest enhancements built into Mac OS X Server 10.4 it is likely that the numbers will grow more in Apple’s favor.

The single largest Network Operating System is still Windows NT 4.0 Server. UNIX, Linux, Windows 2003 Server and Mac OS X Server are all seeking to displace NT 4.0, which gained popularity due to its stability and scalability. A strong placement in the Network Operating System market can only help in gaining even more popularity in the desktop market.

318 Speaks at DefCon 2004: Charles Edge is Featured Speaker

Saturday, June 26th, 2004

This year’s DefCon seminar will cover the features and fundamental concepts of OS 10.3.4 Server. We will begin by describing the various roles of OS 10.3 SERVER in both small and medium sized offices. We will cover managing the webserver, email server and file storage. Finally, we will cover upgrading from 10.2 and data backup strategies.

Bio for Charles Edge:Charles is a Senior Systems Engineer for Three18, Inc. and is a leader within the technical department and a mentor to the other field technicians as well as a trusted advisor to hundreds of Three18′s companies here in Los Angeles. His 10+ years of experience, coupled with his in-depth knowledge of IP Routing, MAC OS, Windows and Linux have made him a valuable asset to both Three18 and its prestigious roster of clients.

Charles maintains certifications with Apple, Microsoft, Cisco and Comptia and is currently writing MAC OS X SERVER book for O’Reilly publishing, which should be on the shelves in early September 2004.

vi cheat sheet

Sunday, May 9th, 2004

VI Reference SOP

Creating and opening Files
Running a vi command without a file name will open a new file. Running a vi command with a existing file name will open that file for editing. For example, using vi test.txt will open a document called test.txt if it’s in the working directory.

VI Modes
Command mode treats input from the keyboard as vi commands. Command mode cannot be used for entering text. When a file is first opened, you start out in command mode and you will not see the words you are typing on the screen . To enter and edit text you have to switch to insert mode by pressing the i or a keys. Use command mode to move to the part of the file you want to edit and then use insert mode to enter text in the file. To switch back to command mode use the Escape key.

COMMAND MODE
Moving around the file
h Move the cursor one column to the left
i Move the cursor one column to the right
k Move the cursor one line up
j Move the cursor one line down
^ & B Go to the beginning of the current line
$ Go to the end of the current line
) Go to the next sentence
( Go to the previous sentence
} Go to the next paragraph
{ Go to the previous paragraph
:$ Go to the end of the file
w Move the cursor one character forward
W Move the cursor one word forward
: Go to the number you specify

Inserting and Appending Text :
i inserts text to the left of the cursor
I inserts text in the beginning of line
a appends text to right of cursor
A appends text to the end of the line

Adding New Line
o Add a new line below the current line
O Adds a new line above the current line.

Deleting Text
X deletes the text character to the right of the cursor
dd deletes the current line
d deletes the line specified by NUMBER
D delete all of the data until the end of the current line.

Replacing Words and Characters
r replace the character above the cursor
R replaces characters until Esc is pressed
C replaces till end of line.

Substitute
s substitutes the current character
S substitutes the entire line

Repeating Last Command
. repeats the last command

Undo the last change
u undo the last change
U undo changes to the current line

Copy and pasting lines
yy copy the current line into buffer
p pastes the information in the current buffer

Searching
:/name searches for the word name in the file
n continues search forward.
N searches backwards.
Search and Substite :s///g

Saving
:w is a simple save command
:wq saves & quits VI
:q! quit VI without saving any changes