Samba:
http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/compiling.html#startingSamba
http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/FastStart.html#id2521110
http://hr.uoregon.edu/davidrl/samba.html
This does not work with Centos 6.4, the image is too big to fit into Fat32 filesystem.
Based on /usr/lib/anaconda/installclasses/rhel.py from images/install.img the following options are available:
[root@example ~]# vim /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE="eth0" BOOTPROTO=dhcp DHCP_HOSTNAME=servername NM_CONTROLLED="no" PERSISTENT_DHCLIENT=1 ONBOOT="yes" TYPE=Ethernet DEFROUTE=yes PEERDNS=yes PEERROUTES=yes IPV4_FAILURE_FATAL=yes IPV6INIT=yes IPV6_AUTOCONF=yes IPV6_DEFROUTE=yes IPV6_PEERDNS=yes IPV6_PEERROUTES=yes IPV6_FAILURE_FATAL=no NAME="eth0"
[username@hostname]$ vim /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE="eth0" HWADDR="00:21:70:10:7E:CD" NM_CONTROLLED="no" ONBOOT="yes" BOOTPROTO=static # BOOTPROTO=dhcp IPADDR=10.16.1.106 NETMASK=255.255.255.0 # The GATEWAY is sometimes in: /etc/sysconfig/network GATEWAY=10.16.1.1 DNS1=10.1.1.2 DNS2=10.1.1.3 DOMAIN=test.com
vim /etc/resolv.conf domain domain.com search domain.com nameserver 10.1.1.2 nameserver 10.1.1.3
[username@hostname]$ vim /etc/sysconfig/network NETWORKING=yes HOSTNAME=acme.example.com DNS1=10.16.1.112 DNS2=8.8.8.8 ## DNS2=76.242.0.28 SEARCH=example.com
Print the network node hostname
# uname -n centos01.how2centos.com
Show the systems DNS domain name
# dnsdomainname how2centos.com
Using a single command line to configure the network
# ifconfig eth0 192.168.0.10 netmask 255.255.255.0
or run System Config
# system-config-network
vncserver -geometry 1960x1080
vncserver -kill :1
vncpasswd
http://www.idevelopment.info/data/Unix/Linux/LINUX_AddGNOMEToCentOSMinimalInstall.shtml
Note that you can switch from GUI to CLI mode manually by using following method:
GUI to CLI: Ctrl + Alt + F6 CLI to GUI: Ctrl + Alt + F1
Compressed Tar
GZip compressed TAR files are usually used to distribute files between users of Linux, BSD or UNIX. An idea what is possible with tar may be found under How to use your Tapedrive. More information is in the manpage of tar.
Some short Ideas how to create or extract a tar.gz:
tar cvfz archive.tar.gz directory -> put the content of the directory directory into the file archive.tar.gz tar tvfz archive.tar.gz -> shows the content of the file archive.tar.gz tar xvfz archive.tar.gz -> extract archive.tar.gz
main configuration file is in sip.conf extensions are in extensions.conf
Using the console: asterisk -rc
Commands:
sip debug sip nodebug reload -reloads the extensions after editing the config files show dialplan - shows extensions exit - exit console stop now
asterisk -vvvc
cat /etc/passwd :pasword list cat /etc/group :list of groups cat /etc/sudoers :list of sudo users groupadd GroupName /usr/sbin/useradd -c "First Last' -g GroupName UserName :create username, add to group passwd UserName :change password groups UserName :list user groups
cat /etc/yp.conf :list user authentication binding
Querry for the name of what you want to unistall:
rpm -qa | grep -i 'mysql'
Uninstall using yum:
yum remove mysql-libs
Install dhcp
rpm -q chkconfig dhcp
Setup dhcp to start automatically using chkconfig:
chkconfig --list dhcpd chkconfig dhcpd on
Configure yp: http://www.server-world.info/en/note?os=CentOS_6&p=nis&f=2
#vim /etc/sysconfig/network
NETWORKING=yes HOSTNAME=localhostname NISDOMAIN=domainname
#vim /etc/sysconfig/authconfig
USENIS=yes (change from no)
#vim /etc/yp.conf
domain domainname server 10.1.1.3
#vi /etc/nsswitch.conf
passwd: files nis shadow: files nis group: files nis
#vi /etc/pam.d/system-auth (automatic home folder creation)
session optional pam_mkhomedir.so skel=/etc/skel umask=077
#vim /etc/pam.d/sshd (automatic home folder creation for ssh login)
session optional pam_mkhomedir.so skel=/etc/skel umask=077
#chkconfig rpcbind on
# chkconfig ypbind on
# shutdown -r now
In order to keep the time accurate on a Linux system one can either:
Q: What are the pros and cons of each of these two methods?
A: ntpdate is deprecated as of September 2012; apparently ntpd now has the ability to do one-time updates if needed, and ntpdate is based on "long-neglected" ntpd code.
Q: Which different scenarios call for picking one over the other?
A: ntpd offers continuous adjustments and maintains better accuracy over time, which can be important for databases. But of course this would require slightly more network traffic (presumably negligible for exchanging simple timestamps) as well as an always-online network connection, slight consumption of RAM and CPU, etc. But all these downsides are tiny in a modern computing environment; overall I doubt there are good reasons to substitute cron for ntpd. You can also run ntpd using cron: # echo '30 * * * * root /usr/sbin/ntpd -q -u ntp:ntp' > /etc/cron.d/ntpd The above instructs crond to run ntpd and after setting the clock just exit, and the -u option instructs it to run as the ntp user.
Install the ntp package:
# yum install ntp
Edit config file and add servers
# vim /etc/ntp.conf
Servers:
server 0.centos.pool.ntp.org server 1.centos.pool.ntp.org server 2.centos.pool.ntp.org #and/or: server 0.north-america.pool.ntp.org server 1.north-america.pool.ntp.org server 2.north-america.pool.ntp.org server 3.north-america.pool.ntp.org
Add your local network to allow access
# Hosts on local network are less restricted. restrict 10.0.0.0 mask 255.0.0.0 nomodify notrap restrict 192.168.0.0 mask 255.255.0.0 nomodify notrap
Add location for logs
logfile /var/log/ntp.log
Update your firewall settings, open /etc/sysconfig/iptables.
# vim /etc/sysconfig/iptables
Add the following line, before the final LOG and DROP lines for the RH-Firewall-1-INPUT chain: -I OUTPUT -p udp -m udp -m multiport --dports 123 -m state --state NEW -j ACCEPT -I INPUT -p udp -m udp -m multiport --dports 123 -m state --state NEW -j ACCEPT
Start ntpd
# service ntpd start # service iptables restart
Install ntp service to start on reboot
#chkconfig ntpd on
Check that the service is listening on the port:
# netstat -tulpn |grep ntpd
Test the ntp:
# ntpstat # ntpq -pn # ntpq -p
Check the logs
#cat /var/log/ntp.log
If ntpd does not work (but is correctly configured) assuming an RFC-compliant implementation, your clock may have drifted too far. If you view /var/log/ntp.log, you may see an entry similar to: 18 Aug 21:04:40 ntpd[7220]: time correction of 1738 seconds exceeds sanity limit (1000); set clock manually to the correct UTC time.
This sanity check can be overridden by adding the command-line switch “-g” when starting ntpd. (For OpenBSD's NTP server OpenNTPD, use “-s”).
ntpd -g
To manually force the time to synchronize, use:
ntpd -q
On client execute this command:
# ntpdate -d xx.xx.xx.xx (your time server)
Check the output, if you see:
xx.xx.xx.xx: Server dropped: strata too high stratum 16, precision -20, leap 11, trust 000
stratum 16 indicates that the time server is not synchronized, possibly unable to reach its time servers configured in /etc/ntp.conf
yum -y install perl mkdir /mnt/cdrom mount /dev/cdrom /mnt/cdrom cp /mnt/cdrom/VMwareTools-*.tar.gz /tmp umount /mnt/cdrom tar -zxf /tmp/VMwareTools-*.tar.gz -C /tmp cd / ./tmp/vmware-tools-distrib/vmware-install.pl --default rm -f /tmp/VMwareTools-*.tar.gz rm -rf /tmp/vmware-tools-distrib
rm mysymlink ; ln -s mytargetfile mysymlink
or change the target of a soft link without deleting the old one by forcing ln to do so.
ln -s /home/Data1 /home/Stores/abc ln -f -s /home/Data2 /home/Stores/abc
Asterisk to Altigen integration