- CouchDB and PHP Web Development Beginner’s Guide
- Tim Juravich
- 541字
- 2021-08-13 18:22:49
Operating systems
This book will focus primarily on the Mac OS X Operating System (10.5 and later). While it's possible to develop applications with PHP and CouchDB on any operating system, I will be restricting most of my discussions to Mac OS X for simplicity and brevity. If you're using a Mac, you can skip ahead to the next section, titled Setting up your web development environment on Mac OS X.
If you're running Windows or Linux, don't worry! I'll give you some setup tips to get you started, and then you can take it from there. Again, it's worth noting that the command line statements that I use in this book are meant for use on a Mac OS. With that in mind, things such as navigating to your working directory, the location of files, and many more may not work as described.
Windows
If you're running Windows, there are a few easy steps you need to follow to get your machine up and running.
You can simplify the setup of your Apache and PHP environment by using WAMP (http://www.wampserver.com/en/) or XAMPP (http://www.apachefriends.org/en/xampp.html). Both options make it incredibly easy for you to get Apache and PHP set up with just a few clicks of the mouse.
Git is available for every operating system. To install Git for Windows, navigate to Git's homepage (http://git-scm.com/), and click on the Windows icon.
You can find more information on installing CouchDB for Windows using Apache's helpful install pages here: http://wiki.apache.org/couchdb/Installing_on_Windows.
Linux
It's difficult to standardize the install
methods for Linux because there are many different flavors and configurations. But if you are using a generic distribution, such as Ubuntu, all of the required tools can be installed with just a few simple command line statements.
apt-get
is a powerful tool that we'll use to install applications and utilities in your system. Let's start by making sure that apt-get
is up-to-date, by running the following command:
sudo apt-get update
Let's make sure that we can host our PHP pages by installing Apache:
sudo apt-get install apache2
Now that we have Apache, let's install PHP and a few other components needed to run the code in this book:
sudo apt-get install php5 php5-dev libapache2-mod-php5 php5-curl php5-mcrypt
We have everything that is needed to host websites. So, let's restart Apache in order for our changes to take effect:
sudo /etc/init.d/apache2 restart
We'll use Git for source control; luckily installing it is incredibly easy with the help of our friend, apt-git
. Install Git by running the following command:
sudo apt-get install git-core
CouchDB is the database that we'll use through the course of this book. In this section, we'll install and start it using the command line.
- Install CouchDB with
apt-get:
sudo apt-get install couchDB
- Start CouchDB as a service by running the following command:
sudo /etc/init.d/couchdb start
That was pretty easy, right? If you are using another Linux distribution, then you might have to do some research on how to get all of the required applications and tools installed.
Now that we got that out of the way, let's discuss the setup of a web development environment for Mac OS X.
- Designing Machine Learning Systems with Python
- 劍指Offer(專項(xiàng)突破版):數(shù)據(jù)結(jié)構(gòu)與算法名企面試題精講
- Web交互界面設(shè)計(jì)與制作(微課版)
- Python深度學(xué)習(xí)
- Hands-On GPU:Accelerated Computer Vision with OpenCV and CUDA
- 零基礎(chǔ)輕松學(xué)SQL Server 2016
- MATLAB 2020從入門到精通
- Mastering C++ Multithreading
- Scratch趣味編程:陪孩子像搭積木一樣學(xué)編程
- Python語言科研繪圖與學(xué)術(shù)圖表繪制從入門到精通
- 高效使用Greenplum:入門、進(jìn)階與數(shù)據(jù)中臺
- Drupal 8 Development:Beginner's Guide(Second Edition)
- Mastering ASP.NET Web API
- Building Web and Mobile ArcGIS Server Applications with JavaScript(Second Edition)
- JavaScript設(shè)計(jì)模式與開發(fā)實(shí)踐