Category Archives: System Administration

ssh亂碼

ssh進Mac時發生亂碼,可先檢查locale 是否設定成正確 (打locale即可)一般是utf8,因為linux ssh client預設會forward locale env variable可參考 /etc/ssh/ssh_config SendEnv LANG LC_* LANG=”en_US.UTF-8″LC_COLLATE=”en_US.UTF-8″LC_CTYPE=”en_US.UTF-8″LC_MESSAGES=”en_US.UTF-8″LC_MONETARY=”en_US.UTF-8″LC_NUMERIC=”en_US.UTF-8″LC_TIME=”en_US.UTF-8″LC_ALL=”en_US.UTF-8″ 如果不是utf8則可以 export LC_ALL=en_US.UTF-8 export LANG=en_US.UTF-8 也可設定在~/.bashrc

Posted in System Administration | Leave a comment

mysql install

MySQL install on CentOS 7 從官網下載yum repo https://dev.mysql.com/downloads/repo/yum/ mysql57-community-release-el7-11.noarch.rpm 安裝 yum -y install mysql-community-server.x86_64 重設root password 如果忘記root密碼 需要重設時 先打開skip-grant-tables選項 可在/etc/my.cnf [mysqld]下加上 skip-grant-tables /etc/my.cnf [mysqld] skip-grant-tables #… 然後重啟server mysql -u root 即可登入進去,但注意 重設password會跳出error說還是在skip-grant-tables mode 此時先刷新privileges flush privileges; 再來將password重設 shell> mysql -u … Continue reading

Posted in System Administration | Leave a comment