顯示具有 CentOS 標籤的文章。 顯示所有文章
顯示具有 CentOS 標籤的文章。 顯示所有文章

2020年12月17日 星期四

免費安裝註冊RHEL(Red Hat Enterprise Linux)

因為CentOS 8之後政策修改,只好研究官方的RHEL如何安裝註冊
免費的Red Hat Developer Subscription授權僅限用於開發用途(development environment)

註冊Red Hat網站帳號
https://www.redhat.com

下載最新版ISO檔安裝
https://developers.redhat.com/products/rhel/download

下載舊版ISO檔、Supplementary、virt-p2v、KVM Guest Image、原始碼等(以RHEL 7.5為例)
https://access.redhat.com/downloads/content/69/ver=/rhel---7/7.5/x86_64/product-software


參考文件
https://developers.redhat.com/products/rhel/hello-world

查看已註冊的產品
https://access.redhat.com/management/subscriptions/

2021/02/01更新
小型企業可以免費使用16套授權
https://www.redhat.com/en/blog/new-year-new-red-hat-enterprise-linux-programs-easier-ways-access-rhel

紅帽推出免費與低成本RHEL計畫
https://www.ithome.com.tw/news/142391

FAQ: Changes to the Red Hat Developer program’s no-cost subscriptions
https://developers.redhat.com/articles/faq-changes-red-hat-developer-programs-no-cost-subscriptions
新政策只能安裝16個VM中
Under the new no-cost Red Hat Developer Subscription available from March 2018 onward, the maximum number of VMs supported by RHEL is now 16.

舊的
Program members who have activated the legacy Red Hat Enterprise Linux Developer Subscription may continue run up to 99 VMs inside their activated copy of Red Hat Enterprise Linux (RHEL.) 

透過指令註冊:
subscription-manager register
https://access.redhat.com/solutions/253273

透過介面註冊:





輸入subscription.rhn.redhat.com




2020年7月18日 星期六

locate: 無法執行 stat()「/var/lib/mlocate/mlocate.db」: 沒有此一檔案或目錄

需要先執行updatedb


[root@db ~]# locate postgresql.conf
locate: 無法執行 stat()「/var/lib/mlocate/mlocate.db」: 沒有此一檔案或目錄
[root@db ~]# updatedb
[root@db ~]# locate postgresql.conf
/etc/postgresql-setup/upgrade/postgresql.conf
/usr/lib/tmpfiles.d/postgresql.conf
/usr/share/pgsql/postgresql.conf.sample
/var/lib/pcp/pmdas/postgresql/pmdapostgresql.conf
/var/lib/pgsql/data/postgresql.conf
[root@db ~]#
[root@db ~]# locate pg_hba.conf
/usr/share/pgsql/pg_hba.conf.sample
/var/lib/pgsql/data/pg_hba.conf
[root@db ~]#

 
LAB環境: CentOS-8.2.2004

2020年7月5日 星期日

修改Docker組態檔開放外部透過TCP 2375操作Docker

修改Docker組態檔開放TCP 2375 (有資安風險,請僅用於開發環境!)
vi /usr/lib/systemd/system/docker.service
加入以下組態
[Service]
ExecStart=
ExecStart=/usr/bin/dockerd -H tcp://0.0.0.0:2375 -H unix://var/run/docker.sock

重啟Docker服務
systemctl daemon-reload
systemctl restart docker

開通防火牆
firewall-cmd --zone=public --add-port=2375/tcp --permanent
firewall-cmd --reload


環境:CentOS

參考
https://www.cnblogs.com/hongdada/p/11512901.html

2015年3月1日 星期日

Red Hat Enterprise Linux 7官方手冊

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/index.html

CentOS 7安裝使用自動配置分頁(Automatically configure partitioning)選項home會很大

[root@localhost ~]# df -BG
檔案系統                1G-區段  已用  可用 已用% 掛載點
/dev/mapper/centos-root     50G    4G   47G    8% /
devtmpfs                     2G    0G    2G    0% /dev
tmpfs                        2G    1G    2G    1% /dev/shm
tmpfs                        2G    1G    2G    1% /run
tmpfs                        2G    0G    2G    0% /sys/fs/cgroup
/dev/mapper/centos-home    458G    1G  458G    1% /home
/dev/sda1                    1G    1G    1G   24% /boot



ref:
Recommended Partitioning Scheme
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Installation_Guide/s2-diskpartrecommend-x86.html

The ultimate guide: Owncloud 8 on CentOS 7.x – step by step. Will work 100%
http://reviews.myhken.com/the-ultimate-guide-owncloud-on-centos-7/

2013年6月29日 星期六

CentOS啟用VIM的Syntax Highlighting

yum install vim-enhanced

alias vi=vim
(也可以加入/etc/profile永久設定)

測試結果
vi +/Directory /etc/httpd/conf/httpd.conf

ref:
http://www.if-not-true-then-false.com/2012/vi-vim-syntax-highlighting-on-fedora-centos-red-hat-rhel/

2012年10月11日 星期四

秀出CentOS/XenServer版本


cat /etc/redhat-release

fedora:
cat /etc/fedora-release

通用:
cat /etc/*release

秀出kernel資訊:
uname -a -m -p

2012年8月13日 星期一

db2開機啟動


db2iauto -on db2inst1

2012年8月8日 星期三

CentOS安裝後更改hostname

vi /etc/sysconfig/network
再reboot

p.s.因為Copy VM後需要改成不同的hostname

2012年7月28日 星期六

CentOS利用text mode setup utility打開80和443 port


#iptables -L
#LANG=C
#setup

REF:
http://linux-dindin.blogspot.tw/2009/10/centosfirewall.html

CentOS安裝pppoe連線軟體

yum install rp-pppoe

如果不是安裝GUI要自己裝

安裝完後設定連線帳號密碼
pppoe-setup
ref:
http://linux.vbird.org/linux_server/0130internet_connect.php#connect_adsl

如果用
Virtualbox,Network設定成Bridge Adapter

如果要設定noip
參考
http://www.no-ip.com/support/guides/update_clients/setting_up_linux_update_client.html

CentOS重新啟動網路

/etc/init.d/network restart

REF:
http://linux.vbird.org/linux_server/0130internet_connect.php

2012年7月17日 星期二

CentOS 6.2設定postgresql 筆記


[root@localhost ~]# /etc/init.d/postgresql start

/var/lib/pgsql/data is missing. Use "service postgresql initdb" to initialize the cluster first.
                                                           [FAILED]

[root@localhost ~]# service postgresql initdb
Initializing database:                                     [  OK  ]

設定參數檔
[root@localhost data]# vi /var/lib/pgsql/data/postgresql.conf

設定登入權限檔
[root@localhost data]# vi /var/lib/pgsql/data/pg_hba.conf

設定完再啟動
[root@localhost ~]# /etc/init.d/postgresql start
Starting postgresql service:                               [  OK  ]


p.s.設定開機啟動
chkconfig postgresql on

2012年1月4日 星期三

yum更新不輸入y

/usr/bin/yum -y update

2012年1月2日 星期一

(CentOS)產生空檔

/bin/cat /dev/null > 空檔

用於Shell Script可清之前檔案中的資料,EX:log