Friday, November 13, 2015

How to create the yum repository

Why do we need to create repository?

The purpose of creating a repository is we wants to install offline. If we don't have an internet connection to external, we unable to download package by yum command. This time we can used local repository, in other word, yum install package from local disk. We have to mount it first, and used yum command it will automatic download from the mount place.

Overall it 's a offline install package. I have provided RHEL 6 and RHEL 7.

------------------------------------RHEL7---------------------------------------


1)Create the new directory and mount the RHEL 7 DVD.
# mkdir /rhel7-repo/ 
# mount /dev/cdrom /rhel7-repo/  
# cd  /rhel7-repo/


2)Navigate to /etc/yum.repos.d/ directory.

3) Create a new file with below contents with extension of “.repo” .


# cat unixarena-rhel7.repo
[rhel7_dvd]
gpgcheck = 0
enabled = 1
baseurl = file:///rhel7-repo
name = unixarena-repo

4) After Modify the file, please yum clean it
[root@UnixArena-RHEL7 yum.repos.d]# yum clean all
Loaded plugins: langpacks, product-id, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Cleaning repos: rhel7_dvd
Cleaning up everything

5)Done

reference: http://www.unixarena.com/2015/04/how-to-create-the-yum-repository-on-rhel-7.html


------------------------------------RHEL6---------------------------------------


1)Create the new directory and mount the RHEL 7 DVD.

# mkdir /dvd/ 
# mount -0 loop /dev/cdrom /dvd
# cd  /dvd/

2)Create a file broexperts.repo  with the following content:
[broexperts]
mediaid=XXXXXX.XXXX   ==> look for mediaid (.diskinfo located in DVD)
name=Local Media Repo
baseurl=file:///dvd/
enabled=1
gpgcheck=0

Find what is our mediaid
#cd /dvd/
#cat .discinfo
xxxxxx.xxx
Red Hat Enterprise Linux 6.0
i386
1
Modify broexperts.repo
# vi /etc/yum.repos.d/broexperts.repo
[broexperts]
mediaid=XXXXXXX.XXXX
name=Local Media Repo
baseurl=file:///dvd/
enabled=1
gpgcheck=0
3. save and exit
reference: https://www.youtube.com/watch?v=NrwDVccKuKw

------------------------------------Let try to see if it work or not---------------------------------------


 yum install httpd

Wednesday, August 26, 2015

DRAC Tools[Dell Sol]

DRAC Tools[Dell Sol]
Dell can used other tool called DRAC.

Tool download as below link:
http://www.dell.com/support/home/us/en/ussoho1/Drivers/DriversDetails?driverid=hr1v5

Open cmd prompt under window and this command can used:

racadm getconfig -g cfgUserAdmin -i 2
racadm config -g cfgUserAdmin -o cfgUserAdminPassword -i 1 newpassword

[by Ip address]
racadm -u root -p calvin -r 192.168.1.1 config -g cfgUserAdmin -o cfgUserAdminPassword -i 1 password

Tuesday, August 25, 2015

SSH

Setup  SSH

SSH is a remote shell prompt that you can access and remote to linux server. You can use tera team, putty or related tool.

Note: Rhel/Centos ssh default is install, you don;t have to open manual.

ubuntu install ssh==>sudo apt-get install sshserver




Samba

Set up SAMBA server (linux 網路芳鄰分享出來,window 才可以用)

Samba server is like share folder to window. IN other means, window will be able to access to folder, can read or write, according to what you set.

Ubuntu: 
don't need to enter password
# vi /etc/samba/smb.conf

# ----------------------- Standalone Server Options ------------------------
security = user
guest account = nobody
map to guest = Bad User
passdb backend = tdbsam

unix charset = utf8
dos charset = cp950

#============================ Share Definitions ==============================
[GUEST]
  path = /home
  #writable = yes
  read only = yes
  browseable = yes
  guest ok = yes
  guest only = yes
  public = yes

need to enter password
# --------------------------- Logging Options -----------------------------
unix charset    = utf8
display charset = utf8
dos charset     = cp950
# ----------------------- Standalone Server Options ------------------------
security = user
passdb backend = tdbsam
#============================ Share Definitions ==============================
[samba]
        comment = Root Directories
        path = /
        browseable = yes
        writable = yes


Redhat6.X/centos6.X/Fedora





Monday, August 24, 2015

Linux command (system, advance)

Linux command (system, advance)

Disk/ storage part:

dd command: used to back up disk or partition, most often used for backup file, like ghost
dd if=/'name of the iso file name[to]' of='/backup partition[from]'
ex: dd if =/filename.iso of /dev/sdd
 or
dd if =/dev/sfa of=/dev/sdd

df command: see the size of the hdd 
#df -h
#df


extract and compress file:
extract file
tar -xzf zzz.tar.gz

compress file 'file '
tar -tzvf compressed.tar.gz


Dhcp setup

Dhcp setup (RHel 6.X , Centos, Ubuntu)

1)Modify configure file as below, to which mac and ip address you wants to set:
修改configure file,把mac和ip 改就會自動指定。

[root@pxeserver /]# vi /etc/dhcp/dhcpd.conf
#P Server Configuration file.
#   see /usr/share/doc/dhcp*/dhcpd.conf.sample
#   see 'man 5 dhcpd.conf'

#


default-lease-time 4320000;
#default-lease-time 7200;
max-lease-time 8640000;
#max-lease-time 21600;

log-facility local7;
subnet 192.168.2.0 netmask 255.255.255.0 {
  #range 192.168.2.101 192.168.2.200;
  option subnet-mask 255.255.255.0;
}


host RUT name {
  hardware ethernet XX:XX:XX:XX:XX:XX;
  fixed-address 192.168.2.100;
}

2)restart dhcp services
[root@pxeserver /]#service dhcpd restart

Thursday, August 20, 2015

推薦好用軟體_生活好用

推薦好用軟體_生活好用

雲端應用[cloud storage relate  
[大家最常用的: ]
Dropbox
Google Drive
Asus Storage : 可以傳上去,去ibon 印東西
Pcloud: 可以分享給朋友上傳或下載


遠端連線程式[remote control tool]
Putty
Xshell 4
tera team
Moba Xterm [類似 putty]
winscp [window 可以下載或上傳到 linux,類似FTP]

雲端Terminal 可以寫不同語法
Koding 

規劃計畫圖軟體
Coogle [心智圖-collaborative mind-mapping tool ]
DrawExpress Diagram [線上製作流程圖flow chart diagram]
Draw.io [線上製作流程圖 flow chart diagram]
Mindly  [心智圖-collaborative mind-mapping tool ]
XMind 7 [軟體工程圖,UMLdigram]
reference: http://www.playpcesor.com/2014/12/coggle.html