1.åºæ¬ååã®åºæ¬çãªèª¬æ
1.1ã MagOSã®ã¢ããªã±ãŒã·ã§ã³ã
1.2ã ãã¯ãããžãŒã
1.3ã åºæ¬çãªé åžã®éžæã
2.ãããã¯ãŒã¯æ§é ã
2.1ã MagosãµãŒããŒã
3.ããŒãããŒããŒã®æ§æã
3.1ã ããŒããŒæååã
3.2ã 䜿çšããããªãã·ã§ã³ã
3.3ã 䜿çšã§ãããªãã·ã§ã³ã
3.4ã ãããã¯ãŒã¯ããŒãæ©èœã
4.ã·ã¹ãã ãåæåããæé ã
4.1ã ããã©ã«ãã®basecfg.iniæ§æãã¡ã€ã«æ§é ã
4.2ã ã·ã¹ãã ãã£ã¬ã¯ããªã®æ§é ã
4.3ã å®è£ ã
5. MagOSãµãŒããŒã
5.1ã äžè¬çãªæ å ±ã
5.2ã ãããã¯ãŒã¯èšå®ã
5.3ã ãµãŒãã¹ãæ§æããŸãã
5.4ã ããã°ã©ã ãªããžããªã
5.5ã è¿œå ã®ãµãŒããŒããŒã¿
5.6ã ã¢ãã¿ãªã³ã°
6.ã«ã¹ã¿ã ã¢ãžã¥ãŒã«ã
6.1ã ã«ã¹ã¿ã ã¢ãžã¥ãŒã«ãäœæããããã®äžè¬ååã
6.2ã ã¢ãžã¥ãŒã«ã®æ°ã
6.3ã ç¹å¥ãªç®çã®ããã®ã¢ãžã¥ãŒã«ã
6.4ã ã¢ãžã¥ãŒã«ã®å¶éã
6.5ã ã¢ãžã¥ãŒã«ã®äœææé ã
6.6ã ã·ã¹ãã æŽæ°ã¢ãžã¥ãŒã«ã
6.7ã OfficeãœãããŠã§ã¢ã€ã³ã¹ããŒã«ã¢ãžã¥ãŒã«ã
6.8ã ãŠãŒãã£ãªãã£ãšãµãŒããŒãåããã¢ãžã¥ãŒã«ã
6.9ã ã·ã¹ãã èšå®ã¢ãžã¥ãŒã«ã
7.ã¹ã¯ãªããã
7.1ã magos-patchesãžã®è¿œå ã
7.2ã OSã€ã³ã¹ããŒã«ã¹ã¯ãªããã
7.3ã ADã®å å«ã¹ã¯ãªããã
7.4ã ã·ã¹ãã 管çïŒ/ root / binïŒã
7.5ã magosããã°ã©ã ãšãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã®åäœãä¿®æ£ããè¿œå ã®ã¹ã¯ãªããã
8.æè¡è ãžã®æ瀺ã
åºæ¬ååã®åºæ¬çãªèª¬æ
MagOSã¢ããªã±ãŒã·ã§ã³
MagOSã¯ãåºç¯ãªãªã¹ãããéžæããããã£ã¹ããªãã¥ãŒã·ã§ã³ã®ç¹å®ã®ãã«ãã§ãã MageaãMandrivaãRosaãUbuntuãDebianãFedoraãAltLinuxãªã©ã®ã©ã€ããã£ã¹ããªãã¥ãŒã·ã§ã³ã¯ãã¢ã»ã³ããªãæ§ç¯ããããã®åºç€ãšããŠäœ¿çšã§ããŸãã MagOSã®ç¹å®ã®èŠçŽ ã¯ãå€æŽãããã«ãŒãã«ïŒAUFSããµããŒãããããïŒãç¹å¥ãªæ¹æ³ã§äœæãããinitrdïŒUIRDã䜿çšïŒãããã³MagOSãå¶åŸ¡ããããã«èšèšãããè¿œå ã®ã¹ã¯ãªããã»ããã§ãã
MagOSã§ã¯ãããŸããŸãªãã£ã¹ããªãã¥ãŒã·ã§ã³ã®Liveã¢ã»ã³ããªïŒCDãDVDãã£ã¹ã¯ããããŠã³ããŒãããããã«èšèšãããã¢ã»ã³ããªïŒã«åºã¥ããŠãå®å šãªãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ãäœæã§ããŸãã MagOSã®äœ¿çšã®è©³çŽ°ã«ã¯ããã®ã¢ãããŒãã®ããŸããŸãªè¿œå ã®å©ç¹ããããŸãã
å ã®ç¶æ ã«åŸ©å ããéåžžã«åçŽãªã·ã¹ãã ã ç¹å¥ãªã³ãã³ãã®å°å ¥ã«ããããŠãŒã¶ãŒãè¡ã£ããã¹ãŠã®èšå®ããªã»ããããã·ã¹ãã ãå ã®ç¶æ ã«æ»ãããšãã§ããå Žåãæ©åšãæäœããæè¡ãšæ¯èŒã§ããŸãã ããã§ã¯ããŠãŒã¶ãŒããŒã¿ãæ ŒçŽãããŠããã»ã¯ã·ã§ã³ã®ããŒã¿ãç Žå£ãããããšã§åãå¹æãåŸãããŸãã ãããã£ãŠããã£ã¹ããªãã¥ãŒã·ã§ã³ãã€ã³ã¹ããŒã«ããããã®ãã®ãªãã·ã§ã³ã¯ãæè²ããã»ã¹ã§äœ¿çšããå Žåã«äžå¯æ¬ ã§ãã äžèšã«å ããŠãé åžãããããã©ãã·ã¥ãã©ã€ãã«ã€ã³ã¹ããŒã«ããæ©èœãè¿œå ããå¿ èŠããããŸããããã«ãããåŠçãŸãã¯åŠçã¯æ宀ã ãã§ãªãèªå® ã§ãããã䜿çšã§ããŸãã
é åžãããã®2çªç®ã«éèŠãªå©ç¹ã¯ãã·ã¹ãã ãäºåèšå®ã§ããããšã§ãã ããã¯ãå¿ èŠãªãã¹ãŠã®æ§æãã¡ã€ã«ãããã£ã¹ããªãã¥ãŒã·ã§ã³ã®äžå€éšåïŒããããã¢ãžã¥ãŒã«ïŒã«ãã©ã¡ãŒã¿ãŒãšãšãã«å«ããããšã§å®çŸãããŸãã ãã®ãã¯ãããžãŒã䜿çšããŠããŠãŒã¶ãŒã®ã³ã³ãã¥ãŒã¿ãŒã«ã·ã¹ãã ãã€ã³ã¹ããŒã«ããåŸã®ç®¡çè ã®ã¢ã¯ã·ã§ã³ã®æ°ãæå°éã«æããŸãã ãã®æ©äŒã¯ãã³ã³ãã¥ãŒã¿ãŒã¯ã©ã¹ã®çµç¹ã ãã§ãªããç£æ¥äŒæ¥ã®éã§ã䜿çšã§ãããããå€æ°ã®ãŠãŒã¶ãŒã®ã³ã³ãã¥ãŒã¿ãŒã§äœæ¥ããå Žåã®ã€ã³ã¹ããŒã«ãšæ§æã«ãããæå°éã®äººä»¶è²»ãæå°éã«æããããšãã§ããŸãã
3çªç®ã®å©ç¹ã¯ããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã®ãã®ãããªã¢ã»ã³ããªã®ã€ã³ã¹ããŒã«ãšæŽæ°ã容æãªããšã§ããããã¯ããã£ã¹ã¯ã®ããŒãã£ã·ã§ã³åå²ããã¡ã€ã«ã·ã¹ãã ã®äœæãäžé£ã®ãã¡ã€ã«ã®ã³ã³ãã¥ãŒã¿ãŒãžã®ã³ããŒãããŒãããŒããŒã®ã€ã³ã¹ããŒã«ã«èŠçŽãããŸãã ç£æ¥çšã¢ããªã±ãŒã·ã§ã³ã§ã¯ãé©åãªã¹ã¯ãªãããå®è¡ãããšãããããã¹ãŠã®æäœãèªåçã«å®è¡ã§ããŸãã ã€ã³ã¹ããŒã«ããããã£ã¹ããªãã¥ãŒã·ã§ã³ãæŽæ°ãããšããã¡ã€ã«ã®ã³ããŒãè¡ãããŸããããã¯ãããšãã°ã³ã³ãã¥ãŒã¿ãŒã®é»æºãåã£ããšãã«èªåçã«å®è¡ã§ããŸãã
å©ç¹ã®ããã€ãã«ã¯ãã€ã³ã¿ãŒããããªã©ããé åžããããã¯ãŒã¯ã§ããŠã³ããŒãããæ©èœãå«ãŸããŸãã
MagOSã®æªå®çŸæ©èœã«ã¯ãå®å šãªåæ£ãã¡ã€ã«ã·ã¹ãã ã«ãŠãŒã¶ãŒããŒã¿ãä¿åããæ©èœã®æ¬ åŠãå«ãŸããŸãã ãã®ãããªåæ£ãã¡ã€ã«ã·ã¹ãã ã®å®è£ ã«ããããŠãŒã¶ãŒã®å®å šãªåçµ±åãå¯èœã«ãªããŸãã
MagOSã«é¢ããããã€ãã®å ¥éæ å ±ã¯ãèšäºMagOS LinuxïŒ9æãªãªãŒã¹ïŒããå ¥æã§ããŸãã
ãã¯ãããžãŒ
MagOSã«å«ãŸããLinuxã«ãŒãã«ã®å€æŽã¯ãAUFSãã¡ã€ã«ã·ã¹ãã ã«ããããå«ããããšã§ãã AUFSã䜿çšãããšãã«ãŒãããã¯ã€ã³ã¿ãŒãã§ã€ã¹ã䜿çšããŠå€éšãã¡ã€ã«ã·ã¹ãã ããã¡ã€ã«ã·ã¹ãã ã«æ¥ç¶ããã¬ã€ã€ãŒã±ãŒãã®ãããªãã¡ã€ã«ã·ã¹ãã ãæ§ç¯ã§ããŸãã ãã®ãããªçµæã®ãã¡ã€ã«ã·ã¹ãã ã®äžéå±€ã¯ãã»ãšãã©ã®å ŽåROïŒèªã¿åãå°çšïŒã¢ãŒãã§æ¥ç¶ãããæäžäœå±€ã¯ååãšããŠRWïŒèªã¿åã/æžã蟌ã¿ïŒã¢ãŒãã§æ¥ç¶ãããRAMã«é 眮ã§ãããã£ã¹ã¯ãã¡ã€ã«ã·ã¹ãã ã«æ圱ãããŸããç©çãã£ã¹ã¯ããã£ã¹ã¯ã€ã¡ãŒãžãããã³SquashFSãã¡ã€ã«ã·ã¹ãã ã䜿çšããŠæ¥ç¶ãããç¹å¥ãªã¢ãžã¥ãŒã«ã®ã·ã£ããããŠã³æäœäžã«ä¿åãããŸãã
SquashFSãã¡ã€ã«ã·ã¹ãã ã䜿çšãããšããã¡ã€ã«ã·ã¹ãã ã®ãã¹ãŠã®å±æ§ãä¿æããªããããããã¯ã¢ã«ãŽãªãºã ã䜿çšããŠå§çž®ãå®è¡ã§ããŸãã MagOSã§ã¯ãAUFSãã¡ã€ã«ã·ã¹ãã ã®ã¬ã€ã€ãŒã€ã¡ãŒãžã§ããŒãå¯èœãªã¢ãžã¥ãŒã«ãäœæããããã«äœ¿çšãããŸãã ãããã¯å§çž®ã¢ã«ãŽãªãºã ã䜿çšãããšãã¢ãžã¥ãŒã«ãã¡ã€ã«ããããŒã¿ãæœåºããå¿ èŠãããå Žåãã¢ãžã¥ãŒã«ãã¡ã€ã«å šäœã解åããªãããã«ã§ããŸãã
MagOSã§ã¯ãã»ãšãã©ã®ãã£ã¹ããªãã¥ãŒã·ã§ã³ã§LinuxãããŒãããããã«äœ¿çšãããinitrdãã£ã¹ã¯ã€ã¡ãŒãžããã·ã¹ãã ã®ç·šæã«äœ¿çšãããŸãã ãéå±€åããããé åžãã¡ã€ã«ã·ã¹ãã ãããã»ã¹æ§æãã¡ã€ã«ãªã©ãäœæããã¹ã¯ãªããããããŸãã
ã·ã¹ãã ã®æ§æã«å¿ èŠãªããŒã¿ã¯ãgrub4dos / grub2 / syslinuxããŒãããŒããŒã§æå®ããããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã®ã«ãŒãã«ãã©ã¡ãŒã¿ãŒãä»ããŠéä¿¡ãããç¹å¥ãªæ§æãã¡ã€ã«MagOS.iniã䜿çšããŸãã ã©ãã§ã©ã®ãã©ã¡ãŒã¿ãéä¿¡ããããã¯ãããã¥ã¡ã³ãã«èšèŒãããŠããŸãã ãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã®äžè¬çãªæ§æã«é¢é£ãããã©ã¡ãŒã¿ãŒã¯ãã«ãŒãã«ãã©ã¡ãŒã¿ãŒã䜿çšããŠæž¡ãããŸãã ãããã¯ãUnified Init Ram DiskïŒuirdïŒãã©ã¡ãŒã¿ãŒã·ã¹ãã ã«ç·šæãããŠããŸãã
ãã©ã¡ãŒã¿ãŒã«ã€ããŠã¯ããããžã§ã¯ãã®Webãµã€ãUIRDã§èª¬æãããŠããŸãã 䜿çšãããMagosãã«ããã£ã¹ããªãã¥ãŒã·ã§ã³ã
ç£æ¥çšã¢ããªã±ãŒã·ã§ã³ã§ã¯ããã£ã¹ããªãã¥ãŒã·ã§ã³ããããå«ã¿ãHTTPïŒãªã¢ãŒãããŠã³ããŒãçšïŒãTFTPïŒPXEçµç±ã®ãªã¢ãŒãããŠã³ããŒããµãŒããŒïŒãSSHïŒãã¡ã€ã«ç®¡ççšïŒãRSYNCïŒãŠãŒã¶ãŒã³ã³ãã¥ãŒã¿ãŒãžã®OSã®ã€ã³ã¹ããŒã«ããã³æŽæ°çšïŒããµããŒããããµãŒããŒãªãã§ã¯ã§ããŸããã ãµãŒããŒã¯ãMagOSãå«ããããããã£ã¹ããªãã¥ãŒã·ã§ã³ã«å®è£ ã§ããŸãã ç§ã®å ŽåãCentOS 6ãã£ã¹ããªãã¥ãŒã·ã§ã³ã«åºã¥ããä»®æ³ã³ã³ãããŒã䜿çšãããŸããã
ã·ã¹ãã ãå¶åŸ¡ããããã«ãå¿ èŠãªãªãã·ã§ã³ãšããããåŠçããã¹ã¯ãªãããMagOSã·ã¹ãã ã«è¿œå ãããŸããã
åºæ¬é åžã®éžæ
ãããã¯ãŒã¯ã®æ§ç¯ã«åºã¥ããŠé åžããããéžæããããšã¯ãåžžã«è€éã§ç©è°ãéžãäœæ¥ã§ãã ç¹å®ã®ååžãéžæããã«ã¯ãå€ãã®ããŒã«ã«åé¡ãå«ãå€ãã®èŠå ãèæ ®ããå¿ èŠããããŸãã 次ã®èŠå ããããŸããïŒéåžžã«éçç£çãªãŠãŒã¶ãŒã³ã³ãã¥ãŒã¿ãŒãæè¿è²·åããããã®ã®ãã³ã³ãã¥ãŒã¿ãŒã«ä¿åãããããããŠãŒã¶ãŒã座ã£ãŠããå žåçãªãã·ã³ã§ãããã2ã®ã¬ãã€ãã®RAMãšãããŸãé«éã§ã¯ãªããã¥ã¢ã«ã³ã¢Celeronã ãã®ãããªãŠãŒã¶ãŒã®ã³ã³ãã¥ãŒã¿ãŒã®å žåçãªæ§æã¯ããã¹ã¯ããããããŒãžã£ãŒã®éžæã«å¶éã課ããŸã;ç¹ã«ãå¿«é©ãªãŠãŒã¶ãŒãšã¯ã¹ããªãšã³ã¹ã®å¯èœæ§ã倱ãããšãªããKDEã䜿çšããããšã¯ãã¯ãã§ããŸããã
第äºã«ãããã¯èŠå¡ã®è³æ Œãäœããšããåé¡ã§ããããã®äž»ãªæ©èœã¯æ±ºããŠã³ã³ãã¥ãŒã¿ãŒã§ã®äœæ¥ã§ã¯ãããŸããã 人ã ãé·å¹Žäžç·ã«äœæ¥ããªããã°ãªããªãã£ãåäžã®ãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã®é·å¹Žã®ç¿æ £ãèŠããŠããå¿ èŠããããŸããWindowsXPã¯ãµããŒããäžæ¢ãããããããŠãŒã¶ãŒã®è·å Žã§OSã亀æããåé¡ãå®éã«çºçããŸãã
ãã¹ã¯ãããã®å€èŠ³ãå€ãè¯ãXPã®å€èŠ³ã«é©å¿ãããå¯èœæ§ãæ¢ããCinnamonã«ç«ã¡å¯ãããšã«ããŸããã éçºã¯ãŸã ãªãªãŒã¹ãããŠããŸããããæšæºæ§æã§ã¯ããã®ãã¹ã¯ãããã¯éåžžã«å®å®ããŠåäœããé©åãªããŒããã€ã³ã¹ããŒã«ããããšã§XPã®å€èŠ³ã«ç°¡åã«é©å¿ã§ããŸãã ãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã®éžæã«åœ±é¿ãäžããè¿œå ã®èŠå ã¯ãè·å Žã§åœå ãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ãæèŒããã³ã³ãã¥ãŒã¿ãŒãèŠãããã®ç¶æ æ§é ã®ã欲æ±ãã§ããã ç§ãã¡ã®å Žåãå šäœã®éžæã¯ãRosa OSãšAlt Linux OSã®éã®éžæã«åž°çããŸããã
Rosa OSã§ã®ããªãã®çµéšã«ãããããããAltLinuxãšRosaã®ãã£ã¹ããªãã¥ãŒã·ã§ã³ãæ¯èŒããããšã¯Rosaã«æå©ã§ã¯ãããŸããã§ããã ãŸã第äžã«ãLiveDVDã®äžéšãšããŠCinnamonãäžè¶³ããŠããããšããããŠç¬¬äºã«ãæè¿ã®é åžããã±ãŒãžã®å質ã®äœäžãåå ã§ãã
ãããã£ãŠã Cinnamonãã¹ã¯ããããå«ãP7ã¹ã¿ãŒã¿ãŒãããã¢ã»ã³ããªã®1ã€ã§ããAltLinuxããã¢ã»ã³ããªäœæã®åºç€ãšããŠéžæãããŸããã ãã®éžæã®ãã©ã¹é¢ã¯ãã»ããã®æå°æ§æã§ããããã«ãããèªç±ã«èšå®ãæ¡åŒµã§ããŸãã
ãããã¯ãŒã¯æ§é
MagosãµãŒããŒ
ãšã³ã¿ãŒãã©ã€ãºãããã¯ãŒã¯ã«ã¯ãMagosãµãŒããŒãå±éãããä»®æ³åãµãŒããŒããããŸãã ãµãŒããŒã¯ããã€ãã®æ©èœãå®è¡ããŸãã
ãŸãããªã¢ãŒãããŠã³ããŒããµãŒããŒãšããŠæ©èœããŸãã ãªã¢ãŒãããŒãã¯TFTPã䜿çšããŠå®è£ ãããã¯ãŒââã¯ã¹ããŒã·ã§ã³ã§ã®äœæ¥ã«äœ¿çšãããã®ãšåãæ§æã§MagOSãèµ·åã§ããŸãã ãã®ããŠã³ããŒãã䜿çšããŠãæ©åšããã¹ãããã¯ãŒã¯ã¹ããŒã·ã§ã³ã«ãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ãã€ã³ã¹ããŒã«ããä»ã®å€ãã®ã¿ã¹ã¯ãå®è¡ã§ããŸãã ããã«ãClonezillaããã³Memtestã®ã€ã¡ãŒãžã¯ããªã¢ãŒãããŠã³ããŒããµãŒããŒã䜿çšããŠããŠã³ããŒããããŸãã
MagOSãå®è¡ããŠããã¯ãŒã¯ã¹ããŒã·ã§ã³ã®ãªã¢ãŒãããŒãã¯HTTPãä»ããŠè¡ãããŸããHTTPã®å ŽåãLighttpdã¯ãµãŒããŒã«ã€ã³ã¹ããŒã«ãããDocumentRootã¯MagOSãªããžããªãæããŸãã
ã¯ãŒã¯ã¹ããŒã·ã§ã³ãžã®é åžãããã®ã€ã³ã¹ããŒã«ãšã¯ãŒã¯ã¹ããŒã·ã§ã³ã®æŽæ°ã¯ãRSYNCãããã³ã«ã䜿çšããŠå®è¡ãããŸãã ãããã£ãŠãrsyncdã¯ãµãŒããŒã«ã€ã³ã¹ããŒã«ãããŸãã
ãµãŒããŒç®¡çã¯ãSSHãããã³ã«ã䜿çšããŠå®è¡ãããŸãã åããããã³ã«ã䜿çšããŠããã¹ãã³ã³ãã¥ãŒã¿ãŒã§æºåãããããã°ã©ã ã¢ãžã¥ãŒã«ãžã®å€æŽããµãŒããŒã§æŽæ°ãããŸãã
ã¡ã¢ãªãå°ãªãã¢ãžã¥ãŒã«ã®äœæã«åé¡ããã£ãããããã®ã³ã³ãã¥ãŒã¿ãŒã«ã¯4Gbã®ã¡ã¢ãªãæèŒãããŠããŸãã
ãããã¯ãŒã¯çµ±å
Windows 2008 SP2ã«åºã¥ããŠADãå±éãããã¹ãŠã®ãããã¯ãŒã¯ã³ã³ãã¥ãŒã¿ãŒãADã«å«ãŸããŠããŸãã äŸå€ãªããLinuxãå®è¡ããŠããã³ã³ãã¥ãŒã¿ãŒã
ããŒãããŒããŒã®ã»ããã¢ãã
ããŒããŒæåå
title AltLinux i586 cinamon save #find --set-root --ignore-floppies --ignore-cd /MagOS/MagOS.sgn kernel /AltLinux/kernel/i586/vmlinuz uird.ro=*.xzm,*/live uird.from=/AltLinux/iso/altlinux-p7-cinnamon-latest-i586.iso;/AltLinux/modules/i586/ uird.load=* root=uird rw findswap vga=788 quiet plymouth.enable=0 uird.home=/dev/sda3/AltLinux-Data/homes/ uird.changes=/dev/sda3/AltLinux-Data/changes/ users initrd /AltLinux/kernel/i586/uird.soft.cpio.xz /AltLinux/kernel/i586/uird.magos.cpio.xz
䜿çšããããªãã·ã§ã³
ã«ãŒãã«ãã©ã¡ãŒã¿ãŒãå€æ°ãããããMagOSãã©ã¡ãŒã¿ãŒã匷調衚瀺ããããã«ããã©ã¡ãŒã¿ãŒãã¬ãã£ãã¯ã¹ 'uird'ïŒUnified Init Ram DiskïŒãå°å ¥ãããŸããã
uird.ro=*.xzm,*/live
uird.ro - MagOSãã©ã¡ãŒã¿ãŒã ROã¢ãŒãã§ããŠã³ããããŠããã¢ãžã¥ãŒã«ã®ãã£ã«ã¿ãŒãå®çŸ©ããŸãã ãã®ãããå®éã®MagOSã¢ãžã¥ãŒã«ãšLiveDVD AltLinuxèªäœãæ©èœããŸãã
uird.from=/AltLinux/iso/altlinux-p7-cinnamon-latest-i586.iso;/AltLinux/modules/i586/
uird.from - MagOSãã©ã¡ãŒã¿ãŒã ã·ã¹ãã ã®ã¢ãžã¥ãŒã«ãååšãããœãŒã¹ã®ãªã¹ãã ããã¯ãã¢ãžã¥ãŒã«ãšãã£ã¹ããªãã¥ãŒã·ã§ã³èªäœãããŒãããããã®ãã¹ã瀺ããŠããŸãã
uird.load=*
uird.load - MagOSãã©ã¡ãŒã¿ãŒã ããŒã段éã§æ¥ç¶ããå¿ èŠãããã¢ãžã¥ãŒã«ã®ãã£ã«ã¿ãŒã
root=uird
root-ã«ãŒãã«ãã©ã¡ãŒã¿ãŒã ã«ãŒããã¡ã€ã«ã·ã¹ãã ãæå®ããŸãã
rw
rw-èªã¿åã/æžã蟌ã¿ã¢ãŒããæå¹ã«ããŸãã
findswap
findswap - MagOSãã©ã¡ãŒã¿ãŒã ã·ã¹ãã ãèªåçã«ã¹ã¯ããã«æ¥ç¶ãããŸãã Linux SwapããŒãã£ã·ã§ã³ãã·ã¹ãã äžã«ããå Žåãæ¥ç¶ãããŠããŸãã ãã以å€ã®å ŽåãWindowsã¹ã¯ãããã¡ã€ã«ãæ€çŽ¢ãããŸãã
vga=788
vga-ã«ãŒãã«ãã©ã¡ãŒã¿ãŒã ã°ã©ãã£ãã¯ã¢ãŒããæå¹ã«ããŸãã
quiet
quiet-ã«ãŒãã«ãã©ã¡ãŒã¿ãŒãdmesgãã®ã³ã°ã®å¿ èŠæ§ã瀺ããŸãã
plymouth.enable=0
plymouth.enable-ã«ãŒãã«ãã©ã¡ãŒã¿ãŒã ãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã®èµ·åäžã«ã°ã©ãã£ã«ã«ç»é¢ãšãã°åºåãå¶åŸ¡ããŸãã
uird.home=/dev/sda3/AltLinux-Data/homes/
uird.home - MagOSãã©ã¡ãŒã¿ãŒã ãŠãŒã¶ãŒã®ããŒã ãã£ã¬ã¯ããªãä¿åããããœãŒã¹ãæå®ããŸãã MagOSã®æ¢åã®ããŒãžã§ã³ã®ãã°ã«ãããããã€ã¹ãå«ãå®å šãªãã¹ãå¿ èŠã§ãã
uird.changes=/dev/sda3/AltLinux-Data/changes/
uird.changes - MagOSãã©ã¡ãŒã¿ãŒã ã«ãŒããã¡ã€ã«ã·ã¹ãã ãžã®æ°žç¶çãªå€æŽãä¿åããããœãŒã¹ãæå®ããŸãã
users
users-ã«ãŒãã«ãã©ã¡ãŒã¿ãŒã
䜿çšã§ãããªãã·ã§ã³
ããŒããã©ã€ãã«ä¿åãããããŒã¿ã«æå·åã䜿çšããããšã¯å¯èœã§ãã ãã®å ŽåãããŒã¿ãããŒãã£ã·ã§ã³ã«ä¿åãã代ããã«ããã£ã¹ã¯ã€ã¡ãŒãžãžã®ä¿åã䜿çšããå¿ èŠããããŸãã ç»åã®åœ¢åŒã¯æ¬¡ã®ãšããã§ãã
*.RWM.ENC - RW *.ROM.ENC - RO
uird.copy2ram [+] = -RAMã«ã³ããŒãããã¢ãžã¥ãŒã«ã®ãã£ã«ã¿ãŒã ããã¯ã倧éã®RAMãããå Žåã®äœæ¥ãé«éåããããã«äœ¿çšã§ããŸãã
uird.copy2cache [+] = -ãã£ãã·ã¥ã«ã³ããŒãããã¢ãžã¥ãŒã«ã®ãã£ã«ã¿ãŒã
uird.cache [+] = -ã¢ãžã¥ãŒã«ãåæãããœãŒã¹ã
ã³ã³ãã¥ãŒã¿ãŒã®é»æºãåããšãã«ãMagOSãã¡ã€ã«ããµãŒããŒãšåæãã代ããã«ãã£ãã·ã¥ã䜿çšããããšãã§ããŸãã ãã®æ¹æ³ã®æ¬ ç¹ã«ã¯ããµãŒããŒãšã®äº€æãHTTPãããã³ã«ã䜿çšããŠå®è¡ããããšããäºå®ããããããèªäœãããã©ãŒãã³ã¹ãå€§å¹ ã«äœäžãããŸãã 2çªç®ã®æ¬ ç¹ã¯ãæŽæ°ãªããžã§ã¯ãïŒMagOS.iniãã¡ã€ã«ãããŒãããŒãã£ã·ã§ã³ãOSããŒãã£ã·ã§ã³èªäœïŒãåé¢ããããšãé£ãããªãããšã§ãã ãªã¢ãŒããªããžããªãããŒã«ã«ãŸãã¯ãã©ã€ããŒãïŒINTRANETïŒãªããžããªã«åæããã·ã¹ãã ãæŽæ°ããããã«äœ¿çšãããã¬ã€ã€ãŒãã£ãã·ã¥ã¬ãã«ãšå¯Ÿå¿ããuird.cacheãã©ã¡ãŒã¿ãŒã¯ã次ã®ããã«èšå®ããå¿ èŠãããããšã«æ³šæããŠãã ããã
uird.cache=/MagOS/cache;/MagOS-Data/cache;/MagOS-Data/netlive
åãœãŒã¹ã«ã¯ç¬èªã®ãã£ã¬ã¯ããªããããŸãã
uird.netfsopt [+] = -ãããã¯ãŒã¯FSãããŠã³ãããããã®è¿œå ãªãã·ã§ã³ïŒsshfsãnfsãcurlftpfsãcifsã
ãããã®ãã¡ã€ã«ã·ã¹ãã ã䜿çšããŠãåŸã§ãããã¯ãŒã¯ãã¡ã€ã«ã·ã¹ãã ããŠãŒã¶ãŒããŒã¿ã»ã¯ã·ã§ã³ã«æ¥ç¶ã§ããŸãã
uird.noload [+] = -ããŒãæã«ã¹ãããããå¿ èŠãããã¢ãžã¥ãŒã«ã®ãã£ã«ã¿ãŒ
åã ã®ã³ã³ãã¥ãŒã¿ãŒãŸãã¯ãããã¯ãŒã¯ã®äžéšã®ã¢ãžã¥ãŒã«ãéžæçã«ç¡å¹ã«ã§ããŸãã
uird.homes [+] = -ãŠãŒã¶ãŒã®ããŒã ãã£ã¬ã¯ããªãä¿åããããœãŒã¹ïŒAUFSãçµåãããŸãïŒã
åºæ¬çã«ãããã§ã¯ãlayer-homesãŠãŒã¶ãŒã®ããŒã ãã£ã¬ã¯ããªã¬ãã«ãšå¯Ÿå¿ãããã©ã¡ãŒã¿ãŒãå ¥åããŸãïŒuird.homesïŒ
uird.homes=/MagOS-Data/homes;/MagOS-Data/home.img;nfs://magos.sibsau.ru/homes/n/e/myuser
ããŸããŸãªãœãŒã¹ããã®ãã¹ãŠã®ãŠãŒã¶ãŒãã£ã¬ã¯ããªã¯ãAUFSãä»ããŠã«ã¹ã±ãŒãããã/ homeã«ããŠã³ããããŸãã æåã®ãœãŒã¹ãåªå 床ãé«ãããªã¹ãã®é ã«åªå 床ãäœããªããŸãã ãœãŒã¹ãuird.home =ãã©ã¡ãŒã¿ãŒã§æå®ãããŠããå ŽåããœãŒã¹ã¯/ homeã«ããŠã³ããããŸãã ãããã£ãŠãããŒã ãã©ã«ããŒãšç°ãªããã¡ã€ã«ã·ã¹ãã ã®ã€ã³ããžã·ã§ã³ãè€æ°æ¥ç¶ãããå¯èœæ§ããããŸãã ãŠãŒã¶ãŒã®ããŒã ãã©ã«ããŒã®ãããã¯ãŒã¯ãã¹ãã£ã³ã°ã«äœ¿çšã§ããŸãã
ãœãŒã¹ã®çš®é¡ïŒ
/path/dir
䜿çšå¯èœãªã¡ãã£ã¢äžã®ãã£ã¬ã¯ããªã
/dev/[..]/path/dir
æå®ãããã¡ãã£ã¢ã®ãã£ã¬ã¯ããªã
file-dvd.iso, file.img
ãã£ã¹ã¯ã€ã¡ãŒãžïŒISOããããã¯ããã€ã¹ã€ã¡ãŒãžïŒ;
server/pathâŠ
server/pathâŠ
...-HTTPçµç±ã§ã¢ã¯ã»ã¹å¯èœãªãœãŒã¹ïŒhttpfsã䜿çšïŒ;
ssh://server/path/âŠ
...-SSHçµç±ã§ã¢ã¯ã»ã¹å¯èœãªãœãŒã¹ïŒsshfsã䜿çšïŒ;
server/pathâŠ
server/pathâŠ
...-FTPçµç±ã§ã¢ã¯ã»ã¹å¯èœãªãœãŒã¹ïŒcurlftpfsã§äœ¿çšïŒ;
nfs://server/path/âŠ
NFSçµç±ã§å©çšå¯èœãªãœãŒã¹ã
cifs://server/path/âŠ
CIFSçµç±ã§å©çšå¯èœãªãœãŒã¹ã
uird.machines=
-ãã·ã³äŸåã®æ°žç¶çãªå€æŽãä¿åããããœãŒã¹ã
åå ¥å¯èœãªãŠãŒã¶ãŒã確ä¿ããããã«å¿ èŠãªãå€æŽã«ãã·ã³äŸåã®ãªãœãŒã¹ã䜿çšããããšãã§ããŸãã
ãããã¯ãŒã¯ããŒãæ©èœ
ãããã¯ãŒã¯ããŒãã«ã¯æ¬¡ã®ãã©ã¡ãŒã¿ãŒã䜿çšãããŸãã
kernel images/vmlinuz uird.ro=*.xzm,*/live uird.from=http://magos-server.mydomain.local/magos/AltLinux/iso/alt linux-p7-cinnamon-latest-i586.iso;http://magos-server.mydomain.local/magos/AltLinux/modules/i586/ uird.load=* root=uird rw findswap vga=788 quiet plymouth.enable=0 users
ãããã¯åããã©ã¡ãŒã¿ãŒã§ãããuird.fromãã©ã¡ãŒã¿ãŒã®æå®ã«æ³šæããå¿ èŠããããŸãã
uird.from=http://magos-server.mydomain.local/magos/AltLinux/iso/altlinux-p7-cinnamon-latest-i586.iso;http://magos-server.mydomain.local/magos/AltLinux/modules/i586/
ããã¯ãOSã®ããŒãå ã®ãµãŒããŒã®å®å šãªhttp URLã§ãã ããŒã¹ã¬ã€ã€ãŒããŒã¹ã¬ãã«ããã³å¯Ÿå¿ããuird.fromãã©ã¡ãŒã¿ãŒã¯ã次ã®ããã«èšå®ã§ããŸãã
uird.from=/MagOS;/MagOS-Data;MagOS.iso;http://magos.sibsau.ru/repository/netlive/2014.64/MagOS
ã·ã¹ãã åæåé åº
- æ§æãã¡ã€ã«ã¯ãuird.basecfgãã©ã¡ãŒã¿ãŒã§æå®ããããã¹ã§æ€çŽ¢ãããŸãã
- ãã©ã¡ãŒã¿ã¯æ§æãã¡ã€ã«ããèšå®ãããŸãããã«ãŒãã«ãã©ã¡ãŒã¿ã«ã¯ãŸã èšå®ãããŠããŸããã
- åºæ¬ã¬ãã«ã®ãœãŒã¹ã¯ãuird.fromãã©ã¡ãŒã¿ãŒã§æå®ãããé åºã§ããŠã³ããããŸãã
- ãã£ãã·ã¥ã¬ãã«ã®ãœãŒã¹ã¯ãuird.cacheãã©ã¡ãŒã¿ãŒã§æå®ãããé åºã§ããŠã³ããããŸãã
- ããŒã ã¬ãã«ã®ãœãŒã¹ã¯ãuird.homesãã©ã¡ãŒã¿ãŒã§æå®ãããé åºã§ããŠã³ããããŸãã
- uird.changesãã©ã¡ãŒã¿ãŒã§æå®ãããæ°žç¶çå€æŽã®ãœãŒã¹ã®æé«ã¬ãã«AUFSãžã®æ¥ç¶ãçºçããŸãã
- ããŒã¹ã¬ãã«ã¯ãuird.copy2cacheãã©ã¡ãŒã¿ãŒãšãµãã¬ãã«ã®å¯Ÿå¿ãèæ ®ããŠããã£ãã·ã¥ã¬ãã«ã«åæãããŸãã ãã£ãã·ã¥ã®ãµãã¬ãã«ãããŒã¹ã¬ãã«ãããå°ããå Žåãæ®ãã®ãµãã¬ãã«ã¯RAMã§åæãããŸãã
âââ layer-base ==> âââ layer-cache â âââ 0 --> â âââ 0 â âââ 1 --> â âââ 1 â âââ ... --> â âââ ... â âââ ... --> â RAM
- RAMã®ããŒã¹ã¬ãã«ãšãã£ãã·ã¥ã¬ãã«ã¯ãuird.copy2ramãã©ã¡ãŒã¿ãŒãèæ ®ããŠåæãããŸãã
- ã¢ãžã¥ãŒã«ã¯ãRAMããã£ãã·ã¥ã¬ãã«ãããŒã¹ã¬ãã«ã§æ€çŽ¢ãããäžäœAUFSã¬ãã«ã«æ¥ç¶ãããããã«ãŒãã«ã³ããŒãããŸãïŒãã©ã¡ãŒã¿ãŒuird.loadãuird.noloadãuird.roãuird.rwãuirdã§æå®ããããã£ã«ã¿ãŒãèæ ®ã«å ¥ããŸãïŒã cpïŒã
- ããŒã ã¬ãã«ã®ãœãŒã¹ã®ã«ã¹ã±ãŒãã¢ãœã·ãšãŒã·ã§ã³ãå®è¡ããããããã®æ¥ç¶ã¯/ home /ã§è¡ãããŸãã
- Rc.preinitã¹ã¯ãªãããå®è¡ãããŠããŸãã
ããã©ã«ãã®basecfg.iniæ§æãã¡ã€ã«ã®æ§é
uird.config=MagOS.ini uird.ramsize=70% uird.ro=*.xzm;*.rom;*.rom.enc;*.pfs;*.sfs uird.rw=*.rwm;*.rwm.enc uird.cp=*.xzm.cp,*/rootcopy uird.load=/base/,/modules/,rootcopy uird.noload= uird.from=/MagOS;/MagOS-Data uird.changes=/MagOS-Data/changes uird.cache=/MagOS-Data/cache uird.machines=/MagOS-Data/machines uird.home=/MagOS-Data/homes
uird.basecfgãæå®ãããŠããªãå Žåã/ uird_configs / basecfg.iniãinitrdå ã§äœ¿çšãããŸãã
ã·ã¹ãã ãã£ã¬ã¯ããªæ§é
/memory/ âââ bundles - â âââ 00-kernel.xzm â âââ 01-firmware.xzm â âââ 10-core.xzm â âââ 80-eepm-1.5.2.xzm â âââ ... - .. âââ changes - â âââ etc â âââ home â âââ memory â âââ run â âââ var â âââ ... - .. âââ data - â âââ cache - â âââ homes - homes â âââ machines - () â âââ from - âââ layer-base - â âââ 0 - â âââ 1 - ( uird.from=) â âââ ... - .. âââ layer-cache - â âââ 0 - â âââ 1 - ( uird.cache=) â âââ ... - .. âââ layer-homes - homes â âââ 0 - â âââ 1 - ( uird.homes=) â âââ ... - .. âââ cmdline - âââ MagOS.ini.gz -
å®è£
å®è£ ã¯ã dracutåæåã¹ã¯ãªãã ïŒããŒã¹ãbusyboxã¢ãžã¥ãŒã«ïŒãšuirdã¹ã¯ãªããïŒlivekitlib + uird-initïŒã®ã»ããã«åºã¥ããŠããŸãã
- cmdline-hookïŒparse-root-uird.shïŒroot = uirdãã©ã¡ãŒã¿ãŒã確èªïŒ;
- mount-hookïŒmount-uird.shïŒuird-initã¹ã¯ãªãããå®è¡ïŒ;
- livekitlib-åæåã·ã¹ãã ã®æ©èœã®ã©ã€ãã©ãªãå«ãŸããŠããŸãã
- uird-init-livekitlibããäžé£ã®é¢æ°ãé 次å®è¡ããdracut $ NEWROOTå€æ°ã§æå®ããããã£ã¬ã¯ããªå ã®åäžã®AUFSã«ãŒãã«ã·ã¹ãã ã¢ãžã¥ãŒã«ã®ã«ã¹ã±ãŒããããã¯ããŠã³ããå®è¡ããŸãã
MagOSãµãŒããŒ
äžè¬çãªæ å ±
ãã®å Žåãmagos-serverã¯openvzã³ã³ãããŒãšããŠãããã€ãããŸãã å®è£ ã¯éèŠã§ã¯ãããŸããã
- ãªã¢ãŒãããŠã³ããŒããµãŒããŒãšããŠæ©èœããŸãã ãªã¢ãŒãããŒãã¯TFTP / PXEã䜿çšããŠå®è£ ãããã¯ãŒââã¯ã¹ããŒã·ã§ã³ã§ã®äœæ¥ã«äœ¿çšãããã®ãšåãæ§æã§MagOSãèµ·åã§ããŸãã ãã®ããŠã³ããŒãã䜿çšããŠãæ©åšããã¹ãããã¯ãŒã¯ã¹ããŒã·ã§ã³ã«ãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ãã€ã³ã¹ããŒã«ããä»ã®å€ãã®ã¿ã¹ã¯ãå®è¡ã§ããŸãã
- MagOSãå®è¡ããŠããã¯ãŒã¯ã¹ããŒã·ã§ã³ã®ãªã¢ãŒãããŒãã£ã³ã°ã¯HTTPãä»ããŠè¡ãããŸããHTTPã®å ŽåãLighttpdã¯ãµãŒããŒã«ã€ã³ã¹ããŒã«ããããã®ããã¥ã¡ã³ãã«ãŒãã¯MagOSãªããžããªãæããŸãã
- ã¯ãŒã¯ã¹ããŒã·ã§ã³ãžã®é åžããã±ãŒãžã®ã€ã³ã¹ããŒã«ãšã¯ãŒã¯ã¹ããŒã·ã§ã³ã®æŽæ°ã¯ãrsyncãããã³ã«ã䜿çšããŠå®è¡ãããŸãã ãããã£ãŠãrsyncdã¯ãµãŒããŒã«ã€ã³ã¹ããŒã«ãããŸãã
- ãµãŒããŒç®¡çã¯sshãããã³ã«ãä»ããŠå®è¡ãããŸãã åããããã³ã«ã䜿çšããŠããã¹ãã³ã³ãã¥ãŒã¿ãŒã§æºåãããããã°ã©ã ã¢ãžã¥ãŒã«ãžã®å€æŽããµãŒããŒã§æŽæ°ãããŸãã
ãµãŒããŒå®è£
ãªãã¬ãŒãã£ã³ã°ã·ã¹ãã Centos v6ã 次ã®ãªãœãŒã¹ãä»®æ³ã³ã³ããã«å²ãåœãŠãããŸãïŒCPU-2ãRAM-512Mbãã¹ã¯ãã-1Gbãä»®æ³ãã£ã¹ã¯ãµã€ãº40Gbã
ãããã¯ãŒã¯èšå®
ifcfg-eth0ã§èšå®
DEVICE=eth0 IPADDR=192.168.1.xxx NETMASK=255.255.255.0 NETWORK=192.168.1.0 GATEWAY=192.168.1.1 DNS1=192.168.1.xxx BROADCAST=192.168.1.255 TYPE=Ethernet ONBOOT=yes NM_CONTROLLED=yes BOOTPROTO=static
ãããã¯ãŒã¯ãµãŒãã¹ïŒnetstat -tunlpïŒ
# netstat -tunlp Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:873 0.0.0.0:* LISTEN 494/xinetd tcp 0 0 192.168.1.xxx:80 0.0.0.0:* LISTEN 551/lighttpd tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 484/sshd udp 0 0 0.0.0.0:69 0.0.0.0:* 494/xinetd
ãµãŒãã¹ã®ã»ããã¢ãã
Lighthttpd
æã¡äžãïŒ
chkconfig --list lighttpd lighttpd 0:off 1:off 2:on 3:on 4:off 5:on 6:off
èšå®ãã¡ã€ã«lighttpd.conf
var.log_root = "/var/log/lighttpd" var.server_root = "/var/www" var.state_dir = "/var/run" var.home_dir = "/var/lib/lighttpd" var.conf_dir = "/etc/lighttpd" var.vhosts_dir = server_root + "/vhosts" var.cache_dir = "/var/cache/lighttpd" var.socket_dir = home_dir + "/sockets" include "modules.conf" server.port = 80 server.use-ipv6 = "disable" server.bind = "192.168.1.xxx" server.username = "lighttpd" server.groupname = "lighttpd" server.document-root = server_root + "/" server.pid-file = state_dir + "/lighttpd.pid" server.errorlog = log_root + "/error.log" include "conf.d/access_log.conf" include "conf.d/debug.conf" server.event-handler = "linux-sysepoll" server.network-backend = "linux-sendfile" server.stat-cache-engine = "simple" server.max-connections = 1024 index-file.names += ( "index.xhtml", "index.html", "index.htm", "default.htm", "index.php" ) url.access-deny = ( "~", ".inc" ) $HTTP["url"] =~ "\.pdf$" { server.range-requests = "disable" } static-file.exclude-extensions = ( ".php", ".pl", ".fcgi", ".scgi" ) include "conf.d/mime.conf" include "conf.d/dirlisting.conf" server.follow-symlink = "enable" server.upload-dirs = ( "/var/tmp" )
æ§æãã¡ã€ã«vhosts.d / magos.conf
$HTTP["host"] == "magos-server.mydomain.local" { var.server_name = "magos-server.mydomain.local" server.name = server_name include "conf.d/trigger_b4_dl.conf" server.document-root = vhosts_dir + "/magos/" accesslog.filename = log_root + "/" + server_name "/access.log" }
Conf.d / dirlisting.confæ§æãã¡ã€ã«
dir-listing.activate = "enable" dir-listing.hide-dotfiles = "disable" dir-listing.exclude = ( "~$" ) dir-listing.encoding = "UTF-8" dir-listing.hide-header-file = "disable" dir-listing.show-header = "disable" dir-listing.hide-readme-file = "disable" dir-listing.show-readme = "disable"
Tftpd
èµ·åïŒ/etc/xinetd.d/tftp :)
service tftp { socket_type = dgram protocol = udp wait = yes user = root server = /usr/sbin/in.tftpd server_args = -s /var/lib/tftpboot disable = no per_source = 11 cps = 100 2 flags = IPv4 }
æ§æãã¡ã€ã«/var/lib/tftpboot/pxelinux.cfg/default
default menu.c32 prompt 0 timeout 300 ONTIMEOUT local MENU TITLE PXE Menu # â HD LABEL Boot from hard disk localboot 0x80 LABEL AltLinux-net MENU LABEL AltLinux-net kernel images/vmlinuz uird.ro=*.xzm,*/live uird.from=http://magos-server.mydomain.local/magos/AltLinux x/iso/altlinux-p7-cinnamon-latest-i586.iso;http://magos-server.mydomain.local/magos/AltLinux/modules/i586/ ui rd.load=* root=uird rw findswap vga=788 quiet plymouth.enable=0 users append initrd=images/uird.magos.cpio.xz LABEL AltLinux-net testing MENU LABEL AltLinux-net testing kernel images/vmlinuz uird.ro=*.xzm,*/live uird.from=http://magos-server.mydomain.local/testing/AltLinux /iso/altlinux-p7-cinnamon-latest-i586.iso;http://magos-server.mydomain.local/testing/AltLinux/modules/i586 / uird.load=* root=uird rw findswap vga=788 quiet plymouth.enable=0 users append initrd=images/uird.magos.cpio.xz
ãªããžããªã¯ãmagosãšåŒã°ããåäœäžã®éšåãšãtestingãšåŒã°ãããã¹ãéšåã®2ã€ã®éšåã§æ§æãããŠããŸããäœæ¥ãªããžããªã¯ããŠãŒã¶ãŒã¯ãŒã¯ã¹ããŒã·ã§ã³ãœãããŠã§ã¢ãã€ã³ã¹ããŒã«ããã³æŽæ°ããããã«èšèšãããŠããŸããã€ã³ã¹ããŒã«ããããœãããŠã§ã¢ã®äºåãã¹ãã¯ããã¹ããªããžããªã§å®è¡ãããŸããããŒãã¡ãã¥ãŒã䜿çšãããšãäœæ¥ãªããžããªãšãã¹ããªããžããªã®äž¡æ¹ãããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ãããŒãã§ããŸãã
Rsync
èµ·åïŒ/etc/xinetd.d/rsyncïŒïŒ
service rsync { disable = no flags = IPv4 socket_type = stream wait = no user = root server = /usr/bin/rsync server_args = --daemon log_on_failure += USERID }
èšå®ãã¡ã€ã«/etc/rsyncd.conf
use chroot = yes max connections = 100 syslog facility = local5 pid file = /var/run/rsyncd.pid [magos] path = /var/www/magos comment = whole MagOS boot [testing] path = /var/www/testing comment = whole MagOS boot
sshd
æã¡äžãïŒ
# chkconfig âlist sshd sshd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
æ§æãã¡ã€ã«/ etc / ssh / sshd_config
Protocol 2 SyslogFacility AUTHPRIV PasswordAuthentication yes ChallengeResponseAuthentication no GSSAPIAuthentication yes GSSAPICleanupCredentials yes UsePAM yes AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT AcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGE AcceptEnv XMODIFIERS X11Forwarding no Subsystem sftp /usr/libexec/openssh/sftp-server
ããã°ã©ã ãªããžããª
ããã°ã©ã ãªããžããªæ§é ã«ã¯ãéèŠãªãã¡ã€ã«ãšãã£ã¬ã¯ããªã®ã¿ã衚瀺ãããŸãã
ããŽã¹
âââAltLinux â âââiso â â âââaltlinux-p7-cinnamon-latest-i586.iso â âââkernel â â âââi586 â â âââuird.magos.cpio.xz â â âââuird.soft.cpio.xz â â âââvmlinuz â âââmodules â âââi586 â âââ00-kernel.xzm â âââ01-firmware.xzm â âââ03-1-nvidia-current.xzm â âââ03-2-nvidia304.xzm â âââ03-9-fglrx.xzm â âââ80-eepm-1.5.2.xzm â âââ80-uird.soft.xzm â âââ90-magos-patches.xzm â âââ99-squashfs-tools.32.xzm â âââ99-u10-update.xzm â âââ99-u40-office4.xzm â âââ99-u50-utils.xzm â âââ99-u99-default.xzm â âââMagOS.ini â âââupdate.txt âââAltLinux-Data â âââcache â âââchanges â âââhomes â âââmachines â âââMagOS-Data.sgn â âââmodules â âââoptional â ââârootcopy âââboot âââgrub4dos â âââinstall.lin â âââinstall.win â âââlocal â âââmenu.lst âââsyslinux âââtools
æ€æ»
âââAltLinux â âââiso â â âââaltlinux-p7-cinnamon-latest-i586.iso â âââkernel â â âââi586 â â âââuird.magos.cpio.xz â â âââuird.soft.cpio.xz â â âââvmlinuz â âââmodules â âââi586 â âââ00-kernel.xzm â âââ01-firmware.xzm â âââ03-1-nvidia-current.xzm â âââ03-2-nvidia304.xzm â âââ03-9-fglrx.xzm â âââ80-eepm-1.5.2.xzm â âââ80-uird.soft.xzm â âââ90-magos-patches.xzm â âââ99-squashfs-tools.32.xzm â âââ99-u10-update.xzm â âââ99-u40-office4.xzm â âââ99-u50-utils.xzm â âââ99-u99-default.xzm â âââMagOS.ini â âââupdate.txt âââAltLinux-Data â âââcache â âââchanges â âââhomes â âââmachines â âââMagOS-Data.sgn â âââmodules â âââoptional â ââârootcopy âââboot â âââgrub4dos â â âââinstall.lin â â âââinstall.win â â âââlocal â â âââmenu.lst â âââsyslinux â âââtools âââupdate.tar.gz
ãªããžããªãžã®èšé²ã¯ã·ã¹ãã ãŠãŒã¶ãŒæš©éã§å®è¡ãããããã察å¿ãããªããžããªãžã®æžã蟌ã¿æš©éãæ åœããã°ã«ãŒããäœæããå¿ èŠããããŸãã
# groupadd magos # groupadd testing
ãã¹ãŠã®ãªããžããªãã£ã¬ã¯ããªã«æš©éãèšå®ããŸãã
# cd /var/www # find magos -type f -exec chmod 664 {} + # find magos -type d -exec chmod 775 {} + # find testing -type f -exec chmod 664 {} + # find testing -type d -exec chmod 775 {} +
ãªããžããªææè ã°ã«ãŒããèšå®ããŸãã
# chown -R :magos magos # chown -R :testing testing
SGIDããªããžããªãã£ã¬ã¯ããªã«èšå®ããŸãã
# chmod g+s magos # chmod g+s testing
è¿œå ã®ãµãŒããŒããŒã¿
yum.repos.d CentOS-Base.repo CentOS-Debuginfo.repo CentOS-fasttrack.repo CentOS-Media.repo CentOS-Vault.repo epel.repo epel-testing.repo vz.repo
å¶åŸ¡ã¹ã¯ãªãã
ã¹ã¯ãªããã¯çŸåšäœ¿çšããããã«äœæããããã®ã§ããã䜿çšäžã«ãããã¯ã¹ã®ãããªããã®ã§ãããšäž»åŒµãããã®ã§ã¯ãããŸããã
ã¢ãã¿ãªã³ã°
æ¯æ¥ã®ã¹ã±ãžã¥ãŒã«ã§å®è¡ãããupdate-txt.shã¹ã¯ãªããã¯ãçŸåšã®æ¥ä»ãå«ãupdate.txtãã¡ã€ã«ãã¢ãžã¥ãŒã«ãã£ã¬ã¯ããªã«æžã蟌ã¿ãŸããããŒã¿ããŠãŒã¶ãŒã®ã³ã³ãã¥ãŒã¿ãŒã«åæããåŸãã³ã³ãã¥ãŒã¿ãŒãæåŸã«æŽæ°ãããæ¥æãç°¡åã«ç¢ºèªã§ããŸããããã¯ãé·æéã«ããã£ãŠéè² è·ã«ãªããªãïŒãŠãŒã¶ãŒãã³ã³ãã¥ãŒã¿ãŒã®é»æºããªãã«ããªãïŒã³ã³ãã¥ãŒã¿ãŒã远跡ããããã«å¿ èŠãªç¬éã§ãã
ã¹ã¯ãªãã/etc/cron.daily/update-txt.sh
#!/bin/sh echo "magos $(date)" > /var/www/magos/AltLinux/modules/i586/update.txt echo "testing $(date)" > /var/www/testing/AltLinux/modules/i586/update.txt
æŽæ°ãã
ã¹ã¯ãªããtestig2magos_kern.shãtestig2magos_mod.shããã³testig2magos_all.shã¯ããã¹ããªããžããªããäœæ¥ãªããžããªãæŽæ°ããããã«èšèšãããŠãããæåã¢ãŒãã§ã®ã¿å®è¡ãããŸãã
testig2magos_kern.sh-ã·ã¹ãã ã¢ãžã¥ãŒã«ãšã«ãŒãã«ãã£ã¬ã¯ããªã®ã¿ãæŽæ°ããŸãã
testig2magos_mod.sh-ãŠãŒã¶ãŒã¢ãžã¥ãŒã«ã®ã¿ãæŽæ°ããŸãã
testig2magos_all.sh-ã«ãŒãã«ãisoãããã³ã¢ãžã¥ãŒã«ãã©ã«ããŒãå«ãå®å šãªæŽæ°ãå®è¡ããŸãã
ã©ã®ã¹ã¯ãªãããMagOS.iniãã¡ã€ã«ãæŽæ°ããŸããïŒ
ãã®ãã¡ã€ã«ãžã®å€æŽã¯æåã§ã®ã¿è¡ãããŸãã
ã¹ã¯ãªãã/root/bin/testig2magos_kern.sh
#!/bin/bash # MagOS magos # testing MAGOS="/var/www/magos" TESTING="/var/www/testing" MAGOSGROUP="magos" echo "!!! UPDATE KERNEL AND MAGOS MODULES TO magos REPOSITORY FROM testing REPOSITORY" echo " =====" echo echo "Pres Rnter to continue, or Ctrl+C to abort..." read junk clear cp -ruv $TESTING/AltLinux/kernel/i586/*.xzm $MAGOS/AltLinux/kernel/i586/ cp -ruv $TESTING/AltLinux/modules/i586/[0-9]?-*.xzm $MAGOS/AltLinux/modules/i586/ find $MAGOS -type f -exec chmod 664 {} + find $MAGOS -type d -exec chmod 775 {} + chown -R :$MAGOSGROUP $MAGOS/* echo "UPDATE KERNEL AND MAGOS MODULES FROM magos REPOSITORY IT IS EXECUTED"
ã¹ã¯ãªãã/root/bin/testig2magos_mod.sh
#!/bin/bash # MagOS magos # testing MAGOS="/var/www/magos" TESTING="/var/www/testing" MAGOSGROUP="magos" echo "!!! UPDATE MODULES TO magos REPOSITORY FROM testing REPOSITORY" echo " =====" echo echo "Pres Rnter to continue, or Ctrl+C to abort..." read junk clear cp -ruv $TESTING/AltLinux/modules/i586/[0-9]??-*.xzm $MAGOS/AltLinux/modules/i586/ find $MAGOS -type f -exec chmod 664 {} + find $MAGOS -type d -exec chmod 775 {} + chown -R :$MAGOSGROUP $MAGOS/* echo "UPDATE MODULES FROM magos REPOSITORY IT IS EXECUTED"
ã¹ã¯ãªãã/root/bin/testig2magos_all.sh
#!/bin/bash # magos # testing, iso MAGOS="/var/www/magos" TESTING="/var/www/testing" MAGOSGROUP="magos" echo "!!! UPDATE ALL MAGOS REPOSITORY magos FROM testing REPOSITORY" echo " =====" echo echo "Pres Rnter to continue, or Ctrl+C to abort..." read junk clear cp -ruv $TESTING/AltLinux/iso/ $MAGOS/AltLinux/iso/ cp -ruv $TESTING/AltLinux/kernel/i586/*.xzm $MAGOS/AltLinux/kernel/i586/ cp -ruv $TESTING/AltLinux/modules/i586/*.xzm $MAGOS/AltLinux/modules/i586/ find $MAGOS -type f -exec chmod 664 {} + find $MAGOS -type d -exec chmod 775 {} + chown -R :$MAGOSGROUP $MAGOS/* echo "UPDATE magos REPOSITORY IT IS EXECUTED"
ã«ã¹ã¿ã ã¢ãžã¥ãŒã«
ã«ã¹ã¿ã ã¢ãžã¥ãŒã«ãäœæããããã®äžè¬åå
ç¥ã£ãŠããã¹ãããš
MagOSã§ã¢ãžã¥ãŒã«ãäœæããå ŽåããŠãŒã¶ãŒãšã°ã«ãŒãã®äœæã«é¢é£ãã1ã€ã®éèŠãªæ©èœãèæ ®ããå¿ èŠããããŸããã¢ãžã¥ãŒã«ãäœæãããšãå€æŽãããpasswdãgroupãshadowãªã©ã®ãã¡ã€ã«ããã®äžã«ä¿åãããŸãããã ãã次ã®ã¢ãžã¥ãŒã«ãäœæããŠepm2xzmã¹ã¯ãªããã§ãèŠããããã«ã¯ãã¢ãžã¥ãŒã«åããNN-ããã³ãã¬ãŒããšäžèŽããå¿ èŠããããŸããã¢ãžã¥ãŒã«ã®ååããã®ãã³ãã¬ãŒããšäžèŽããªãå ŽåãäœæãããåŸç¶ã®åã¢ãžã¥ãŒã«ã¯ãæåã®ã¢ãžã¥ãŒã«ãšåæ§ã«ãåºæ¬çãªMagOSã¢ãžã¥ãŒã«ã®ã¿ã«åºã¥ããŠäœæãããŸããããã«ãããèªèšŒãã¡ã€ã«ãæãçããªããŸããã·ã¹ãã ãŠãŒã¶ãŒãäœæããç°ãªãã¢ãžã¥ãŒã«ã«ã€ã³ã¹ããŒã«ãããããã°ã©ã ã¯åãUIDãšGIDãåãåããç°ãªãã¢ãžã¥ãŒã«ã§äœæãããpasswdãã¡ã€ã«ã¯åŸç¶ã®ã¬ã€ã€ãŒã«ãã£ãŠäžæžããããŸãããã®çµæãåºç€ãšãªãã¢ãžã¥ãŒã«ã«ã€ã³ã¹ããŒã«ãããŠããããã°ã©ã ã¯åäœããªããªããŸãã
ãã®åé¡ã解決ããã«ã¯ã2ã€ã®æ¹æ³ããããŸãã1ã€ã®ã¢ãžã¥ãŒã«å ã§ã·ã¹ãã ã¢ã«ãŠã³ããäœæããããã°ã©ã ãã°ã«ãŒãåããããäžèšã®ãã³ãã¬ãŒãã«åŸã£ãŠã¢ãžã¥ãŒã«åãèšå®ããŸãã
ã¢ãžã¥ãŒã«ãäœæããã¹ã¯ãªããã¯ãã¢ãžã¥ãŒã«åãšããŠç¬èªã®ååã䜿çšããããã«èšè¿°ãããŠããŸãã99-u30-example.shãšããã¹ã¯ãªããã¯ã99-u30-example.xzmãšããã¢ãžã¥ãŒã«ãäœæããŸãã
ã¢ãžã¥ãŒã«ã®æ°
ããŒã¹ã¢ãžã¥ãŒã«ã«ã¯éè€ãããã¡ã€ã«ããã£ã¬ã¯ããªããªããããããŒã¹ã¢ãžã¥ãŒã«ãæ¥ç¶ããé åºã¯éèŠã§ã¯ãããŸããããã ãããŠãŒã¶ãŒã¢ãžã¥ãŒã«ãæ¥ç¶ããé åºã¯éèŠã§ãããŠãŒã¶ãŒã¢ãžã¥ãŒã«ã«ããŒã¹ã¢ãžã¥ãŒã«ãã¡ã€ã«ã®ä¿®æ£ãå«ãŸããŠãããAltLinuxãã£ã¹ããªãã¥ãŒã·ã§ã³ãžã®MagOSé©å¿ã®å Žåããã®ãããªç¶æ³ã芳å¯ãããå Žåããããã¯aufsã®äžäœã¬ã€ã€ãŒã«é 眮ãããã·ã¹ãã ã¬ã€ã€ãŒã®åŸã«æ¥ç¶ãããŸããã¢ãžã¥ãŒã«ã¯ã·ã¹ãã ã«æ¥ç¶ãããååã§ãœãŒãããããããã¢ãžã¥ãŒã«ã®ååã¯éèŠã§ããæåŸã®ã·ã¹ãã ã¢ãžã¥ãŒã«ã®ååã¯ã99-ãã§å§ãŸããããã99ïŒ-ãã§å§ãŸããŠãŒã¶ãŒã¢ãžã¥ãŒã«ã®ååã䜿çšããããšããå§ãããŸããããã«ãããååã§ãã£ã¬ã¯ããªã䞊ã¹æ¿ãããšãã·ã¹ãã ã¢ãžã¥ãŒã«ã®åŸã«è¡šç€ºãããŸãã
ç¹å¥ãªç®çã®ã¢ãžã¥ãŒã«
ç¹å¥ãªç®çãæã€2ã€ã®ã¢ãžã¥ãŒã«ãåºå¥ããããšããå§ãããŸãïŒãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã®çŸåšã®æŽæ°ãé 眮ãããŠããã¢ãžã¥ãŒã«ãæåã«ã€ã³ã¹ããŒã«ããããšããå§ãããŸãããããã£ãŠãæšå¥šãããååã¯ã99-u10-updateãã§ãããŸãããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ãšãã®ããã°ã©ã ã«é©åããèšå®ãã¡ã€ã«ãå«ãã¢ãžã¥ãŒã«ãæåŸã«ã€ã³ã¹ããŒã«ããããšããå§ãããŸããèšå®ã䜿çšããŠã¢ãžã¥ãŒã«ãäœæããå Žåãããã€ãã®ã«ãŒã«ãéµå®ããå¿ èŠããããŸãã
- ãã®ã¢ãžã¥ãŒã«ã«ããã°ã©ã ãã€ã³ã¹ããŒã«ããããšã¯ã§ããŸããã
- ãã®ã¢ãžã¥ãŒã«ã§ã¯ãæš©éã®å²ãåœãŠãæ åœãããã¡ã€ã«ïŒpasswdãgroupãªã©ïŒã¯ãããŸããã
ãããã®èŠåã«åŸã£ãŠãåºç€ãšãªãã¢ãžã¥ãŒã«ãåçµã¿ç«ãŠãããšãã«ã·ã¹ãã ããã¢ãžã¥ãŒã«ãé€å€ããããšã¯ã§ãããã·ã¹ãã 管çã¹ã¯ãªããããã®äžã«é 眮ãããå ŽåããããŸãã
ã¢ãžã¥ãŒã«ã®å¶é
ã¢ãžã¥ãŒã«ã®æ°ã«å¶éã¯ãããŸããïŒããã©ã«ãã§ã¯æ倧127ã«èšå®ã§ããŸãïŒããããã°ã©ã ãã¢ãžã¥ãŒã«ã«åå²ããéã«åŠ¥åç¹ã確èªããããšããå§ãããŸãããŸããåºç€ãšãªãã¢ãžã¥ãŒã«ãåæ§ç¯ãããšããåŸã§ããŒãããå¿ èŠããããã¹ãŠã®ã¢ãžã¥ãŒã«ãåæããå¿ èŠããããŸãããããŠããã®ãããªã¢ãžã¥ãŒã«ãåæ§ç¯ããåŸãã¢ãžã¥ãŒã«å ã®ããã°ã©ã ãæŽæ°ãŸãã¯å€æŽãããŠããªãå Žåã§ããåŸç¶ã®ãã¹ãŠã®ã¢ãžã¥ãŒã«ãåæ§ç¯ããããšããå§ãããŸããããã¯ãã©ã€ãã©ãªã®äŸåé¢ä¿ã«ãããã®ã§ãããããã£ãŠããŠãŒã¶ãŒã¢ãžã¥ãŒã«ã®æ°ãå€ããªããªãããã«ããå¿ èŠããããŸãã
2çªç®ã®å¶éã¯ãä»æ¹ã§ã¯ãã¢ãžã¥ãŒã«ãåæ§ç¯ãããã³ã³ãã¥ãŒã¿ãŒã®ãªãœãŒã¹èŠä»¶ã§ããã¢ãžã¥ãŒã«ãžã®ããã°ã©ã ã®ã€ã³ã¹ããŒã«äžããã¡ã€ã«ã·ã¹ãã ã¯ããã©ã«ãã§RAMã«é 眮ããããããã€ã³ã¹ããŒã«ãããããã°ã©ã ã®æ°ã¯å¿ èŠãªRAMã®ãµã€ãºã«çŽæ¥é¢ä¿ããŸãããã®ãããLibreofficeãã€ã³ã¹ããŒã«ããã«ã¯ãã³ã³ãã¥ãŒã¿ãŒã«çŽ3 GBã®ç©ºãRAMãå¿ èŠã§ãããã®å¶éã解æ¶ããã«ã¯ãã¢ãžã¥ãŒã«ãäœæããããã®äžæãã¡ã€ã«ãé 眮ããããã®ãã£ã¬ã¯ããªãç¹å¥ã«æºåããå¿ èŠããããŸãã
ãããã£ãŠã䜿çšããå¿ èŠã®ããã¢ãžã¥ãŒã«ã®æå°æ°ã¯3ã§ãæé©ãªæ°ã¯4ã¢ãžã¥ãŒã«ã§ãã
ã¢ãžã¥ãŒã«ã®äœææé
ã¢ãžã¥ãŒã«ã®çµã¿ç«ãŠæé ã¯æ¬¡ã®ãšããã§ãã
- æŽæ°ããŒã«/root/bin/loadupdate.shãããŠã³ããŒãããŸãã
- OSã®åèµ·åäžã«ã·ã¹ãã ã®æŽæ°ãç¡å¹ã«ããŸãã/etc/sysconfig/MagOSããã³/mnt/livemedia/MagOS.iniãã¡ã€ã«ã§å€æ°AUTOUPDATE = Noãèšå®ããŸãã
- .bakæ¡åŒµåãè¿œå ããŠãæŽæ°ãããã¢ãžã¥ãŒã«ãšåŸç¶ã®ãã¹ãŠã®ã¢ãžã¥ãŒã«ã®ååãå€æŽããŸãïŒä»ã®æ¡åŒµåã¯èš±å¯ãããŸããïŒã
- ã¢ãžã¥ãŒã«ããã«ãããŸããèŠæ±ã«å¿ããŠãã¢ãžã¥ãŒã«ãmagos-serverãµãŒããŒã«ä¿åããŸãã
- å€æŽãæ£ããæå¹ã«ããããã«ã³ã³ãã¥ãŒã¿ãŒãåèµ·åããŸãã
- åŸç¶ã®ãã¹ãŠã®ã¢ãžã¥ãŒã«ã«å¯ŸããŠæé 3ã5ãç¹°ãè¿ããŸãã
æ°ããããã°ã©ã ãã€ã³ã¹ããŒã«ããæ¹æ³
ããã°ã©ã ã®æ€çŽ¢ãã€ã³ã¹ããŒã«ãããã³æ§æã®æ¹æ³ã¯æ¬¡ã®ãšããã§ãã
- ã¯ãªãŒã³ã¢ãŒãã§ã³ã³ãã¥ãŒã¿ãŒãèµ·åããŸãã
- ç®çã®ããã°ã©ã ãèŠã€ããŠã€ã³ã¹ããŒã«ããŸãã
- accããã³Webã€ã³ã¿ãŒãã§ãŒã¹ãå«ãã䜿çšå¯èœãªæ§æããŒã«ã䜿çšããŠããã°ã©ã ãæ§æããŸããçµæãéæããããã«ã
- , .
- .
- .
- . . . .. . .
- .
ãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ãæŽæ°ãããã¢ãžã¥ãŒã«ãæãç°¡åã§ããæŽæ°ã®æ°ã¯ãé åžãªãªãŒã¹ä»¥éã®çµéæéã«ãã£ãŠç°ãªããŸããæŽæ°åæ°ãéèŠã«ãªãå Žåã¯ãisoååžã€ã¡ãŒãžã®æŽæ°ãæ€èšããå¿ èŠããããŸããæŽæ°ã¯æåã¢ãŒãã§ã®ã¿å®è¡ãããä»ã®ãã¹ãŠã®ã¢ãžã¥ãŒã«ã®åã¢ã»ã³ããªãå¿ èŠã«ãªããããæŽæ°æéã¯ã·ã¹ãã 管çè ã®è£éã«ä»»ãããŠããŸãã
ã¹ã¯ãªãã99-u10-update.sh
#!/bin/sh . conf/devel.conf NAME=`echo $0 | sed 's/\.\///'| sed 's/\..*//'` . lib/mv.sh $NAME epm2xzm $NAME upgrade $NAME.xzm rm -rf $NAME mkdir $NAME xzm2dir $NAME.xzm $NAME . lib/delhlam.sh $NAME dir2xzm $NAME $NAME.xzm . lib/update.sh $NAME
OfficeãœãããŠã§ã¢ã€ã³ã¹ããŒã«ã¢ãžã¥ãŒã«
ãã®ã¢ãžã¥ãŒã«ã«ã¯ããµãŒãã¹ã¢ã«ãŠã³ãã®äœæãå¿ èŠãšããªããšã³ããŠãŒã¶ãŒåãã®ã¢ããªã±ãŒã·ã§ã³ãå«ãŸããŠããŸããã¢ããªã±ãŒã·ã§ã³ã®ãªã¹ãã¯ããã»ã©å€§ããã¯ãããŸããããå€æ°ã®äŸåããã±ãŒãžãããããããã®ã¢ãžã¥ãŒã«ã¯éåžžã«å€§ãããªã£ãŠããŸãã
ã¹ã¯ãªãã99-u10-office4.sh
#!/bin/sh . conf/devel.conf NAME=`echo $0 | sed 's/\.\///'| sed 's/\..*//'` . lib/mv.sh $NAME epm2xzm $NAME -i 'java-1.7.0-openjdk LibreOffice4-langpack-ru LibreOffice4-integrated file-roller LibreOffice4 LibreOffice4-gnome foomatic-db lsof foo2zjs foo2zjs-apps foo2zjs-fwdownloader mozilla-plugin-adobe-flash mozilla-plugin-mozplugger mozilla-plugin-totem totem-plugins fonts-ttf-ms' rm -rf $NAME mkdir $NAME xzm2dir $NAME.xzm $NAME rm -rf $NAME/etc/urpmi $NAME/etc/.java . lib/delhlam.sh $NAME dir2xzm $NAME $NAME.xzm . lib/update.sh $NAME
ãŠãŒãã£ãªãã£ãšãµãŒããŒãåããã¢ãžã¥ãŒã«
ãã®ã¢ãžã¥ãŒã«ã«ã¯ããŠãŒã¶ãŒãµãŒãã¹ã¬ã³ãŒããšãã®äŸåã³ã³ããŒãã³ãã®äœæãå¿ èŠãšãããã¹ãŠã®ãŠãŒãã£ãªãã£ãšãµãŒããŒãå«ãŸããŠããŸãã次ã®ãŠãŒãã£ãªãã£ã®äžéšããªãã£ã¹ã¢ãžã¥ãŒã«ã«è»¢éããããšã¯éåžžã«å¯èœã§ãããããã°ã©ã ã®éèŠãªãªã¹ãã«ãããããããã€ã³ã¹ããŒã«ãããããã°ã©ã ã®ç·æ°ãšã€ã³ã¹ããŒã«äžã«æ¶è²»ããããªãœãŒã¹ã¯3ã®ã¬ãã€ããè¶ ããŸããã
ããã°ã©ã ãå®éã«ã€ã³ã¹ããŒã«ããããšã«å ããŠããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã®äžéšã®èŠçŽ ãšã€ã³ã¹ããŒã«ãããããã°ã©ã ã¯ãã€ã³ã¹ããŒã«ã¹ã¯ãªããã§çŽæ¥æ§æãããŸãã
ãã®ã¢ãããŒãã«ãããæ§æãã¡ã€ã«ã®åœ¢åŒã«å€æŽãçããå ŽåããŸãã¯æ§æãã¡ã€ã«ã®ããã©ã«ãèšå®ã衚瀺/å€æŽãããå Žåã«ãããã°ã©ã ã®æŽæ°ããŒãžã§ã³ã«ããæ£ç¢ºã«å¯Ÿå¿ããããšãã§ããŸãããã®ãããªå Žåããã®ã¡ã«ããºã ã¯ãä¿®æ£ãããå®æããæ§æãã¡ã€ã«ãæçµèšå®ã§ã¢ãžã¥ãŒã«ã«å ¥ãããããæãŸããæ¹æ³ã§ãã次ã«ãæ§æèšå®ãå€æŽãããšãã¢ãžã¥ãŒã«ã®äœæãŸãã¯æŽæ°äžã«æ§æèšå®ããŸã£ããæ€åºãããªããšãã倧ããªãªã¹ã¯ããããŸãã
䜿çšãããœãããŠã§ã¢ã¹ã€ãŒãã«ã€ããŠã®ããã€ãã®èšèãã³ã³ãã¥ãŒã¿ãŒãœãããŠã§ã¢ã«ã¯ãç¹å®ã®èŠä»¶ãã¿ã¹ã¯ã¯å«ãŸããŠããŸããããšã³ã¿ãŒãã©ã€ãºã·ã¹ãã ã¯ãã¢ããªã±ãŒã·ã§ã³ã®ã€ã³ãã©ãããã¬ãã«ã«ç§»è¡ããŸãããã³ã³ãã¥ãŒã¿ãŒã¯ã·ã³ã¯ã©ã€ã¢ã³ããšã¿ã€ãã©ã€ã¿ãŒã§ãã
ã¹ã¯ãªãã99-u20-utils.sh
#!/bin/sh . conf/devel.conf NAME=`echo $0 | sed 's/\.\///'| sed 's/\..*//'` . lib/mv.sh $NAME epm2xzm $NAME -i 'samba samba-winbind alterator-auth cups-windows samba-client ntpdate ntp-utils zabbix-agent zabbix-agent-sudo perl-FusionInventory-Agent perl-FusionInventory-Agent-scripts perl-Task-FusionInventory perl-Pod-Text-Ansi alterator-fbi alterator-net-iptables italc2-client installer-feature-init-italc rsync tcpdump nmap netcat telnet sane sane-server xsane xsane-gimp2 sane-frontends yagf cuneiform cuneiform-data fonts-otf-gdouros-akkadian aspell-ru-lebedev aspell-ru-rk iperf whois rdesktop xfreerdp remmina-plugins sshpass pssh' rm -rf $NAME mkdir $NAME xzm2dir $NAME.xzm $NAME cp /usr/share/zoneinfo/Asia/Krasnoyarsk $NAME/etc/localtime cp /etc/nsswitch.conf $NAME/etc/nsswitch.conf sed -is/'^hosts: files mdns4_minimal \[NOTFOUND=return\]*'/'hosts: files dns mdns4_minimal \[NOTFOUND=return\] myhostname fallback'/ $NAME/etc/nsswitch.conf sed -is/'^# PidFile=\/var'/'PidFile=\/var'/ $NAME/etc/zabbix/zabbix_agentd.conf sed -is/'^# EnableRemoteCommands=0'/'EnableRemoteCommands=1'/ $NAME/etc/zabbix/zabbix_agentd.conf sed -is/'^LogFileSize='/'# LogFileSize='/ $NAME/etc/zabbix/zabbix_agentd.conf sed -is/'127.0.0.1'/'192.168.0.XXX'/ $NAME/etc/zabbix/zabbix_agentd.conf sed -is/'^# LogRemoteCommands=0'/'LogRemoteCommands=1'/ $NAME/etc/zabbix/zabbix_agentd.conf sed -is/'^Hostname='/'# Hostname='/ $NAME/etc/zabbix/zabbix_agentd.conf sed -is/'^# Timeout=3'/'Timeout=30'/ $NAME/etc/zabbix/zabbix_agentd.conf mkdir $NAME/etc/fusioninventory echo "server = http://glpi.kompany.local/glpi/plugins/fusioninventory/" > $NAME/etc/fusioninventory/agent.cfg echo "delaytime = 3600" >> $NAME/etc/fusioninventory/agent.cfg echo "timeout = 180" >> $NAME/etc/fusioninventory/agent.cfg echo "logger = File" >> $NAME/etc/fusioninventory/agent.cfg echo "logfile = /var/log/fusioninventory.log" >> $NAME/etc/fusioninventory/agent.cfg echo "logfacility = LOG_USER" >> $NAME/etc/fusioninventory/agent.cfg echo "debug = 3" >> $NAME/etc/fusioninventory/agent.cfg mkdir $NAME/etc/cron.daily echo "#!/bin/sh" > $NAME/etc/cron.daily/fusioninventory-agent echo "" >> $NAME/etc/cron.daily/fusioninventory-agent echo "/usr/bin/fusioninventory-agent --conf-file=/etc/fusioninventory/agent.cfg" >> $NAME/etc/cron.daily/fusioninventory-agent chmod +x $NAME/etc/cron.daily/fusioninventory-agent . lib/delhlam.sh $NAME dir2xzm $NAME $NAME.xzm . lib/update.sh $NAME
ãã®å Žåãå€ã¯ãã£ã¹ããªãã¥ãŒã·ã§ã³ãããã®ããã©ã«ãå€ãšã¯ç°ãªããããã¿ã€ã ãŸãŒã³èšå®ã¯ãã®æ§æãã¡ã€ã«ã§å®è¡ãããæå®ãããMagOSãã©ã¡ãŒã¿ãŒã®æšæºèšå®ã¯æ£ããæ©èœããŸããïŒcp / usr / share / zoneinfo / Asia / Krasnoyarsk $ NAME / etc / localtimeïŒã
AltLinuxãã£ã¹ããªãã¥ãŒã·ã§ã³ã®èšå®ã§å¥åŠãªãšã©ãŒãä¿®æ£ãããŠããŸããããŒã«ã«ãããã¯ãŒã¯ã®ãã¡ã€ã³åãlocalïŒcp /etc/nsswitch.conf $ NAME / etc / nsswitch.conf sed -is / 'ã§çµããå ŽåãããŒã«ã«ãããã¯ãŒã¯äžã®ã³ã³ãã¥ãŒã¿ãŒã®ååã¯è§£æ±ºãããŸããã ^ãã¹ãïŒãã¡ã€ã«mdns4_minimal \ [NOTFOUND = return \] * '/'ãã¹ãïŒãã¡ã€ã«dns mdns4_minimal \ [NOTFOUND = return \] myhostname fallback '/ $ NAME / etc / nsswitch.confïŒã
æ§æãã¡ã€ã«zabbix_agentdãæ§æãããŸããããã«ããããŠãŒã¶ãŒã®ã³ã³ãã¥ãŒã¿ãŒã®ã¹ããŒã¿ã¹ããªã¢ã«ã¿ã€ã ã§ç£èŠã§ããŸããããã¯ãããŠã³ã¿ã€ã ãåæžããã®ã«ååéèŠã§ãã
fusioninventory-agentã®æ§æãã¡ã€ã«ã¯ãGLPIãã¯ãã«ã«ãµããŒãèªååã·ã¹ãã ãšé£æºããŠåäœããæ©åšããã³ãœãããŠã§ã¢ã®èªåã€ã³ãã³ããªãå¯èœã«ãããŠãŒãã£ãªãã£ã§ãã
ã·ã¹ãã èšå®ã¢ãžã¥ãŒã«
ã·ã¹ãã èšå®ã¢ãžã¥ãŒã«ã«ã¯ã€ã³ã¹ããŒã«ãããããã°ã©ã ã¯å«ãŸããŠããããã¢ãžã¥ãŒã«ã«ã¿ãã°ã®åãªãããã«ãŒã§ããããã¯äž»ãªé¢å¿äºã§ãã
ã¹ã¯ãªãã99-u99-default.sh
#!/bin/sh . conf/devel.conf NAME=`echo $0 | sed 's/\.\///'| sed 's/\..*//'` . lib/mv.sh $NAME dir2xzm $NAME $NAME.xzm . lib/update.sh $NAME
etc / moduleãã£ã¬ã¯ããªã«ã¯ã次ã®ãã£ã¬ã¯ããªãšæ§æãã¡ã€ã«ãå«ãŸããŸãã
sudoers
-r-------- 1 root root 730 Aug 20 15:42 ./sudoers
ãã¹ã¯ãŒããªãã§ç®¡çè ã«sudoæäœãèš±å¯ããããã®è¡ãå ¥åãããŸããïŒsshãããã³ã«ã䜿çšããŠäžŠåæäœãå®è¡ããããã«å¿ èŠïŒã
X11
./X11: total 8 drwxr-xr-x 2 root root 4096 Aug 21 12:42 xinit drwxr-xr-x 2 root root 4096 Aug 21 12:42 xorg.conf.d
äºåèšå®ãããããŒããŒããã±ãŒã«ã¹ã€ããïŒ
etc / X11 / xinit / Xkbmap
option grp:alt_shift_toggle -variant , -layout us,ru -model pc104
ããŒããŒãã®ã»ããã¢ããïŒ
etc / X11 / xorg.conf.d / 00-keyboard.conf
# Read and parsed by systemd-localed. It's probably wise not to edit this file # manually too freely. Section "InputClass" Identifier "system-keyboard" MatchIsKeyboard "on" Option "XkbLayout" "us,ru" EndSection
./apt
total 8 drwxr-xr-x 2 root root 4096 Jun 9 09:45 sources.list.d drwxr-xr-x 2 root root 4096 Jun 9 09:42 vendors.list.d
fusioninventory-agentãã€ã³ã¹ããŒã«ããããã®èªåã€ã³ããŒããªããžããªãè¿œå ãããŸããã
etc / apt / sources.list.d / autoimports-p7.list
rpm [cronbuild] ftp://ftp.altlinux.ru/pub/distributions/ALTLinux/autoimports/Sisyphus/ noarch autoimports /etc/apt/vendors.list.d/autoimports-p7.list simple-key "cronbuild" { Fingerprint "DE73F3444C163CCD751AC483B584C633278EB305"; Name "Cronbuild Service <cronbuild@altlinux.org>"; } simple-key "cronport" { Fingerprint "F3DBF34AB0CC0CE638DF7D509F61FBE7E2C322D8"; Name "Cronport Service <cronport@altlinux.org>"; }
./italc
total 4 drwxr-xr-x 3 root root 4096 Jul 17 18:19 keys
italcããã°ã©ã ã®ããŒãã€ã³ã¹ããŒã«ãããŸãã
./lightdm
total 12 -rw-r--r-- 1 root root 909 Jun 8 13:03 lightdm-gtk-greeter.conf -rw-r--r-- 1 root root 4536 Jun 8 13:18 lightdm.conf
èªåãã°ã€ã³ã¢ãŒããç¡å¹ã«ãªããè¿œå ã®èšå®ãè¡ãããŸãã
etc / lightdm / lightdm-gtk-greeter.conf
[greeter] logo=/usr/share/design/current/icons/large/altlinux.png background=/usr/share/design/current/backgrounds/default.png icon-theme-name=gnome show-language-selector=false show-indicators=a11y;power
etc / lightdm / lightdm.conf
[LightDM] minimum-vt=7 user-authority-in-system-dir=true log-directory=/var/log/lightdm run-directory=/var/run/lightdm cache-directory=/var/cache/lightdm xsessions-directory=/etc/lightdm/sessions [SeatDefaults] xserver-command=/usr/bin/X greeter-hide-users=true session-wrapper=/etc/X11/Xsession [XDMCPServer] [VNCServer]
./net
total 8 drwxr-xr-x 3 root root 4096 Jul 16 12:35 ifaces -rw-r--r-- 1 root root 1987 Jul 16 12:44 sysctl.conf
ãããã¯ãŒã¯ã€ã³ã¿ãŒãã§ã€ã¹ãšãã¡ã€ã¢ãŠã©ãŒã«ã¯äºåã«æ§æãããŠããŸãã
./pam.d
total 4 -rw-r----- 1 root root 237 Aug 24 11:28 reboot
etc / pam.d / reboot
auth required pam_nologin.so auth sufficient pam_rootok.so auth sufficient pam_console.so #auth required pam_deny.so auth required pam_permit.so account required pam_permit.so password required pam_deny.so
./skel
total 16 drwxr-xr-x 8 root root 4096 Jun 8 16:17 drwxr-xr-x 2 root root 4096 Jun 8 16:17 drwxr-xr-x 2 root root 4096 Jun 8 16:17 drwxr-xr-x 2 root root 4096 Jun 8 16:17
skelãã£ã¬ã¯ããªã«ã¯ãç°å¢ããã³ãŠãŒã¶ãŒããã°ã©ã ã®äºåèšå®ãå®è¡ãããã¡ã€ã«ãå«ãŸããŠããŸãã
./sysconfigïŒ
total 8 -rw-rârâ 1 root root 75 Jun 8 13:11 i18n
etc / sysconfig / i18n
SYSFONT=UniCyr_8x16 LANG=ru_RU.utf8
./systemd
total 8 drwxr-xr-x 5 root root 4096 Aug 20 18:52 system drwxr-xr-x 2 root root 4096 Aug 20 18:51 user
ããã©ã«ãã§èµ·åãããããé åžãããã«ãªããµãŒãã¹ã®èšå®ã¯å®äºããŸããã
./xdg
total 4 drwxr-xr-x 2 root root 4096 Jul 17 17:59 iTALC Solutions
Italcã¯ãå ã®æ§æãšã¯ç°ãªãæ§æã§äœ¿çšãããŸããæ§æãã¡ã€ã«ã®å€ãã®ãã©ã¡ãŒã¿ãŒãå€æŽããããããæ§æãã¡ã€ã«ã¯åã«ããã©ã«ãã¢ãžã¥ãŒã«ã«é 眮ãããŸããã
/ etc / xdg / iTALCãœãªã¥ãŒã·ã§ã³/ iTALC.conf
[Authentication] KeyAuthenticationEnabled=1 LogonAuthenticationEnabled=0 LogonGroups="italc-admins,italc-supporters,italc-teachers,italc-students" PermissionRequiredWithKeyAuthentication=0 PermissionRequiredWithLogonAuthentication=0 PrivateKeyBaseDir=$GLOBALAPPDATA/keys/private PublicKeyBaseDir=$GLOBALAPPDATA/keys/public SameUserConfirmationDisabled=0 [DemoServer] Backend=0 Multithreaded=1 [Logging] LimittedLogFileSize=0 LogFileDirectory=$TEMP LogFileSizeLimit=-1 LogLevel=4 LogToStdErr=1 LogToWindowsEventLog=0 [Network] CoreServerPort=11100 DemoServerPort=11400 FirewallExceptionEnabled=1 HttpServerEnabled=0 HttpServerPort=5800 [Paths] GlobalConfiguration=$APPDATA/GlobalConfig.xml PersonalConfiguration=$APPDATA/PersonalConfig.xml SnapshotDirectory=$APPDATA/Snapshots [Service] Arguments= Autostart=1 HideTrayIcon=0 LockWithDesktopSwitching=1 [VNC] CaptureLayeredWindows=1 LowAccuracy=1 PollFullScreen=1
ã¹ã¯ãªãã
ã·ã¹ãã ãèšèšãããšããã·ã¹ãã 管çã®èªååã«ç¹å¥ãªæ³šæãæãããŸããããã®ç®çã¯ããã®åŸã®ã¡ã³ããã³ã¹ã®äººä»¶è²»ãåæžããããšã§ããããã®ç®çã®ããã«ãè¿œå ã®ã¹ã¯ãªããã®ã»ãããäœæãããŸããããããã¯æ¡ä»¶ä»ãã§2ã€ã®ã«ããŽãªã«åé¡ã§ããŸããã¡ã³ããã³ã¹ãšã·ã¹ãã 管çãèªååããã¹ã¯ãªãããšã¢ãžã¥ãŒã«ãäœæããã¹ã¯ãªããã§ããã¢ãžã¥ãŒã«ä¿å®ã¹ã¯ãªããã®äž»èŠéšåã«ã€ããŠã¯äžèšã§èª¬æããŸããããããã§èª¬æããã©ã€ãã©ãªéšåã¯ããªãŒããŒããŒããã®ãŸãŸã§ãã
Magos-patchesã¢ããªã³
ç£æ¥çšã®æäœã§ã¯ãMagOSã䜿çšããããã®ã¿ã¹ã¯ãšæ¡ä»¶ããããã«ç°ãªããããMagOSã³ã¢èªäœã®æäœãèªååããæ段ãå¿ èŠã§ãã以äžã®ã¹ã¯ãªããã¯ãçè«çã«ã¯MagOSãããã«çµã¿èŸŒãŸããã¹ãã§ãããããã§ã¯ããããåå¥ã«æ€èšããŸãã
èµ·åã¹ã¯ãªãã
ã¹ã¯ãªãã/usr/lib/magos/rc.halt/05-update.shã¯ãã³ã³ãã¥ãŒã¿ãŒã®é»æºãåããåèµ·åãããšããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ãèªåçã«æŽæ°ããããã«èšèšãããŠããŸããã¹ã¯ãªãããæ©èœããããã«ã3ã€ã®ãã©ã¡ãŒã¿ãŒãMagOS.iniæ§æãã¡ã€ã«ã«è¿œå ãããŸããã
/usr/lib/magos/rc.halt/05-update.sh
# : Yes, No AUTOUPDATE=Yes # : boot - UPDATE=AltLinux,boot # rsync SRCUPDATE=192.168.1.XXX/magos
ããã§ïŒAUTOUPDATEãã©ã¡ãŒã¿ãŒã¯ãé»æºããªãã«ãªã£ããšãã«æŽæ°ãããã©ããã瀺ããŸããUPDATE-æŽæ°ãå®è¡ããããã£ã¬ã¯ããªã®åæã
SRCUPDATE-æŽæ°ãå®è¡ããããµãŒããŒã¢ãã¬ã¹ãšãªããžããªãã¢ãã¬ã¹ã¯ãIPã¢ãã¬ã¹ãŸãã¯DNSãµãŒããŒã®ååãšããŠæå®ã§ããŸãã
ãŠãŒã¶ãŒã®ã³ã³ãã¥ãŒã¿ãŒã«ãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ãã€ã³ã¹ããŒã«ãããšãã«ãåããã©ã¡ãŒã¿ãŒãé¢ä¿ããŸãã
ã¹ã¯ãªããã®ãœãŒã¹ã³ãŒãïŒ
/usr/lib/magos/rc.halt/05-update.sh
#!/bin/bash # Initial script for MagOS-Linux Live operating system # This script are launching before starting init from linux-live script. # Current dir always must be set to root (/) # All system path must be relative, except initrd dirs export PATH=.:/:/usr/sbin:/usr/bin:/sbin:/bin ENABLED=yes . /mnt/live/liblinuxlive [ -f /etc/sysconfig/MagOS ] && . /etc/sysconfig/MagOS #. etc/sysconfig/MagOS [ "$ENABLED" != "yes" ] && exit 0 [ "$AUTOUPDATE" != "Yes" or "$AUTOUPDATE" != "yes" ] && exit 0 [ -z "$UPDATE" -a -z "$SRCUPDATE" ] && exit 0 [ -z "$(grep changes /memory/cmdline)" ] && exit 0 [ -n "$(grep 'from=http:' /memory/cmdline)" ] && exit 0 if ! [ -z "$UPDATE" ] ;then for dirs in $(echo $UPDATE | tr ',;' ' ') ;do rsync -azr --delete --exclude=MagOS.ini rsync://$SRCUPDATE/$dirs/ /mnt/livemedia/$dirs/ done fi
NTPãµãŒããŒãæ§æããæ¢åã®ã¹ã¯ãªãã/usr/lib/magos/rc.preinit.d/21-ntpã®ä¿®æ£ãå®è¡ãããŸãããã©ãããããã®éšåã¯ç¹ã«AltLinuxãã£ã¹ããªãã¥ãŒã·ã§ã³ã«äŸåããŠãããããå°æ¥ä¿®æ£ãããå¯èœæ§ããããŸãã
/usr/lib/magos/rc.preinit.d/21-ntp
#!/bin/bash # Initial script for MagOS-Linux Live operating system # This script are launching before starting init from linux-live script. # Current dir always must be set to root (/) # All system path must be relative, except initrd dirs export PATH=.:/:/usr/sbin:/usr/bin:/sbin:/bin ENABLED=yes [ "$ENABLED" != "yes" ] && exit 0 DEBUGMODE=no . /liblinuxlive 2>/dev/null || . /mnt/live/liblinuxlive . /livekitlib 2>/dev/null debug_mode "$0" "$@" . etc/sysconfig/MagOS if ! [ -z "$NTPSERVERS" ] ;then sed -is/'^server'/'#server'/ etc/ntp.conf sed -is/'^server'/'#server'/ etc/ntpd.conf for a in $(echo $NTPSERVERS | tr ',;' ' ') ;do sed -i '/^driftfile/ s/^/server '"$a"\\n/ etc/ntp.conf grep -q "restrict $a" etc/ntp.conf || echo "restrict $a noquerry notrap" >> etc/ntp.conf sed -is/'^#listen on 127.0.0.1'/'listen on 127.0.0.1'/ etc/ntpd.conf echo "server $a" >> etc/ntpd.conf done fi
OSã€ã³ã¹ããŒã«ã¹ã¯ãªãã
ç¹å¥ãªã¹ã¯ãªããã䜿çšããŠOSãã€ã³ã¹ããŒã«ãããšããã¹ãŠã®ã€ã³ã¹ããŒã«ã§çµ±äžæ§ãå®çŸãããã®äœæ¥ãå®è¡ããæè¡è ã®ãã¹ãæé€ãããã®ããã»ã¹ãäœåºŠãé«éåã§ããŸãã
ã¹ã¯ãªãã/usr/share/magos/install/magosinstall.shã¯ç¹æ®ã§ããããŒããã£ã¹ã¯ããŒãã£ã·ã§ã³ã®äœæãšãã©ãŒããããå®è¡ããŸãããªããžããªã»ã¯ã·ã§ã³ãmagos-serverãµãŒããŒããã³ã³ãã¥ãŒã¿ãŒã®ããŒã«ã«ãã©ã€ãã«ã³ããŒããããŒãããŒããŒãã€ã³ã¹ããŒã«ããŸãã
/usr/share/magos/install/magosinstall.sh
#!/bin/bash # #Usage: # $1 - source catalog: magos testing # Default is magos SRC="magos" . /etc/sysconfig/MagOS SRCINI=$(echo $SRCUPDATE | cut -d "/" -f 2) if ! [ -z "$SRCINI" ];then SRC=$SRCINI fi if ! [ -z "$1" ] ;then SRC=$1 fi echo "-------------------------------------------------------" echo "INSTALL MagOS Altlinux FROM HARD DISK from $SRC !!!" echo " =========" echo echo "Press Enter to continue, or Ctrl+C to abort..." read junk clear swapoff -a echo "=======================================================" echo "Create parition table." parted -s /dev/sda mklabel msdos parted -s /dev/sda mkpart primary ext3 1 30000 parted -s /dev/sda mkpart primary linux-swap 30000 36000 parted -s /dev/sda mkpart primary ext3 36000 100% parted -s /dev/sda toggle 1 boot echo "-------------------------------------------------------" echo "=======================================================" echo "Make file systems on /dev/sda1." mkfs.ext3 -L system /dev/sda1 echo "Make file systems on /dev/sda2." mkswap /dev/sda2 echo "Make file systems on /dev/sda3." mkfs.ext3 -L data /dev/sda3 echo "-------------------------------------------------------" echo "=======================================================" mkdir /media/system && mount /dev/sda1 /media/system mkdir /media/data && mount /dev/sda3 /media/data echo "Syncing instalation data." for dirs in $(echo $UPDATE | tr ',;' ' ') ;do srv=$(echo $SRCUPDATE | cut -d '/' -f 1) if [ "$dirs" != "boot" ] ;then mkdir /media/system/$dirs rsync -azr --delete rsync://$srv/$SRC/$dirs/ /media/system/$dirs/ mkdir /media/data/$dirs-Data rsync -azr --delete rsync://$srv/$SRC/$dirs-Data/ /media/data/$dirs-Data/ else mkdir /media/system/$dirs rsync -azr --delete rsync://$srv/$SRC/$dirs/ /media/system/$dirs/ fi done rm -rf /media/system/lost+found /media/data/lost+found cd /media/system/boot/ bash ./Install_MagOS.bat $(sync) umount /dev/sda1 && rmdir /media/system umount /dev/sda3 && rmdir /media/data echo "-------------------------------------------------------" echo "Instalation is OK." echo "please reboot computer."
ã¹ã¯ãªããããã¹ããããOSãã€ã³ã¹ããŒã«ãããŠããã¡ã€ã³ããŒãã£ã·ã§ã³ã«30 Gbãå²ãåœãŠãããã¹ã¯ããçšã«6 Gbãå²ãåœãŠãããæ®ãã¯å€æŽããã³ããŒã ãå«ãããŒã¿ã»ã¯ã·ã§ã³çšã«äºçŽãããŠããããšãããããŸãããããŸã§ã®ãšããããããã®ãã©ã¡ãŒã¿ãŒãæ§æãã¡ã€ã«ã«ããŸãã¯å°ãªããšããã¡ã€ã«ã®å é ã«é 眮ã§ããå€æ°ã¯äœ¿çšãããŠããŸããã
ã¹ã¯ãªãããžã®ãã¹ã誀ã£ãŠé£ããéžæãããããšã¯ãããŸãããããã«ãããããã°ã©ã ã誀ã£ãŠèµ·åããã®ãé²ãããšãã§ããŸãã
ADã®å å«ã¹ã¯ãªãã
ADSã§ã³ã³ãã¥ãŒã¿ãŒã®é»æºãå ¥ããæ¹æ³ã¯ããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã«ãã£ãŠç°ãªããŸãããã®ã¿ã¹ã¯ãå®äºããããã«ãAltLinuxã¯ç¬èªã®ããã°ã©ã ãäœæããŸããããã ãããã®æ©èœã¯éåžžã«å€§ããããã®æäœã®å®è¡ãç°¡çŽ åããããã«ãç¬èªã®ã¹ã¯ãªãããå®è£ ãããŸããã 2ã€ã®ã¹ã¯ãªãããããã1ã€ã¯ã³ã³ãœãŒã«ã¢ãŒãã§æ¥ç¶ãã2ã€ç®ã¯TCLã䜿çšããŠã°ã©ãã£ã«ã«ã¢ãŒãã§åäœããŸããã°ã©ãã£ãã¯ããã¹ãæžã¿ã§ãããã³ã³ãœãŒã«ã¢ãŒãã䜿çšããããšããå§ãããŸãã
ãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ãã€ã³ã¹ããŒã«ãããšãã³ã³ãã¥ãŒã¿ãŒã®ãã¹ãåã¯MagOSã«ãªããŸããã³ã³ãã¥ãŒã¿ãŒã®å€§éã€ã³ã¹ããŒã«ã§ã¯ãç¹ã«ã³ã³ãã¥ãŒã¿ãŒãADã«å«ãŸããŠããå Žåãããã¯éèŠã§ãããããã£ãŠãã¹ã¯ãªããã¯2ã€ã®åé¡ãåæã«è§£æ±ºããŸããã³ã³ãã¥ãŒã¿ãŒã®ååãå€æŽããADã«å«ããããšã§ãã
çãã¡ã¢ïŒã³ã³ãã¥ãŒã¿ãŒåã¯MagOS.iniãã¡ã€ã«ã§ã¯å®çŸ©ãããŠããŸãããããããã®ã¹ã¯ãªããã䜿çšããŠ/ etc / sysconfig / magosãã¡ã€ã«ã«çŽæ¥å ¥åãããŸãããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã®èµ·åæã«å®è¡ãããä»ã®ãã¹ãŠã®MagOSã¹ã¯ãªããã¯ããã¡ã€ã«/ etc / sysconfig / magosã®ã³ã³ãã¥ãŒã¿ãŒåã䜿çšããŸãã
/usr/share/magos/ad_join/ad_join.pl
#!/usr/bin/perl -w # MagOS-linux.ru # Author M.Fiskov use strict; #use Glib qw/TRUE FALSE/; #use Gtk3 '-init'; my $hostname=''; my $username=''; my $password=''; my $domain='mydomain'; my $realm='mydomain.local'; for (my $i=0;$i<=$#ARGV;$i++){ $_=$ARGV[$i]; (/^--help$/) && do {&usage(); exit 0}; (/^--hostname=/) && do { ($hostname=$ARGV[$i])=~s/^--hostname=//; }; (/^-h$/) && do {$hostname=$ARGV[$i+1];$i++;}; (/^--password=/) && do { ($password=$ARGV[$i]) =~s/^--password=//; }; (/^-p$/) && do {$password=$ARGV[$i+1];$i++;}; (/^--username=/) && do { ($username=$ARGV[$i]) =~s/^--username=//; }; (/^-u$/) && do {$username=$ARGV[$i+1];$i++;}; } if (open (F1,"</etc/altlinux-release") ) { close F1; &addname($hostname) && system("system-auth write ad $realm $hostname $domain $username $password") && system("systemctl restart nm b") && system("systemctl restart winbind") && system("systemctl restart smb"); &wins(); &winbind(); }else{ &addname($hostname) && system("net join -U \"".$username.'%'.$password."\"") && system("systemctl restart nmb") && system("systemct l restart winbind") && system("systemctl restart smb"); &wins(); &winbind(); }; #system("/sbin/reboot"); exit; sub usage(){ print "Join this computer from MagOS to Active Directory Service (ADS) -h or --hostname= Computer name -u or --username= ADS administrator user name -p or --password= ADS administrator password --help This usage " } sub wins(){ my @wins=split("\"",`/usr/bin/wbinfo -P`); system ("sed -i '/wins server = /d' /etc/samba/smb.conf"); my $wsed=sprintf("sed -i \'/\\[global\\]/ s/\$/\\nwins server = ".$wins[1]."\'/ /etc/samba/smb.conf"); system ($wsed); my $wgroup=sprintf("net groupmap add ntgroup=\" \" unixgroup=wheel rid=512 type=d"); system ($wgroup); $wgroup=sprintf("net groupmap add ntgroup=\" \" unixgroup=wheel rid=513 type=d"); system ($wgroup); $wgroup=sprintf("net groupmap add ntgroup=\" \" unixgroup=wheel rid=514 type=d"); system ($wgroup); } sub addname (){ my ($hostname)=@_; system ("sed -i '/netbios name =/d' /etc/samba/smb.conf"); my $ssed=sprintf("sed -i \'/\\[global\\]/ s/\$/\\n netbios name = ".$hostname."\'/ /etc/samba/smb.conf"); system ($ssed); system ("sed -i '/HOSTNAME/d' /etc/sysconfig/MagOS"); $ssed=sprintf("echo \"HOSTNAME=$hostname\" >>/etc/sysconfig/MagOS"); system ($ssed); system("hostnamectl set-hostname $hostname"); return 1; } sub winbind(){ system ("sed -is/'server string ='/';server string ='/ /etc/samba/smb.conf"); system ("sed -i '/idmap backend = /d' /etc/samba/smb.conf"); my $wsed=sprintf("sed -i \'/\\[global\\]/ s/\$/\\nidmap config $domain : backend = ad\'/ /etc/samba/smb.conf"); system ($wsed); system ("sed -i '/winbind cache time /d' /etc/samba/smb.conf"); $wsed=sprintf("sed -i \'/\\[global\\]/ s/\$/\\nwinbind cache time = 1440\'/ /etc/samba/smb.conf"); system ($wsed); }
ãã¡ã€ã³åãšã¬ã«ã ã¯ãå€æ°$ domainããã³$ realmã®ã¹ã¯ãªããã§çŽæ¥æå®ãããããšã«æ³šæããŠãã ãããããããããã¯æ£ãã決å®ã§ã¯ãããŸãã...
/usr/share/magos/ad_join/ad_join_x.pl
#!/usr/bin/perl -w # MagOS-linux.ru # Author M.Zaripov # No testing use strict; use Glib qw/TRUE FALSE/; use Gtk3 '-init'; #standard window creation, placement, and signal connecting my $window = Gtk3::Window->new('toplevel'); $window->signal_connect('delete_event' => sub { Gtk3->main_quit; }); $window->set_border_width(5); $window->set_position('center_always'); #this vbox will geturn the bulk of the gui my $vbox = &ret_vbox(); #add and show the vbox $window->add($vbox); $window->show(); #our main event-loop Gtk3->main(); sub ret_vbox { my $vbox = Gtk3::VBox->new(FALSE,5); $vbox->pack_start ("Gtk3::Label"->new (" Please input password to join into domain "), 0, 0, 0); # create table with 2 entries my $table1 = Gtk3::Table->new (5, 2, FALSE); my $t1l0 = Gtk3::Label->new_with_mnemonic("Domain: "); $t1l0->set_alignment (0, 0); $table1->attach_defaults ($t1l0, 0, 1, 0, 1); my $t1e0 = Gtk3::Entry->new(); $table1->attach_defaults ($t1e0, 1, 2, 0, 1); my $t1l0 = Gtk3::Label->new_with_mnemonic("workgroup: "); $t1l0->set_alignment (0, 0); $table1->attach_defaults ($t1l0, 0, 1, 1, 2); my $t1e1 = Gtk3::Entry->new(); $table1->attach_defaults ($t1e0, 1, 2, 1, 2); my $t1l0 = Gtk3::Label->new_with_mnemonic("computer name: "); $t1l0->set_alignment (0, 0); $table1->attach_defaults ($t1l0, 0, 1, 2, 3); my $t1e2 = Gtk3::Entry->new(); $table1->attach_defaults ($t1e0, 1, 2, 2, 3); my $t1l1 = Gtk3::Label->new_with_mnemonic("Domain Admin User Name: "); $t1l1->set_alignment (0, 0); $table1->attach_defaults ($t1l1, 0, 1, 3, 4); my $t1e3 = Gtk3::Entry->new(); $table1->attach_defaults ($t1e1, 1, 2, 3, 4); my $t1l2 = Gtk3::Label->new_with_mnemonic("Domain Admin Password: "); $t1l2->set_alignment (0, 0); $table1->attach_defaults ($t1l2, 0, 1, 4, 5); my $t1e4 = Gtk3::Entry->new(); $t1e2->set_visibility (FALSE); $table1->attach_defaults ($t1e2, 1, 2, 4, 5); $vbox->pack_start($table1, 0, 0 ,0); #$vbox->pack_end(Gtk3::HSeparator->new(),0, 0 ,0); # create table with 2 buttons my $table2 = Gtk3::Table->new (1, 2, FALSE); my $t2b1 = Gtk3::Button->new ('Join'); $table2->attach_defaults ($t2b1, 0, 1, 0, 1); my $t2b2 = Gtk3::Button->new ('Cancel'); $table2->attach_defaults ($t2b2, 1, 2, 0, 1); $t2b2->signal_connect (clicked => sub { Gtk3->main_quit; }); if (open (F1,"</etc/altlinux-release") ) { close F1; $t2b1->signal_connect (clicked => sub { &addname($t1e2->get_text()) || system("system-auth write ad ".$t1e0->get_text().'%'.$t1e0->get_text()." ".#domain $t1e2->get_text().'%'.$t1e2->get_text()." ".# hostname $t1e1->get_text().'%'.$t1e1->get_text()." ".# workgroup $t1e3->get_text().'%'.$t1e3->get_text()." ".# username $t1e4->get_text().'%'.$t1e4->get_text()."\"") # password || system("systemctl restart nmb") || system("systemctl restart winbind") || system("systemctl restart smb") || exit (1); }); }else{ $t2b1->signal_connect (clicked => sub { &addname($t1e2->get_text()) #hostname || system("net join -U \"". $t1e3->get_text().'%'. # username $t1e4->get_text()."\"") # password || system("systemctl restart nmb") || system("systemctl restart winbind") || system("systemctl restart smb") || exit (1); }); } $vbox->pack_start($table2, 0, 0 ,0); $vbox->show_all(); return $vbox; } sub addname (){ my ($hostname)=@_; system ("sed -i '/netbios name =/d' /etc/samba/smb.conf"); my $ssed=sprintf("sed -i \'/\\[global\\]/ s/\$/\\n netbios name = ".$hostname."\'/ /etc/samba/smb.conf"); system ($ssed); system ("sed -i '/HOSTNAME/d' /etc/sysconfig/MagOS"); $ssed=sprintf("echo \"HOSTNAME=$hostname\" >>/etc/sysconfig/MagOS"); system ($ssed); system("hostnamectl set-hostname $hostname"); return 1; }
ãã¡ã€ã³ã«ã³ã³ãã¥ãŒã¿ãŒãå ¥åããæäœãããããããã¡ã€ã³ããåºåããæäœãå¿ èŠã§ããããããMagOSã®å Žåãããã¯å¿ èŠãããŸããããã®ããã«ã¯ãå€æŽã§å¯Ÿå¿ãããã¡ã€ã«ãåé€ããã ãã§ååã§ãã
ADã®åé¡ãä¿®æ£ãã
ã³ã³ãã¥ãŒã¿ãŒãADSã«æ¥ç¶ããåŸããã®ãããªåé¡ãçºèŠããŸãããã³ã³ãã¥ãŒã¿ãŒãããŒãããåŸãwinbindã¯ãŠãŒã¶ãŒãã°ã«ãŒãã®ãªã¹ããå«ãADã«é¢ããæ å ±ã§ãã£ãã·ã¥ãåããã®ã«é·ãæéãããããŸããåæã«ãå éšã¹ã±ãžã¥ãŒã«ã«åŸã£ãŠããªãŒãºããã³åèµ·åããå ŽåããããŸãããããã«ã¯å€ãã®æéãããããŸãïŒæ倧ã§30åïŒããã®åé¡ã¯ãADã®å éšæ§é ã®çµç¹ã«é¢é£ããŠããå Žåãããã°ããã¹ãŠã®å®è£ ã«å ±éããŠããå ŽåããããŸããååã«ç©ºã®ADããŒã¿ããŒã¹ã«ã¯åé¡ããªãããšãããã£ãŠããã ãã§ãããããããã®ãããªåé¡ããããããã解決ããããã«ã次ã®ãæŸèæããçºæãããŸããã
çµéšçã«ãADãã¡ã€ã³ãæ€åºããåŸã«winbindãåèµ·åãããšãåé¡ã®è§£æ±ºã«åœ¹ç«ã€ããšãæããã«ãªããŸããããããã£ãŠã次ã®ããã°ã©ã ã¯systemdãä»ããŠãµãŒãã¹ãšããŠèµ·åããwinbindãã¡ã€ã³ã®æ€åºãç£èŠããŠãããwinbindãåèµ·åããŠçµäºããŸãããŠãŒã¶ãŒã®ãªã¹ãã®ã³ã³ãã€ã«ã®é 延ã¯ããã®å Žåã1ã2åã§ãããŠãŒã¶ãŒãèªåã®ååãšãã¹ã¯ãŒããããã«å ¥åããªããšãå®éã«ã¯ãã®åé¡ã®ååšã«æ°ä»ããŸããã
å¥ã®æ©èœãåãã¹ã¯ãªããã«å²ãåœãŠãããŸã-magos-patchesã«ååšããã¹ã¯ãªããã¯MagOS.iniã§æå®ããã1人ã®ãŠãŒã¶ãŒã®ããŒã ãã©ã«ããŒã®ã¿ãæŽæ°ãããããADãŠãŒã¶ãŒã®ããŒã ãã©ã«ããŒã®ã·ã¹ãã ãã¡ã€ã«ãæŽæ°ããŸã-ã·ã¹ãã 管çè ãããã³ä»®æ³ãŠãŒã¶ãŒãã©ã«ããŒã®æŽæ°ã¯ãŸã£ããæäŸãããŸããããã®ã¹ã¯ãªããã¯ããã¡ã€ã³ãŠãŒã¶ãŒã®ããŒã ãã©ã«ããŒã«ãªãé衚瀺ã®ã·ã¹ãã ãã¡ã€ã«ãšãã£ã¬ã¯ããªã/ etc / skelãã©ã«ããŒããã³ããŒãããã©ã«ããŒã®ææè æš©éãå²ãåœãŠãŸãããããã£ãŠããŠãŒã¶ãŒã®ããŒã ãã©ã«ããŒã®èšå®ãæŽæ°ããã«ã¯ã察å¿ãããã¡ã€ã«ãåé€ããwinbind-restartã¹ã¯ãªããã䜿çšããŠãµãŒãã¹ãåèµ·åããå¿ èŠããããŸããæ£ããæäœã«å¿ èŠãªæ¡ä»¶ã¯ãæå®ãããæéã«ã·ã¹ãã ã«ãŠãŒã¶ãŒãç»é²ãããŠããªãããšã§ãã
ãã ããã³ã³ãã¥ãŒã¿ãŒãŠãŒã¶ãŒã®èšå®ãæŽæ°ãããµãŒãã¹ãšããŠã®ã¹ã¯ãªãããæ¹åããå¿ èŠãããããšã«æ³šæããŠãã ããã
/ usr / sbin / winbind-restart
#!/bin/bash export PATH=.:/:/usr/sbin:/usr/bin:/sbin:/bin while [ "$(wbinfo --online-status | grep -i mydomain | cut -d ":" -f 2)" != " online" ] do $(sleep 1) done $(systemctl restart winbind) . etc/sysconfig/MagOS # update home folders from domain users if [ "$UPDATEHOME" = "yes" ] ;then DOMAIN=$(wbinfo --own-domain) if [ -d home/$DOMAIN ] ;then for LISTUSER in $(ls -1 home/$DOMAIN/); do $(cp -rHun etc/skel/.[a-zA-Z0-9]* home/$DOMAIN/$LISTUSER/) $(chown -R $LISTUSER:\ home/$DOMAIN/$LISTUSER/) done fi fi
/etc/systemd/user/winbindrestart.service
[Unit] Description=Samba Winbind Daemon restart from mydomain After=winbind.target [Service] Type=oneshot RemainAfterExit=yes ExecStart=/usr/sbin/winbind-restart [Install] WantedBy=multi-user.target
ã·ã¹ãã 管çïŒ/ root / binïŒ
ãããã®ã¹ã¯ãªããã¯ãç£æ¥çšã¢ããªã±ãŒã·ã§ã³åãã®AltLinuxãã£ã¹ããªãã¥ãŒã·ã§ã³ã«åºã¥ããŠMagOSã·ã¹ãã ãå¶åŸ¡ããããã«èšèšãããŠããŸãã
äœããã®çç±ã§OSã®åŒ·å¶æŽæ°ãå¿ èŠãªå Žåã次ã®2ã€ã®ã¹ã¯ãªããã䜿çšãããŸããæåã®ãã®ã¯ãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ãæŽæ°ãã2çªç®ã®ãã®ã¯èšå®ãã¡ã€ã«MagOS.iniãæŽæ°ããŸãã
ãªãã¬ãŒãã£ã³ã°ã·ã¹ãã /root/bin/updatemagos.shã匷å¶çã«æŽæ°ããããã®ã¹ã¯ãªãããæäœãå®äºãããšããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã®èªåãªãŒããŒããŒããç¶ããŸãã
/root/bin/updatemagos.sh
#!/bin/bash echo "Update MagOS from Hard Disk to this computer!!!" echo echo "Press Enter to continue, or Ctrl+C to abort..." read junk clear export PATH=.:/:/usr/sbin:/usr/bin:/sbin:/bin SRC=192.168.1.XXX/magos DEFAULT="AltLinux,boot" . /mnt/live/liblinuxlive [ -f /etc/sysconfig/MagOS ] && . /etc/sysconfig/MagOS [ -z "$UPDATE" -a -z "$SRCUPDATE" ] && UPDATE=$(echo "$DEFAULT") && SRCUPDATE="$SRC" if ! [ -z "$UPDATE" ] ;then for dirs in $(echo $UPDATE | tr ',;' ' ') ;do rsync -azr --delete rsync://$SRCUPDATE/$dirs/ /mnt/livemedia/$dirs/ done fi reboot
/root/bin/updateini.sh
#!/bin/bash # This script getting file MagOS.ini from magos server to this computer SRCI="magos-server/magos" SRC="magos" srv="magos-server" . /etc/sysconfig/MagOS export PATH=.:/:/usr/sbin:/usr/bin:/sbin:/bin echo "Update MagOS.ini from Hard Disk!!!" [ -z "$SRCUPDATE" ] && SRCUPDATE="$SRCI" SRCINI=$(echo $SRCUPDATE | cut -d "/" -f 2) [ -n "$SRCUPDATE" ] && srv=$(echo $SRCUPDATE | cut -d '/' -f 1) if ! [ -z "$SRCINI" ];then SRC=$SRCINI fi if ! [ -z "$1" ] ;then SRC=$1 fi rsync -az rsync://$srv/$SRC/AltLinux/modules/i586/MagOS.ini /mnt/livemedia/AltLinux/modules/i586/MagOS.ini
/root/bin/mnt.shã¯ããã£ã¹ã¯ããŠãŒã¶ãŒããŒã¿ããã³ãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã®ä¿åã«æ¥ç¶ããããã®éåžžã«åçŽãªè£å©ã¹ã¯ãªããã§ãã
/root/bin/mnt.sh
#!/bin/sh # mount data disk from /srv mount /dev/sda3 /srv #groupadd -g 501 magos #groupadd -g 502 testing
loadupdateããã³saveupdateã¹ã¯ãªããã¯ãMagOSãµãŒããŒãããã¹ããã·ã³ã«ã¢ãžã¥ãŒã«ãšã¢ãžã¥ãŒã«ãªãªãžãã«ãçæããããã®ã¹ã¯ãªãããããŒããããããã«å€æŽãå ããåŸã«ãµãŒããŒã«ã¢ããããŒãããããã«èšèšãããŠããŸãã
/root/bin/saveupdate.sh
#!/bin/bash # # This script save update folder from this computer to magos server # Fiskov MM export PATH=.:/:/usr/sbin:/usr/bin:/sbin:/bin ENABLED=yes [ "$ENABLED" != "yes" ] && exit 0 . /usr/lib/magos/scripts/liblinuxlive . /etc/sysconfig/MagOS . /mnt/livemedia/update/conf/devel.conf PWD=$(echo $(pwd)) cd /mnt/livemedia/update mkdir /root/tmp/update cp -r /mnt/livemedia/update/{*.sh,lib,conf} /root/tmp/update/ for files in $(echo $(ls 9*.sh| cut -d '.' -f 1)) ;do cp /mnt/livemedia/$DISTNAME/modules/$ARCH/$files.xzm /root/tmp/update/ done cd /root/tmp tar -czf /mnt/livemedia/update.tar.gz ./update cd /mnt/livemedia/ scp /mnt/livemedia/update.tar.gz $USER@$SERVER:/var/www/$DISTTYPE/ rm -rf /root/tmp/update cd $PWD
/root/bin/loadupdate.sh
#!/bin/bash # # This script load update folder from magos server to this computer # export PATH=.:/:/usr/sbin:/usr/bin:/sbin:/bin:/usr/lib/magos/scripts ENABLED=yes [ "$ENABLED" != "yes" ] && exit 0 PWD=$(echo $(pwd)) . /etc/sysconfig/MagOS rsync -az rsync://$SRCUPDATE/update.tar.gz /mnt/livemedia/update.tar.gz cd /mnt/livemedia/ tar -xzf update.tar.gz cd /mnt/livemedia/update for files in $(echo $(ls 9*.sh| cut -d '.' -f 1)) ;do mkdir $files xzm2dir $files.xzm $files done cd $PWD
OSã¡ã³ããã³ã¹ã¹ã¯ãªãã
ãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã®ãµãŒãã¹ããã»ã¹ã§ã¯ãããšãã°ããã¹ãŠã®ã³ã³ãã¥ãŒã¿ãŒã§äžåºŠã«ã³ãã³ããå®è¡ãããªã©ãã³ã³ãã¥ãŒã¿ãŒã®å€§éãµãŒãã¹ã®ã¿ã¹ã¯ãçºçããŸãããã®åé¡ã解決ããããã®ãªãã·ã§ã³ã®1ã€ã¯ãsshãããã³ã«ã䜿çšããããã§å¯Ÿå¿ããã³ãã³ããå®è¡ããã³ã³ãã¥ãŒã¿ãŒãžã®äžŠåã¢ã¯ã»ã¹ã§ãã hostalt-create.shã¹ã¯ãªããã¯æ®éçã§ã¯ãªããAltLinuxã¢ã»ã³ããªã«åºã¥ããŠMagOSãã€ã³ã¹ããŒã«ãããŠããã³ã³ãã¥ãŒã¿ãŒã®ãªã¹ããã³ã³ãã€ã«ããããšãç®çãšããŠããŸããã³ã³ãã¥ãŒã¿ãŒãæ€åºããã«ã¯ãååã®æ«å°Ÿã-aã§ããå¿ èŠããããŸããã³ã³ãã¥ãŒã¿ãŒã®ãªã¹ããä¿æããããããåŸã ã«æ¡åŒµã§ããŸãã
äžè¬ã«ããã®ãœãªã¥ãŒã·ã§ã³ã¯é»æºãå ¥ã£ãŠããã³ã³ãã¥ãŒã¿ãŒã«å¯ŸããŠã®ã¿å®è¡ããããããæ¬æ Œçãªãœãªã¥ãŒã·ã§ã³ãšã¯èšããŸããã次ã«ãã¹ã¯ãªããã䜿çšããã«ã¯ããã¹ã¯ãŒããªãã®ã¿ã¹ã¯ã§sudoãèšå®ããå¿ èŠããããŸãã
ã³ã³ãã¥ãŒã¿ãŒãžã®ã¢ã¯ã»ã¹ã«äœ¿çšããããŠãŒã¶ãŒåãšããŠã管çè ã¢ã«ãŠã³ãã䜿çšãããŸã; AltLinuxã¢ã»ã³ããªãŒã§ã¯ãããã¯alttlinuxã¢ã«ãŠã³ãã§ãã
/root/bin/hostalt-create.sh
#!/bin/sh # create list from hostalt file from programm pssh $(nmap 192.168.1.0/24 -p T:8080 2>&1 | grep "mydomain" | grep '\-a' | cut -d " " -f 5 >> /tmp/hostalt1) $(sort -u /tmp/hostalt1 > hostalt)
/root/bin/parallelssh.sh
#!/bin/sh # parallelssh.sh sudo /root/bin/updateini.sh <password> echo "parallelssh.sh <\"command\"> <password>" echo "parallelssh.sh sudo \"/root/bin/updateini.sh\" <password>" echo [ -z "$2" ] && exit sshpass -p $2 pssh -x "-o StrictHostKeyChecking=no" -h hostalt -l altlinux -A -i $1 2>&1 > /tmp/ssherr.txt cat /tmp/ssherr.txt
ã¢ãžã¥ãŒã«äœæ管çã¹ã¯ãªãã
ã¢ãžã¥ãŒã«ã®äœæã管çããããã®ã¹ã¯ãªããã¯ãã«ã¹ã¿ã ã¢ãžã¥ãŒã«ã®äœæãšãããã®magosãµãŒããŒãžã®é 眮ãèªååããããã«èšèšãããŠããŸãã
ã¹ã¯ãªããã¯ãããã»ã¹ãèªååããæ§æãã¡ã€ã«ãšã¹ã¯ãªããã®libexecã©ã€ãã©ãªãå«ãããã°ã©ã ã®è€åäœã§ãããå®éã«ã¯ãã¢ãžã¥ãŒã«ãã¢ã»ã³ãã«ããåä¿¡ããã¢ãžã¥ãŒã«ããŽãããåé€ããã¢ãžã¥ãŒã«ããã°ã©ã ã調æŽããã¹ã¯ãªããèªäœã§ãã
ã¹ã¯ãªãããšæ§æãã¡ã€ã«ã¯ãã£ã¹ã¯ã®ã«ãŒããã£ã¬ã¯ããªã«ãããŸãããä»»æã®äŸ¿å©ãªå Žæã«é 眮ã§ããŸããåææ¡ä»¶ã¯ãããããé 眮ãããŠãããã¡ã€ã«ã·ã¹ãã ãUnix ACLããµããŒãããå¿ èŠãããããšã§ããã€ãŸããPosixäºæã§ããå¿ èŠããããŸãã
ã¢ãžã¥ãŒã«ã¢ã»ã³ããªã·ã¹ãã èšå®ãã¡ã€ã«/update/conf/devel.confã
DISTTYPE="testing" DISTNAME="AltLinux" ARCH="i586" UPDETESRV=yes SERVER=192.168.0.3 USER=altlinux
ããïŒ
DISTTYPE - magos -serverãªããžããªãã£ã¬ã¯ããªãæããŸãã
DISTNAME-é åžãã£ã¬ã¯ããªã®ååã
ARCH-ã·ã¹ãã ã¢ãŒããã¯ãã£ã
äžèšã®3ã€ã®ãã©ã¡ãŒã¿ãŒã¯ãã¹ãŠãã¢ãžã¥ãŒã«ãå«ããã©ã«ããŒããµãŒããŒäžããã³ã³ã³ãã¥ãŒã¿ãŒå ã«é 眮ãããã¹ã決å®ããŸãã
UPDETESRV-ãµãŒããŒãªããžããªãèªåçã«æŽæ°ãããã©ãããSERVER-magos-serverãµãŒããŒã®ã¢ãã¬ã¹ãŸãã¯URLã
USERã¯ããªããžããªãžã®æžã蟌ã¿æš©éãæã€magos-serverãŠãŒã¶ãŒã®ååã§ãããã®ãŠãŒã¶ãŒã®ããŒã ãã©ã«ããŒã«ã察å¿ãããªããžããªãã©ã«ããŒãžã®ã·ã³ããªãã¯ãªã³ã¯ãäœæããå¿ èŠããããŸãã
ã¢ãžã¥ãŒã«äœæã¹ã¯ãªããã®äŸïŒ
/update/99-u50-example.sh
#!/bin/sh . conf/devel.conf NAME=`echo $0 | sed 's/\.\///'| sed 's/\..*//'` . lib/mv.sh $NAME epm2xzm $NAME -i 'ntpdata samba' rm -rf $NAME mkdir $NAME xzm2dir $NAME.xzm $NAME #------------------------------------------- # cp /usr/share/zoneinfo/Asia/Krasnoyarsk $NAME/etc/localtime cp /etc/nsswitch.conf $NAME/etc/nsswitch.conf sed -is/'^hosts: files mdns4_minimal \[NOTFOUND=return\]*'/'hosts: files dns mdns4_minimal \[NOTFOUND=return\] myhostname f #-------------------------------------------- . lib/delhlam.sh $NAME dir2xzm $NAME $NAME.xzm . lib/update.sh $NAME
ã¢ãžã¥ãŒã«äœæã¹ã¯ãªããèªäœããåŒã³åºãããã¹ã¯ãªãããã¢ãžã¥ãŒã«ãepm2xzmã³ãã³ãã«ãã£ãŠæ§ç¯ãããåŸã«æ®ã£ããŽããã¯ãªãŒã³ã¢ããããŸãã
/update/lib/delhlam.sh
#!/bin/sh NAME=$1 rm -rf $NAME/etc/urpmi $NAME/var/cach/ldconfig $NAME/var/cach/ldconfig/ $NAME/var/cache/ldconfig/ $NAME/var/lib/apt $NAME/var/log/rpmpk gs rm -f $NAME/etc/ld.so.cache $NAME/etc/resolv.conf rm -f $NAME/etc/xinetd.conf $NAME/etc/group- $NAME/etc/gshadow- $NAME/etc/passwd-
ã¹ã¯ãªããã¯ãèšå®ã§ã¢ãžã¥ãŒã«ãç¡å¹ã«ããå€ãã¢ãžã¥ãŒã«ã®ããã¯ã¢ããã³ããŒãäœæããŸãã
ã¢ãžã¥ãŒã«ã®åé·æ§ã®æè¡ã¯æ¬¡ã®ãšããã§ããå€æŽããã¢ãžã¥ãŒã«ã®ååãå€æŽããã«ã¯ã.bakæ¡åŒµåãè¿œå ããŸããå°æ¥ãã¢ãžã¥ãŒã«äœæã¹ã¯ãªãããæ°åå®è¡ããŠãçºçãããšã©ãŒãä¿®æ£ã§ããŸããæ¯åã以åã®ããŒãžã§ã³ã®ã¢ãžã¥ãŒã«ã®ååãå€æŽãããæ¡åŒµå.oldãä»ããããŸããäœæ¥ãå®äºããããäžèŠãªã³ããŒãåé€ããå¿ èŠããããŸãã
/update/lib/mv.sh
#!/bin/sh NAME=$1 . conf/devel.conf if [ $NAME != "99-u99-default" ] ;then $(sh /usr/lib/magos/scripts/deactivate $NAME.xzm) fi if [ -f /mnt/livemedia/$DISTNAME/modules/$ARCH/$NAME.xzm.bak ] && [ -f /mnt/livemedia/$DISTNAME/modules/$ARCH/$NAME.xzm ] ;then $(mv -nf /mnt/livemedia/$DISTNAME/modules/$ARCH/$NAME.xzm $NAME.xzm.old) fi
ã¹ã¯ãªããã¯ãã¢ãžã¥ãŒã«ãã¢ãžã¥ãŒã«ãã£ã¬ã¯ããªã«è»¢éãããããã¯ãŒã¯ãªããžããªã«ã³ããŒããŸããã¢ã¯ã»ã¹æš©ãèšå®ããã¢ãžã¥ãŒã«ã®åæ¥ç¶ãå®è¡ããŸãã
/update/lib/update.sh
#!/bin/bash NAME=$1 . conf/devel.conf if [ ! -f /mnt/livemedia/$DISTNAME/modules/$ARCH/$NAME.xzm.bak ] ;then $(mv /mnt/livemedia/$DISTNAME/modules/$ARCH/$NAME.xzm /mnt/livemedia/$DISTNAME/modules/$ARCH/$NAME.xzm.bak) fi $(mv $NAME.xzm /mnt/livemedia/$DISTNAME/modules/$ARCH/$NAME.xzm) $(chmod 664 /mnt/livemedia/$DISTNAME/modules/$ARCH/$NAME.xzm) $(chown :root /mnt/livemedia/$DISTNAME/modules/$ARCH/$NAME.xzm) if [ $NAME != "99-u99-default" ] ;then $(sh /usr/lib/magos/scripts/activate $NAME.xzm) else $(sh /usr/lib/magos/scripts/deactivate $NAME.xzm) $(sh /usr/lib/magos/scripts/activate $NAME.xzm) fi [ "$UPDETESRV" != "yes" ] && exit 0 $(scp /mnt/livemedia/$DISTNAME/modules/$ARCH/$NAME.xzm $USER@$SERVER:~/$DISTTYPE/$DISTNAME/modules/$ARCH/)
magosããã°ã©ã ãšãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã®åäœãä¿®æ£ããè¿œå ã®ã¹ã¯ãªãã
MagOSã¯ã/ tmpããã³/ var / tmpãã©ã«ããŒãtmpfsãã¡ã€ã«ã·ã¹ãã ã«æ¥ç¶ããããã®ã¡ã«ããºã ããŸã£ããæ£ããå®è£ ããŠããŸããã/ tmpãtmpfsãã¡ã€ã«ã·ã¹ãã ã«æ¥ç¶ããããã®ãŠãããsystemdããããŸãããå«ãŸããŠããŸããããããæå¹ã«ããããã«ãã·ã³ããªãã¯ãªã³ã¯ã/etc/systemd/system/local-fs.target.wantsãã£ã¬ã¯ããªã«é 眮ãããŸããã
tmp.mount -> /lib/systemd/system/tmp.mount var-tmp.mount -> ../var-tmp.mount
ãŠãããvar-tmp.mountã¯åã«å®è£ ãããŠããŸãããMagOSã¯ãVARTMPFSãªãã·ã§ã³ããªã³ã«ãããšãã·ã³ããªãã¯ãªã³ã¯/ var / tmpâ/ tmpãäœæããŸããCUPSããªã³ããµãŒããŒã®å Žåãããã¯æå¹ã§ã¯ãªããããé©åãªãŠããããèªåã§å®è£ ããå¿ èŠããããŸãã
/etc/systemd/system/var-tmp.mount
[Unit] Description=Temporary Directory Documentation=man:hier(7) Documentation=http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems DefaultDependencies=no Conflicts=umount.target Before=local-fs.target umount.target [Mount] What=tmpfs Where=/var/tmp Type=tmpfs Options=mode=1777,strictatime
/ var / tmpãã£ã¬ã¯ããªãtmpfsãã¡ã€ã«ã·ã¹ãã ã«æ¥ç¶ããããã®ãŠãããã
/etc/systemd/system/ntp-units.d/ntpd.service
[Unit] Description=Network Time Service After=syslog.target network.target [Service] EnvironmentFile=/etc/sysconfig/ntpd ExecStart=/usr/sbin/ntpd -d $NTPD_ARGS [Install] WantedBy=multi-user.target
æè¡è ãžã®æ瀺
MagOSã¢ãŒãã§Alt Linuxãã€ã³ã¹ããŒã«ããŸãã
- ãããã¯ãŒã¯ããããŠã³ããŒãããBIOSãéžæããŸãã
- AltLinuxãããŠã³ããŒãããŸãã
- ããã©ã«ãã®ãã¹ã¯ãŒãã䜿çšããŠaltlinuxãšããŠç»é²ããŸãã
- ãŠãŒã¶ãŒããŒã¿ãä¿åããå¿ èŠãããå Žåã¯ããããã¯ãŒã¯ã«æ¥ç¶ããŠããŒã¿ããããã¯ãŒã¯ã«ä¿åããŸããããŒããã©ã€ãäžã®ãã¹ãŠã®ããŒã¿ãç Žå£ãããŸãïŒ
- ã³ã³ãœãŒã«ãéã
- 管çè æš©éãååŸããŸãã
$ su - Password:
ãã¹ã¯ãŒããå ¥åãããšããæåã¯è¡šç€ºãããŸããã ããã¯æ£åžžã§ãã mydomainãããã¯ãŒã¯ã®ããã©ã«ããã¹ã¯ãŒãã䜿çšãããŸãã
- ã³ãã³ããå®è¡ããŸãïŒ
# /usr/share/magos/install/magosinstall.sh
- ã·ã¹ãã ãã€ã³ã¹ããŒã«ããã«ã¯ãEnterããŒã3åæŒãå¿ èŠããããŸãã^ CãæŒããšãæåã®æ®µéã§ã€ã³ã¹ããŒã«ãæåŠã§ããŸãã
- ã³ã³ãã¥ãŒã¿ãŒãåèµ·åããŸããéè² è·ãçºçããªãå Žåã¯ãããŒããŠã§ã¢ãªã»ãããå®è¡ããŸãã
- ãŠãŒã¶ãŒaltlinuxãšããŠãŠãŒã¶ãŒç°å¢ã«å ¥ããŸãã
- ã³ã³ãœãŒã«ãéã
- äžèšã®èª¬æã«åŸã£ãŠç®¡çè æš©éãååŸããŸãã
- 次ã®ã³ãã³ãã䜿çšããŠãã³ã³ãã¥ãŒã¿ãŒããã¡ã€ã³ã«å ¥åããŸãã
# /usr/share/magos/ad_join/ad_join.pl -h <hostname> -u <username> -p <password>
ã©ãã§ïŒ
ãã¹ãå -ã³ã³ãã¥ãŒã¿ãŒã®ååãåæã«ãã³ã³ãã¥ãŒã¿ãŒã®ååãå€æŽãããŸãã
ãŠãŒã¶ãŒå -mydomain.localãã¡ã€ã³ç®¡çè ã®ååã
password-ãã¡ã€ã³ç®¡çè mydomain.localã®ãã¹ã¯ãŒãã
ã³ãã³ããæ£ããå®è¡ããããšã次ã®ããã«æžã蟌ãŸããŸãã
Joined ' ' to dns domain 'mydomain.local'
ä»ã®ã¡ãã»ãŒãžã¯ç¡èŠã§ããŸãã
- ãã¡ã€ã³ãžã®ã³ã³ãã¥ãŒã¿ãŒæ¥ç¶ã確èªããŸãã
# wbinfo -u
ã·ã¹ãã ã¯ãããã¯ãŒã¯ãªãœãŒã¹ããã£ãã·ã¥ããã®ã«æéããããããããã¡ã€ã³ãžã®æåã®ãšã³ããªã¯æ°åé ããå¯èœæ§ããããŸãããããã¯ãŒã¯ã®è² è·ã«äŸåããŸãã
ã³ãã³ãã®çµæãšããŠããã¹ãŠã®ãã¡ã€ã³ãŠãŒã¶ãŒã®ãªã¹ãã衚瀺ãããŸãã - ã³ã³ãã¥ãŒã¿ãŒãåèµ·åããŸãã
- ãã¡ã€ã³ãŠãŒã¶ãŒã¢ã«ãŠã³ãã䜿çšããŠã³ã³ãã¥ãŒã¿ãŒã«ç»é²ããŸãã
- ãããã¯ãŒã¯ãªãœãŒã¹ãæ¥ç¶ããŸãããã®ããã«ã¯ããã¡ã€ã«ãã©ãŠã¶ãŒãéãããã®äžã®ãããã¯ãŒã¯ãªãœãŒã¹ïŒãµã€ãã¿ãã®ãnew_driveããªã©ïŒãéããŸãããŠãŒã¶ãŒãã¹ã¯ãŒããå
¥åããŸãã
ãæ°žä¹ ã«èšæ¶ãããã©ãžãªãã¿ã³ãéžæããŸããããããªããšããŠãŒã¶ãŒã¯ã³ã³ãã¥ãŒã¿ãŒã«æ°ãããã°ã€ã³ããããã³ã«ãã¹ã¯ãŒããå ¥åããå¿ èŠããããŸãã - ã³ã³ãã¥ãŒã¿ãŒäžã®ãŠãŒã¶ãŒããŒã¿ãå埩ããŸãã
- ã³ã³ãã¥ãŒã¿ãŒã®BIOSã§ãããã¯ãŒã¯ããŒããç¡å¹ã«ããŸãã
ãã¹ã¯ãããã·ã§ãŒãã«ããã®åé€
ç®çã®ããã°ã©ã ãå³ã¯ãªãã¯ããŸãããã¹ã¯ããããžã®ã·ã§ãŒãã«ãããéä¿¡ããŸããå¿ èŠã«å¿ããŠãã·ã§ãŒãã«ããã®ããããã£ãéããå¿ èŠãªãã©ã¡ãŒã¿ãŒãå ¥åããŸãã
èè ïŒGoroshkin Anton NikolaevichãFiskov Mikhail Mikhailovichã