周日. 4月 28th, 2024

声明:因本人水平有限,所写的操作方式仅作为参考,因为Webmin涉及到整个系统的操作,故无完全经验不可轻易用于生产环境中。

接触了一些国外的主机空间,多数是Linux+cPanel,cPanel/WHM的实用性,的确无法比拟,但其高昂的价格,对于我们这种小用户来说是不现实的,加之FreeBSD社区对于开源软件有着更高的热情,因此最近有兴趣尝试下Webmin。

#cd /usr/ports/sysutils/webmin/
#make install clean

After installing Webmin for the first time you should perform the following
steps as root:

* Configure Webmin by running ${LOCALBASE}/lib/webmin/setup.sh
* Add webmin_enable=”YES” to your /etc/rc.conf
* Start Webmin for the first time by running ${LOCALBASE}/etc/rc.d/webmin

The parameters requested by setup.sh may then be changed from within Webmin
itself.

===> Installing rc.d startup script(s)
===> Registering installation for webmin-1.450_2
===> Cleaning for p5-Net-SSLeay-1.35
===> Cleaning for p5-Authen-PAM-0.16_1
===> Cleaning for webmin-1.450_2

因为之前也没有搜索任何安装资料,安装完毕按着这个提示进行初始配置:
#/usr/local/lib/webmin/setup.sh

此过程的交互式配置大致就是些用户,端口等的常规设置。

Web server port (default 10000):
Login name (default admin):
Login password:
Password again:
Segmentation fault (core dumped)
The Perl SSLeay library is not installed. SSL not available.

Notice:最后一行是说我们没有安装Perl SSLeay库,SSL不可用,这个接下来再解决。

完成后添加启动脚本和启动Webmin:

#echo ‘webmin_enable=”YES”‘ >> /etc/rc.conf
(注意这里有两个“>”,如果只打一个就不是追加而是替换了。)
#/usr/local/etc/rc.d/webmin start

成功启动后浏览器输入http://serverip:10000即可打开登陆界面了

现在来解决HTTPS登陆的问题。
由于p5-Net-SSLeay-1.35已经关联安装过,说明是安装此port时出现了问题,进入目录/usr/ports/security/p5-Net-SSLeay/
#make deinstall
#make install clean
安装时提示说一些模块必须与perl,openssl保持一致,否则会出现问题。于是将perl与openssl版本更新到ports最新版本,然后安装p5-Net-SSLeay。

期间仍然出现许多警告,如:

SSLeay.c: In function ‘XS_Net__SSLeay_set_app_data’:
SSLeay.c:7637: warning: cast to pointer from integer of different size
SSLeay.c: In function ‘XS_Net__SSLeay_set_mode’:
SSLeay.c:7662: warning: cast to pointer from integer of different size
SSLeay.c: In function ‘XS_Net__SSLeay_set_pref_cipher’:
SSLeay.c:7687: warning: cast to pointer from integer of different size
SSLeay.c: In function ‘XS_Net__SSLeay_set_tmp_dh’:
SSLeay.c:7712: warning: cast to pointer from integer of different size
SSLeay.c:7713: warning: cast to pointer from integer of different size

这些问题的原因还有待知者指点。

完毕后登陆仍以http方式登陆webmin,然后打开到Webmin-Webmin配置-SSL加密-Enable SSL if available?点选为“是”,保存后即可使用https登陆。

作者 Chris

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据