Ms7 Search
Google 搜尋 翻譯
calendar
« 二月 2025 »
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28    
近期文章
文章分類
網站連結
Syndicate

分類: Linux

linux 臨時增加一組虛擬網卡IP

2019-09-08 @ 10:14 in Linux

有時需要在 Linux 臨時增加一組 IP , 又不想增加網卡,只好增加一組虛擬網卡IP,用完記得 down

假設原網卡名稱 eth0 , 虛擬網卡加 :0 即可

  1. 增加 :  ifconfig eth0:0 10.0.0.1 up
  2. 取消 :  ifconfig eth0:0 10.0.0.1 down

centos 7 安裝記錄

2017-05-13 @ 20:44 in Linux

  1. service 改成 systemctl
    1. systemctl 列出所有 service
    2. systemctl status servie 列出 service 狀況
    3. systemctl stop service 停止
    4. systemctl start service 啟動
    5. systemctl enable service 開機啟動
    6. systemctl disable service 取消啟
  2.  (閱讀全文)

mail文件主旨編碼

2016-07-29 @ 08:58 in Linux

mail 主旨的編碼方式好像大部份是 base64,如果你看到的是
MIME格式: =?國家碼代號?編碼方式?內容.....?=
國家碼代號=>英文:US-900A,中文(Big5內碼):big5
編碼方式===>Q:Quoted-Printable,B:Base-64
Subject: =?big5?B?UmU6IKZVpuyl66bxLKdAt36o06RGLi4u?=
這一段就是base64編碼 UmU6IKZVpuyl66bxLKdAt36o06RGLi4u
如果用 php 就用 base64_decode($str) 解碼就可以了,記得是 big5或utf-8,網頁編碼格式要對

Liunx LVM 備忘

2016-05-01 @ 11:21 in Linux

Physical Volume, PV, 實體捲軸
Volume Group, VG, 捲軸群組
Physical Extent, PE, 實體範圍區塊
Logical Volume, LV, 邏輯捲軸

參考: http://linux.vbird.org/linux_basic/0420quota.php#lvm_whatis

centos 7 安裝筆記

2016-04-27 @ 10:10 in Linux

安裝 cento7 後,先關閉兩個安全網管程序,比較好 debug

  1. Selinux
    vi /etc/selinux/config
    SELINUX=enforce 修改成:SELINUX=disable
    #SELINUXTYPE=targeted
  2. 關閉防火牆  (閱讀全文)

systemctl 簡易使用

2016-02-22 @ 10:07 in Linux

動作 服務名.service

一些centos7 systemctl命令簡單實用實例:

systemctl start httpd.service /啟動Apache httpd

systemctl restart httpd.service /重新啟動

systemctl stop httpd.service /停止服務

systemctl enable httpd.service /開機啟動httpd

systemctl disable httpd.service /禁止開機啟動httpd

 (閱讀全文)

postfix 設定只能收信不能寄信

2016-01-28 @ 19:36 in Linux

首先建立了一個/etc/postfix/reject_user, 填入要封鎖的帳號資料, 建立該db檔.
然後編輯 vi /etc/postfix/main.cf, 並將加入check_sender_access hash:/etc/postfix/reject_user在下面兩項敘述中

 (閱讀全文)

centos shell script 更改 passwd 密碼 , samba 密碼

2015-10-28 @ 22:06 in Linux

centos 6 以後可以用的 passwd 更改
 ==>  printf "$pass" | passwd --stdin $user

samba 密碼更改
 ==> printf "$pass\n$pass\n" | smbpasswd -a -s $user

linux 中斷連線

2015-08-12 @ 21:44 in Linux

想中斷連線,找到的方法用  netstat -tp  加 p 參數可以顯示 pid ,然後用 kill -9 pid 將連線中止就可以了

 

ssh 設定 chroot 的方法

2015-05-27 @ 19:21 in Linux

openssh 4.8p1以後,chroot功能已經被內置了,使用方法如下:
1.建立 chroot 環境 dir.sh
2.建立可用指令環境 cmd.sh
3.建立使用者 user.sh
4.修改 /etc/ssh/sshd_config 的設定
Match User foo
ChrootDirectory /var/chroot
 (閱讀全文)

1 2 3 4 5 6 7 8  下一篇»