CloudStack 制作模板 Ubuntu 使用Ubuntu ISO镜像可好系统之后;系统之上的操作:
初始的进入系统是会有一个普通的账户;如果sudo 麻烦的说对root设置一密码然后重新登录;然后在删除/home 下的普通账户; 1、如果在安装系统的时候没有设置时区(可以先修改时间)
国人一般设置都是亚洲上海时区 root@ubuntu:~# cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
2、校验时间
安装ntp 对于apt-get安装的时候可以先更新下先 root@ubuntu:~# apt-get update 然后安装 root@ubuntu:~# apt-get install ntp–y 然后是执行时官网的网络时间上的校验时间 root@ubuntu:~# ntpdate cn.pool.ntp.org root@ubuntu:~# hwclock –w
转发式电源管理服务
root@ubuntu:~# service acpid restart Acpid是一个用户空间的服务进程,它充当linux内核与应用程序之间通信的接口,负责将kernel中的电源管理事件转发给应用程序。acpid与内核的通信方式:acpid用poll函数挂在/proc/acpi/event文件上。内核在drivers/acpi/event.c中实现了该文件的接口,一旦总线事件列表(acpi_bus_event_list)上有电源管理事件发生,内核吧就会唤醒挂在/proc/acpi/event上的acpid,acpid从/proc/acpi/event中读取相应的事件
3、安装Ubuntu 开机自启的程序管理器比较安全 root@ubuntu:~# apt-get install sysv-rc-conf –y
4、对于设置的服务全部设置为开机自起; root@ubuntu:~# sysv-rc-conf acpid on root@ubuntu:~# sysv-rc-conf ntp on root@ubuntu:~# sysv-rc-conf ntpateon
5、下载cloud-set-guest-password 脚本文件;
移动到/etc/init.d/目录下
root@ubuntu:~# mv cloud-set-guest-password.in /etc/init.d/cloud-set-guest-password
6、然后为脚本添加可执行的权限; root@ubuntu:/etc/init.d# chmod +x cloud-set-guest-password root@ubuntu:/etc/init.d# update-rc.d cloud-set-guest-password defaults 99
7、设置启动项 root@ubuntu:/etc/init.d# sysv-rc-conf cloud-set-guest-password on
8、删除普通账户只保留root账户;
查看home下的普通账户 先注销普通用户 root@ubuntu:~# skill -kill -u mahk
root@ubuntu:~# userdel -r mahk
9、清除执行命令记录
root@ubuntu:~# history -c
|