MacOS

来自开放百科 - 灰狐
2012年10月14日 (日) 04:27Allen (讨论 | 贡献)的版本

跳转到: 导航, 搜索
Wikipedia-35x35.png 您可以在Wikipedia上了解到此条目的英文信息 MacOS Thanks, Wikipedia.

Mac OS X 是苹果公司(原苹果电脑公司)为麦金塔电脑开发的专属操作系统Mac OS的最新版本。Mac OS X于2001年首次在市场上推出,并从2002年起随麦金塔电脑发售。它是一套Unix基础的操作系统,包含两个主要的部份:核心名为Darwin,是以FreeBSD源代码和Mach微核心为基础,由苹果公司和独立开发者社区协力开发;及一个由苹果电脑开发,名为Aqua之专有版权的图形用户界面。

雪豹

目录

安全

Security

Port

安装 MacPorts

cd MacPorts-2.0.3
./configure && make && sudo make install
add /opt/local/bin to your PATH
vim /etc/profile
export PATH=/opt/local/bin:$PATH
sudo port -v selfupdate
port list
port search php5
port info php5
port deps php5
port variants php5
sudo port install nmap
sudo port clean --all nmap
sudo port uninstall nmap
port installed
port -v installed nmap
port outdated
sudo port upgrade nmap
port dependents openssl
port livecheck rrdtool 
...

Windows

Mac OS X 与 Windows 的集成

让MAC OS X 访问 Windows 共享文件

Web Server

Nginx

wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.21.zip
./config --prefix=/usr/local
make 
sudo make install
wget http://nginx.org/download/nginx-1.0.10.tar.gz
./config --prefix=/usr/local --with-http_ssl_module
make 
sudo make install
cd /usr/local/sbin
sudo ./nginx

Apache

cd /usr/sbin
sudo httpd -k start

Database

PostgreSQL

sudo port install postgresql91
sudo port install postgresql91-server
sudo mkdir -p /opt/local/var/db/postgresql91/defaultdb
sudo chown postgres:postgres /opt/local/var/db/postgresql91/defaultdb
sudo su postgres -c '/opt/local/lib/postgresql91/bin/initdb -D /opt/local/var/db/postgresql91/defaultdb'
sudo su postgres
/opt/local/lib/postgresql91/bin/postgres -D /opt/local/var/db/postgresql91/defaultdb &
or 
/opt/local/lib/postgresql91/bin/pg_ctl -D /opt/local/var/db/postgresql91/defaultdb -l logfile start

MySQL

NoSQL

LLVM

cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin
ls *llvm-gcc*
arm-apple-darwin10-llvm-gcc-4.2		llvm-gcc
i686-apple-darwin10-llvm-gcc-4.2	llvm-gcc-4.2
port info llvm
llvm @2.9, Revision 2 (lang)
Replaced by:          llvm-2.9
Variants:             universal
wget http://llvm.org/releases/3.1/clang+llvm-3.1-x86_64-apple-darwin11.tar.gz
 ./llc --version
 LLVM (http://llvm.org/):
 LLVM version 3.1
 ...
sudo ln -s /usr/bin/llvm-gcc-4.2 /usr/bin/gcc-4.2
sudo ln -s /usr/bin/llvm-g++-4.2 /usr/bin/g++-4.2

Java

vi /etc/profile

JAVA_HOME=/Library/Java/JavaVirtualMachines/JDK 1.7.0 Developer Preview.jdk/Contents/Home
export JAVA_HOME
export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/
export USER_MEM_ARGS="-Xmx1024m -XX:MaxPermSize=256m"
export MW_HOME=/Users/huihoo/Software/weblogic // WebLogic
export WL_HOME=/Users/huihoo/Software/weblogic/wlserver


No Java runtime present, requesting install. 的解决方法

Java for OS X Lion Update 1 updating Java SE 6 to 1.6.0_29.

技巧

我在设备中运行Xcode,安装 iOS 5.0 Simulator 出现以下错误,需要将Xcode安装到应用程序里,就OK了。

chmod: Unable to change file mode on Xcode: Read-only file system

安装postgresql-9.1.5-1-osx出现以下错误:

Your system seems to be configured with a setting for SHMALL which is less than SHMMAX/4096. Please see the installer README file for more information on how to configure shared memory settings.

设置共享内存

sysctl -A | grep shm
kern.sysv.shmmax: 4194304
kern.sysv.shmmin: 1
kern.sysv.shmmni: 32
kern.sysv.shmseg: 8
kern.sysv.shmall: 1024
sudo vim /etc/sysctl.conf

DNS屏蔽开启

sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist

链接

Mac OS X Leopard 10.5.5 VMware Image

Comment-32x32.png

<discussion>characters_max=300</discussion>

分享您的观点
个人工具
名字空间

变换
操作
导航
工具箱