Sie sind auf Seite 1von 6

Click Battery on top right corner

Show percentage
Download Macports
http://www.macports.org/install.php
MacPorts-2.2.0-10.8-MountainLion.pkg
echo "export PATH=$PATH:/opt/local/bin" > ~/.bash_profile
Download and Open XCode
Preferences
Downloads
Install Command Line Tools
Download Software
smartsvn-macosx-10_78-7_6.tar.gz
http://www.sublimetext.com
sudo port install php53-fpm
sudo cp /opt/local/etc/php53/php-fpm.conf.default
/opt/local/etc/php53/php-fpm.conf
sudo port install php53-mysql php53-mbstring php53-APC
sudo port install php53-mcrypt
sudo port install php53-gd
sudo port install php53-curl
sudo port install php53-iconv
sudo port install nginx
sudo cp -p /opt/local/etc/nginx/fastcgi.conf.default
/opt/local/etc/nginx/fastcgi.conf
sudo cp /opt/local/etc/nginx/fastcgiparams.default
/opt/local/etc/nginx/fastcgiparams
sudo cp /opt/local/etc/nginx/mime.types.default
/opt/local/etc/nginx/mime.types
sudo cp /opt/local/etc/nginx/nginx.conf.default
/opt/local/etc/nginx/nginx.conf
sudo m!dir /opt/local/etc/nginx/conf
"##$ %&"'C$#"( --) /opt/local/share/nginx/html
Open App Store
Open in Safari : https://itunes.apple.com/us/app/xcode/id497799835?
ls=1&mt=12
View in Mac App Store
Free -> Install App
here
Configure start and stop command in your .bash_profile
* nginx
alias nginxstart+,sudo launchctl load --
/.ibrary/.aunch%aemons/org.macports.nginx.plist,
alias nginxstop+,sudo launchctl unload --
/.ibrary/.aunch%aemons/org.macports.nginx.plist,
alias nginxrestart+,nginxstop/ nginxstart/,
# php-fpmalias fpm_start=sudo launchctl load -w
/Library/LaunchDaemons/org.macports.php!-fpm.plistalias fpm_stop=sudo
launchctl unload -w /Library/LaunchDaemons/org.macports.php!-fpm.plist
alias fpm_restart=fpm_stop" fpm_start
# mys#lalias mys#l=/usr/local/mys#l/bin/mys#lralias
mys#ladmin=/usr/local/mys#l/bin/mys#ladminalias s#l_start=$sudo
/Library/%tartup&tems/'y%(LC)'/'y%(LC)' restart$alias
s#l_stop=$sudo /Library/%tartup&tems/'y%(LC)'/'y%(LC)' stop$alias
s#l_restart=$sudo /Library/%tartup&tems/'y%(LC)'/'y%(LC)' restart$
&nstall 'ongoD*
http+//www.mongodb.org/downloads
mongodb-os,-,-._./-0./...tg1
Download, unpack, and install the pre-compiled 64-bit binaries:curl
http://downloads.mongodb.org/osx/mongodb-osx-x86_64-2.4.6.tgz
> mongodb.tgz
tar xzf mongodb-osx-x86_64-2.4.6.tgz
mkdir /opt/loca/mongodb
sudo mv mongodb-osx-x86_64-2.4.6 /opt/local/mongodb
sudo mkdir /opt/local/mongodb_data /var/log/mongodb
sudo chown - root /opt/local/mongodb
Next, youll want to make a config file so you can change the serers options without
fiddling with command-line arguments!
"ae as nano #opt#local#mongodb#mongod!conf:
! "tor# data alongsid# $ongo%& inst#ad of th# d#fault'
/data/db/
dbpath ( /opt/local/mongodb_data
! )nl* acc#pt local conn#ctions
bind_ip ( +2,.-.-.+
Now, well make a launchd $ob to register the serer as an %" & daemon! launchd will
start the serer at startup, stop it before shutdown, make sure it stays up, and
redirect its output to a nice log file!
"ae as nano #'ibrary#'aunchDaemons#org!mongodb!mongod!plist:
./xml v#rsion(0+.-0 #ncoding(0123-80/4
.5%)62789 plist 81&:;6 0-//<ppl#//%2% 8:;"2 +.-//9=0
0http>//www.appl#.com/%2%s/8rop#rt*:ist-+.-.dtd04
.plist v#rsion(0+.-04
.dict4
.k#*4:ab#l./k#*4
.string4org.mongodb.mongod./string4
.k#*48rogram<rgum#nts./k#*4
.arra*4
.string4/opt/local/mongodb/bin/mongod./string4
.string4run./string4
.string4--config./string4
.string4/opt/local/mongodb/mongod.conf./string4
./arra*4
.k#*4un<t:oad./k#*4
.tru#/4
.k#*4?##p<liv#./k#*4
.tru#/4
.k#*4@orking%ir#ctor*./k#*4
.string4/opt/local/mongodb./string4
.k#*4"tandard9rror8ath./k#*4
.string4/var/log/mongodb/output.log./string4
.k#*4"tandard)ut8ath./k#*4
.string4/var/log/mongodb/output.log./string4
./dict4
./plist4
=ow w# Aust n##d to load th# launchd Aob>
sudo launchctl load
/:ibrar*/:aunch%a#mons/org.mongodb.mongod.plist
)n# last thing> *ou should probabl* add /opt/local/mongodb/bin
to *our B8<2C --4 nano /#tc/paths
ch#cking *our path #cho B8<2C' mak# sur#
/opt/local/mongodb/bin in *our list.
sudo sh -c D#cho 0/opt/local/mongodb/bin0 4
/#tc/paths.d/mongodbD
<nd that should do it5 2r* visiting http>//localhost>28-+, to
s## th# status consol# for *our databas#.
2hat wa* *ou can us# th# oth#r binari#s that ship with
$ongo%&' lik# th# mongo consol#' mongo#xport' and so on.
7ou can adAust *our path th# r#gular wa* b* #diting *our
sh#llEs profil#' or *ou can us# this nic# paths.d m#chanism
that )" F provid#s>
&nstall 'y%(L
mys#l-..!!-os,23..-,-._./.dmg
http+//blog.mclaughlinsoftware.com/0322/30/23/mac-os-,-mys#l-install/
%tep by step
2. The open file folder and it will loo lie the followin!. "a#nch the mysql-
5.5.33-osx 10.6-x86_64.pkg file$ which installs the prod#ct.
%. After la#nchin! the exec#table$ &o# are now on the first pa!e of the 'nstall (&)*"
+.+., installation application. -lic the -ontin#e b#tton.
,. This pa!e contains the instr#ctions$ &o# can pa#se to read the. or contin#e with
these instr#ctions. -lic the -ontin#e b#tton to proceed.
/. This pa!e contains the 0eneral P#blic "icense 10P"2. 3o# a!ree or stop the
installation. -lic the -ontin#e b#tton to proceed.
+. The followin! o4erla& dialo! contains &o#r a!ree.ent. -lic the A!ree b#tton to
proceed.
5. There are fewer options in this installation than the 6indows installation. 6hile
&o# can chan!e the installation location$ the software installs b& defa#lt in the
/usr/local/mysql director&. The installation re7#ires that &o# ha4e a mysql
#ser acco#nt on the operatin! s&ste.$ and &o# don8t need to do an&thin! beca#se one
exists as part of the defa#lt (ac 9) : installation. -lic the 'nstall b#tton to proceed.
;. This dialo! re7#ires the s&ste. ad.inistrator8s password. <nter the 4alid password
and clic the 9= b#tton to proceed.
>. ?ependin! on the s&ste.$ this co#ld tae .ore than a .in#te. All &o# can do it
wait.
@. This pa!e tells &o# that &o#84e co.pleted the installation. -lic the -lose b#tton to
proceed.
AB. This step re7#ires that &o# ret#rn to the download folder$ shown in )tep C% abo4e.
"a#nch the MySQLStartupItem.pkg and &o#8ll see the followin! (&)*"
)tart#p 'te. 'nstaller dialo!. -lic the -ontin#e b#tton to proceed.
AA. This pa!e contains the instr#ctions for the (&)*" )tart#p software$ &o# can pa#se
to read the. or contin#e with these instr#ctions. -lic the -ontin#e b#tton to proceed.
A%. This pa!e ass if &o# want to chan!e the director&. '8d reco..end &o# lea4e it as
the defa#lt beca#se it re7#ires the )&ste. Ad.inistrator8s password to start and stop
the database. 't sho#ld also start for &o# e4er& ti.e &o# boot the .achine. -lic the
-ontin#e b#tton to proceed.
A,. This dialo! re7#ires the s&ste. ad.inistrator8s password. <nter the 4alid password
and clic the 9= b#tton to proceed.
A/. 3o# co#ld see a pro!ress dialo! box b#t !enerall& it happens so fast &o# sho#ld
land at the 'nstallation was )#ccessf#l dialo!. -lic the -lose b#tton to proceed.
A+. This step re7#ires that &o# ret#rn to the download folder$ shown in )tep C% abo4e.
"a#nch the MySQL.prefPane and &o#8ll see the followin! (&)*" Preferences
dialo!. -lic the 'nstall b#tton to proceed.
A5. This dialo! re7#ires the s&ste. ad.inistrator8s password. <nter the 4alid password
and clic the 9= b#tton to proceed.
A;. ?on8t clic in the a#to.atic start b#tton #nless &o#8re s#re. 9therwise$ there8s a
lot of clean#p to be able to ret#rn to this point and start or stop the ser4er as re7#ired.
This is the last screen$ &o# sho#ld clic the )tart (&)*" )er4er b#tton to start
(&)*".
3o# can start and stop the ser4ice b& openin! &o#r )&ste. Preferences$ where &o#8ll
find the. in the botto. 9ther row. 'f the intent was to ha4e it start a#to.aticall&$
so.eti.es the per.issions are incorrect. 3o#8ll !et the followin! error in (&)*"
+.+.@ b#t not in (&)*" +.+.A5 beca#se the (&)*" ?(0 file is fixed. 3o# can sip
the instr#ctions #ntil &o# !et to Configure Users Shell Environment below:
'nsec#re )tart#p 'te. disabled.
""ibrar&/)tart#p'te.s/(&)*"-9(" has not been started beca#se it does not ha4e the
proper sec#rit& settin!s
3o# can fix this b& chan!in! the per.issions .an#all& in a Ter.inal )ession. "a#nch
a Ter.inal )ession fro. &o#r Dtilities folder inside &o#r Applications folder.
-han!e director& to the /Library/StartupItems/MySQLCOM director&. Then$
list the files. These co..ands sho#ld do the tric for &o#:
cd /Library/StartupItems/MySQLCOM
ls -al
'f &o# see these per.issions$ &o# ha4e proble. beca#se the !ro#p for start#p files
sho#ld be wheel not staff:
drwxr-xr-x 4 root staff 136 Jan 20 13:46 .
drwxr-xr-x 4 root wheel 136 Feb 9 21:11 ..
-rwxr-xr-x 1 root staff 1300 Jan 20 13:46 MySQLCOM
-rw-r--r-- 1 root staff 469 Jan 20 13:46
StartupParameters.plist
3o# can chan!e the files with this co..and:
sudo chown root:wheel *
Howe4er$ now &o# need to step #p the director& tree one le4el to
/Library/StartupItems$ and chan!e the ownership of:
drwxr-xr-x 4 root staff 136 Jan 20 13:46 MySQLCOM
There are two co..ands to do this. The first chan!es director& b& .o4in! to the
parent director& in the hierarch& 1the parent director& is represented b& two dots2. The
second chan!es the !ro#p ownership of the MySQLCOM director&.
cd ..
sudo chown root:wheel MySQLCOM
Eow &o# need to confi!#re &o#r shell en4iron.ent and harden the database.
Hardenin! .eans sec#rin! acco#nts with passwords. The&8re co4ered in the next two
sections.
Configure Users Shell Environment
Ass#.in! &o# accepted the defa#lts$ &o# sho#ld be able to cop& the re7#ired
instr#ctions directl& into a .bash_login file if one exists. Dnless &o#84e created
one before there won8t be a file. (ac 9) : doesn8t a#to.aticall& create the file. 'f
&o# don8t ha4e the file$ &o# can create one with the followin! s&ntax:
touch .bash_login
==== create under /Users/{nameuser} ====
nano .bash_login
C )et the (&)*" Ho.e en4iron.ent 4ariable to point to the root director& of the$
export set (3)*"_H9(<=/#sr/local/.&s7l
C Add the /bin director& fro. the (3)*"_H9(< location into &o#r $PATH en4iron.e$
export set PATH=$PATH:$(3)*"_H9(</bin
C -reate aliases that .ae it easier for &o# to .an#all& start and stop the (&)$
alias s7l_start="s#do /#sr/local/.&s7l/s#pportFfiles/.&s7l.ser4er start"
alias s7l_stop="s#do /#sr/local/.&s7l/s#pportFfiles/.&s7l.ser4er stop"
alias s7l_restart="s#do /#sr/local/.&s7l/s#pportFfiles/.&s7l.ser4er restart"
alias s7l_stat#s="ps a#x G !rep .&s7l G !rep F4 !rep" .bash_lo!in
3o# need to sa4e the file and close and restart a new Ter.inal session to place these
en4iron.ent 4ariables in scope. 3o# co#ld also r#n the followin! to p#t the. in scope
witho#t closin! and openin! the ter.inal:
. ./.bash_login or
. ~/.bash_login
)ec#re the ?atabase
This is presentl& necessar& beca#se of the different file str#ct#re in a (ac 9) :
(&)*" install$ which disables the mysql_secure_installation file fro.
r#nnin! s#ccessf#ll&. 3o# can .an#all& edit the file or follow these steps.
3o# need to connect to the database as the pri4ile!ed s#per #ser$ root #ser. This is
si.ple beca#se the installation doesn8t set an& passwords. 3o# open another Ter.inal
session to .ae these chan!es or &o# co#ld install (&PHPAd.in or (&)*"
6orbench. The tools wor as well in fixin! the .aHorit& of iss#es.
'nsec#re )tart#p 'te. disabled
/"ibrar&/)tart#p'te.s/(&)*"-9( does not ha4e the proper sec#rit& settin!s
(&)*" p#t on start#p

Das könnte Ihnen auch gefallen