搜尋此網誌

2015年7月2日 星期四

CentOS 文字模式及圖形模式的切換

CentOS 6 切換文字介面只要將

/etc/inittab

「id:3:initdefault:」裡的3改成「id:5:initdefault:」即可



CentOS 7 切換文字介面只要將

/etc/inittab

圖形介面:#systemctl set-default graphical.target
文字介面:#systemctl set-default multi-user.target

指令下完之後,重新開機就變成您想要的模式了

Yumdownloader



If downloading a installed package, "yumdownloader" is useful.


1.Install the yum-utils package:
# yum install yum-utils


Run the command followed by the desired package:
# yumdownloader <package>


Note:
The package is saved in the current working directly by default; use the --destdir option to specify an alternate location.
Be sure to add --resolve if you need to download dependencies.

2015年6月24日 星期三

RedHat/CentOS 關閉 SELINUX

編輯 /etc/sysconfig/selinux 這個檔案

將 SELINUX=enforcing 改成 SELINUX=disabled ,

重開機就可以了!

2015年6月21日 星期日

註冊 Redhat Linux

subscription-manager register

Username: email adress
Password: password
The system has been registered with ID: 8d1eef8f-f44a-42bd-b423-4197c3c20082

再次執行 yum,若出現如下指令表示已經註冊但還沒有套用可用的授權訂閱。

Loaded plugins: product-id, security, subscription-manager
This system is registered to Red Hat Subscription Management, but is not receiving updates. You can

use subscription-manager to assign subscriptions.
Setting up Update Process
No Packages marked for Update



查看可用訂閱。
subscription-manager list --available

[root@localhost tmp]# subscription-manager list --available
+-------------------------------------------+
    Available Subscriptions
+-------------------------------------------+
Subscription Name: 30 Day Red Hat Enterprise Linux Server Self-Supported Evaluation
Provides:          Red Hat Container Images Beta
                   Red Hat Beta
                   Red Hat Enterprise Linux Atomic Host Beta
                   Oracle Java (for RHEL Server)
                   Red Hat Container Images
                   Red Hat Enterprise Linux Server
                   Red Hat Enterprise Linux Atomic Host
SKU:               RH00065
Contract:          10719296
Pool ID:           8a85f9814df266ee014dfb931cfc2854
Available:         2
Suggested:         1
Service Level:     Self-Support
Service Type:      L1-L3
Subscription Type: Instance Based
Ends:              07/16/2015
System Type:       Physical




使用 subscribe 參數訂閱可用的 Pool。


subscription-manager subscribe --pool=8a85f9814df266ee014dfb931cfc2854

Successfully attached a subscription for: 30 Day Red Hat Enterprise Linux Server Self-Supported

Evaluation


完成!




2015年5月15日 星期五

讓 VsFTPd 允許 root 登入


因為Linux 預設不讓任何軟體隨意進出root 這個資料匣,但因為要讓root使用ftp ,所以需要以下指令開放:

setsebool -P allow_ftpd_full_access  on

使用vi 編輯器,編輯 /etc/vsftpd 裡面的 ftpusers 及 user_list  兩個檔案。
將 root 前面都加上 “#”

重新啟動 vsftpd


2015年5月3日 星期日

CentOS / RHEL 7: Install GCC (C and C++ Compiler) and Development Tools

Source: http://www.cyberciti.biz/faq/centos-rhel-7-redhat-linux-install-gcc-compiler-development-tools/

先檢查本機是否有安裝開發套件:
# yum group list


如果畫面上條列出來,Available Groups 內缺乏
Development Tools 的話,參照以下指令,以 root 身份安裝 開發套件

Type the following [nixcmd name="yum" as root user:
# yum -y group install "Development Tools" 

OR

$ sudo yum -y group install "Development Tools" 
If above command failed, try:
# yum -y groupinstall "Development Tools"




搜尋此網誌