最近搞redhat server 5
因为里面自带的apache mysql 版本我想更换下
没想到卸载后 装的时候出了好多问题 依赖啊依赖
最后准备用YUM搞 TNND 配置YUM的时候也错了 懒得搞
最后换了CentOS 4.4 ---老版本的了
发现这版本的LAMP根本就不需要怎么设置就可以了
引用:
Mysql配置:
Edit /etc/init.d/mysqld:
vi /etc/init.d/mysqld
and change this section:
restart(){
stop
start
}
so that it looks like this:
restart(){
stop
sleep 3
start
}
This adds a three second delay between the stop and start of MySQL.
Then we create the system startup links for MySQL (so that MySQL starts automatically whenever the system boots) and start the MySQL server:
chkconfig --levels 235 mysqld on
/etc/init.d/mysqld start
Now check that networking is enabled. Run
netstat -tap
It should show a line like this:
tcp 0 0 *:mysql *:* LISTEN 2995/mysqld
If it does not, edit /etc/my.cnf and comment out the option skip-networking:
vi /etc/my.cnf
#skip-networking
and restart your MySQL server:
/etc/init.d/mysqld restart
Run
mysqladmin -u root password yourrootsqlpassword
mysqladmin -h server1.example.com -u root password yourrootsqlpassword
to set a password for the user root (otherwise anybody can access your MySQL database!).
让Apache支持PHP
Apache2 With PHP
Now we install Apache with PHP (this is PHP 4.3.9; CentOS does not provide PHP5 packages):
yum install php php-devel php-gd php-imap php-ldap php-mysql php-odbc php-pear php-xml php-xmlrpc curl curl-devel perl-libwww-perl ImageMagick libxml2 libxml2-devel
Then edit /etc/httpd/conf/httpd.conf:
vi /etc/httpd/conf/httpd.conf
and change DirectoryIndex to
DirectoryIndex index.html index.htm index.shtml index.php index.php3
Now configure your system to start Apache at boot time:
chkconfig --levels 235 httpd on
Start Apache:
/etc/init.d/httpd start
添加PHP
(If you do not plan to install ISPConfig on this server, please skip this section!)
In ISPConfig you will configure PHP on a per-website basis, i.e. you can specify which website can run PHP scripts and which one cannot. This can only work if PHP is disabled globally because otherwise all websites would be able to run PHP scripts, no matter what you specify in ISPConfig.
To disable PHP globally, we edit /etc/httpd/conf.d/php.conf and comment out the AddType line:
vi /etc/httpd/conf.d/php.conf
#
# PHP is an HTML-embedded scripting language which attempts to make it
# easy for developers to write dynamically generated webpages.
#
LoadModule php4_module modules/libphp4.so
#
# Cause the PHP interpreter to handle files with a .php extension.
#
#AddType application/x-httpd-php .php
# AddType application/x-httpd-php-source .phps
#
# Add index.php to the list of files that will be served as directory
# indexes.
#
DirectoryIndex index.php
Afterwards we restart Apache:
/etc/init.d/httpd restart
--------------------------------------------------------------
写测试代码 OK 了 原来在Linux下支持Php如此简单
分享到:
相关推荐
CentOS6.5 LAMP配置及所需的安装文件 呕心沥血收集,希望对大家有所帮助 有问题 请留言!
转载CENTOS安装LAMP平台安装,RPM包简易安装过程
安装centos下LAMP_自动.pdf
文档详细介绍了Centos下安装配置Lamp环境,并介绍出现问题怎么解决
Centos5.5下安装LAMP完整版Centos5.5下安装LAMP完整版Centos5.5下安装LAMP完整版Centos5.5下安装LAMP完整版Centos5.5下安装LAMP完整版Centos5.5下安装LAMP完整版Centos5.5下安装LAMP完整版Centos5.5下安装LAMP完整版
在服务器配置安装lamp架构,Centos6.0安装lamp.linux apache mysql
centos下安裝lamp
这个教程自己已经在centos5.5上一个个试出来的 包括lamp安装过程出现的问题都有记录,安装的步骤参考与别人的经验,我只是做了个总结及问题归总,用该文档我已经装好了好多台服务器了。 该文档包括apache的安装,php...
CentOS 搭建LAMP平台 + Web控制面板管理
教程名称:CentOS配置LAMP视频教程(18集)课程目录:【】01(下载并在虚拟机上安装CentOS5.1(视频.语音全过程))【】02(在CentOS5.1上编译安装MySql)【】03(编译安装apache.httpd-2.2.8)【】04(安装支持ssl安全性比较高...
CentOS搭建LAMP架构,讲述如何在CentOS环境下搭建出LAMP架构,方便进行机一部的开发。希望对大家有帮助
近一段时间经常要搭建一些基于lamp的应用,自己又比较喜欢用源码包安装,大家懂的,速度非常慢。由此想到去做一个自动安装脚本,通过各大论坛的学习后,动手写了这个脚本,思路模板cp大佬的。
centos6.5下编译安装lamp
在centos7环境下源码安装lamp apache版本 2.4.43 php版本 5.4.45
centos 6.8 搭建LAMP环境及配置,以及搭建phpmyadmin**************************
centos6.0 lamp源码包,包含:autoconf-2.61.tar.gz freetype-2.3.5.tar.gz gd-2.0.35.tar.gz httpd-2.2.9.tar.gz jpegsrc.v6b.rar libmcrypt-2.5.8.tar.gz libpng-1.2.31.tar.gz libxml2-2.6.30.tar.gz mysql-...
LAMP是世界上最流行的组合,当然同时也有Nginx,也就是LNMP: LAMP 相对于 Nginx来说较为安全,但是Nginx处理高并发比Apache要强,Nginx 相对于 LAMP 来说安全较为差一点,同样的配制环境负载远远高于 LAMP ...
CentOS_6.3安装以及配置LAMP
CentOS下快速搭建LAMP环境,Linux + Apache + MySQL + PHP。
CentOS 7.0 安装LAMP服务器方法 安装Apache 安装MariaDB 安装PHP 安装PHP组件,使PHP支持 MariaDB systemctl restart mariadb.service #重启MariaDBsystemctl restart httpd.service #重启apache至此,软件安装完成...