关闭mac启动项
在win下经常会使用msconfig或regedit等命令来检查系统启动项,mac os里当然也一样:
launchctl unload -w /System/Library/LaunchDaemons/com.apple.syslogd.plist
更多mac 命令可以参考官方手册:
No commentsAMM语录
最喜欢吃:肉
最喜欢的颜色:橙 最不喜欢的颜色:棕色
最想去的地方:塞班岛(不知道在哪,反正twins去过)、要不然威尼斯也行、最差也要新加坡,反正不管,我就要出国!
那你最想拥有的 5 样东西是:钱、朋友、貌似就够了也~我满足嗒^^!!!
最想听我说的话:我们一起去吃饭饭
自己最大的缺点:太聪明 太矮
最喜欢喝:绿茶
最喜欢的数字:7
喜欢看哪一种电影类型:偶像剧
你最怕什么东西:毛毛虫
讨厌别人做什么:骗我
最怀念的日子:石牌岭打星际的日子
最擅长的事呢:我做什么事都很厉害啊。
最不敢吃的东西:蛇啊,蚕蛹啊,很多海鲜啊
最喜欢什么服装品牌是:AF (Abercrombie & Fitch )
最喜欢自己五官之一:耳朵(最讨厌的就是眼睛,喜欢内双小眼睛)
如果生命只剩三天,如何度过:吃好吃的,把自己爱的人统统叫道身边
我们在一起最难忘的一件事情:在湖南长沙的经历
说句话,什么都行:你把所有的问题回答一遍以后才准去睡!^^
1 commentMAC OS X 10.4.6 编译安装 Apache,PHP,MySql
MAC OS X “系统预置”里的“共享”里提供了“个人web共享”可以很快搭建起静态环境,或者下载类似MAMP的集成环境包快速搭建起动态环境,还有ports的类似freebsd ports的方式安装,但最原始的方式就是编译安装了,当然也是最费时间和精力的。
准备工作当然是先搭建好编译环境,下载并安装xcode后,以后的步骤基本和linux下一样:
### openssl
wget http://www.openssl.org/source/openssl-0.9.8e.tar.gz
tar zxvf openssl-0.9.8e.tar.gz
cd openssl-0.9.8e
./config –prefix=/usr/local/openssl
make
make test
make install
echo ‘/usr/local/openssl/lib/’ >> /etc/ld.so.conf
cd ..
### 查看openssl的版本号
openssl version -a
### zlib
wget http://www.zlib.net/zlib-1.2.3.tar.gz
tar xvfz zlib-1.2.3.tar.gz
cd zlib-1.2.3
./configure –prefix=/usr/local/zlib
make
make install
cd ..
### curl
wget http://curl.haxx.se/download/curl-7.14.0.tar.gz
tar xvfz curl-7.14.0.tar.gz
cd curl-7.14.0
./configure –prefix=/usr/local/curl
make
make install
cd ..
### libpng
wget http://prdownloads.sourceforge.net/libpng/libpng-1.2.19.tar.gz
tar xvfz libpng-1.2.19.tar.gz
cd libpng-1.2.19
./configure –prefix=/usr/local/libpng
make
make install
cd ..
### freetype
wget http://downloads.sourceforge.net/freetype/freetype-2.3.5.tar.gz
tar xvfz freetype-2.3.5.tar.gz
cd freetype-2.3.5
./configure –prefix=/usr/local/freetype2
make
make install
cd ..
### jpeg
wget ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz
tar xvfz jpegsrc.v6b.tar.gz
cd jpeg-6b
mkdir /usr/local/jpeg6
mkdir /usr/local/jpeg6/include
mkdir /usr/local/jpeg6/lib
mkdir /usr/local/jpeg6/bin
mkdir /usr/local/jpeg6/man
mkdir /usr/local/jpeg6/man/man1
./configure –prefix=/usr/local/jpeg6 –enable-shared –enable-static
make
make test
make install
cd ..
### xpm
tar xvfz xpm-3.4k.tar.gz
cd xpm-3.4k
xmkmf -a
make
make install
cd ..
### t1lib
tar xvfz t1lib-1.3.tar.gz
cd T1Lib-1.3/
./configure
make without_doc
make install
cd ..
### libxml2
wget http://ftp.acc.umu.se/pub/GNOME/sources/libxml2/2.6/libxml2-2.6.29.tar.gz
tar zxvf libxml2-2.6.29.tar.gz
cd libxml2-2.6.29
./configure –prefix=/usr/local/libxml2
make
make install
cd ..
### libxslt
wget http://ftp.acc.umu.se/pub/GNOME/sources/libxslt/1.1/libxslt-1.1.20.tar.gz
tar zxvf libxslt-1.1.20.tar.gz
cd libxslt-1.1.20
./configure –prefix=/usr/local/libxslt –with-libxml-prefix=/usr/local/libxml2
make
make install
cd ..
### fontconfig
wget http://www.fontconfig.org/release/fontconfig-2.4.2.tar.gz
tar xvfz fontconfig-2.4.2.tar.gz
cd fontconfig-2.4.2
./configure –prefix=/usr/local/fontconfig –disable-docs –sysconfdir=/etc –mandir=/usr/share/man –with-freetype-config=/usr/local/freetype2
make
make install
cd ..
### libiconv
tar xvfz libiconv-1.9.2.tar.gz
cd libiconv-1.9.2
./configure –prefix=/usr/local/libiconv
make
make install
cd ..
tar xvfz gettext-0.15.tar.gz
cd gettext-0.15
./configure –prefix=/usr/local/gettext
make
make check
make install
cd ..
cd libiconv-1.9.2
make distclean
./configure –prefix=/usr/local/libiconv
make
make install
cd ..
### gd
tar xvfz gd-2.0.26gif.tar.gz
cd gd-2.0.26gif
./configure –prefix=/usr/local/gd2 –with-zlib=/usr/local/zlib –with-png=/usr/local/libpng –with-jpeg=/usr/local/jpeg6 –with-freetype=/usr/local/freetype2 –with-fontconfig=/usr/local/fontconfig –with-xpm=/usr/local –with-libiconv-prefix=/usr/local/libiconv
make
make install
cd ..
vi gd_png.c
找到 png.h 改成 “/usr/local/libpng/include/png.h”
### mysql
tar xvfz mysql-5.0.45.tar.gz
cd mysql-5.0.45
./configure –prefix=/usr/local/mysql –with-extra-charsets=gbk
make
make install
ln -s /usr/local/mysql/include/mysql /usr/include/mysql
ln -s /usr/local/mysql/lib/mysql /usr/lib/mysql
./scripts/mysql_install_db
/usr/local/mysql/bin/mysqladmin -u root -p 123456
/usr/local/mysql/share/mysql/mysql.server start
ln -s /private/var/mysql/mysql.sock /tmp/mysql.sock
### httpd
wget http://apache.mirror.phpchina.com/httpd/httpd-2.2.6.tar.gz
tar xvfz httpd-2.2.6.tar.gz
cd httpd-2.2.6/srclib/apr
./configure –prefix=/usr/local/apr
make
make install
cd ../apr-util
./configure –with-apr=/usr/local/apr –with-ldap –with-ldap-include=/usr/local/include –with-ldap-lib=/usr/local/lib
make
make install
cd ../..
./configure –prefix=/usr/local/httpd –enable-auth-anon –enable-auth-dbm –enable-cache –enable-disk-cache –enable-expires –enable-file-cache –enable-headers –enable-info –enable-logio –enable-mem-cache –enable-proxy –enable-rewrite –enable-ssl –with-ssl=/usr/local/openssl -enable-unique-id –enable-usertrack –enable-vhost-alias –enable-mods-shared=most –enable-so –enable-ldap –enable-authnz-ldap
make
make install
vi /usr/local/httpd/conf/httpd.conf
/usr/local/httpd/bin/apachectl start
cd ..
### php
wget http://au3.php.net/get/php-5.2.4.tar.gz/from/cn.php.net/mirror
tar xvfz php-5.2.4.tar.gz
cd php-5.2.4
./configure –prefix=/usr/local/httpd/php –with-mysql=/usr/local/mysql –with-apxs2=/usr/local/httpd/bin/apxs –with-config-file-path=/usr/local/httpd/conf –with-openssl-dir=/usr/local/openssl –with-libxml-dir=/usr/local/libxml2 –with-expat-dir=/usr/lib –with-xsl=/usr/local/libxslt –enable-xslt –with-gd=/usr/local/gd2 –with-jpeg-dir=/usr/local/jpeg6 –with-zlib-dir=/usr/local/zlib –with-png-dir=/usr/local/libpng –with-ttf=/usr/local/freetype2 –with-tiff-dir=/usr/local –with-iconv=/usr/local/libiconv –with-gettext=/usr/local/gettext –with-freetype-dir=/usr/local/freetype2 –with-xpm-dir=/usr/local –with-curl=/usr/local/curl –with-xml –with-mime-magic –enable-track-vars –enable-sockets –enable-soap –enable-ftp –enable-mbstring=all –enable-calendar –enable-pcntl –enable-embed –enable-fastcgi –enable-magic-quotes –enable-mbregex
vi /usr/local/httpd/conf/httpd.conf
在LoadModule处添加:
LoadModule php5_module /usr/local/httpd/php/lib/libphp5.so
找到 AddType application/x-gzip .gz .tgz 在其下添加如下内容
AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps
最后在编译php的时候出现 make: *** [libphp5.la] 的错误提示,编译了3次始终不成功,最后不小心写错了–prefix=/usr/local/httpd/php 为:-prefix=/usr/locla/httpd/php 才通过(但在linux是没问题的),呵呵要不是写错了,估计我也不知道原因出在这里。
设置后台启动 :
vi /etc/rc.local
#!/bin/bash
/usr/local/httpd/bin/apachectl start
/usr/local/mysql/share/mysql/mysql.server start
Mac OS X 下安装 Photoshop rdesktop
1.Photoshop CS3
正常安装是需要在Mac OS X 10.4.8以上版本进行,如果和我一样是10.4.6就要做如下修改了:
运行“实用程序”>“终端”输入:
sudo su
#输入su密码
vim /System/Library/CoreServices/SystemVersion.plist
#替换所有 “10.4.6″ 为”10.4.8″
:wq!
#保存退出后重起
看“关于本机”显示版本为:10.4.8即可安装Photoshop CS3了
2.rdesktop
平时需要用rdesktop连接远程的Windows服务器桌面,安装前提是gcc,DeveloperTools,DevSDK,openssl已安装,除openssl需要编译安装(或ports方式)外,其他软件均可在xcode2.*中找到对应的pkg安装包。
终端输入:
sudo su
#编译安装 openssl 下载地址: http://www.openssl.org/source/openssl-0.9.8e.tar.gz
tar zxvf openssl-0.9.8e.tar.gz
cd openssl-0.9.8e
./config shared zlib
make
make test
make install
ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl
ln -s /usr/local/ssl/include/openssl /usr/include/openssl
#编译安装rdesktop,下载地址:http://www.rdesktop.org/#download
tar zxvf rdesktop-1.5.0.tar.gz
cd rdesktop-1.5.0
./configure
make
make install
#注意:必须在X11上运行
/usr/local/bin/rdesktop -v
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
NV显卡驱动下载:MacVidia1.0.8.pkg.zip
No comments











