2009/01/15 | Apple sometings
类别(自由世界) | 评论(7) | 阅读(918) | 发表于 01:47
tiger php 开启方法

cd /etc/httpd
 
Next step is to use "root" privileges, start up the text editor named "Pico" and edit the "httpd.conf" file.
 
Use the following command in the Terminal.app:
 
sudo pico httpd.conf
 
Type the root password and you are ready to go.
 
Locate the 4 lines:
 
#LoadModule php4_module
#AddModule mod_php4.c
#AddType application/x-httpd-php .php
#AddType application/x-httpd-php-source .phps
 

leopard 打开php5

http://www.procata.com/blog/archives/2007/10/28/working-with-php-5-in-mac-os-x-105/

Editing Configuration Files

We will have to edit several configuration files that exist as part of the unixy underpinnings of OS X. I'm going to recommend the free text editor, TextWrangler for this purpose. Normally, the finder hides the configuration files from view. However, in the finder, you can use the "Goto Folder…" option under the "Go" menu to view these files. This option if available via command-shift-G. Actually, this option is available in any file open dialog in OS X via command-shift-G. In addition, Text Wrangler will allow you to browse these files with its "open hidden…" option. But, the much easier option is selecting "Open file by name…" (command-D) and just typing the full path and filename. To save many of these files, you will need to enter your root password. Be Careful.
Enabling PHP

PHP is installed in Mac OS X by default, but not enabled. To enable it, we must edit the apache 2 configuration file, which is located at /etc/apache2/httpd.conf. Find the line which loads the PHP 5 module, which looks like this:

#LoadModule php5_module libexec/apache2/libphp5.so

The line is currently commented out. All we have to do is remove the comment symbol,#, so the line looks like this:

LoadModule php5_module libexec/apache2/libphp5.so

Save.
Starting Apache

Go to the sharing panel in system preferences and enable "Web Sharing." This will start the apache server.
Sharing Panel

Another way to do this is to type the following in the Terminal application:

sudo apachectl start

You will be prompted to enter your root password. After that, your apache server should now be running. If you need to restart the server from the terminal, you can type this:

sudo apachectl restart

If you find this tedious to type, there is a script that you can download to do this later in this post.

MacOSX的terminal显示设为彩色
1.一般bash命令高亮度:
编辑~/.bash_profile(没有则创建之)或者直接修改/etc/bashrc,添加

export CLICOLOR=1 


vim支持高亮度:
进入vim后

   1. e $ VIMRUNTIME/vimrc_example.vim 
   2. saveas ~/.vimrc 
   3.  
   4. e $ VIMRUNTIME/gvimrc_example.vim 
   5. saveas ~/.gvimrc 





找到/System/Library/Coreservices/Systemversion.plist,将其拖至桌面,以文本编辑器打开,您将看到如下字段复制内容到剪贴板代码:)

<key>ProductUserVisibleVersion</key>

<string>10.4.8</string>

<key>ProductVersion</key>

<string>10.4.8</string>将其中的10.4.8改成10.4.9或10.4.10,再拖回/System/Library/Coreservices/鉴定,覆盖。OK!



emule server http://emule.org.cn/server.met


leopard dock 变为 2d 或 3d


defaults write com.apple.dock no-glass -boolean YES

killall Dock




ps:解决mac os x86下不能同时使用ps2键盘+USB鼠标:
先把ps2鼠标和usb鼠标同时挂上,进入系统后,进入终端输入:
—————————–
sudo su
cp -R ApplePS2Controller.kext /System/Library/Extensions/
chown -R root:wheel /System/Library/Extensions/ApplePS2Controller.kext
cd /System/Library/Extensions/ApplePS2Controller.kext/Contents/PlugIns
rm ApplePS2Mouse.kext ApplePS2Trackpad.kext
cd /System/Library/
rm Extensions.kextcache
chown -R root:wheel /System/Library/Extensions/ApplePS2Controller.kext

#重起后即可
下载:ApplePS2Controller.kext.zip








x86安装MacOS,CPU频率及时间不准确问题的处理 - [Mac OS X]
2007-11-09
好像从 Mac OS 10.4开始, 内核默认的FSB为200, 这就导致在我的Celeron 530中时间很慢, 一秒钟的时间变的很长, 经过无数的搜索后(感谢Google)终于找到解决问题的办法。

1、 打开终端
2、 sudo vi /Library/Preferences/SystemConfiguration/com.apple.Boot.plist
3、 输入密码后可以看到在Kernel Flags下有一个空,在中间加入cpus=1 platform=X86PC fsb=133 -legacy

cpus=1是让系统使用单核, 目前x86版的MacOS使用双核启动不起来。

platform=X86PC据说加上这句会速度更快些,但是我没有感觉到

fsb=133是我CPU的外频,请根据实际情况改成自己CPU的外频就可以了。

-legacy 使用32位,amd不支持64位

<key>Graphics Mode</key>
<string>1280*1024*32@60</string>

______________________________
__________________________________________


無線網卡驅動修改:
1. 打開終端機
2. sudo -s 輸入密碼成為root
3. 打入以下指令【vi /System/Library/Extensions/ IO80211Family.kext/Contents/PlugIns/AirPortAtheros.kext/Contents/Info.plist】
4. 在【IONameMatch】下找裝置ID,加入【pci168c,1014】並存檔離開
5. 打入以下指令【kextload -t /System/Library/Extensions/IO80211Family.kext/Contents/PlugIns/AirPortAtheros.kext】
6. 打入以下指令【kextcache /System/Library/Extensions/】
7. 利用磁碟工具程式修復權限後重開機
8. 開機時按下F8,輸入參數【-f】,進入系統之後就可以使用無線網卡了

____________
______
______
______


想暂时禁止spotlight运行,可以到偏好设置面板里把硬盘根目录添加到隐私列表。
想解决这个问题,按下面的方法做。

from http://www.macintouch.com/tiger12.html

[quote]Spotlight

Jeff Hirsch
I can confirm that there are issues with Spotlight hogging the CPU under certain circumstances. In particular, the mds (metadata) process and mdimport process can eat up a huge chunk of available CPU and RAM. Upwards of 80% at times, causing a very noticeable slowdown on even the fastest of machines.

A quick search for "mds cpu" in the 10.4 Discussions over at Apple shows that a number of users are dealing with the same issue. Here is what I did to fix the problem and some thoughts on possible causes. First the fix:

1) Using the mdutil command-line utility in Terminal, turn off indexing for each of your drives. example:

$ sudo mdutil -i off /Volumes/your_hard_drive_name_ 1
$ sudo mdutil -i off /Volumes/your_hard_drive_name_2

2) Then use mdutil to remove the indexes from each drive

$ sudo mdutil -E /Volumes/your_hard_drive_name_ 1
$ sudo mdutil -E /Volumes/your_hard_drive_name_2

3) Physically remove the .Spotlight directories from the root of each drive.

$ cd /
$ sudo rm -fr .Spotlight-V100

(do the same for your second or third drive) BE CAREFUL WITH THAT RM COMMAND! One typo could ruin your day.

4) Use mdutil again to turn indexing back on for each drive

$ sudo mdutil -i on /Volumes/your_hard_drive_name_ 1
$ sudo mdutil -i on /Volumes/your_hard_drive_name_2

5) Spotlight will now re-index all drives and should behave in a normal fashion. (No longer uses 60%-80% of your CPU)

Finally a couple of quick thoughts on possible causes:

My initial indexing process after installing Tiger was interrupted by a couple of reboots I had to do while installing third-party apps. This may have left me with a funky index when Spotlight tried to pick up where it had left off. I suggest letting it fully index your drives before rebooting the machine at all.
A few users in the Discussions over at Apple noticed that they had files on their hard drive with modification dates AFTER the current date. i.e. days/months/weeks into the future. These files may have been causing Spotlight to choke as it tried to make sense of a date that hadn't happened yet.
I did a quick search for files modified "after" today and found a handful of them on my hard drive. (A few were dated 2031!) I used the touch command in Terminal to give these proper dates. If you have a lot of these files, you might want to create and Automator script to touch them all for you.

Hope this saves some of you a headache or two.[/quote]





------------------------------ ---------------

关掉: .DS_Store
defaults write com.apple.desktopservices DSDontWriteNetworkStores true

http://hi.baidu.com/xiangkaihua/blog/item/088d1fd7be6752dca144df9f.html
打开Quartz 2D Extreme前提是你打开了QE/CI

打开终端,输入:
sudo defaults write /Library/Preferences/com.apple.windowserver Quartz2DExtremeEnabled -boolean yes

输入密码。
重启看看系统概述里的显卡信息,如果有"Quartz 2D Extreme:支持",就表示已经打开了。
如果打开了Quartz 2D Extreme之后发现对系统有负面影响, 也可以关闭它。方法是把上面命令行最后那个"yes"改为"no",即 :

sudo defaults write /Library/Preferences/com.apple.windowserver Quartz2DExtremeEnabled -boolean no

其他步骤一样。
对于液晶显示器需要关闭beamsync,才能有更好的效果的。

sudo defaults write /Library/Preferences/com. apple.windowserver Compositor -dict deferredUpdates 0

不过据我了解, 关闭beamsync功能会导致花屏和屏幕变色等问题, 大家慎用.


Mac唱歌:

osascript -e 'say "hoo hoo hoo hoo hoo hoo hoo hoo hoo hoo hoo hoo hoo hoo hoo hoo hoo hoo hoo hoo hoo hoo hoo hoo hoo hoo hoo hoo hoo hoo hoo hoo hoo hoo hoo hoo hoo hoo hoo" using "Bubbles"'

osascript -e 'say "Dum dum dum dum dum dum dum he he he ho ho ho fa lah lah lah lah lah lah fa lah full hoo hoo hoo hoo hoo hoo dum dum dum dum dum dum he he he ho ho ho fa lah lah" using "Good News"'

osascript -e 'say "oh I love mac x mac x mac x mac Dum dum dum dum dum dum dum he he he ho ho ho fa lah lah" using "Cellos"'
2

评论Comments

日志分类
首页[193]
flash As[107]
有的没的[59]
数码照片[4]
自由世界[19]
blender[4]