CentOS   发布时间:2019-10-31  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了CentOS 5.5使用yum安装LAMP环境(sohu源)大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

CentOS 5.5默认的是163的源,据说sohu的源很好用,今天小试了下

m.repos.d/ .bak

清空CentOS-Base.repo文件内容,替换为以下内容:

s. # The mirror system uses the connecTing IP address of the client and the # update status of each mirror to pick mirrors that are updated to and # geographically close to the client. You should use updates # unless you are manually picking other mirrors. # # If the mirrorlistfall BACk you can REMARKed http:s.sohu.com/centos/$releasever/os/$basearch/ checkhttp:s.sohu.com/centos/RPM-GPG-KEY-CentOS-5 updates [updates] nameupdates baseurlhttp:s.sohu.com/centos/$releasever/updates/$basearch/ checkhttp:s.sohu.com/centos/RPM-GPG-KEY-CentOS-5 http:s.sohu.com/centos/$releasever/addons/$basearch/ checkhttp:s.sohu.com/centos/RPM-GPG-KEY-CentOS-5 http:s.sohu.com/centos/$releasever/extras/$basearch/ checkhttp:s.sohu.com/centos/RPM-GPG-KEY-CentOS-5 Ting packages [centosplus] namehttp:s.sohu.com/centos/$releasever/centosplus/$basearch/ checkhttp:s.sohu.com/centos/RPM-GPG-KEY-CentOS-5

更新源

update

2、使用yum命令安装apache、mysql、php环境

httpd php mysql mysql-server php-mysql

httpd onservice httpd startservice mysqld start

{http}iptables -I INPUT -p tcp --dport 80 -j ACCEPTservice iptables stop service iptables restart

password 'root'

其他的配置,童鞋们自己搞吧

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

安装日志:

<div class="cnblogs_code">

[jianbao@localhost ~]$ yum install -y httpd@R_674_10787@ mysql mysql-server@R_674_10787@-mysql@R_674_10787@-develLoaded plugins: fastestmirrorYou need to be root to perform this command.[jianbao@localhost ~]$ su -口令:[root@localhost ~]# yum install -y httpd@R_674_10787@ mysql mysql-server@R_674_10787@-mysql@R_674_10787@-develLoaded plugins: fastestmirrorLoading mirror speeds from cached hostfile  base: centoS.Ustc.edu.cn  extras: centoS.Ustc.edu.cn * UPDATEs: centoS.Ustc.edu.cnSetTing up Install ProcessResolving Dependencies--> running transaction check---> Package httpd.i386 <span style="color: #800080;">0:<span style="color: #800080;">2.2.<span style="color: #800080;">3-<span style="color: #800080;">53.el5.centos.<span style="color: #800080;">3 set to be UPDATEd---> Package mysql.i386 <span style="color: #800080;">0:<span style="color: #800080;">5.0.<span style="color: #800080;">95-<span style="color: #800080;">1.el5_7.<span style="color: #800080;">1 set to be UPDATEd--> Processing Dependency: perl(DBI) <span style="color: #0000FF;">for package: mysql---> Package mysql-server.i386 <span style="color: #800080;">0:<span style="color: #800080;">5.0.<span style="color: #800080;">95-<span style="color: #800080;">1.el5_7.<span style="color: #800080;">1 set to be UPDATEd--> Processing Dependency: perl-DBD-MySQL <span style="color: #0000FF;">for package: mysql-server---> Package@R_674_10787@.i386 <span style="color: #800080;">0:<span style="color: #800080;">5.1.<span style="color: #800080;">6-<span style="color: #800080;">27.el5_7.<span style="color: #800080;">5 set to be UPDATEd--> Processing Dependency:@R_674_10787@-cli = <span style="color: #800080;">5.1.<span style="color: #800080;">6-<span style="color: #800080;">27.el5_7.<span style="color: #800080;">5 <span style="color: #0000FF;">for package:@R_674_10787@--> Processing Dependency:@R_674_10787@-common = <span style="color: #800080;">5.1.<span style="color: #800080;">6-<span style="color: #800080;">27.el5_7.<span style="color: #800080;">5 <span style="color: #0000FF;">for package:@R_674_10787@---> Package@R_674_10787@-devel.i386 <span style="color: #800080;">0:<span style="color: #800080;">5.1.<span style="color: #800080;">6-<span style="color: #800080;">27.el5_7.<span style="color: #800080;">5 set to be UPDATEd--> Processing Dependency: autoconf <span style="color: #0000FF;">for package:@R_674_10787@-devel--> Processing Dependency: automake <span style="color: #0000FF;">for package:@R_674_10787@-devel---> Package@R_674_10787@-mysql.i386 <span style="color: #800080;">0:<span style="color: #800080;">5.1.<span style="color: #800080;">6-<span style="color: #800080;">27.el5_7.<span style="color: #800080;">5 set to be UPDATEd--> Processing Dependency:@R_674_10787@-pdo <span style="color: #0000FF;">for package:@R_674_10787@-mysql--> running transaction check---> Package autoconf.noarch <span style="color: #800080;">0:<span style="color: #800080;">2.59-<span style="color: #800080;">12 set to be UPDATEd--> Processing Dependency: imake <span style="color: #0000FF;">for package: autoconf---> Package automake.noarch <span style="color: #800080;">0:<span style="color: #800080;">1.9.<span style="color: #800080;">6-<span style="color: #800080;">2.3.el5 set to be UPDATEd---> Package perl-DBD-MySQl.i386 <span style="color: #800080;">0:<span style="color: #800080;">3.0007-<span style="color: #800080;">2.el5 set to be UPDATEd---> Package perl-DBI.i386 <span style="color: #800080;">0:<span style="color: #800080;">1.52-<span style="color: #800080;">2.el5 set to be UPDATEd---> Package@R_674_10787@-cli.i386 <span style="color: #800080;">0:<span style="color: #800080;">5.1.<span style="color: #800080;">6-<span style="color: #800080;">27.el5_7.<span style="color: #800080;">5 set to be UPDATEd---> Package@R_674_10787@-common.i386 <span style="color: #800080;">0:<span style="color: #800080;">5.1.<span style="color: #800080;">6-<span style="color: #800080;">27.el5_7.<span style="color: #800080;">5 set to be UPDATEd---> Package@R_674_10787@-pdo.i386 <span style="color: #800080;">0:<span style="color: #800080;">5.1.<span style="color: #800080;">6-<span style="color: #800080;">27.el5_7.<span style="color: #800080;">5 set to be UPDATEd--> running transaction check---> Package imake.i386 <span style="color: #800080;">0:<span style="color: #800080;">1.0.<span style="color: #800080;">2-<span style="color: #800080;">3 set to be UPDATEd--> Finished Dependency resolutionDependencies resolved================================================================================ Package             arch        Version                     Repository    Size================================================================================Installing: mysql               i386        <span style="color: #800080;">5.0.<span style="color: #800080;">95-<span style="color: #800080;">1.el5_7.<span style="color: #800080;">1            UPDATEs      <span style="color: #800080;">4.9 M mysql-server        i386        <span style="color: #800080;">5.0.<span style="color: #800080;">95-<span style="color: #800080;">1.el5_7.<span style="color: #800080;">1            UPDATEs      <span style="color: #800080;">9.8 M@R_674_10787@                 i386        <span style="color: #800080;">5.1.<span style="color: #800080;">6-<span style="color: #800080;">27.el5_7.<span style="color: #800080;">5            UPDATEs      <span style="color: #800080;">2.3 M@R_674_10787@-devel           i386        <span style="color: #800080;">5.1.<span style="color: #800080;">6-<span style="color: #800080;">27.el5_7.<span style="color: #800080;">5            UPDATEs      <span style="color: #800080;">504 k@R_674_10787@-mysql           i386        <span style="color: #800080;">5.1.<span style="color: #800080;">6-<span style="color: #800080;">27.el5_7.<span style="color: #800080;">5            UPDATEs       <span style="color: #800080;">86 kupdating: httpd               i386        <span style="color: #800080;">2.2.<span style="color: #800080;">3-<span style="color: #800080;">53.el5.centos.<span style="color: #800080;">3       updates      <span style="color: #800080;">1.2 MInstalling <span style="color: #0000FF;">for dependencies: autoconf            noarch      <span style="color: #800080;">2.59-<span style="color: #800080;">12                     base         <span style="color: #800080;">647 k automake            noarch      <span style="color: #800080;">1.9.<span style="color: #800080;">6-<span style="color: #800080;">2.3.el5               base         <span style="color: #800080;">476 k imake               i386        <span style="color: #800080;">1.0.<span style="color: #800080;">2-<span style="color: #800080;">3                     base         <span style="color: #800080;">319 k perl-DBD-MySQL      i386        <span style="color: #800080;">3.0007-<span style="color: #800080;">2.el5                base         <span style="color: #800080;">148 k perl-DBI            i386        <span style="color: #800080;">1.52-<span style="color: #800080;">2.el5                  base         <span style="color: #800080;">600 k@R_674_10787@-cli             i386        <span style="color: #800080;">5.1.<span style="color: #800080;">6-<span style="color: #800080;">27.el5_7.<span style="color: #800080;">5            UPDATEs      <span style="color: #800080;">2.1 M@R_674_10787@-common          i386        <span style="color: #800080;">5.1.<span style="color: #800080;">6-<span style="color: #800080;">27.el5_7.<span style="color: #800080;">5            UPDATEs      <span style="color: #800080;">153 k@R_674_10787@-pdo             i386        <span style="color: #800080;">5.1.<span style="color: #800080;">6-<span style="color: #800080;">27.el5_7.<span style="color: #800080;">5            UPDATEs       <span style="color: #800080;">65 ktransaction Sum@R_618_11035@================================================================================Install      <span style="color: #800080;">13 Package(s)Upgrade       <span style="color: #800080;">1 Package(s)@R_321_10586@l download size: <span style="color: #800080;">23 MDownloading Packages:(<span style="color: #800080;">1/<span style="color: #800080;">14):@R_674_10787@-pdo-<span style="color: #800080;">5.1.<span style="color: #800080;">6-<span style="color: #800080;">27.el5_7.<span style="color: #800080;">5.i386.rpm                |  <span style="color: #800080;">65 kB     <span style="color: #800080;">00:<span style="color: #800080;">00     (<span style="color: #800080;">2/<span style="color: #800080;">14):@R_674_10787@-mysql-<span style="color: #800080;">5.1.<span style="color: #800080;">6-<span style="color: #800080;">27.el5_7.<span style="color: #800080;">5.i386.rpm              |  <span style="color: #800080;">86 kB     <span style="color: #800080;">00:<span style="color: #800080;">00     (<span style="color: #800080;">3/<span style="color: #800080;">14): perl-DBD-MySQL-<span style="color: #800080;">3.0007-<span style="color: #800080;">2.el5.i386.rpm             | <span style="color: #800080;">148 kB     <span style="color: #800080;">00:<span style="color: #800080;">00     (<span style="color: #800080;">4/<span style="color: #800080;">14):@R_674_10787@-common-<span style="color: #800080;">5.1.<span style="color: #800080;">6-<span style="color: #800080;">27.el5_7.<span style="color: #800080;">5.i386.rpm             | <span style="color: #800080;">153 kB     <span style="color: #800080;">00:<span style="color: #800080;">00     (<span style="color: #800080;">5/<span style="color: #800080;">14): imake-<span style="color: #800080;">1.0.<span style="color: #800080;">2-<span style="color: #800080;">3.i386.rpm                           | <span style="color: #800080;">319 kB     <span style="color: #800080;">00:<span style="color: #800080;">01     (<span style="color: #800080;">6/<span style="color: #800080;">14): automake-<span style="color: #800080;">1.9.<span style="color: #800080;">6-<span style="color: #800080;">2.3.el5.noarch.rpm                | <span style="color: #800080;">476 kB     <span style="color: #800080;">00:<span style="color: #800080;">02     (<span style="color: #800080;">7/<span style="color: #800080;">14):@R_674_10787@-devel-<span style="color: #800080;">5.1.<span style="color: #800080;">6-<span style="color: #800080;">27.el5_7.<span style="color: #800080;">5.i386.rpm              | <span style="color: #800080;">504 kB     <span style="color: #800080;">00:<span style="color: #800080;">02     (<span style="color: #800080;">8/<span style="color: #800080;">14): perl-DBI-<span style="color: #800080;">1.52-<span style="color: #800080;">2.el5.i386.rpm                     | <span style="color: #800080;">600 kB     <span style="color: #800080;">00:<span style="color: #800080;">02     (<span style="color: #800080;">9/<span style="color: #800080;">14): autoconf-<span style="color: #800080;">2.59-<span style="color: #800080;">12.noarch.rpm                      | <span style="color: #800080;">647 kB     <span style="color: #800080;">00:<span style="color: #800080;">02     (<span style="color: #800080;">10/<span style="color: #800080;">14): httpd-<span style="color: #800080;">2.2.<span style="color: #800080;">3-<span style="color: #800080;">53.el5.centos.<span style="color: #800080;">3.i386.rpm            | <span style="color: #800080;">1.2 MB     <span style="color: #800080;">00:<span style="color: #800080;">05     (<span style="color: #800080;">11/<span style="color: #800080;">14):@R_674_10787@-cli-<span style="color: #800080;">5.1.<span style="color: #800080;">6-<span style="color: #800080;">27.el5_7.<span style="color: #800080;">5.i386.rpm               | <span style="color: #800080;">2.1 MB     <span style="color: #800080;">00:<span style="color: #800080;">07     (<span style="color: #800080;">12/<span style="color: #800080;">14):@R_674_10787@-<span style="color: #800080;">5.1.<span style="color: #800080;">6-<span style="color: #800080;">27.el5_7.<span style="color: #800080;">5.i386.rpm                   | <span style="color: #800080;">2.3 MB     <span style="color: #800080;">00:<span style="color: #800080;">08     (<span style="color: #800080;">13/<span style="color: #800080;">14): mysql-<span style="color: #800080;">5.0.<span style="color: #800080;">95-<span style="color: #800080;">1.el5_7.<span style="color: #800080;">1.i386.rpm                 | <span style="color: #800080;">4.9 MB     <span style="color: #800080;">00:<span style="color: #800080;">18     (<span style="color: #800080;">14/<span style="color: #800080;">14): mysql-server-<span style="color: #800080;">5.0.<span style="color: #800080;">95-<span style="color: #800080;">1.el5_7.<span style="color: #800080;">1.i386.rpm          | <span style="color: #800080;">9.8 MB     <span style="color: #800080;">00:<span style="color: #800080;">39     --------------------------------------------------------------------------------@R_321_10586@l                                           <span style="color: #800080;">256 kB/s |  <span style="color: #800080;">23 MB     <span style="color: #800080;">01:<span style="color: #800080;">32     running rpm_check_debugRunning transaction TestFinished transaction Testtransaction Test SucceededRunning transaction  Installing     :@R_674_10787@-common                                              <span style="color: #800080;">1/<span style="color: #800080;">15   installing     : perl-DBI                                                <span style="color: #800080;">2/<span style="color: #800080;">15   installing     : mysql                                                   <span style="color: #800080;">3/<span style="color: #800080;">15   installing     : perl-DBD-MySQL                                          <span style="color: #800080;">4/<span style="color: #800080;">15   installing     :@R_674_10787@-pdo                                                 <span style="color: #800080;">5/<span style="color: #800080;">15   installing     :@R_674_10787@-cli                                                 <span style="color: #800080;">6/<span style="color: #800080;">15   installing     : imake                                                   <span style="color: #800080;">7/<span style="color: #800080;">15   updating       httpd                                                   <span style="color: #800080;">8/<span style="color: #800080;">15   installing     :@R_674_10787@                                                     <span style="color: #800080;">9/<span style="color: #800080;">15   installing     :@R_674_10787@-mysql                                              <span style="color: #800080;">10/<span style="color: #800080;">15   installing     : mysql-server                                           <span style="color: #800080;">11/<span style="color: #800080;">15   installing     : autoconf                                               <span style="color: #800080;">12/<span style="color: #800080;">15   installing     : automake                                               <span style="color: #800080;">13/<span style="color: #800080;">15   installing     :@R_674_10787@-devel                                              <span style="color: #800080;">14/<span style="color: #800080;">15   Cleanup        : httpd                                                  <span style="color: #800080;">15/<span style="color: #800080;">15 Installed:  mysql.i386 <span style="color: #800080;">0:<span style="color: #800080;">5.0.<span style="color: #800080;">95-<span style="color: #800080;">1.el5_7.<span style="color: #800080;">1         mysql-server.i386 <span style="color: #800080;">0:<span style="color: #800080;">5.0.<span style="color: #800080;">95-<span style="color: #800080;">1.el5_7.<span style="color: #800080;">1     @R_674_10787@.i386 <span style="color: #800080;">0:<span style="color: #800080;">5.1.<span style="color: #800080;">6-<span style="color: #800080;">27.el5_7.<span style="color: #800080;">5          @R_674_10787@-devel.i386 <span style="color: #800080;">0:<span style="color: #800080;">5.1.<span style="color: #800080;">6-<span style="color: #800080;">27.el5_7.<span style="color: #800080;">5        @R_674_10787@-mysql.i386 <span style="color: #800080;">0:<span style="color: #800080;">5.1.<span style="color: #800080;">6-<span style="color: #800080;">27.el5_7.<span style="color: #800080;">5    Dependency Installed:  autoconf.noarch <span style="color: #800080;">0:<span style="color: #800080;">2.59-<span style="color: #800080;">12              automake.noarch <span style="color: #800080;">0:<span style="color: #800080;">1.9.<span style="color: #800080;">6-<span style="color: #800080;">2.3.el5         imake.i386 <span style="color: #800080;">0:<span style="color: #800080;">1.0.<span style="color: #800080;">2-<span style="color: #800080;">3                   perl-DBD-MySQl.i386 <span style="color: #800080;">0:<span style="color: #800080;">3.0007-<span style="color: #800080;">2.el5      perl-DBI.i386 <span style="color: #800080;">0:<span style="color: #800080;">1.52-<span style="color: #800080;">2.el5            @R_674_10787@-cli.i386 <span style="color: #800080;">0:<span style="color: #800080;">5.1.<span style="color: #800080;">6-<span style="color: #800080;">27.el5_7.<span style="color: #800080;">5        @R_674_10787@-common.i386 <span style="color: #800080;">0:<span style="color: #800080;">5.1.<span style="color: #800080;">6-<span style="color: #800080;">27.el5_7.<span style="color: #800080;">5    @R_674_10787@-pdo.i386 <span style="color: #800080;">0:<span style="color: #800080;">5.1.<span style="color: #800080;">6-<span style="color: #800080;">27.el5_7.<span style="color: #800080;">5       updated:  httpd.i386 <span style="color: #800080;">0:<span style="color: #800080;">2.2.<span style="color: #800080;">3-<span style="color: #800080;">53.el5.centos.<span style="color: #800080;">3                                            Complete![root@localhost ~]#

<div class="cnblogs_code">

[root@localhost ~]# chkconfig httpd on[root@localhost ~]# chkconfig --add mysqld[root@localhost ~]# chkconfig mysqld on[root@localhost ~]# service httpd start启动 httpd:                                               [确定][root@localhost ~]# service mysqld start初始化 MySQL 数据库: Installing MySQL system tables...oKFilling Help tables...oKTo start mysqld at boot <span style="color: #0000FF;">time you have to copysupport-files/mysql.server to the right place <span style="color: #0000FF;">for your systemPLEASE rEMEMBER TO SET A passworD FOR THE MySQL root USER !To do so, start the server, then issue the following commands:/usr/bin/mysqladmin -u root password <span style="color: #800000;">'<span style="color: #800000;">new-password<span style="color: #800000;">'/usr/bin/mysqladmin -u root -h localhost.localdomain password <span style="color: #800000;">'<span style="color: #800000;">new-password<span style="color: #800000;">'Alternatively you can run:/usr/bin/mysql_secure_installationwhich will also give you the option of removing the testdatabases <span style="color: #0000FF;">and anonymous user created by <span style="color: #0000FF;">default.  This isstrongly recommended <span style="color: #0000FF;">for production servers.See the manual <span style="color: #0000FF;">for more instructions.You can start the MySQL daemon with:cd /usr ; /usr/bin/mysqld_safe &You can test the MySQL daemon with mysql-test-run.plcd mysql-test ; perl mysql-test-run.plPlease report any problems with the /usr/bin/mysqlbug script!The latest information about MySQL is available on the web athttp:<span style="color: #008000;">//<span style="color: #008000;">www.mysql.com<span style="color: #008000;">Support MySQL by buying support/licenses at http:<span style="color: #008000;">//<span style="color: #008000;">shop.mysql.com<span style="color: #008000;">                                                           [确定]启动 MySQL:                                               [确定][root@localhost ~]#

大佬总结

以上是大佬教程为你收集整理的CentOS 5.5使用yum安装LAMP环境(sohu源)全部内容,希望文章能够帮你解决CentOS 5.5使用yum安装LAMP环境(sohu源)所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。
标签: