2019年2月26日 星期二

SUSE Linux Enterprise Server 15 (SLES 15)

檢查 OS 版本
#cat /etc/os-release

更新
#zypper update

查 PHP 版本
#php -v

安裝 PHP 5
must add php repository to server. For example add php5.6 repository to SLES12SP3 you must add below command:

#zypper addrepo http://download.opensuse.org/repositories/devel:/languages:/php:/php56/SLE_12_SP3/devel:languages:php:php56.repo

查目前工作
#ps -aux

登入 MySQL
#mysql -u root -p

MySQL 指令 查版本
>SHOW VARIABLES LIKE "%version%";

建立 DB (utf8_general_ci)
>CREATE DATABASE mydatabase CHARACTER SET utf8 COLLATE utf8_general_ci;

LAMP 安裝參考:https://en.opensuse.org/SDB:LAMP_setup

2018年10月4日 星期四

Linux Performance Commands

for virtual memory and CPU
vmstat for IO and CPU utilization
iostat for network
netstat
參考來源:
1.https://blogs.oracle.com/openomics/system-performance-issues-check-the-io
2.https://geekflare.com/linux-performance-commands/

disk io test

磁碟測速工具 hdparm 讀取測試

#sudo hdparm -tT /dev/sda1

dd 寫入測試 (用 dd 指令寫檔到 /tmp 目錄測試)

#dd if=/dev/zero of=/tmp/bench bs=1M count=1024 && rm /tmp/bench

參考來源:https://blog.toright.com/posts/5051/linux-disk-io-%E6%95%88%E8%83%BD%E6%B8%AC%E8%A9%A6.html