2013年7月19日 星期五

fedora , ubuntu 常用軟體

以下情形: 防火牆皆關閉,懶得搞 

ssh :
1: yum install openssh-server
2: systemctl enable sshd.service
    或
   vi /etc/rc.local
   /etc/init.d/sshd start 
 
 chkconfig sshd on  開機時自動開啟ssh

development tools:
1: 
yum groupinstall 'Development Tools' 'Development Libraries'

ubuntu下
sudo apt-get install build-essential

具有root權限:
vim /etc/sudoers

root ALL=(ALL)  ALL  下面加入

 jimmy   ALL=(ALL)       ALL

samba:
1:yum install samba*
2: useradd smbusr
    passwd smbusr
    smbpasswd -a smbusr

3:vim /etc/samba/smb.conf


[work]
        comment = work
        path = /home/jimmy/work
        write list = +jimmy
        writable = yes
        browseable = yes
        valid users = jimmy


4:
    chmod 777 -R /home/jimmy/work

5: vim /etc/selinux/config
    SELINUX=disabled

6:systemctl start smb.service
   systemctl enable smb.service nmb.service

   或 vim /etc/rc.local
    /etc/rc.d/init.d/nmb start
   /etc/rc.d/init.d/smb start

service smb restart
service nmb restart

sudo service smbd restart

git:
1: git clone https://github.com/git/git.git

2:
yum install curl-devel expat-devel gettext-devel \
  openssl-devel zlib-devel perl-devel.i686
 
3: make clean && make
 
4: make install 
 
5:cp -rf ./root/bin/git* /usr/bin/
 
 
tftp: fedora
1: yum install xinetd tftp tftp-server

2: mkdir -p /tftpboot/jimmy
   chmod 777 -R /tftpboot/jimmy/
 
3:vim /etc/xinetd.d/tftp
  server_args             = -s /home/jimmy/work/tftp_server
  disable                 = no
 
4: vim /etc/rc.local
/etc/rc.d/init.d/xinetd restart
 
5:測試
netstat -anp | grep tftp 
會看到   unix  2      [ ]         DGRAM                    13175  1712/in.tftpd
 
tftp: ubuntu 
1: apt-get install tftpd-hpa
 
2: vim /etc/default/tftpd-hpa
 
TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/home/jimmy/work/tftp_server"
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="-l -c -s"
 
3: vim /etc/rc.local
service tftpd-hpa restart
 
4: 測試
netstat -a | grep tftp  


nfs: fedora
1: yum install nfs-utils

2: vim /etc/exports
/home/jimmy/work/nfs *(rw,nohide,insecure,no_subtree_check,async,no_root_squash)

/home1/jimmy *(rw,nohide,insecure,no_subtree_check,sync,no_root_squash) <---nfs 編譯soruce code 用的

3: mkdir /home/jimmy/work/nfs
    chmod 777 -R /home/jimmy/work/nfs

4:vim /etc/rc.local
  service nfs restart

或者
sudo /etc/init.d/nfs-kernel-server restart

5: 檢查
showmount -e

會出現
Export list for localhost.localdomain:
/home/jimmy/work/nfs *

nfs:ubuntu

1:  sudo apt-get install nfs-common nfs-kernel-server

2, 3: 同fedora

4: vim /etc/rc.local
/etc/init.d/nfs-kernel-server start

5: 同fedora

掛載指令
mount -t nfs -o nolock 172.16.9.1:/home/jimmy/nfs /nfs
sudo mount -t nfs -o nfsvers=4 192.168.70.25:/nfs nfs

make menuconfig:
sudo apt-get install libncurses5-dev


gitlab:
https://github.com/gitlabhq/gitlab-ci/blob/master/doc/installation.md

沒有留言:

張貼留言