Linux common commands (CentOS)


Setting ON To activate / deactivate the program
Chkconfig --level 0123456 (program name) on / off

Mount CD
Mkdir -p / mnt / cdrom
Mount Auto -t / dev / cdrom / mnt / cdrom

Set the time
Date -s xx / xx / xxxx xx : xx: xx

RPM command to
install the package
Rpm -ivh (file name)
to uninstall the software
Rpm -e

Turn off the firewall
Service iptables STOP
chkconfig iptables OFF -Level 0123456

Setenforec 0

Open SSH
Vi / etc / SSH / sshd_config
#port 22 uncommented
Service sshd Start
Service Network restart
chkconfig sshd ON -Level 0123456


Vsftp Installation and Configuration (remember to turn off the firewall, SELinux, directory permissions, start and restart services)
yum install rpm -ivh vsftpd vsftpd or
modify the configuration file
Vi /etc/vsftpd/vsftpd.conf
turn off anonymous
Anonymous_enable = no
go comment
chroot_list_enable = yes
chroot_list_file = / etc / vsftpd / chroot_list
set permissions
Chmod 777 (directory)
to add users
Adduser -d (user directory) -g ftp -s / sbin / nologin ( username)
password
Passwd (user name)

setenforce 0 Close the SELinux
the chmod -R & lt 777 / var / WWW / HTML

 


Samba installation and configuration (remember to turn off the firewall, SELinux, directory permissions, start and restart services)
Rpm -ivh perl-Conert-ASN
Rpm -ivh Samba-3.0.33
Adduser

Guess you like

Origin www.cnblogs.com/insane/p/12310251.html