用什么linux做服务器好

用什么linux做服务器好,第1张

Linux服务器优势1:良好的稳定性

Linux内核的源代码是以标准规范的32位(在64位CPU上是64位)的计算机来做的最佳化设计,可确保其系统的稳定性。正因为Linux的稳定,才使得一些安装Linux的主机像Unix机一样常年不关而不曾宕机。

Linux服务器优势2:丰富的软件支持

与其他的 *** 作系统不同的是,安装了Linux系统后,用户常用的一些办公软件、图形处理工具、多媒体播放软件和网络工具等都已无需安装。而对于程序开发人员来说,Linux更是一个很好的 *** 作平台,在Linux的软件包中,包含了多种程序语言与开发工具,如g、、C、Tcl/Tk、Perl、Fortran77等。

Linux服务器优势3:可靠的安全性

Linux系统是一个具有先天病毒免疫能力的 *** 作系统,很少受到病毒攻击。

对于一个开放式系统而言,在方便用户的同时,很可能存在安全隐患。不过,利用Linux自带防火墙、入侵检测和安全认证等工具,及时修补系统的漏洞,就能大大提高Linux系统的安全性,让黑客们无机可乘。

Linux服务器优势4:完善的网络功能

Linux内置了很丰富的免费网络服务器软件、数据库和网页的开发工具,如Apache、Sendmail、VSFtp、SSH、MySQL、PHP和JSP等。近年来,越来越多的企业看到了Linux的这些强大的功能,利用Linux担任全方位的网络服务器。

Linux服务器优势5:多用户多任务

和Unix系统一样,Linux系统是一个真正的多用户多任务的 *** 作系统。多个用户可以各自拥有和使用系统资源,即每个用户对自己的资源(例如:文件、设备)有特定的权限,互不影响,同时多个用户可以在同一时间以网络联机的方式使用计算机系统。多任务是现代计算机的最主要的一个特点,由于Linux系统调度每一个进程是平等地访问处理器的,所以它能同时执行多个程序,而且各个程序的运行是互相独立的。

Linux服务器优势6:跨平台的硬件支持

由于Linux的内核大部分是用C语言编写的,并采用了可移植的Unix标准应用程序接口,所以它支持如i386、Alpha、AMD和Sparc等系统平台,以及从个人电脑到大型主机,甚至包括嵌入式系统在内的各种硬件设备。如需详细了解Linux请看《Linux就该这么学》。

1安装mariadb-server

2运行mysql_install_db

正常运行完成后可以看到如下:

To start mysqld at boot time you have to copy

support-files/mysqlserver to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !

To do so, start the server, then issue the following commands:

'/usr/bin/mysqladmin' -u root password 'new-password'

'/usr/bin/mysqladmin' -u root -h localhost password 'new-password'

Alternatively you can run:

'/usr/bin/mysql_secure_installation'

which will also give you the option of removing the test

databases and anonymous user created by default  This is

strongly recommended for production servers

See the MariaDB Knowledgebase at >1开始说明
本教程中使用的IP地址是1921680100,主机名称为Server1examplecom 这些设置可能会有所不同,你需要根据不同情况进行修改。
CentOS 62下安装MySQL
2开始安装MySQL5
首先我们应该先用下面的命令安装MySQL:
yum install mysql mysql-server
然后我们需要创建MySQL系统的启动键链接启动MySQL服务器,这样以便于MySQL在系统启动时自动启动
chkconfig --levels 235 mysqld on
/etc/initd/mysqld start
为MySQL root帐户设置密码:
mysql_secure_installation
会出现下面的一系列提示:
root@server1 ~]# mysql_secure_installation
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MySQL to secure it, we'll need the current
password for the root user If you've just installed MySQL, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here
Enter current password for root (enter for none):
OK, successfully used password, moving on
Setting the root password ensures that nobody can log into the MySQL
root user without the proper authorisation
Set root password [Y/n] <-- ENTER
New password: <-- yourrootsqlpassword
Re-enter new password: <-- yourrootsqlpassword
Password updated successfully!
Reloading privilege tables
Success!
By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL without having to have a user account created for
them This is intended only for testing, and to make the installation
go a bit smoother You should remove them before moving into a
production environment
Remove anonymous users [Y/n] <-- ENTER
Success!
Normally, root should only be allowed to connect from 'localhost' This
ensures that someone cannot guess at the root password from the network
Disallow root login remotely [Y/n] <-- ENTER
Success!
By default, MySQL comes with a database named 'test' that anyone can
access This is also intended only for testing, and should be removed
before moving into a production environment
Remove test database and access to it [Y/n] <-- ENTER
- Dropping test database
Success!
- Removing privileges on test database
Success!
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately
Reload privilege tables now [Y/n] <-- ENTER
Success!
Cleaning up
All done! If you've completed all of the above steps, your MySQL
installation should now be secure
Thanks for using MySQL!
[root@server1 ~]#
CentOS 62下安装Apache
3安装阿帕奇2
Apache2的是作为一个CentOS的软件包,因此我们可以直接用下面命令安装它:
yum install >linux桌面版和服务器版的主要区别就是桌面版加了个图形界面(KDE或GNOME),而这个图形界面其实也是一个软件。桌面会占用一部分系统内存,用作服务器的时候,内存对服务器来说比较珍贵。
同时服务器版的系统专门对服务器硬件、服务应用、稳定性等做过深度优化。
当然并不是说带桌面的linux不能用作服务器,比如有些服务就一定得用桌面,例如把oracle安装在linux上的时候就一定需要安装桌面。如果硬件不够的话建议将桌面的分辨率、刷新率、颜色等都设置到最低值,能够在图形界面下 *** 作文件就行了,不要求显示多好。当然桌面版在系统启动的时候也可以选择不启动图形界面,直接进入命令行的界面。


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/zz/13487530.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-08-16
下一篇 2023-08-16

发表评论

登录后才能评论

评论列表(0条)

保存