Ubuntu Server Guide
Download 1.23 Mb. Pdf ko'rish
|
ubuntu-server-guide (1)
Resources
• For more information on screen see the screen web site. • And the Ubuntu Wiki screen page. • Also, see the byobu project page for more information. etckeeper etckeeper allows the contents of /etc to be stored in a Version Control System (VCS) repository. It integrates with APT and automatically commits changes to /etc when packages are installed or upgraded. Placing /etc under version control is considered an industry best practice, and the goal of etckeeper is to make this process as painless as possible. Install etckeeper by entering the following in a terminal: sudo apt i n s t a l l e t c k e e p e r The main configuration file, /etc/etckeeper/etckeeper.conf, is fairly simple. The main option is which VCS to use and by default etckeeper is configured to use git. The repository is automatically initialized (and committed for the first time) during package installation. It is possible to undo this by entering the following command: sudo e t c k e e p e r u n i n i t By default, etckeeper will commit uncommitted changes made to /etc daily. This can be disabled using the AVOID_DAILY_AUTOCOMMITS configuration option. It will also automatically commit changes before and after package installation. For a more precise tracking of changes, it is recommended to commit your changes manually, together with a commit message, using: sudo e t c k e e p e r commit ” Reason f o r c o n f i g u r a t i o n change ” The vcs etckeeper command allows to run any subcommand of the VCS that etckeeper is configured to run. t will be run in /etc. For example, in the case of git: sudo e t c k e e p e r v c s l o g / e t c / passwd To demonstrate the integration with the package management system (APT), install postfix: 268 sudo apt i n s t a l l p o s t f i x When the installation is finished, all the postfix configuration files should be committed to the repository: [ master 5 a16a0d ] committing c ha n g e s i n / e t c made by ” apt i n s t a l l p o s t f i x ” Author : Your Name 36 f i l e s changed , 2987 i n s e r t i o n s (+) , 4 d e l e t i o n s (−) c r e a t e mode 100755 i n i t . d/ p o s t f i x c r e a t e mode 100644 i n s s e r v . c o n f . d/ p o s t f i x c r e a t e mode 100755 network / i f −down . d/ p o s t f i x c r e a t e mode 100755 network / i f −up . d/ p o s t f i x c r e a t e mode 100644 p o s t f i x / dynamicmaps . c f c r e a t e mode 100644 p o s t f i x /main . c f c r e a t e mode 100644 p o s t f i x /main . c f . p r o t o c r e a t e mode 120000 p o s t f i x / makedefs . out c r e a t e mode 100644 p o s t f i x / master . c f c r e a t e mode 100644 p o s t f i x / master . c f . p r o t o c r e a t e mode 100755 p o s t f i x / post− i n s t a l l c r e a t e mode 100644 p o s t f i x / p o s t f i x − f i l e s c r e a t e mode 100755 p o s t f i x / p o s t f i x −s c r i p t c r e a t e mode 100755 ppp/ ip−down . d/ p o s t f i x c r e a t e mode 100755 ppp/ ip−up . d/ p o s t f i x c r e a t e mode 120000 r c 0 . d/ K 0 1 p o s t f i x c r e a t e mode 120000 r c 1 . d/ K 0 1 p o s t f i x c r e a t e mode 120000 r c 2 . d/ S 0 1 p o s t f i x c r e a t e mode 120000 r c 3 . d/ S 0 1 p o s t f i x c r e a t e mode 120000 r c 4 . d/ S 0 1 p o s t f i x c r e a t e mode 120000 r c 5 . d/ S 0 1 p o s t f i x c r e a t e mode 120000 r c 6 . d/ K 0 1 p o s t f i x c r e a t e mode 100755 r e s o l v c o n f / update−l i b c . d/ p o s t f i x c r e a t e mode 100644 r s y s l o g . d/ p o s t f i x . c o n f c r e a t e mode 120000 systemd / system / multi −u s e r . t a r g e t . wants / p o s t f i x . s e r v i c e c r e a t e mode 100644 ufw / a p p l i c a t i o n s . d/ p o s t f i x For an example of how etckeeper tracks manual changes, add new a host to /etc/hosts. Using git you can see which files have been modified: sudo e t c k e e p e r v c s s t a t u s and how: sudo e t c k e e p e r v c s d i f f If you are happy with the changes you can now commit them: sudo e t c k e e p e r commit ” added new h o s t ” Download 1.23 Mb. Do'stlaringiz bilan baham: |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling