【介绍】
Ubuntu 是一个以桌面应用为主的开源 GNU/Linux 操作系统。
Ubuntu 基于 Debian GNU/Linux,支持x86、amd64(即x64)和ppc架构,由全球化的专业开发团队(Canonical Ltd)打造的。
Ubuntu 基于 Debian 发行版和 GNOME 桌面环境,而从11.04版起,Ubuntu 发行版放弃了 Gnome 桌面环境,改为 Unity 。
【环境】
环境:Ubuntu 18.04 x64
【工具】
build-essential:
参考:https://tecadmin.net/install-development-tools-on-ubuntu/
apt-get install build-essential -y
libtool等:
apt-get install make libtool libtool-bin m4 autoconf automake libtool git aptitude htop dos2unix zip unzip -y
【更新】
参考:https://ubuntuforums.org/showthread.php?t=1222909
apt-get update -y && apt-get upgrade -y && apt-get dist-upgrade -y aptitude update -y && aptitude upgrade -y && aptitude dist-upgrade -y
【排错】
缺 libtool 时,报错:
:~/ModSecurity# ./build.sh ./build.sh: 6: ./build.sh: libtoolize: not found ./build.sh: 7: ./build.sh: autoreconf: not found ./build.sh: 8: ./build.sh: autoheader: not found ./build.sh: 9: ./build.sh: automake: not found ./build.sh: 10: ./build.sh: autoconf: not found
缺 m4 时,报错:
~/ModSecurity# ./build.sh libtoolize: error: One of these is required: libtoolize: gm4 gnum4 m4 libtoolize: error: Please install GNU M4, or 'export M4=/path/to/gnu/m4'.
参考:https://www.howtoinstall.co/en/ubuntu/trusty/m4
缺 autoconf automake 时,报错:
~/ModSecurity# ./build.sh ... ./build.sh: 7: ./build.sh: autoreconf: not found ./build.sh: 8: ./build.sh: autoheader: not found ./build.sh: 9: ./build.sh: automake: not found ./build.sh: 10: ./build.sh: autoconf: not found
参考:https://blog.csdn.net/x356982611/article/details/70856470
sysv-rc-conf:
参考:https://blog.csdn.net/weixin_42380024/article/details/80614290
参考:https://stackoverflow.com/questions/20680050/how-do-i-install-chkconfig-on-ubuntu
ubuntu中chkconfig已经被sysv-rc-conf替代,具体如下操作如下:
chkconfig: command not found
sysv-rc-conf命令:
apt-get install sysv-rc-conf sysv-rc-conf keepalived on
报错:
Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package sysv-rc-conf
参考:https://askubuntu.com/questions/378558/unable-to-locate-package-while-trying-to-install-packages-with-apt/481355
参考:https://www.cnblogs.com/sunyl1982/p/11864241.html
在软件源列表末尾添加如下内容:/etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu/ trusty main universe restricted multiverse
更新apt-get:
apt-get update
安装sysv-rc-conf:
apt-get install sysv-rc-conf -y
参考:https://blog.csdn.net/u013554213/article/details/86584705
systemctl:
ubuntu自从15.04版本以后都使用了systemd。Systemctl是一个systemd工具,主要负责控制systemd系统和服务管理器。
参考:https://blog.csdn.net/philosophyatmath/article/details/88863136
参考:https://stackoverflow.com/questions/20680050/how-do-i-install-chkconfig-on-ubuntu
foobar表示伪变量。
打开服务:
systemctl start foobar
关闭服务:
systemctl stop foobar
重启服务:
systemctl restart foobar
不中断正常功能下重新加载服务:
systemctl reload foobar
设置服务的开机自启动:
systemctl enable foobar
关闭服务的开机自启动:
systemctl disable foobar
查看某个服务的状态:
systemctl status foobar
查看已启动的服务列表:
systemctl list-unit-files|grep enabled
查看活跃的单元:
systemctl list-units
查看启动失败的服务列表:
systemctl --failed
【桌面】
输入以下命令安装桌面以及 Windows 远程桌面的工具:
参考:https://www.jianshu.com/p/4befb190c94b
参考:https://www.jianshu.com/p/daba3fd81786
sudo apt-get install lxde sudo apt-get install xrdp
打开 Windows 附件自带的远程桌面连接:
参考:https://jingyan.baidu.com/article/cbcede07ce04ee02f40b4d08.html
1. 按 Windows键 + R ,在运行中输入 mstsc
2. 在远程桌面登录框中输入 IP 地址和 Ubuntu 系统的用户名,点击连接,输入密码。