A memo of the application and development environment installed and built on the newly arrived macbook air Mid2013 by a small engineer who is engaged in WEB development.
If there is something like "There is a better tool! There is a better way! Or that is no good ...", please let me know.
Is the main feature of this macbook air Mid2013 about improving battery life? I'm looking forward to the energy saving effect of Sea lion (though that icon was more cute than Maverick ...).
Until now, I used the Mid 2011 lion, but since it's a big deal, I tried to build the environment from the beginning.
It's a GUI group, so it may not be very helpful for developers with CUI ...
Since the actual work was mixed up, the order may be different from what is written below.
There are quite a few things to do, but once 1-3 is over, the rest should go smoothly.
For some of 4 ~, I referred to http://qiita.com/suin/items/26162a4ebcbbb351b879. (Thank you!)
I set the following.
--Software update
--Set trackpad trajectory speed to max ―― 1 (favorite)
--Application Expose (swipe down with three fingers)
--System Preferences> Share, change the computer name to your preferred name + allow remote login
--System Preferences > Keyboard > Keyboard > Modifier Keys > Assign "Caps Lock Key" to "Command"
--System Preferences> Keyboard> Check all of F1, F2, etc ...
This time I wanted to renew the network, so I bought a Time Capsule along with the macbook air, so first I will set it and set up a backup to Time Machine.
I wanted it to function as a router, so I rewired it and connected it to my work terminal (which I did in mid2011) via a wired LAN.
Start AirPort Utility and make various settings.
I made a mistake once during this setting.
I made the "wireless network name" an empty string, and I couldn't find it from the wireless ... (Why is it a utility that can set an empty string ...)
Also, I haven't set it yet, but if you want to fix the IP allocation by DHCP by MAC address (if you want to store the MAC address and IP as a pair), it seems possible from the "Network" tab. This function may be useful for those who want to fix the local IP for some reason. (I'm grateful that the bhr-4rv I used before was done automatically)
After setting, work from macbook air Mid2013.
I want to use ac for wifi. Click the fan-shaped wifi icon and wait for a while. Then, the candidate "Set base station name" + "5GHz" should appear. This is the connection with ac. (Should be.)
Once you've done that, start your backup from Time Machine's Preferences.
If you connect it with ac, it may be quite fast even if it is not wired. (Since I backed up by wire, I do not know the experience.)
For the time being, install and set the minimum you use.
KeyRemap4MacBook https://pqrs.org/macosx/keyremap4macbook/index.html.ja
I'm only using it so that all applications can be terminated by pressing and holding command + q.
Source: http://veadardiary.blog29.fc2.com/blog-entry-3235.html
System Preferences > KeyRemap4MacBook > Custom Shortcuts > Hold Command+ Q to Quit Application
Alfred 2 http://www.alfredapp.com/
Search variously with Option + Space
iTerm 2 http://www.iterm2.com/
Do not use the default terminal.
For the time being, make the following settings.
.bash_profile
if [ -f ~/.bashrc ] ; then
. ~/.bashrc
fi
.bashrc
#Prompt settings
PS1="\[\e[0;36m\][\u \W]\$\[\e[00m\] "
#Color setting
export CLICOLOR=1
#Alias setting
alias ls='ls -h'
alias ll='ls -l'
alias la='ls -a'
alias cp='cp -iv'
alias rm='rm -iv'
alias mv='mv -iv'
alias cl='clear'
alias vi='vim'
alias grep='grep --color'
alias opne_iphone_simulator='open -a /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app/'
The opne_iphone_simulator command must be installed after XCode is installed.
Psst https://www.macupdate.com/app/mac/16780/psst
Originator? It cannot be downloaded from (http://ww2.satsumac.com/), so from https://www.macupdate.com/app/mac/16780/psst.
Erase the "Jan!" At startup.
Shortcat http://shortcatapp.com/
"Shift + Cmd + Space" will allow you to access the button label with the enter or tab key.
For example, in Chrome, if you enter the text of the Title tag in the input box displayed by "Shift + Cmd + Space", you can select it with Tab etc.
When there are many destinations such as system environment settings, it is convenient because you can narrow down the destinations with text and enter.
Xcode https://developer.apple.com/xcode/
I'll use it a lot, so I'll put it in.
After the installation is complete, install Preferences> Downloads> Command Line Tooles (I will use it later, so I will do it first.)
Install from the App Store.
cd to https://code.google.com/p/cdto/
A handy tool that opens the directory opened in the Finder as the current directory in the terminal.
Reference: http://wakabamac.blog95.fc2.com/blog-entry-757.html
After downloading, throw it into Applications.
Then, drag and drop it on the toolbar of Finder to register it.
However, if it is left as it is, it will open in the default terminal.
I want to open it in iTerm 2.
So, refer to http://easyramble.com/cdto-iterm.html and change the settings.
Download iTerm2.zip from https://code.google.com/p/cdto/issues/detail?id=23#c7.
As stated in the URL above, "First, move the standard terminal you want to discontinue to /Applications/cd\to.app/Contents/PlugIns\ Disabled. Then move the plug-in for iTerm2 to the PlugIns directory."
$ mv /Applications/cd\ to.app/Contents/PlugIns/terminal.bundle /Applications/cd\ to.app/Contents/PlugIns\ Disabled
$ mv ~/Downloads/iTerm2/bundle/iterm2.bundle /Applications/cd\ to.app/Contents/PlugIns
ClipMenu http://www.clipmenu.com/ja/
A tool for managing the history of the clipboard. It's sober, but very convenient.
A tool similar to CLCL on Windows.
However, sometimes it cannot be pasted normally. If you try to paste an item other than the top level but it does not paste correctly, you may be able to paste it by selecting the top level item and then pressing Cmd + v again. Even if you can't, there will be times when it makes sense just to visually check the clipboard history!
There is a remnant of when I was using Windows, so I set the shortcut key to Option + c.
Coccinellida http://coccinellida.sourceforge.net/
For SSH tunnels.
This is also convenient.
But I don't know the setting to get out of the tunnel I made once.
It ends with Cmd + q and restarts, but is there another way to prepare it? (Also, black and white burns, but there are no single color icons ...)
Colors http://mattpatenaude.com/
The so-called color picker.
CotEditor http://sourceforge.jp/projects/coteditor/
The default editor you're using.
Sometimes I want you to get rid of "changed by another process" alert, but no.
Dropbox http://db.tt/uz0LXXmb
Needless to say, that.
Convenient. I switched to the paid version.
I created an arbitrary directory under ~ / Documents / for materials and documents, but I created a directory with the same name on the Dropbox side, and ~ / Documents / docs ← docs started operation as a Symlink to ~ / Dropbox / docs. I tried to.
The URL to Dropbox above is the "I'll give you 1 GB and your friends 500 MB bonus space" link. If you don't like it, go to https://www.dropbox.com.
DropLHa http://www.fan.gr.jp/~sakai/softwares/lha
I feel that handling LHA on a mac has worn out, but I'll put it in for the time being.
FireAlpaca http://firealpaca.com/
Sometimes I also play with images.
Firefox http://www.mozilla.jp/firefox/
Basically, people who use Chrome, but when using WEB Application-like tools, Firefox is often used.
The installed Add-on is as follows.
Firebug
Live HTTP headers
Web Developer
I want to erase the title bar (?), But it seems that FireFox 22 does not support it ... (as of 2013/06/26)
FreeMemory
From the App Store.
It displays the free memory status.
Google Chrome
The default browser.
--Advanced REST client (I feel good elsewhere) https://chrome.google.com/webstore/detail/advanced-rest-client/hgmloofddffdnphfgcellkdfbfbjeloo
Google Mail Checker https://chrome.google.com/webstore/detail/google-mail-checker/mihcahmgecmbnbcchbopgniflfhgnkff
Pendule https://chrome.google.com/webstore/detail/pendule/gbkffbkamcejhkcaocmkdeiiccpmjfdi
Simple Window Saver https://chrome.google.com/webstore/detail/simple-window-saver/fpfmklldfnlcblofkhdeoohfppdoejdc
--TweetDeck (I think this is also good, but I use it somehow) https://chrome.google.com/webstore/detail/tweetdeck/hbdpomandigafcibbmofojjchbcdagbl
Until recently I didn't know the shortcut to focus on the address bar with Command + l.
Gmail https://mail.google.com/
Labs "Unread Message Icon" is too nice!
Google Calendar https://www.google.com/calendar/render
calendar. Calendars for multiple Google Apps Accounts are set to be shared with each other.
Asana https://app.asana.com/
TODO management.
ChatWork https://www.chatwork.com
You can reduce the frequency of emails. Also, as long as I want you to add a function like "unread message icon" of Gmail.
Wri.pe https://wri.pe/
Online notes.
Pixlr Editor (may be used mainly with FireFox) http://pixlr.com/editor/
This is enough for simple image editing.
Cacoo (maybe used mainly with FireFox) https://cacoo.com
I use it to make materials.
Google IME
Used for Japanese input.
The alphabet is Kotoeri.
Select from "" Words Text "Preferences".
Growl + Bark
Install Growl from the App Store.
Install Bark from Bark http://barkplug.in/.
For the setting method, I referred to http://www.danshihack.com/2012/08/31/junp/macapp-bark.html.
Convenient even for a fee.
If you want to efficiently back up iPhone photos to your device, you can buy it.
Magican http://www.magicansoft.com/jp/magican.html
For cleanup. I haven't come in yet, but I'll put it in for the time being.
Microsoft Office 2011 for mac
For some reason, even if Office is installed, there is no loss.
Why does Google Suggest say "office mac 2013"?
Notify https://www.macupdate.com/app/mac/32217/notify-pro
I don't know what the official URL is.
For Gmail notifications.
PhpStorm http://www.jetbrains.com/phpstorm/
IDE for PHP. Quite convenient.
It may not be necessary for those who think it is unnecessary, but there is a 30-day trial version, so please try it once.
I basically use this when writing HTML, JavaScript, and PHP.
SiteSucker http://sitesucker.us/home.html
Install from the App Store.
For example, when you want to save the entire WEB Site.
Skype http://www.skype.com/ja/download-skype
Somehow active.
SourceTree http://www.sourcetreeapp.com
I don't have many chances to use it, but I put it in.
For those who want to operate Git with GUI.
Sublime Text 2 http://www.sublimetext.com/
Even if you save it to a file, it will resume in its original state, which is convenient.
Various other conveniences.
I thought I'd switch from CotEditor, but for some reason I haven't switched yet.
TextWrangler http://www.barebones.com/products/textwrangler/
It is convenient because you can check the difference between files and the difference for each directory.
Install from the App Store.
Th-MakerX http://www5.wind.ne.jp/miko/mac_soft/th-maker_x/
It resizes and renames images all at once.
It's convenient to have it, but it doesn't really come into play.
TinkerTool http://www.bresink.com/osx/TinkerTool.html
A lot of messing around.
I feel like I just checked Finder > Finder Settings > Show hidden files and system files.
If it was just this, it might have been okay to install it separately. .. ..
VLC http://www.videolan.org/vlc/
I installed it for the time being.
VMware Fusion5 seems to have "Mujirushi" and "Professional".
If you have a past version, it seems that you can upgrade cheaply. In that case, select Professional.
However, due to the rate, the packaged version of MUJI could be purchased cheaper on Amazon, so I chose MUJI this time.
Yummy FTP http://www.yummysoftware.com/
Paid FTP, SCP client. Quite convenient.
I wanted to share Bookmarks on multiple devices, so I wrote the following before.
"Share Yummy FTP Bookmarks on multiple macs using Dropbox" http://qiita.com/hokutoasari/items/a4f1b6f5d60db66f2d48
Install from the App Store.
Install Homebrew and add tree and wget as well.
Check the installation method at http://mxcl.github.io/homebrew/.
[username ~]$ ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
[username ~]$ brew doctor
If you are told "I don't have X Code Command Line Tooles", install Preferences> Downloads> Command Line Tooles.
[username ~]$ brew update
[username ~]$ brew install tree
[username ~]$ brew install wget
[username ~]$ vi .bashrc
#Added the following contents
#For brew
export PATH=/usr/local/bin:/usr/local/sbin:$PATH # for Homebrew
[username ~]$ source .bashrc
After changing the PATH, write "source .bashrc".
Install Apache.
[username ~]$ brew tap Homebrew/dupes
[username ~]$ brew search httpd
[username ~]$ brew install httpd
[username ~]$ sudo apachectl start
Now try accessing http: // localhost / from your browser.
When "It works!" Is displayed, it is running.
Perhaps it is started by a person who is not installed Apache with brew, so try modifying index.html.
[username ~]$ vi /usr/local/Cellar/httpd/2.2.23/share/apache2/htdocs/index.html
So, let's fix it appropriately.
Access http: // localhost / from your browser again, and if the contents you modified are reflected, it is proof that Apache installed from brew is working.
If the fix doesn't reflect, it's probably a PATH typo (probably) and you should review your .bashrc.
For the time being, put in MySQL.
Recently I stopped using postgresql.
[username ~]$ brew install mysql
[username ~]$ mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp
[username ~]$ mysql.server start
Starting MySQL
. SUCCESS!
If it becomes the above, the startup is successful.
[username ~]$ mysqladmin -u root password 'Password here'
Set it for the time being.
[username ~]$ mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.6.12 Source distribution
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> SHOW DATABASES;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| test |
+--------------------+
4 rows in set (0.00 sec)
mysql>
Enter the password and it will be OK if it looks like the above.
Exit with mysql> quit ;.
php installs phpenv, php-build from brew and allows you to switch versions.
I was wondering whether to install from brew, but for now I install from brew.
[username ~]$ brew tap josegonzalez/php
[username ~]$ brew install --HEAD phpenv
[username ~]$ vi .bashrc
#Add the following
if [ -f $HOME/.phpenv/bin/phpenv ]; then
export PATH=$PATH:$HOME/.phpenv/bin
eval "$(phpenv init -)"
fi
[username ~]$ brew install php-build
[username ~]$ vi /usr/local/share/php-build/default_configure_options
--with-apxs2=/usr/local/sbin/apxs
Add "--with-apxs2 = / usr / local / sbin / apxs".
[username ~]$ php-build --definitions
It should be displayed all the time. Select the version you like from here and install it.
This time I decided to install two, 5.4.9 and 5.3.20.
[username ~]$ php-build 5.4.9 ~/.phpenv/versions/5.4.9
An error should occur on the way, so install the missing one from brew each time and php-build again.
For example:
[username ~]$ brew install re2c
[username ~]$ brew install jpeg
[username ~]$ brew install libpng
[username ~]$ brew install mcrypt
[username ~]$ mv /usr/local/Cellar/httpd/2.2.23/libexec/libphp5.so ~/.phpenv/versions/5.4.9
[username ~]$ php-build 5.3.20 ~/.phpenv/versions/5.3.20
If you've done the above, you'll probably get an fpm-related error.
So, modify the definition file of php-build.
[username ~]$ sudo vi /usr/local/share/php-build/default_configure_options
"--Enable-fpm" Erase this line. Then php-build again.
[username ~]$ mv /usr/local/Cellar/httpd/2.2.23/libexec/libphp5.so ~/.phpenv/versions/5.3.20/
[username ~]$ phpenv versions
* system (set by /Users/username/.phpenv/version)
5.3.20
5.4.9
There are three.
[username ~]$ phpenv global 5.3.20
[username ~]$ php -v
PHP 5.3.20 (cli) (built: Jun 23 2013 01:58:57)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
with Xdebug v2.2.1, Copyright (c) 2002-2012, by Derick Rethans
[username ~]$ phpenv global 5.4.9
[username ~]$ php -v
PHP 5.4.9 (cli) (built: Jun 23 2013 01:41:07)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
with Xdebug v2.2.1, Copyright (c) 2002-2012, by Derick Rethans
Switch as "phpenv global version number".
However, this will switch to CLI php. Apache Module php cannot be switched with the phpenv command.
I referred to http://starzero.hatenablog.com/entry/20120916/1347786793.
[username ~]$ vi ~/.phpenv/libexec/rbenv-apache-version
[username ~]$ chmod 666 ~/.phpenv/libexec/rbenv-apache-version
~/.phpenv/libexec/rbenv-apache-version
#!/usr/bin/env bash
set -e
[ -n "$RBENV_DEBUG" ] && set -x
# Provide rbenv completions
if [ "$1" = "--complete" ]; then
echo system
exec rbenv-versions --bare
fi
RBENV_VERSION="$1"
RBENV_ON_FILE="${RBENV_ROOT}/versions"
APACHE_ROOT="/usr/local/Cellar/httpd/2.2.22"
APACHE_MODULE_PATH="${APACHE_ROOT}/libexec"
# Make sure the specified version is installed.
RBENV_PREFIX_PATH="${RBENV_ROOT}/versions/${RBENV_VERSION}"
if [ ! -d "$RBENV_PREFIX_PATH" ]; then
echo "rbenv: version \`${RBENV_VERSION}' not installed" >&2
exit 1
fi
PHP_MODULE_PATH="$RBENV_PREFIX_PATH/libphp5.so"
if [ ! -f "$PHP_MODULE_PATH" ]; then
echo "apache module not found \'${PHP_MODULE_PATH}'" >&2
exit 1
fi
if [ ! -d "$APACHE_MODULE_PATH" ]; then
echo "Directory not found \'${APACHE_MODULE_PATH}'" >&2
exit 1
fi
echo "copy ${PHP_MODULE_PATH} to ${APACHE_MODULE_PATH}"
cp "$PHP_MODULE_PATH" "$APACHE_MODULE_PATH"
echo "Restarting apache..."
sudo apachectl restart
[username ~]$ vi /usr/local/etc/apache2/httpd.conf
#Add the following to the last line
Include /usr/local/etc/apache2/conf.d/*.conf
[username ~]$ mkdir /usr/local/etc/apache2/conf.d
[username ~]$ vi /usr/local/etc/apache2/conf.d/_mine.conf
ServerName localhost:80
AddType application/x-httpd-php .php
DirectoryIndex index.html index.php
[username ~]$ vi /usr/local/Cellar/httpd/2.2.23/share/apache2/htdocs/info.php
<?php
phpinfo();
[username ~]$ phpenv apache-version 5.3.20
[username ~]$ phpenv apache-version 5.4.9
After running each, go to http: //localhost/info.php and check that the PHP versions are 5.3.20 and 5.4.9.
[username ~]$ curl -s https://getcomposer.org/installer | php
[username ~]$ sudo mv composer.phar /usr/local/bin/composer
This completes the Apache + PHP settings for the time being.
Install rbenv and ruby-build from brew.
I'm wondering if this should be installed from brew, but for now I'm installing from brew.
[username ~]$ brew install rbenv
[username ~]$ brew install ruby-build
[username ~]$ vi .bashrc
# rbenv
export PATH=$HOME/.rbenv/bin:$PATH
eval "$(rbenv init -)"
[username ~]$ source .bashrc
[username ~]$ brew install openssl
[username ~]$ brew install readline
[username ~]$ rbenv install 1.9.3-p429
[username ~]$ rbenv global system
[username ~]$ ruby -v
ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]
[username ~]$ rbenv global 1.9.3-p429
[username ~]$ ruby -v
ruby 1.9.3p429 (2013-05-15 revision 40747) [x86_64-darwin12.4.1]
With this, it is OK if you can confirm that it has switched properly.
[username ~]$ gem install bundler
It seems better to install other gems on a project-by-project basis.
If this is left as it is, the command will be bundler exec hogehoge, so it seems better to include a plugin to avoid it.
Reference: http://qiita.com/naoty_k/items/9000280b3c3a0e74a618
I'll do it next time.
Node.js is managed by nodebrew.
[username ~]$ curl https://raw.github.com/hokaccha/nodebrew/master/nodebrew |
[username ~]$ vi .bashrc
# nodebrew
if [ -f ~/.nodebrew/nodebrew ]; then
export PATH=$HOME/.nodebrew/current/bin:$PATH
fi
[username ~]$ source .bashrc
[username ~]$ nodebrew ls-remote
[username ~]$ nodebrew install-binary v0.10.12
[username ~]$ nodebrew ls
v0.10.12
current: none
[username ~]$ nodebrew use v0.10.12
use v0.10.12
[username ~]$ node -v
v0.10.12
So far for the time being.
[username ~]$ brew install mongodb
[username ~]$ mongod run --fork --config /usr/local/etc/mongod.conf
Start in the background with the "--fork" option.
[username ~]$ mongo
It is OK if it is started with this.
Python is managed by pyenv.
[username ~]$ git clone git://github.com/yyuu/pyenv.git .pyenv
[username ~]$ vi .bashrc
# pyenv
if [ -f ~/.pyenv/bin/pyenv ]; then
export PATH=$HOME/.pyenv/bin:$PATH
eval "$(pyenv init -)"
fi
[username ~]$ pyenv install -l
[username ~]$ pyenv install 3.2.5
[username ~]$ pyenv rehash
pyenv install 3.3.2 was an error. The cause is not pursued. Also, here, I restarted the terminal. (I didn't do it with source .bashrc)
[username ~]$ pyenv versions
* system
3.2.5 (set by /Users/username/.pyenv/version)
[username ~]$ pyenv global 3.2.5
[username ~]$ python --version
Python 3.2.5
[username ~]$ pyenv global system
[username ~]$ python --version
Python 2.7.2
[username ~]$ pyenv global 3.2.5
So far for the time being.
For the time being, this completes the "for the time being" setting. After that, I wonder if I should build it as needed.
I referred to various sites. There are many sites that have forgotten the URL because they couldn't make a note of it. I'm sorry I couldn't list it. Also, it's a strange story to write here, but thank you.
I have to install nginx as well.
I should have written about the setting of Apache Virtual Host.
Recommended Posts