- 浏览: 570632 次
- 性别:
- 来自: 广州
文章分类
- 全部博客 (365)
- Tomcat调优 (2)
- Apache Http (20)
- Webserver安装 (5)
- Linux安装 (28)
- Linux常用命令 (17)
- C语言及网络编程 (10)
- 文件系统 (0)
- Lucene (12)
- Hadoop (9)
- FastDFS (8)
- 报表 (0)
- 性能测试 (1)
- JAVA (18)
- CSharp (3)
- C++ (38)
- BI (0)
- 数据挖掘 (0)
- 数据采集 (0)
- 网址收集整理 (3)
- Resin (0)
- JBoss (0)
- nginx (0)
- 数据结构 (1)
- 随记 (5)
- Katta (1)
- Shell (6)
- webservice (0)
- JBPM (2)
- JQuery (6)
- Flex (41)
- SSH (0)
- javascript (7)
- php (13)
- 数据库 (6)
- 搜索引擎排序 (2)
- LVS (3)
- solr (2)
- windows (1)
- mysql (3)
- 营销软件 (1)
- tfs (1)
- memcache (5)
- 分布式搜索 (3)
- 关注的博客 (1)
- Android (2)
- clucene (11)
- 综合 (1)
- c c++ 多线程 (6)
- Linux (1)
- 注册码 (1)
- 文件类型转换 (3)
- Linux 与 asp.net (2)
- perl (5)
- coreseek (1)
- 阅读器 (2)
- SEO (1)
- 励志 (1)
- 在线性能测试工具 (1)
- yii (7)
- 服务器监控 (1)
- 广告 (1)
- 代理服务 (5)
- zookeeper (8)
- 广告联盟 (0)
- 常用软件下载 (1)
- 架设自已的站点心得 (0)
最新评论
-
terry07:
java 7 用这个就可以了 Desktop desktop ...
关于java Runtime.getRunTime.exec(String command)的使用 -
HSINKING:
怎么设置打开的dos 窗口是指定的路径下
关于java调用bat文件,不打开窗口 -
liubang201010:
hyperic hq更多参考资料,请访问:http://www ...
hyperic-hq -
^=^:
STDIN_FILENO是unistd.h中定义的一个numb ...
深入理解dup和dup2的用法 -
antor:
留个记号,学习了
[转]用java流方式判断文件类型
CentOS 6下搭建Apache+MySQL+PHP+SSL
网上的一些文章都已经比较老了,现在版本高了之后,其实配置是很省力的(不考虑什么负载的话)
分享全过程,出了文中提到的安装epel rpmfushion 源指令不同外,其他的过程也适用与Centos 5
1.安装CentOS 6 ,可以选择最小安装,也可以安装桌面
2.升级系统
?yum update
3.安装mysql,并设置mysql开机自启动,同时启动mysql
?yum install mysql yum install mysql-server chkconfig --levels 35 mysqld on service mysqld start
4.配置mysql的root密码
?mysql_secure_installation
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] (Y)
New password: (123456)
Re-enter new password: (123456)
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]
(是否移出数据库的默认帐户,如果移出,那么在终端中直接输入mysql是会提示连接错误的)Y
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]
(是否禁止root的远程登录)Y
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] Y
Reload privilege tables now? [Y/n] Y
5.安装apache,并设置开机启动
?yum install httpd chkconfig --levels 35 httpd on service httpd start
这时候可以测试apache是否正常工作
直接浏览器访问localhost应该没问题,但是如果别的机子访问不了的话,是因为防火墙的关系,配置防火墙
(后面的ssl还会有这个问题的)
6.安装php
?yum install php yum install php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc
这个时候php就安装完成拉,写个脚本测试一下
?vi /var/www/html/info.php
输入
?<?php phpinfo();?>
访问localhost/info.php即可~
7.安装phpMyAdmin
首先先给系统安装epel 和rpmfushion两个软件大仓库
?rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-5.noarch.rpm rpm -Uvh http://download1.rpmfusion.org/free/el/updates/testing/6/i386/rpmfusion-free-release-6-0.1.noarch.rpm http://download1.rpmfusion.org/nonfree/el/updates/testing/6/i386/rpmfusion-nonfree-release-6-0.1.noarch.rpm
如果是centos 5 的话执行下面
?rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm rpm -Uvh http://download1.rpmfusion.org/free/el/updates/testing/5/i386/rpmfusion-free-release-5-0.1.noarch.rpm http://download1.rpmfusion.org/nonfree/el/updates/testing/5/i386/rpmfusion-nonfree-release-5-0.1.noarch.rpm
接着安装起来就很方便拉,~根本不需要去下载就可以获得最新的版本
?yum install phpmyadmin
安装完成后还需要配置一下访问权限,使得出了本机外,其他机子也能访问phpMyAdmin
?vi /etc/httpd/conf.d/phpMyAdmin.conf
找到两个directory的权限设置,Allow from 改成All
<Directory /usr/share/phpMyAdmin/>
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from All
</Directory>
<Directory /usr/share/phpMyAdmin/setup/>
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from All
</Directory>
重启服务器
?service httpd restart
测试localhost/phpMyAdmin
用户名密码:root 123456
OK~ LAMP搭建完毕,
8.搭建SSL,让apache支持https
?yum install mod_ssl
其实安装完这个模块后,重启完apache 就可以用https://localhost测试了,因为他创建了默认的证书
在/etc/pki/tls下
当然我们也可以用openssl创建自己的证书
?yum install openssl
生成证书文件
创建一个rsa私钥,文件名为server.key
?openssl genrsa -out server.key 1024
Generating RSA private key, 1024 bit long modulus
............++++++
............++++++
e is 65537 (0x10001)
用 server.key 生成证书签署请求 CSR
?openssl req -new -key server.key -out server.csr
Country Name:两个字母的国家代号
State or Province Name:省份名称
Locality Name:城市名称
Organization Name:公司名称
Organizational Unit Name:部门名称
Common Name:你的姓名
Email Address:地址
至于 'extra' attributes 不用输入.直接回车
生成证书CRT文件server.crt。
?openssl x509 -days 365 -req -in server.csr -signkey server.key -out server.crt
修改ssl.conf指定我们自己生成的证书
?vi /etc/httpd/conf.d/ssl.conf
找到如下位置,修改路径
# Server Certificate:
# Point SSLCertificateFile at a PEM encoded certificate. If
# the certificate is encrypted, then you will be prompted for a
# pass phrase. Note that a kill -HUP will prompt again. A new
# certificate can be generated using the genkey(1) command.
SSLCertificateFile /etc/pki/tls/certs/localhost.crt
# Server Private Key:
# If the key is not combined with the certificate, use this
# directive to point at the key file. Keep in mind that if
# you've both a RSA and a DSA private key you can configure
# both in parallel (to also allow the use of DSA ciphers, etc.)
SSLCertificateKeyFile /etc/pki/tls/private/localhost.key
OK
?service httpd restart
一切都搞定拉~~
整个过程我们不需要修改/etc/httpd/conf/httpd.conf 这就是版本高了的好处阿
http://www.idouye.com 爱豆叶资料分享
网上的一些文章都已经比较老了,现在版本高了之后,其实配置是很省力的(不考虑什么负载的话)
分享全过程,出了文中提到的安装epel rpmfushion 源指令不同外,其他的过程也适用与Centos 5
1.安装CentOS 6 ,可以选择最小安装,也可以安装桌面
2.升级系统
?yum update
3.安装mysql,并设置mysql开机自启动,同时启动mysql
?yum install mysql yum install mysql-server chkconfig --levels 35 mysqld on service mysqld start
4.配置mysql的root密码
?mysql_secure_installation
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] (Y)
New password: (123456)
Re-enter new password: (123456)
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]
(是否移出数据库的默认帐户,如果移出,那么在终端中直接输入mysql是会提示连接错误的)Y
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]
(是否禁止root的远程登录)Y
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] Y
Reload privilege tables now? [Y/n] Y
5.安装apache,并设置开机启动
?yum install httpd chkconfig --levels 35 httpd on service httpd start
这时候可以测试apache是否正常工作
直接浏览器访问localhost应该没问题,但是如果别的机子访问不了的话,是因为防火墙的关系,配置防火墙
(后面的ssl还会有这个问题的)
6.安装php
?yum install php yum install php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc
这个时候php就安装完成拉,写个脚本测试一下
?vi /var/www/html/info.php
输入
?<?php phpinfo();?>
访问localhost/info.php即可~
7.安装phpMyAdmin
首先先给系统安装epel 和rpmfushion两个软件大仓库
?rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-5.noarch.rpm rpm -Uvh http://download1.rpmfusion.org/free/el/updates/testing/6/i386/rpmfusion-free-release-6-0.1.noarch.rpm http://download1.rpmfusion.org/nonfree/el/updates/testing/6/i386/rpmfusion-nonfree-release-6-0.1.noarch.rpm
如果是centos 5 的话执行下面
?rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm rpm -Uvh http://download1.rpmfusion.org/free/el/updates/testing/5/i386/rpmfusion-free-release-5-0.1.noarch.rpm http://download1.rpmfusion.org/nonfree/el/updates/testing/5/i386/rpmfusion-nonfree-release-5-0.1.noarch.rpm
接着安装起来就很方便拉,~根本不需要去下载就可以获得最新的版本
?yum install phpmyadmin
安装完成后还需要配置一下访问权限,使得出了本机外,其他机子也能访问phpMyAdmin
?vi /etc/httpd/conf.d/phpMyAdmin.conf
找到两个directory的权限设置,Allow from 改成All
<Directory /usr/share/phpMyAdmin/>
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from All
</Directory>
<Directory /usr/share/phpMyAdmin/setup/>
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from All
</Directory>
重启服务器
?service httpd restart
测试localhost/phpMyAdmin
用户名密码:root 123456
OK~ LAMP搭建完毕,
8.搭建SSL,让apache支持https
?yum install mod_ssl
其实安装完这个模块后,重启完apache 就可以用https://localhost测试了,因为他创建了默认的证书
在/etc/pki/tls下
当然我们也可以用openssl创建自己的证书
?yum install openssl
生成证书文件
创建一个rsa私钥,文件名为server.key
?openssl genrsa -out server.key 1024
Generating RSA private key, 1024 bit long modulus
............++++++
............++++++
e is 65537 (0x10001)
用 server.key 生成证书签署请求 CSR
?openssl req -new -key server.key -out server.csr
Country Name:两个字母的国家代号
State or Province Name:省份名称
Locality Name:城市名称
Organization Name:公司名称
Organizational Unit Name:部门名称
Common Name:你的姓名
Email Address:地址
至于 'extra' attributes 不用输入.直接回车
生成证书CRT文件server.crt。
?openssl x509 -days 365 -req -in server.csr -signkey server.key -out server.crt
修改ssl.conf指定我们自己生成的证书
?vi /etc/httpd/conf.d/ssl.conf
找到如下位置,修改路径
# Server Certificate:
# Point SSLCertificateFile at a PEM encoded certificate. If
# the certificate is encrypted, then you will be prompted for a
# pass phrase. Note that a kill -HUP will prompt again. A new
# certificate can be generated using the genkey(1) command.
SSLCertificateFile /etc/pki/tls/certs/localhost.crt
# Server Private Key:
# If the key is not combined with the certificate, use this
# directive to point at the key file. Keep in mind that if
# you've both a RSA and a DSA private key you can configure
# both in parallel (to also allow the use of DSA ciphers, etc.)
SSLCertificateKeyFile /etc/pki/tls/private/localhost.key
OK
?service httpd restart
一切都搞定拉~~
整个过程我们不需要修改/etc/httpd/conf/httpd.conf 这就是版本高了的好处阿
http://www.idouye.com 爱豆叶资料分享
发表评论
-
CentOS 下管理自定义 PHP 计划任务代码的守护进程脚本
2012-02-17 15:32 2064from http://micate.me/centos-ph ... -
CentOS 6 架設 apache + php + mysql
2012-02-17 15:29 14181.Download Centos 6 Minimail CD ... -
CentOS 5.5+Apache+PHP+MySQL 5部署笔记(更新)
2012-02-17 14:54 1635[日期:2011-05-06] 来源:Linux社区 作者: ... -
linux下apache2.2性能优化和安装_重要
2011-06-05 11:33 25582011年02月17日 星期四 23:31转载自 macaqu ... -
定制Apache的防盗链模块 Mod_perl<1>
2011-05-28 12:20 1372from http://bbs.chinaunix.net/v ... -
详细解析用Squid实现反向代理的方法
2011-05-06 18:04 957from http://tech.ccidnet.com/a ... -
apache与Tomcat整合配置文档[windows].txt
2011-04-06 11:20 12511\下载的软件(可以从此网址下载得到http://www.a ... -
apache 防盗链
2011-03-27 23:11 17922010-09-25 22:09apche有rewrite_m ... -
apache modperl防盗链
2011-03-27 23:02 11192010-09-25 21:41定制Apache的 ... -
很好的一个运维博客
2011-01-26 17:05 978陈子的学前班笔记(很值得一看) http://blog.si ... -
apache防盗链(mod_perl试用二)
2011-01-26 17:03 916引用(2010-05-27 00:07:01) 转 ... -
apache 防盗链,限带宽和连接数
2011-01-26 16:59 1102防盗链原理: http标准协议中有专门的字段记录referer ... -
Apache 防盗链(Apache Anti-Leech)技术的简单实现
2011-01-26 16:49 1016引用. 使用 rewrite 技术实现 Apache 防盗链 ... -
Linux上Apache反向代理之ProxyPass IIS网站总结
2010-08-19 13:53 2191Linux上Apache反向代理之ProxyPass IIS网 ... -
Apache的ProxyPass指令详解
2010-08-19 13:33 2112文章分类:JavaEye 关键字: ... -
Windows下安装多个Apache服务
2010-08-18 09:59 1262安装好Apache以后,可以 ... -
apachemod_proxy 集群
2010-07-06 10:58 775下面以在apachemod_proxy下做的反向代理负载均衡为 ... -
Apache RewriteRule的标志一览
2010-06-30 11:38 1088也可请参考下面网址 http://res.phpchina.c ... -
apache2.2 tomcat6.0 负载均衡集群整理配置
2010-06-28 15:24 2017worker.list=controller,tomcat1, ...
相关推荐
安装apache 关闭SELinux 编辑器打开 etc/selinux/config 文件,找到 SELINUX=enforcing 字段,将其改成 SELINUX=disabled ,并重启设备。 yum -y install httpd mod_ssl 配置防火墙 firewall-cmd --permanent --...
centos6.5以上版本,源码编译搭建lamp环境,包含所需源码包以自动编译安装shell脚本,自动添加进系统变量,添加开启启动项,编译后安装后环境支持ssl,curl开启ssl支持,环境为apache2.4+php5.6+mysql5.5,使用时请...
支持ssl,curl开启ssl支持,环境为apache2.4+php5.6+mysql5.5,使用时请在根目录创建一个data目录,然后将源码包以及shell脚本复制到该目录,给install*文件可执行权限,然后执行installall即可。
支持ssl,curl开启ssl支持,环境为apache2.4+php5.6+mysql5.5,使用时请在根目录创建一个data目录,然后将源码包以及shell脚本复制到该目录,给install*文件可执行权限,然后执行installall即可。
CentOS7服务器中apache、php7以及mysql5.7的配置代码如下所示: yum upgrade yum install net-tools 安装apache 关闭SELinux 编辑器打开 etc/selinux/config 文件,找到 SELINUX=enforcing 字段,将其改成 SELINUX...
支持ssl,curl开启ssl支持,环境为apache2.4+php5.6+mysql5.5,使用时请在根目录创建一个data目录,然后将源码包以及shell脚本复制到该目录,给install*文件可执行权限,然后执行installall即可。
支持ssl,curl开启ssl支持,环境为apache2.4+php5.6+mysql5.5,使用时请在根目录创建一个data目录,然后将源码包以及shell脚本复制到该目录,给install*文件可执行权限,然后执行installall即可。
主要介绍了Centos7.4环境安装lamp-php7.0,较为详细的分析了CentOS7.4环境下Apache、mysql、php7.0及phpmyadmin等安装命令与操作注意事项,需要的朋友可以参考下
语音全过程))【】02(在CentOS5.1上编译安装MySql)【】03(编译安装apache.httpd-2.2.8)【】04(安装支持ssl安全性比较高的apache.web服务器)【】05(编译安装GD库.和.ttf字体的支 资源太大,传百度网盘了,链接在附件中...
centos7服务器一台 域名一个并申请ssl证书 下载apache和tomcat两种格式的证书 服务器环境: jdk11 unzip, zip mysql5.7 screen 环境搭建不再说明,请自行解决 开始搭建: 1.下载源码包后解压,得到以下文件,apache和...
与上一版本相比,phpstudy v8.1采用了全新界面,操作更清晰,内置最新版本Apache、Nginx、MySQL、FTP、php,并且支持选择不同版本php互不影响。除此之外,phpstudy 8还添加伪静态功能,添加composer,添加自定义SSL...
guacamole-install-rhel-7:用于RHEL 7和CentOS 7的Apache Guacamole安装bash脚本,包括Nginx,HTTPS,SSL,LDAP,Let's Encrypt证书等选项
yum -y install httpd-manual mod_ssl mod_perl mod_auth_mysql ##备注下 默认apache 配置文件在 /etc/httpd/conf/httpd.conf 2、安装配置MySQL # mysql 客户端程序 # mysql-server 服务端程序 # mysql-devel 开发
请参考: : 盒子CentOS 6.5 64 位 LAMP虚拟机,非常适合本地开发Yum 的Remi和EPEL存储库NFS , 发送邮件, Git Apache 2 带mod_ssl , MySQL 5 PHP 5 带扩展mysql gd xml mbstring mcrypt NodeJS 、 NPM 、 rubygems ...
eRisemail-基于Linux / MySQL / Hadoop / LDAP的可扩展分布式Mail / XMPP服务器/联合会支持SMTP,POP3,IMAP4,... 支持大尺寸附件的邮件(最大大小为2G) 支持Apache SpamAssassin和推荐Ubuntu或CentOS作为主机OS项目