ubuntu+nginx+php5+mysql安装配置
2011-11-02 10:17
801 查看
1. 安装ubuntu(此处就不做介绍了,按默认流程安装即可)
2. 网卡配置
vim /etc/network/interfaces
可以进行虚拟IP 的设置
eth1 Link encap:Ethernet HWaddr 00:*:19:85:59:12
inet addr:220.196.*.* Bca*t:*.196.*.* Mask:255.255.255.0
inet6 addr: fe80::222:19ff:fe*5:5912/64 Scope:Link
UP BROADCA*T RUNNING MULTICAST MTU:1500 Metric:1
RX packets:27*7964 errors:0 dropped:0 overruns:0 frame:0
TX packets:245*802 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:71035**742 (710.3 MB) TX bytes:13**698783 (1.3 GB)
Interrupt:16 Memory:f4000000-f4012800
eth1:0 Link encap:Ethernet HWaddr 00:22:**:85:59:12
inet addr:220.196.*.* Bcast:220.196.*.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:16 Memory:f40**000-f4012800
以上的意思是eth1 网卡1 eth1:0是网卡1的虚拟IP设置
重启 /etc/init.d/networking restart
3.vim /etc/resolv.conf
search ***.com
nameserver 202.**.2.101
4.更新源
apt-get update
以上命令是 更新:这指令是用来取得记录在 /etc/apt/sources.list 内的远端服务器的套件档案清单
在使用 「apt-get dist-upgrade」指令升级套件前,一定要记得先用这条指令将套件档案清单更新 ;例如:
apt-get upgrade
升级:这里的升级主要是根据已有的软件包更新而言,并不是更新整个系统,也可以使用图形界面的新立得包管理器:)
5.安装软件
apt-get install nginx
apt-get install mysql-server
apt-cache search php
apt-get install php5-cgi
在/etc/apt/sources.list 加入源
deb http://ppa.launchpad.net/brianmercer/php/ubuntu lucid main
deb-src http://ppa.launchpad.net/brianmercer/php/ubuntu lucid main
然后 若需要取得密钥
gpg --keyserver pgpkeys.mit.edu --recv-key A42227CB8D0DC64F
gpg -a --export A42227CB8D0DC64F | sudo apt-key add -
然后再 查找
apt-cache search fpm
安装
apt-get install php5-fpm
apt-get install php-pear
重启
/etc/init.d/php5-fpm restart
查看端口9000
netstat -tan
端口启动:
ufw status
ufw allow 22
ufw allow 80
ps:
rsync -avr john@220.196.*.*:/etc/nginx/* /etc/nginx/
rsync -avr jhon@220.196.*.*:/etc/nginx/* /etc/nginx/
scp jhon@220.196.*.*:/etc/mysql/my.cnf /etc/mysql/my.cnf
拷贝了之前的配置信息
有需要的话找我 我再写一篇配置书
2. 网卡配置
vim /etc/network/interfaces
可以进行虚拟IP 的设置
eth1 Link encap:Ethernet HWaddr 00:*:19:85:59:12
inet addr:220.196.*.* Bca*t:*.196.*.* Mask:255.255.255.0
inet6 addr: fe80::222:19ff:fe*5:5912/64 Scope:Link
UP BROADCA*T RUNNING MULTICAST MTU:1500 Metric:1
RX packets:27*7964 errors:0 dropped:0 overruns:0 frame:0
TX packets:245*802 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:71035**742 (710.3 MB) TX bytes:13**698783 (1.3 GB)
Interrupt:16 Memory:f4000000-f4012800
eth1:0 Link encap:Ethernet HWaddr 00:22:**:85:59:12
inet addr:220.196.*.* Bcast:220.196.*.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:16 Memory:f40**000-f4012800
以上的意思是eth1 网卡1 eth1:0是网卡1的虚拟IP设置
重启 /etc/init.d/networking restart
3.vim /etc/resolv.conf
search ***.com
nameserver 202.**.2.101
4.更新源
apt-get update
以上命令是 更新:这指令是用来取得记录在 /etc/apt/sources.list 内的远端服务器的套件档案清单
在使用 「apt-get dist-upgrade」指令升级套件前,一定要记得先用这条指令将套件档案清单更新 ;例如:
apt-get upgrade
升级:这里的升级主要是根据已有的软件包更新而言,并不是更新整个系统,也可以使用图形界面的新立得包管理器:)
5.安装软件
apt-get install nginx
apt-get install mysql-server
apt-cache search php
apt-get install php5-cgi
在/etc/apt/sources.list 加入源
deb http://ppa.launchpad.net/brianmercer/php/ubuntu lucid main
deb-src http://ppa.launchpad.net/brianmercer/php/ubuntu lucid main
然后 若需要取得密钥
gpg --keyserver pgpkeys.mit.edu --recv-key A42227CB8D0DC64F
gpg -a --export A42227CB8D0DC64F | sudo apt-key add -
然后再 查找
apt-cache search fpm
安装
apt-get install php5-fpm
apt-get install php-pear
重启
/etc/init.d/php5-fpm restart
查看端口9000
netstat -tan
端口启动:
ufw status
ufw allow 22
ufw allow 80
ps:
rsync -avr john@220.196.*.*:/etc/nginx/* /etc/nginx/
rsync -avr jhon@220.196.*.*:/etc/nginx/* /etc/nginx/
scp jhon@220.196.*.*:/etc/mysql/my.cnf /etc/mysql/my.cnf
拷贝了之前的配置信息
有需要的话找我 我再写一篇配置书
相关文章推荐
- Ubuntu 12.04上安装Nginx, PHP,Mysql及配置
- ubuntu安装配置 mysql+php+nginx
- ubuntu下nginx+Mysql+php的安装和配置
- Ubuntu 12.04上安装Nginx, PHP,Mysql及配置
- ubuntu下nginx+Mysql+php的安装和配置
- ubuntu+nginx+php+mysql安装配置方法命令
- Ubuntu 11.04下Nginx+PHP+Mysql+Tomcat安装配置
- Ubuntu 11.04下Nginx+PHP+Mysql+Tomcat安装配置
- ubuntu下的nginx+php+mysql安装配置(转)
- Ubuntu系统安装配置Nginx、PHP、MySQL、ZendGuardLoader服务器环
- ubuntu下安装并配置Nginx、php、mysql
- ubuntu下nginx+php+mysql+memcached+mango的安装配置
- 基于ubuntu下nginx+php+mysql安装配置的具体操作步骤
- ubuntu下的nginx+php+mysql安装配置
- Ubuntu+Nginx+Mysql+Php+Zend+eaccelerator安装配置文字版
- 基于ubuntu下nginx+php+mysql安装配置的具体操作步骤
- ubuntu下nginx+php+mysql安装配置
- linux nginx+apache+php+mysql 安装配置
- Ubuntu下安装Nginx,PHP5(及PHP-FPM),MySQL
- ubuntu下安装php+nginx+mysql