Ubuntu24.04下安装ISPConfig全过程记录
今天在网上看到ISPConfig,觉得不错,刚好手里又有一台没用的VPS,就顺手安装一个玩玩。具体安装步骤如下:
一、配置服务器hosts及hostname 【安装时候需要检查】
使用root账号登录VPS后
先安装vim编辑器,然后编辑hosts,hostname文件
root@server1:~# apt-get -y install vim
root@server1:~# vim /etc/hosts
再打开文件里添加:【server1这行是添加你的子域名】
127.0.0.1 localhost.localdomain localhost
# This line should be changed to the correct servername:
127.0.1.1 server1.abc.com server1# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
添加完后安装:wq保存并退出
接下来使用vim编辑hostname
root@server1:~# vim /etc/hostname
打开hostname后将里面的内容修改成:server1,然后使用:wq保存并退出,接下来重启
root@server1:~# systemctl reboot
当vps重启后,再次使用root账号登录,使用下面的命令验证是否修改成功
root@server1:~$ hostname
server1
root@server1:~$ hostname -f
server1.abc.com
二、更新你的Ubuntu 系统,确保不会因为缺失运行库以致安装失败
root@server1:~$ apt update && apt upgrade
三、正式开始安装ISPConfig、nginx
root@server1:~$ wget -O - https://get.ispconfig.org | sh -s -- --use-nginx --use-ftp-ports=40110-40210 --unattended-upgrades
耐心等待安装提示:
WARNING! This script will reconfigure your complete server!
It should be run on a freshly installed server and all current configuration that you have done will most likely be lost!
Type 'yes' if you really want to continue:
看见上述提示,输入yes后,程序可能会中断,你需要多次运行第三步的操作才能继续下去
等待安装完成之后会提示:
[INFO] Your ISPConfig admin password is: 5GvfSSSYsdfdYC
[INFO] Your MySQL root password is: kkAkft82d!kafMwqxdtYs
到这里就安装完了