一 软件安装篇
1.rpm
rpm -ivh xxxxxxxx
2.*.tar.gz
# 1: Uncompress tarball
To uncompress them, execute the following command(s) depending on the extension:
$ tar zxf file.tar.gz
$ tar zxf file.tgz
$ tar jxf file.tar.bz2
$ tar jxf file.tbz2
Now change directory
$ ls
$ cd path-to-software/
# 2: Build and install software
Generally you need to type 3 commands as follows for building and compiling software:
# ./configure
# make
# make install
Where
* ./configure will configure the software to ensure your system has the necessary functionality and libraries to successfully compile the package
* make will compile all the source files into executable binaries.
* Finally, make install will install the binaries and any supporting files into the appropriate locations.
# 3: Read INSTALL / README file
Each tarball comes with installation and build instructions. Open INSTALL or README file for more information:
$ vi INSTALL
二 系统篇
1.系统关机
# shutdown -k 2 Attention:System will shutdown soon! //带参数k系统不会实际关机
# shutdown 2 Attention:System will shutdown soon! //2分钟后实际执行shutdown命令
最快速关机命令 # shutdown -h now
定时关机命令
# shutdown 9:30
# shutdown +5
# shutdown now
取消关机命令,则只要按Ctrl+C键即可
2.系统重启
定时重启命令
# shutdown -r 9:30
# shutdown -r +5
# shutdown -r now
另外还有其他3个命令 1.halt 2.poweroff 3.reboot
注意:在实际执行关机前,最好先执行sync命令,因为它可以将内存缓冲区内的数据写回硬盘,以避免正在访问的数据丢失,最后执行shutdown命令。