centos中web服务器搭建.docx
上传人:王子****青蛙 上传时间:2024-09-12 格式:DOCX 页数:5 大小:1.6MB 金币:10 举报 版权申诉
预览加载中,请您耐心等待几秒...

centos中web服务器搭建.docx

centos中web服务器搭建.docx

预览

在线预览结束,喜欢就下载吧,查找使用更方便

10 金币

下载此文档

如果您无法下载资料,请参考说明:

1、部分资料下载需要金币,请确保您的账户上有足够的金币

2、已购买过的文档,再次下载不重复扣费

3、资料包下载后请先用软件解压,在使用对应软件打开

……………………………完成mysql的安装。然后我们需要创建MySQL系统的启动键链接启动MySQL服务器,这样以便于MySQL在系统启动时自动启动。……………………………………………………………..为mysqlroot账户设置密码:Mysql_secure_installation[root@localhostlx]#mysql_secure_installationNOTE:RUNNINGALLPARTSOFTHISSCRIPTISRECOMMENDEDFORALLMySQLSERVERSINPRODUCTIONUSE!PLEASEREADEACHSTEPCAREFULLY!InordertologintoMySQLtosecureit,we'llneedthecurrentpasswordfortherootuser.Ifyou'vejustinstalledMySQL,andyouhaven'tsettherootpasswordyet,thepasswordwillbeblank,soyoushouldjustpressenterhere.Entercurrentpasswordforroot(enterfornone):OK,successfullyusedpassword,movingon...SettingtherootpasswordensuresthatnobodycanlogintotheMySQLrootuserwithouttheproperauthorisation.Setrootpassword?[Y/n]yNewpassword:Re-enternewpassword:Passwordupdatedsuccessfully!Reloadingprivilegetables.....Success!Bydefault,aMySQLinstallationhasananonymoususer,allowinganyonetologintoMySQLwithouthavingtohaveauseraccountcreatedforthem.Thisisintendedonlyfortesting,andtomaketheinstallationgoabitsmoother.Youshouldremovethembeforemovingintoaproductionenvironment.Removeanonymoususers?[Y/n]...Success!Normally,rootshouldonlybeallowedtoconnectfrom'localhost'.Thisensuresthatsomeonecannotguessattherootpasswordfromthenetwork.Disallowrootloginremotely?[Y/n]...Success!Bydefault,MySQLcomeswithadatabasenamed'test'thatanyonecanaccess.Thisisalsointendedonlyfortesting,andshouldberemovedbeforemovingintoaproductionenvironment.Removetestdatabaseandaccesstoit?[Y/n]-Droppingtestdatabase......Success!-Removingprivilegesontestdatabase......Success!Reloadingtheprivilegetableswillensurethatallchangesmadesofarwilltakeeffectimmediately.Reloadprivilegetablesnow?[Y/n]...Success!Cleaningup...Alldone!Ifyou'vecompletedalloftheabovesteps,yourMySQLinstallationshouldnowbesecure.ThanksforusingMySQL!创建成功。Apache2的是作为一个CentOS的软件包,因此我们可以直接用下面命令安装它:……………………安装成功。现在配置系统在引导时启动apache,第二步启动apache查看本地IP现在,在浏览器中输入本地IP地址,可以看到apache2的测试页,如下图:Apache的默认文档根目录是在CentOS上的/var/www/html目录,配置文件是/etc/httpd/conf