之前電腦亂七八糟裝了很多東西垦页,強迫癥表示有點受不了,最近跳槽順便把Mac重裝了(已備份文件),好清爽照藻,哈哈哈
Homebrew
Mac上的軟件包管理工具,能在Mac中方便的安裝軟件或者卸載軟件汗侵,可以說Homebrew就是mac下的apt-get幸缕、yum神器
https://brew.sh/
以下是官方說的安裝方式,復(fù)制粘貼到命令行回車即可
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
常規(guī)使用
搜索軟件:brew search 軟件名晰韵,如brew search git
安裝軟件:brew install 軟件名发乔,如brew install git
卸載軟件:brew remove 軟件名,如brew remove git
軟件列表:brew list
git
brew install git
Java
官方下載安裝包直接安裝
是下載JDK(內(nèi)有JRE)雪猪,不是下載JRE
安裝完可以在命令行檢驗一下
java -version
java version "10.0.1" 2018-04-17
Java(TM) SE Runtime Environment 18.3 (build 10.0.1+10)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.1+10, mixed mode)
node
官網(wǎng)下載安裝沒啥好說的
mysql
brew install mysql
設(shè)置開機啟動
ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents
啟動mysql
Y:~ hongxi$ mysql.server start
Starting MySQL
. SUCCESS!
設(shè)置密碼
mysql_secure_installation
運行mysql_secure_installation會執(zhí)行以下幾個設(shè)置:
a)為root用戶設(shè)置密碼
b)刪除匿名賬號
c)取消root用戶遠程登錄
d)刪除test庫和對test庫的訪問權(quán)限
e)刷新授權(quán)表使修改生效
Y:~ hongxi$ mysql_secure_installation
Securing the MySQL server deployment.
Connecting to MySQL using a blank password.
VALIDATE PASSWORD PLUGIN can be used to test passwords
and improve security. It checks the strength of password
and allows the users to set only those passwords which are
secure enough. Would you like to setup VALIDATE PASSWORD plugin?
Press y|Y for Yes, any other key for No: y
There are three levels of password validation policy:
LOW Length >= 8
MEDIUM Length >= 8, numeric, mixed case, and special characters
STRONG Length >= 8, numeric, mixed case, special characters and dictionary file
Please enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: 0
Please set the password for root here.
New password:
Re-enter new password:
Estimated strength of the password: 50
Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : y
By default, a MySQL installation has an anonymous user,
allowing anyone to log into MySQL without having to have
a user account created for them. This is intended only for
testing, and to make the installation go a bit smoother.
You should remove them before moving into a production
environment.
Remove anonymous users? (Press y|Y for Yes, any other key for No) : y
Success.
Normally, root should only be allowed to connect from
'localhost'. This ensures that someone cannot guess at
the root password from the network.
Disallow root login remotely? (Press y|Y for Yes, any other key for No) : y
Success.
By default, MySQL comes with a database named 'test' that
anyone can access. This is also intended only for testing,
and should be removed before moving into a production
environment.
Remove test database and access to it? (Press y|Y for Yes, any other key for No) : y
- Dropping test database...
Success.
- Removing privileges on test database...
Success.
Reloading the privilege tables will ensure that all changes
made so far will take effect immediately.
Reload privilege tables now? (Press y|Y for Yes, any other key for No) : y
Success.
All done!
redis
brew install redis
配置文件在/usr/local/etc/redis.conf