Apache, MySQL, phpMyAdmin在Mac OS X 10.9 下的配置

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Command: 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.

You already have a root password set, so you can safely answer ‘n‘.

Change the root password? [Y/n] n
... skipping.

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] y
... 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] y
... 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] y
- 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] y
... Success!

All done! If you‘ve completed all of the above steps, your MySQL
installation should now be secure.

Thanks for using MySQL!

Cleaning up...

NOTES:

********************************************************************************

Apache

OS X comes with Apache already installed, so it’s as simple as starting up the server. ?Previously, you could start this using the System Preferences > Sharing panel, but it has been removed from there in 10.9. To start the server, first start up Terminal app via Utilities > Terminal, and then enter the command below. You can read the full documentation on the apachectl command.

Start Apache:

1
$ sudo apachectl start
Stop Apache:

1
$ sudo apachectl stop
Restart Apache:

1
$
Another useful command is to verify your httpd.conf configuration via the -t test switch.

1
$ sudo apachectl -t

1 to check verison(apache 2.2.* UNIX comes with OS X 10.9)
apachectl -v

Then, open the link http://localhost we can see a default test page says "It works!".

********
IMPORTANT
********
The default system path where the localhost points to is (on OS X 10.9) :
/Library/WebServer/Documents
Then we can put our newly created site root directory in that place.

2. the apache server installation location is :
/etc/apache2/sudo apachectl restart
You can find all the configuration files about the server there.
configuration file: httpd.conf

3. Add php support to apache server so that it can handle with the files ended up
with .php or .phps
And configure the default responding pages for directory requests to the server.

(by default, apache is not configured to serve php files, so we need to change it!)

Follow the steps:
PHP
************************************* begin ************************************

PHP is already installed for you in OS X 10.9 Mavericks. ?It’s as simple as modifying the httpd.conf file again.

On line 118, uncomment the LoadModule for PHP:
LoadModule php5_module libexec/apache2/libphp5.so
On line 231, add index.php as a default document if a directory is requested:
DirectoryIndex index.html index.php
Lastly, we need to tell Apache to use the PHP handler when requesting files that end in .php or .phps. ?Append the following code to the end of your httpd.conf file.

#PHP Settings
<IfModule php5_module>
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
</IfModule>
Don’t forget to restart the Apache server after making any changes to your httpd.conf file.
************************************* end ************************************

4. if we want to change the root directory of our web contents files(ie. Document Root in apache server configuration)

************************************ begin ************************************

Make the following changes to the httdp.conf file.

On line 170, change the DocumentRoot:
DocumentRoot “/www”
On line 197, change the Directory location:
<Directory “/www”>
On line 217 (within the Directory location we just updated), change the AllowOverride to “All” so that we can use .htaccess to modify any settings for our local sites:
AllowOverride All
On line 429, uncomment the Include of the httpd-vhosts.conf file:
Include /private/etc/apache2/extra/httpd-vhosts.conf

************************************* end ************************************

phpAdmin
http://coolestguidesontheplanet.com/installing-phpmyadmin-on-mac-osx-10-7-lion/

+************* IMPORTANT **************
when
# Virtual hosts
#Include /private/etc/apache2/extra/httpd-vhosts.conf

in the httpd.conf is uncommented, then localhost will be redirected to /.
Example:

http://localhost/phpMyAdmin is compiled as virtualHost/phpMyAdmin. if your virtual
host is not configured correctly, then it will lead to a NOT Found error.

________________________________________________________________________________

MySQL

1. start the mysql server:
$ mysql.server start

几个参考的链接:

主要参考 http://brianflove.com/2013/10/23/os-x-mavericks-and-apache/

http://blog.csdn.net/ww122081351/article/details/18809197

Error message “Forbidden You don‘t have permission to access / on this server”

http://www.cyberciti.biz/faq/apache-403-forbidden-error-and-solution/

http://superuser.com/questions/270746/are-there-any-differences-between-etc-and-private-etc

高级功能: http://docs.phpmyadmin.net/en/latest/setup.html

Apache, MySQL, phpMyAdmin在Mac OS X 10.9 下的配置

时间: 2024-12-24 13:15:49

Apache, MySQL, phpMyAdmin在Mac OS X 10.9 下的配置的相关文章

MAC OS X 10.9下Xcode 6 beta安装图文教程

为了方便大家学习和使用Swift语言,而又不用影响项目进展或者系统的正常使用,更是出于稳定性和安装的难易程度,我们不需要直接在Mac上更新到新版Xcode 6 Beta版,特此做了一个VMware 10虚拟机下的Mac OS X 10.9系统中安装Xcode 6 Beta来体验Swift语言的教程,希望对大家有帮助. 一.准备工作: 1.使用Vmware虚拟机部署Swift开发环境之Mac OS X系统安装 http://blog.csdn.net/baigoocn/article/detail

MAC OS X10.10下Caffe无脑安装(CPU ONLY)

最近心血来潮,想趁着实习之前一周空闲的时间玩玩各种 Deep Learning 的热门工具(Caffe, Theano 之类),结果却深陷安装和配置环境的痛苦当中...安装Caffe花费了我两天时间,在各种文档教程中绕了不少圈子.据不完全统计,对我比较有帮助的一些参考资料如下: Caffe官方文档:http://caffe.berkeleyvision.org/install_osx.html 最初照着弄的资料:http://blog.csdn.net/surgewong/article/det

在Mac OS X 10.8中配置Apache + PHP + MySQL

在Mac OS X 10.8中配置Apache+PHP+MySQL的内容包括: 配置Apache 配置PHP 安装MySQL 配置PHPAdmin 设置数据库默认字符集 一. 配置Apache 1. 启动Apache 打开终端,输入: sudo apachectl start 打开浏览器,输入: http://localhost 应该可以看到”It works!“的页面,该页面位于/Library/WebServer/Documents/目录下,这是Apache的默认根目录. 2. 配置用户访问

phpMyAdmin在Mac OS X上的配置和使用

本文主要记录phpMyAdmin在Mac OS X上的配置和使用,避免朋友们走弯路,浪费不必要的时间. 1. 下载: 2. 在"设置"中打开" web share", 即可开启Mac自带的Apache, 也可以通过sudo apachectl restart, 重启Apache. 3. 源码放入 Apache的配置文件—httpd.cnf中DocumentRoot项指定的目录中, 4. 修改DocumentRoot下地phpmyadmin源码的访问权限. chmod

Hadoop2.7.3 多台主机完全分布式搭建(Mac OS X 10.12.4系统 + Parallels Desktop 12 Pro Edition)

Hadoop2.7.3 多台主机完全分布式搭建(Mac OS X 10.12.4系统) 前言 由于学校课程实验的要求,特意需要搭建hadoop的完全分布式系统,所以自己就蛋疼的配了,可惜关于MAC系统的Hadoop搭建材料太少,而且真正的基于校园网的配置基本上没有(基本是在一台电脑上进行,因此当在多台电脑上运行会有许多bug),因此这里想要能够将自己搭的过程想要分享给大家,可能有些配置的解释没有那么全面,所以希望大家见谅?? 环境 基于Mac OSX 10.12.4(Sierra).Ubuntu

Mac OS X 10.9.4 安装全文索引 Coreseek-3.2.14稳定版 问题及解决

根据coreseek官方文档安装: http://www.coreseek.cn/products-install/install_on_macosx/ (1)在安装mmseg过程中,进行make操作的时候,突然报了以下错误信息: n file included from css/ThesaurusDict.cpp:6: ../src/css/ThesaurusDict.h:12:17: error: expected namespace name using namespace __gnu_c

VMware Workstation11.0安装Mac OS X 10.10最完整指南(包含所需所有资源下载)

前言说明:最近换了新的电脑,配置好很多了,想装下虚拟机来玩下IOS,其中也遇到了几个大坑,现在刚完全装好,把所有步骤以及资源整合到一处,后面的朋友可以避免浪费很多无谓的百度时间. ""我先把使用到的程序以及版本说明下,因为这非常总要,使用虚拟机安装mac,其实就是装黑苹果,这要依赖很多破解工具,但这些工具都是有版本支持的.我这些版本装的没问题,但是你如果下载网上其他版本,我就不能确保一定没问题了,只能是自己试了."" VMware 11.0 永久不过期激活密钥 1F

Mac OS X 10.12.5下Anaconda中JupyterNotebook出现&quot;不理解“open location”信息。 (-1708)&quot;错误的解决方法

在更新Mac OS X 10.12.5后,发现当通过Anaconda打开JupyterNotebook时出现了以下错误,而且JupyterNotebook并没有通过浏览器启动 我们退出Anaconda,系统提示是否退出JupyterNotebook,这说明JupyterNotebook已经在8888端口上运行了 我们在浏览器地址栏输入(http://localhost:8888)就可以跳转到JupyterNotebook页面,但此时我们会发现页面要求我们输入密码 但这个密码之前并没有被设置过,尝

用beamoff给VMware的Mac OS X 10.10.x加速

前言 今天刚在VMware里装了个Yosemite,然后测试了下看电影,真j8卡,试了下在vm里打开3d加速,然并卵,直接显示不能打开3d加速,然后找了下发现有个vga的什么软件,是vmware里的显卡驱动,不过看了下发现vga这个软件不支持yosemite,正好找到下面的大神的文章. 我全部转帖过来再完善下. 原文 http://www.cnblogs.com/yipu/p/4422355.html MAC OS X 10.10.x Yosemite在VMWare中实在是太慢了,卡出翔!好在高