[教學] 如何在10.7 Lion下更改家目錄名稱


[此篇文章為"Mac OS X Lion 哪裏有問題"一書,Part1 Q06 進階修改方法教學]

在台灣向經銷商購買Mac電腦,大部分時候經銷商會幫我們預先裝好一些軟體和設定,因此使用者名稱通常都是"apple"或"mac"之類的,想要更改這個名稱,可以另外一新增一個使用者,填入自己喜愛的名稱,再換用那個帳號即可。
如果真的想要保留經銷商幫您預先安裝的那些軟體和設定,或者電腦已經使用一段時間,要搬移檔案很不方便,又想要改名稱的時候,才建議使用這種方式來修改名稱。
此種方法,Stanley雖然也有試過成功,但是還沒有檢驗會有哪些後遺症,所以也請你小心使用,並且自行負責和承擔後果
請注意,以下這種方法,範例為舊名稱為stanley,新名稱為apple,你可以依樣畫葫蘆來修改你自己的電腦。

首先,也請先進入系統偏好設定>>使用者與群組,解鎖後,進入登入項目,停用自動登入、快速切換,另外,也請注意關閉FileVault(如果你有使用的話)。
再來,再使用者與群組項目中,先輸入使用者密碼解鎖,進入"登入項目",按下"加入",接著再按下"打開目錄工具程式"。
開啟目錄工具程式後,選目錄工具程式的 編輯>>啟用Root使用者
接著會請你為這個root使用者輸入一組密碼。輸入完密碼之後,你就可以登出原本的帳號,然後使用root和剛剛那組密碼來重新登入系統。
使用root帳號登入系統之後,點選Finder選單列中的"前往">>"電腦"。
在硬碟>>使用者 的資料夾中,找到原本的帳號名稱,假設是如下圖所示,原本是stanley,然後對它按下enter,可以直接修改它的名稱,例如把它直接改成我們要的 apple。請注意,新帳號名稱必須要英文小寫,且不能有空白和其他特殊符號。

再來,進入系統偏好設定>>使用者與群組 點選下圖紅框中的+號來新增一組帳號。
跳出來的視窗中,新帳號選擇"管理者",並且名稱的地方,一定要取名為我們要更改的新名稱,這邊的範例,新名稱為apple,密碼也請填起來~
按下建立使用者後,會跳出以下警告視窗,跟我們說已經有人使用這個名稱,點選"使用現有資料夾"。這樣系統就會把舊名稱的使用者資料夾重新指向到新的帳號名稱下。
重新開機後,用新的帳號密碼登入,如果一切沒有問題,就表示修改家目錄名稱成功啦~
最後,記得再回到 步驟1,開啟目錄工具程式,點選編輯裡的"停用Root使用者",就大功告成了。

How to remove MySQL on Mac

ref [1]: http://jimmyphenphen.blogspot.com/2008/06/mac-mysql.html
ref [2]: http://www.j2h.tw/bbs/bbs16/150.html
ref [3]: http://www.comentum.com/mysql-administration.html


若要移除MySQL,請先登入成root,系統最高權限管理者的帳號,將"/usr/local/mysql-版本號碼/data/"檔案夾內,已建立的重要資料庫檔案夾,複製備份出來,再直接將"/usr/local/mysql-版本號碼"這個子目錄直接刪除,
另外在 /資源庫/Receipt/mysql-版本號碼.pkg這個檔案也順便刪除,即完成MySQL在MacOSX平台的軟體移除程序。

Where are the Apache Configuration files on Mac?


Here’s where to find httpd.conf on Mac. This is the httpd.conf location on Mac OS X 10.6 Snow Leopard and Mac OS X 10.7 Lion. This article also shows how to make the httpd.conf directory visible in the Mac Finder.

What is Httpd.conf?

Httpd.conf is the Apache web server’s main configuration file. Mac OSX ships with Apache installed. See Apache’s configuration docs for how to configure Apache.

Httpd.conf Location on Mac

On Mac httpd.conf location is in the directory /etc/apache2. You can access this folder through the Mac Finder or through the Mac Terminal.
Checked on OS X 10.7, 10.6.8, 10.6.7.

Httpd.conf Location in Mac Finder

You won’t normally see even the /etc/apache2 directory showing up in the Mac Finder. I tried looking in Macintosh HD, but /etc doesn’t show up.)
I found a tip at Codejacked on how to open hidden files in the Finder.
Here’s how to view httpd.conf’s directory in the Mac’s finder:
  1. In the Finder, click the Go menu, and choose Go to Folder…
  2. Type in /etc/apache2.
  3. Click Go.
The Finder will show the apache2 folder, and in it, you’ll see httpd.conf.

Httpd.conf Location in Mac Terminal

You can also get to the httpd.conf file through a terminal session, which is okay if your comfortable in the Unix shell (bash):
tazpro:~ taz$ cd /etc/apache2
tazpro:apache2 taz$ ls
extra  magic  original users
httpd.conf mime.types other

Can’t Save Httpd.conf?

Httpd.conf is protected by OSX from being edited. If you open it with the TextEdit application for example, you won’t be able to save it. For details to bypass this security, see How to Easily Edit Httpd.conf on Mac.

Restart Apache to Apply Configuration Changes

Don’t forget you will need to restart Apache for your configuration changes in httpd.conf to be applied. To restart Apache on Mac:
  1. Go to the Apple menu and choose System Preferences.
  2. Click on Sharing.
  3. Untick Web Sharing.
  4. Tick Web Sharing.

Installing MySQL server on Mac OS X Lion

ref [1]: http://www.djangoapp.com/blog/2011/07/24/installation-of-mysql-server-on-mac-os-x-lion/
ref [2]: http://dev.mysql.com/downloads/mysql/
ref [3]: http://downloads.mysql.com/archives.php?p=mysql-5.5&o=%28%3F%3Adarwin%7Cosx%29


Installation of MySQL server on Mac OS X Lion



This article is part of Django Installation on Mac OS X Lion
At the time of writing this post, MySQL Server on MySQL site doesn’t have installer package for OS X 10.7 (aka Lion) but 10.6 Package works just fine for 10.7 as well. This may change soon and we may see package for OS X 10.7 as well or may be rename current package to 10.6 & above.
Installing MySQL community server:
  1. Download the latest  64-Bit DMG Archive (Apple Disk Image) from MySQL Site (http://dev.mysql.com/downloads/mysql/). Current latest version is 5.5.14 which I’ll be using to install on my machine.
  2. Mount the Disk Image (I mean open/double-click the DMG file) and install MySQL server by double-clicking the PKG file (in my case mysql-5.5.14-osx10.6-x86_64.pkg) and follow onscreen instructions. ( It will ask for Master password, as it installs MySQL server in /usr/local )
  3. Add /usr/local/mysql/bin to your path by editing .profile file. (Optionally you can create alias to mysql and mysqladmin as mentioned in README File)
  4. You can start MySQL server by running “/usr/local/mysql/bin/mysqld_safe &” from terminal but Disk image you downloaded also consists of Startup Package & Preferences Pane which allows you to start/stop MySQL server from System Preferences and even Automatically Start MySQL Server at Startup.
*Please note /usr/local/mysql is only symlink to /usr/local/mysql-5.5.14-osx10.6-x86_64 which means when you upgrade to new version symlink will be changed to point to new version but won’t be deleting the older version. However you need to copy your data directory to new location to make sure your existing databases are intact post upgrade.
Installing MySQL Startup Scripts & Preferences Pane (OPTIONAL)
  1. Double Click MySQLStartupItem.pkg and Follow on screen instructions (You will be asked for Master Password)
  2. Double Click MySQL.prefPane which will add MySQL to OS X System Preferences and it should like something like below
    MySQL Mac OS X Lion Preferences
    MySQL Mac OS X Lion Preferences
  3. Check Automatically Start MySQL Server on Startup to start MySQL server at boot time.
In next section we will discuss installing phpMyAdmin which will provide us web interface to perform basic MySQL administration tasks on Mac OS X Lion.

教你升級Lion Server版

Ref : http://iphone4.tw/forums/showthread.php?t=140749#top




---------------------------------------------------
軟體名稱:Mac OS X 10.7 Lion
軟體分類:作業系統
官方網站:http://www.apple.com/
安裝資源:Mac App Store
操作等級:▼▽▽▽▽
推薦安裝:▲▲▲▲▲
購買費用:USD$29.99
適用機型:Mac OS 10.6.6 以上版本,Intel Core-Duo2 以上硬體
---------------------------------------------------




---------------------------------------------------
軟體名稱:Mac OS X 10.7 Lion Server
軟體分類:作業系統
官方網站:http://www.apple.com/
安裝資源:Mac App Store
操作等級:▼▽▽▽▽
推薦安裝:▲▲▲▲▲
購買費用:USD$49.99
適用機型:Mac OS 10.6.6 以上版本,Intel Core-Duo2 以上硬體
---------------------------------------------------





首先,當然你要在Mac App Store上架後,購買並下載完成這兩套軟體,都好了之後


在開始之前,請先備份你的系統,備份教學請參考這篇「SuperDuper!備份複製你的硬碟」,或是這篇「Carbon Copy Cloner整顆備份你的硬碟

當你一切都備份好之後,就可以點擊兩下開始升級安裝囉




接著就開始安裝囉



同意使用者條款



選擇升級安裝磁碟



接著就開始跑囉




經過了漫長的等待,尤其若你是把server放在機房的人,那更是心理發毛

沒錯,基本上server這種東西用的好好的,不需要升級的

只是剛好吉米有空著一台Mac Mini Server,所以就來做示範給大家看


等了一段時間,因為他安裝好之後要重新開機並且安裝套件

要全部都好之後




你才會看到這個歡迎介面,而目前選繁體中文也沒用,最後安裝好之後,還是要去系統偏好設定中設定


而很大一個重點是,當你在server上面安裝Lion的時候,他會自動檢查你有沒有下載Server的軟體,兩個都有才開始裝

所以裝好之後就直接是Server版了,而不是一般的Lion版本



接著設定鍵盤



輸入你的企業資訊、管理員信箱



接著就開始讓他設定囉



設定好重開機之後,就會看到你的登入畫面,輸入帳號密碼即可



第一次進來,你會發現其實整套系統已經是Server版了



來,驗明正聲一下,這是吉米從朋友手上買到的Mac Mini 8GB Server版



這邊還沒資訊



8GB的RAM



接著請去「系統偏好設定」中設定「語言與文字」中,將繁體中文拉到最頂端就有中文啦


那接著要怎麼去找Server Admin的程式來設定這台Server呢?




現在都在這個Server軟體裡面啦,這就是要你另外買的,還記得嗎?

所以點擊他兩下,他就算是Lion的Server Admin軟體囉



這時候你可以選擇要管理本機,還是其他機器



登入後,使用者帳號、密碼、服務....都全部都在這裡了



一如以往,Mac的server可以設定的是少之又少




例如這是設定檔案分享的地方




檔案分享細部設定



這是設定Web Server的地方,對,就這樣,上面一個開關,然後問你要不要跑php,最後是網站設定




你以為網站設定很難嗎?也是基本設定而已,就這樣




Mail Server更是簡單



iChat Server



VPN



所以啊,就這樣,Server就設定升級好囉

有沒有很簡單啊?

真的超簡單

最後




再去這裡下載Server Admin Tools就完成啦
http://support.apple.com/kb/DL1419



以上教學是「升級」原本的Snow Leopard Server,變成Lion Server的教學

虹光大成就-密教灌頂(一)