客户让做webmin,才知道linux下也有界面的管理了
对于大部分使用计算机的人来说,linux的印象就是一大堆的命令字符以及黑黑的显示屏。虽然现在Linux的桌面版有了长足的进步,界面已和Windows不相上下了.但对于Linux服务器来说,恐怕没有几个管理员会愿意装X-Windows程序.因此大部份的Linux服务器都是基于字符界面的.对于刚刚接触Unix的系统管理员来说,正确高效地完成各种关键的系统配置简直是一件不可能的任务。即使是一个很有经验的Unix的管理员,也常常会为某些复杂的配置文件的格式而苦恼。因此拥有一个Unix上的GUI管理工具一直是广大Unix爱好者的美好愿望,当然前题是不用安装X-Windows程序.Webmin的出现实现了我们的想法.一起去看看这个程序的强大功能吧.
简介:
Webmin是一个基于Web的Unix系统管理工具。管理员通过浏览器访问Webmin的各种管理功能并完成相应的管理动作。目前Webmin支持绝大多数的Unix系统,这些系统除了各种版本的linux以为还包括:AIX、HPUX、Solaris、Unixware、Irix和FreeBSD等.
一、我的机器的环境如下:
[root@localhost ~]# uname -r
2.6.18-028stab057.4
[root@localhost ~]# cat /etc/redhat-release
CentOS release 5 (Final)
[root@localhost ~]# ip ad sh
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
3: venet0: <BROADCAST,POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue
link/void
inet 127.0.0.1/32 scope host venet0
inet 172.20.51.154/32 brd 172.20.51.154 scope global venet0:0
2.6.18-028stab057.4
[root@localhost ~]# cat /etc/redhat-release
CentOS release 5 (Final)
[root@localhost ~]# ip ad sh
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
3: venet0: <BROADCAST,POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue
link/void
inet 127.0.0.1/32 scope host venet0
inet 172.20.51.154/32 brd 172.20.51.154 scope global venet0:0
在安装webmin时要求系统必须有Perl支持,如果启用ssl的话还须有openssl及perl-net-ssleasy模块的支持
二、检查模块:
[root@localhost ~]# rpm -qa |grep perl
mod_perl-2.0.2-6.1
perl-Net-SSLeay-1.32-1.el5.rf
perl-5.8.8-10
perl-BSD-Resource-1.28-1.fc6.1
perl-DBI-1.52-1.fc6
perl-DBD-MySQL-3.0007-1.fc6
perl-String-CRC32-1.4-2.fc6
[root@localhost ~]# rpm -qa |grep openssl
openssl-0.9.8b-8.3.el5
mod_perl-2.0.2-6.1
perl-Net-SSLeay-1.32-1.el5.rf
perl-5.8.8-10
perl-BSD-Resource-1.28-1.fc6.1
perl-DBI-1.52-1.fc6
perl-DBD-MySQL-3.0007-1.fc6
perl-String-CRC32-1.4-2.fc6
[root@localhost ~]# rpm -qa |grep openssl
openssl-0.9.8b-8.3.el5
三、安装模块:
[root@localhost ~]# rpm -ivh perl-Net-SSLeay-1.32-1.el5.rf.i386.rpm
这个rpm包可以在
http://dag.wieers.com/rpm/packages/perl-Net-SSLeay/这个中下载
四、解压webmin
[root@localhost ~]# tar xvfz webmin-1.450.tar.gz
五、安装webmin
[root@localhost ~]# cd webmin-1.450
[root@localhost webmin-1.450]# ./setup.sh
***********************************************************************
* Welcome to the Webmin setup script, version 1.450 *
***********************************************************************
Webmin is a web-based interface that allows Unix-like operating
systems and common Unix services to be easily administered.
[root@localhost webmin-1.450]# ./setup.sh
***********************************************************************
* Welcome to the Webmin setup script, version 1.450 *
***********************************************************************
Webmin is a web-based interface that allows Unix-like operating
systems and common Unix services to be easily administered.
Installing Webmin in /root/webmin-1.450 ...
***********************************************************************
Webmin uses separate directories for configuration files and log files.
Unless you want to run multiple versions of Webmin at the same time
you can just accept the defaults.
Webmin uses separate directories for configuration files and log files.
Unless you want to run multiple versions of Webmin at the same time
you can just accept the defaults.
Config file directory [/etc/webmin]: /usr/local/webmin
Log file directory [/var/webmin]: /usr/local/webmin/log
Log file directory [/var/webmin]: /usr/local/webmin/log
***********************************************************************
Webmin is written entirely in Perl. Please enter the full path to the
Perl 5 interpreter on your system.
Webmin is written entirely in Perl. Please enter the full path to the
Perl 5 interpreter on your system.
Full path to perl (default /usr/bin/perl):
Testing Perl ...
Perl seems to be installed ok
Perl seems to be installed ok
***********************************************************************
Operating system name: CentOS Linux
Operating system version: 5
Operating system name: CentOS Linux
Operating system version: 5
***********************************************************************
Webmin uses its own password protected web server to provide access
to the administration programs. The setup script needs to know :
- What port to run the web server on. There must not be another
web server already using this port.
- The login name required to access the web server.
- The password required to access the web server.
- If the webserver should use SSL (if your system supports it).
- Whether to start webmin at boot time.
Webmin uses its own password protected web server to provide access
to the administration programs. The setup script needs to know :
- What port to run the web server on. There must not be another
web server already using this port.
- The login name required to access the web server.
- The password required to access the web server.
- If the webserver should use SSL (if your system supports it).
- Whether to start webmin at boot time.
Web server port (default 10000):
Login name (default admin): root
Login password:
Password again:
Use SSL (y/n): y
Start Webmin at boot time (y/n): y
***********************************************************************
Creating web server config files..
..done
Login name (default admin): root
Login password:
Password again:
Use SSL (y/n): y
Start Webmin at boot time (y/n): y
***********************************************************************
Creating web server config files..
..done
Creating access control file..
..done
..done
Inserting path to perl into scripts..
..done
..done
Creating start and stop scripts..
..done
..done
Copying config files..
..done
..done
Configuring Webmin to start at boot time..
Created init script /etc/rc.d/init.d/webmin
..done
Created init script /etc/rc.d/init.d/webmin
..done
Creating uninstall script /usr/local/webmin/uninstall.sh ..
..done
..done
Changing ownership and permissions ..
..done
..done
Running postinstall scripts ..
..done
..done
Attempting to start Webmin mini web server..
Starting Webmin server in /root/webmin-1.450
..done
Starting Webmin server in /root/webmin-1.450
..done
***********************************************************************
Webmin has been installed and started successfully. Use your web
browser to go to
Webmin has been installed and started successfully. Use your web
browser to go to
and login with the name and password you entered previously.
Because Webmin uses SSL for encryption only, the certificate
it uses is not signed by one of the recognized CAs such as
Verisign. When you first connect to the Webmin server, your
browser will ask you if you want to accept the certificate
presented, as it does not recognize the CA. Say yes.
it uses is not signed by one of the recognized CAs such as
Verisign. When you first connect to the Webmin server, your
browser will ask you if you want to accept the certificate
presented, as it does not recognize the CA. Say yes.
[root@localhost webmin-1.450]#
六、测试运行
如果在安装的过程中选取默认的设置并启用了SSL的话,那么直接输入
https://ip:10000就可以进去了,我这里ip是172.20.51.154,所以输入
https://172.20.51.154:10000
输入你的用户名和密码,就可以体验一下了。
转载于:https://blog.51cto.com/qhd2004/169723