欢迎大家赞助一杯啤酒🍺 我们准备了下酒菜:Formal mathematics/Isabelle/ML, Formal verification/Coq/ACL2, C++/F#/Lisp
MacOS
小 (→Java) |
小 (→PHP) |
||
(未显示1个用户的38个中间版本) | |||
第1行: | 第1行: | ||
− | |||
− | |||
Mac OS X 是苹果公司(原苹果电脑公司)为麦金塔电脑开发的专属操作系统Mac OS的最新版本。Mac OS X于2001年首次在市场上推出,并从2002年起随麦金塔电脑发售。它是一套Unix基础的操作系统,包含两个主要的部份:核心名为[[Darwin]],是以[[FreeBSD]]源代码和[[Mach]]微核心为基础,由苹果公司和独立开发者社区协力开发;及一个由苹果电脑开发,名为Aqua之专有版权的图形用户界面。 | Mac OS X 是苹果公司(原苹果电脑公司)为麦金塔电脑开发的专属操作系统Mac OS的最新版本。Mac OS X于2001年首次在市场上推出,并从2002年起随麦金塔电脑发售。它是一套Unix基础的操作系统,包含两个主要的部份:核心名为[[Darwin]],是以[[FreeBSD]]源代码和[[Mach]]微核心为基础,由苹果公司和独立开发者社区协力开发;及一个由苹果电脑开发,名为Aqua之专有版权的图形用户界面。 | ||
− | + | ||
+ | ==版本== | ||
+ | *macOS 10.12 Sierra | ||
+ | *OS X 10.11 El Capitan | ||
+ | *OS X 10.10 Yosemite | ||
+ | *OS X 10.9 (Mavericks)巨浪 | ||
+ | *OS X 10.8(Mountain Lion)美洲狮 | ||
+ | *OS X 10.7(Lion)狮子 | ||
+ | *Mac OS X 10.6(Snow Leopard)雪豹 | ||
+ | *Mac OS X 10.5(Leopard)豹 | ||
+ | *Mac OS X 10.4(Tiger)老虎 | ||
+ | *Mac OS X 10.3(Panther)黑豹 | ||
+ | *Mac OS X 10.2(Jaguar)美洲虎 | ||
+ | *Mac OS X 10.1(Puma)美洲豹 | ||
+ | *Mac OS X 10.0(Cheetah)猎豹 | ||
+ | |||
==安全== | ==安全== | ||
+ | {{SeeWikipedia}} | ||
+ | |||
[[Mac OS X/security|Security]] | [[Mac OS X/security|Security]] | ||
+ | |||
+ | ==Brew== | ||
+ | 通过 [[Homebrew]] 安装软件包。 | ||
==Port== | ==Port== | ||
第13行: | 第31行: | ||
vim /etc/profile | vim /etc/profile | ||
export PATH=/opt/local/bin:$PATH | export PATH=/opt/local/bin:$PATH | ||
− | sudo port | + | sudo port selfupdate |
+ | sudo port upgrade outdated | ||
port list | port list | ||
port search php5 | port search php5 | ||
第34行: | 第53行: | ||
让MAC OS X 访问 Windows 共享文件 | 让MAC OS X 访问 Windows 共享文件 | ||
+ | |||
+ | ==Visual Studio== | ||
+ | [https://visualstudio.microsoft.com/zh-hans/vs/mac/ Visual Studio for Mac] | ||
==Web Server== | ==Web Server== | ||
第45行: | 第67行: | ||
make | make | ||
sudo make install | sudo make install | ||
− | cd /usr/local/sbin | + | cd /usr/local/nginx/sbin |
sudo ./nginx | sudo ./nginx | ||
===Apache=== | ===Apache=== | ||
− | + | sudo port install apache2 | |
+ | sudo vim /etc/apache2/httpd.conf | ||
+ | LoadModule php5_module libexec/apache2/libphp5.so | ||
+ | #PHP Settings | ||
+ | <IfModule php5_module> | ||
+ | AddType application/x-httpd-php .php | ||
+ | AddType application/x-httpd-php-source .phps | ||
+ | </IfModule> | ||
+ | |||
sudo httpd -k start | sudo httpd -k start | ||
+ | sudo apachectl restart | ||
+ | |||
+ | first.cgi | ||
+ | <nowiki>#!/usr/bin/perl -wT | ||
+ | print "Content-type: text/html\n\n"; | ||
+ | print "<h2>Hello, World!</h2>\n";</nowiki> | ||
+ | [Sat Dec 06 14:37:43 2014] [notice] Apache/2.2.26 (Unix) PHP/5.4.30 DAV/2 mod_ssl/2.2.26 OpenSSL/0.9.8za mod_perl/2.0.7 Perl/v5.16.2 configured -- resuming normal operations | ||
+ | [Sat Dec 06 14:37:52 2014] [error] [client ::1] Options ExecCGI is off in this directory: /Library/WebServer/Documents/first.cgi | ||
==Database== | ==Database== | ||
===PostgreSQL=== | ===PostgreSQL=== | ||
+ | [[Homebrew]]维护着最新版本[[PostgreSQL#OS_X|PostgreSQL的安装]] 或者通过 [http://www.macports.org/ MacPorts] 方式安装。 | ||
+ | port search postgresql // 选择要安装的版本 | ||
sudo port install postgresql91 | sudo port install postgresql91 | ||
sudo port install postgresql91-server | sudo port install postgresql91-server | ||
第65行: | 第105行: | ||
===MySQL=== | ===MySQL=== | ||
+ | 安装 [[MariaDB]] | ||
==NoSQL== | ==NoSQL== | ||
第86行: | 第127行: | ||
sudo ln -s /usr/bin/llvm-gcc-4.2 /usr/bin/gcc-4.2 | 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 | sudo ln -s /usr/bin/llvm-g++-4.2 /usr/bin/g++-4.2 | ||
+ | |||
+ | ==PHP== | ||
+ | https://php-osx.liip.ch/ | ||
+ | curl -s https://php-osx.liip.ch/install.sh | bash -s 7.3 | ||
+ | curl -s https://php-osx.liip.ch/install.sh | bash -s 7.2 | ||
+ | |||
+ | 创建符号链接 /usr/local/php5/entropy-php.conf /etc/apache2/other/+php-osx.conf | ||
+ | |||
+ | vim ~/.profile file and add the following | ||
+ | export PATH=/usr/local/php5/bin:$PATH | ||
+ | php.ini | ||
+ | php -i | grep php.ini | ||
+ | /usr/local/php5/lib/php.ini | ||
==Java== | ==Java== | ||
第92行: | 第146行: | ||
vi /etc/profile | vi /etc/profile | ||
− | JAVA_HOME=/Library/Java/JavaVirtualMachines/ | + | JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_21.jdk/Contents/Home |
export JAVA_HOME | export JAVA_HOME | ||
+ | export PATH=/Library/Java/JavaVirtualMachines/jdk1.7.0_21.jdk/Contents/Home/bin:$PATH | ||
export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/ | export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/ | ||
export USER_MEM_ARGS="-Xmx1024m -XX:MaxPermSize=256m" | export USER_MEM_ARGS="-Xmx1024m -XX:MaxPermSize=256m" | ||
第103行: | 第158行: | ||
[http://support.apple.com/kb/DL1421 Java for OS X Lion Update 1] updating Java SE 6 to 1.6.0_29. | [http://support.apple.com/kb/DL1421 Java for OS X Lion Update 1] updating Java SE 6 to 1.6.0_29. | ||
+ | |||
+ | ==xcode-select== | ||
+ | 不用安装Xcode,只需要安装下载安装类似工具包:Command_Line_Tools_macOS_10.14_for_Xcode_10.1.dmg 就能完成一些源代码编译工作。 | ||
+ | sudo xcode-select -switch /Library/Developer/CommandLineTools | ||
==技巧== | ==技巧== | ||
+ | macOS 版本 | ||
+ | $> sw_vers -productVersion | ||
+ | |||
+ | 修改主机名:sudo scutil --set HostName 主机名 | ||
+ | |||
我在设备中运行Xcode,安装 iOS 5.0 Simulator 出现以下错误,需要将Xcode安装到应用程序里,就OK了。 | 我在设备中运行Xcode,安装 iOS 5.0 Simulator 出现以下错误,需要将Xcode安装到应用程序里,就OK了。 | ||
chmod: Unable to change file mode on Xcode: Read-only file system | chmod: Unable to change file mode on Xcode: Read-only file system | ||
第120行: | 第184行: | ||
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist | sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist | ||
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist | sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist | ||
+ | |||
+ | ==X11== | ||
+ | [[X11]] 不包含在 OS X,但 X11 服务端和客户端软件包可通过 [[XQuartz]] 项目获得。 | ||
+ | |||
+ | ==图集== | ||
+ | <gallery> | ||
+ | image:macOS-architecture.gif|macOS架构 | ||
+ | image:Darwin-and-macOS.gif|Darwin和macOS | ||
+ | image:macOS-kernel-architecture.gif|macOS核心架构 | ||
+ | image:visual-studio-for-mac-installer.png|VS安装 | ||
+ | </gallery> | ||
==链接== | ==链接== | ||
[[Image:Mac-OS-X-Leopard-10.5.5-VMware-Image.png|right|thumb|Mac OS X Leopard 10.5.5 VMware Image]] | [[Image:Mac-OS-X-Leopard-10.5.5-VMware-Image.png|right|thumb|Mac OS X Leopard 10.5.5 VMware Image]] | ||
*[http://www.apple.com/macosx/ Mac OS X官网] | *[http://www.apple.com/macosx/ Mac OS X官网] | ||
+ | *[https://github.com/iCHAIT/awesome-osx Awesome OS X] [[image:awesome.png]] | ||
+ | *[https://www.cocoacontrols.com/ Cocoa Controls: open source UI components for iOS and OS X] | ||
+ | *[http://www.macosforge.org/ Mac OS Forge] | ||
*[http://download.huihoo.com/apple/MAC_OS_X_Leopard_10.5.5_VMware_Image.4798016.TPB.torrent Mac OS X Leopard 10.5.5 VMware Image BT种子] | *[http://download.huihoo.com/apple/MAC_OS_X_Leopard_10.5.5_VMware_Image.4798016.TPB.torrent Mac OS X Leopard 10.5.5 VMware Image BT种子] | ||
*[http://www.tonymacx86.com/ 著名的黑苹果开发组织tonymacx86] | *[http://www.tonymacx86.com/ 著名的黑苹果开发组织tonymacx86] | ||
第129行: | 第207行: | ||
{{comment}} | {{comment}} | ||
− | [[ | + | [[category:apple]] |
− | [[ | + | [[category:mach]] |
− | [[ | + | [[category:FreeBSD]] |
+ | [[category:OS X]] |
2020年8月20日 (四) 06:46的最后版本
Mac OS X 是苹果公司(原苹果电脑公司)为麦金塔电脑开发的专属操作系统Mac OS的最新版本。Mac OS X于2001年首次在市场上推出,并从2002年起随麦金塔电脑发售。它是一套Unix基础的操作系统,包含两个主要的部份:核心名为Darwin,是以FreeBSD源代码和Mach微核心为基础,由苹果公司和独立开发者社区协力开发;及一个由苹果电脑开发,名为Aqua之专有版权的图形用户界面。
目录 |
[编辑] 版本
- macOS 10.12 Sierra
- OS X 10.11 El Capitan
- OS X 10.10 Yosemite
- OS X 10.9 (Mavericks)巨浪
- OS X 10.8(Mountain Lion)美洲狮
- OS X 10.7(Lion)狮子
- Mac OS X 10.6(Snow Leopard)雪豹
- Mac OS X 10.5(Leopard)豹
- Mac OS X 10.4(Tiger)老虎
- Mac OS X 10.3(Panther)黑豹
- Mac OS X 10.2(Jaguar)美洲虎
- Mac OS X 10.1(Puma)美洲豹
- Mac OS X 10.0(Cheetah)猎豹
[编辑] 安全
您可以在Wikipedia上了解到此条目的英文信息 MacOS Thanks, Wikipedia. |
[编辑] Brew
通过 Homebrew 安装软件包。
[编辑] 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 selfupdate sudo port upgrade outdated 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 共享文件
[编辑] Visual Studio
[编辑] 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/nginx/sbin sudo ./nginx
[编辑] Apache
sudo port install apache2 sudo vim /etc/apache2/httpd.conf LoadModule php5_module libexec/apache2/libphp5.so #PHP Settings <IfModule php5_module> AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps </IfModule>
sudo httpd -k start sudo apachectl restart
first.cgi
#!/usr/bin/perl -wT print "Content-type: text/html\n\n"; print "<h2>Hello, World!</h2>\n";
[Sat Dec 06 14:37:43 2014] [notice] Apache/2.2.26 (Unix) PHP/5.4.30 DAV/2 mod_ssl/2.2.26 OpenSSL/0.9.8za mod_perl/2.0.7 Perl/v5.16.2 configured -- resuming normal operations [Sat Dec 06 14:37:52 2014] [error] [client ::1] Options ExecCGI is off in this directory: /Library/WebServer/Documents/first.cgi
[编辑] Database
[编辑] PostgreSQL
Homebrew维护着最新版本PostgreSQL的安装 或者通过 MacPorts 方式安装。
port search 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
安装 MariaDB
[编辑] 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
[编辑] PHP
curl -s https://php-osx.liip.ch/install.sh | bash -s 7.3 curl -s https://php-osx.liip.ch/install.sh | bash -s 7.2
创建符号链接 /usr/local/php5/entropy-php.conf /etc/apache2/other/+php-osx.conf
vim ~/.profile file and add the following
export PATH=/usr/local/php5/bin:$PATH
php.ini
php -i | grep php.ini /usr/local/php5/lib/php.ini
[编辑] Java
vi /etc/profile
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_21.jdk/Contents/Home export JAVA_HOME export PATH=/Library/Java/JavaVirtualMachines/jdk1.7.0_21.jdk/Contents/Home/bin:$PATH 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-select
不用安装Xcode,只需要安装下载安装类似工具包:Command_Line_Tools_macOS_10.14_for_Xcode_10.1.dmg 就能完成一些源代码编译工作。
sudo xcode-select -switch /Library/Developer/CommandLineTools
[编辑] 技巧
macOS 版本
$> sw_vers -productVersion
修改主机名:sudo scutil --set HostName 主机名
我在设备中运行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
[编辑] X11
X11 不包含在 OS X,但 X11 服务端和客户端软件包可通过 XQuartz 项目获得。
[编辑] 图集
- 生成缩略图错误:
VS安装
[编辑] 链接
- Mac OS X官网
- Awesome OS X
- Cocoa Controls: open source UI components for iOS and OS X
- Mac OS Forge
- Mac OS X Leopard 10.5.5 VMware Image BT种子
- 著名的黑苹果开发组织tonymacx86
<discussion>characters_max=300</discussion>