ubuntu 10.04上搭建php网站运行环境
ubuntu 10.04下搭建php网站运行环境
ubuntu 10.04下搭建php网站运行环境 前提: 要打开root权限 sudo password [这里填写root密码] 1、第一步安装ubuntu10.04 2、更新源 sudo apt-get update 3、安装lighttpd sudo apt-get install lighttpd 安装好之后检查lighttpd是否成功启动,在浏览器里打开URL: http://localhost/ 如果显示为 it's works 表面已经成功了 如果不行的话,结束掉lighttpd程序的进程 然后再输入 sudo lighttpd -f /etc/lighttpd/lighttpd.conf 4、安装PHP sudo apt-get install php5 完成后继续 sudo apt-get install php5-cli 完成后继续 sudo apt-get install php5-cgi 完成后继续 sudo apt-get install php5-mysql 让lighttpd 支持cgi模式 # lighttpd-enable-mod fastcgi 重起Lighttpd # /etc/init.d/lighttpd restart 5、将/var/www文件夹的owner改变成当前用户(有的可能不需要这步) sodu chown -R xu2006:xu2006 /var/www 这样www文件夹的拥有者即为xu2006,这样就可以写入文件了 6、打开www文件夹(var/www) 右键--Create Document ---empty file 文件名为:test.php 在里面写入下面内容并保存 < ?php // this file will test to see if php // is enabled and functiona; phpinfo(); ?> 然后打开 http://localhost/test.php 你会看到网页中的PHP信息 7、安装mysql sudo apt-get install mysql-server-5.1 mysql-client-5.1 在这个安装过程中会提示你输入管理密码 8、安装phpmyadmin 用来管理mysql sudo apt-get install phpmyadmin 当它提示你选择那种web server时,什么都不要选,然后OK安装 就行 把phpmyadmin移动到/var/www我们就能用phpmyadmin管理mysql了 # sudo mv /usr/share/phpadmin /var/www 打开http://localhost/phpmyadmin 看看是不是能管理mysql了 到此,php网站运行环境就搭载好了!你现在就可以下载一些php类型的网站程序安装测试看看, 检验一下自己的劳动成果 php程序有:discuz wordpress 等等。 根本文件夹权限 sudo chmod -R 0777 /home/1.txt sudo chmod -R 【权限】 【目录或文件】 sudo chwon -R root:root /var/www sudo chown -R [用户名:用户组] 【目录或文件】
?

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

In this chapter, we will understand the Environment Variables, General Configuration, Database Configuration and Email Configuration in CakePHP.

PHP 8.4 brings several new features, security improvements, and performance improvements with healthy amounts of feature deprecations and removals. This guide explains how to install PHP 8.4 or upgrade to PHP 8.4 on Ubuntu, Debian, or their derivati

To work with date and time in cakephp4, we are going to make use of the available FrozenTime class.

To work on file upload we are going to use the form helper. Here, is an example for file upload.

In this chapter, we are going to learn the following topics related to routing ?

CakePHP is an open-source framework for PHP. It is intended to make developing, deploying and maintaining applications much easier. CakePHP is based on a MVC-like architecture that is both powerful and easy to grasp. Models, Views, and Controllers gu

Visual Studio Code, also known as VS Code, is a free source code editor — or integrated development environment (IDE) — available for all major operating systems. With a large collection of extensions for many programming languages, VS Code can be c

Validator can be created by adding the following two lines in the controller.
