文章归档

ubuntu9.04 install nginx+mysql+php+phpmyadmin

安装平台基于ubuntu 9.04.使用apt-get简单安装.在安装之前你要准备好源.还有安装库g++ vim ssh links因为你要用到这些功具.

下面这个就是我配置成功图.

nginx04

1 Install Tools

#apt-get install g++ vim links ssh

2 安装 5.0

#apt-get install mysql-server mysql-client

在安装这个过程中会提示让你输入MYSQL数据库的密码:
New password for the MySQL “root” user: <– yourrootsqlpassword 你的MYSQL密码
Repeat password for the MySQL “root” user: <– yourrootsqlpassword 你的MYSQL密码

阅读更多 »

Share

mysql和iptables备忘

这个是发布在LAMP兄弟连 里.觉的关面有两个还不错.可以做为自己的笔记吧.主要是iptables 保存吧.
1.系统root权限下修改数据库访问root口令:
/usr/local/mysql/bin/mysqladmin -u root -p password 新密码
回车后会提示输入口令,这里输入的是旧的ROOT的口令,口令正确后,回车完成,无任何错误提示口令修改成功。
2. 的总结
(1)清空旧规则
iptables -F
iptables -X
iptables -t nat -F
iptables -t nat -X
service iptables save –保存,以前一直不知道怎么保存,用iptables-save也不起作用,这样整个iptables处于最原始状态。
(2)按需求增加规则
我的服务器的iptabls 的配置
iptables -A INPUT -p tcp -s 192.168.0.1/24 –dports 80 -j ACCEPT
iptables -A INPUT -p tcp -m multiport –dports 22,3306  -j ACCEPT
iptables -A INPUT -m state –state RELATED,ESTABLISHED -j ACCEPT
iptalbes -A INPUT -p icmp -j ACCEPT
iptables -P INPUT DROP
service iptables save
————————————————————————
以下是显示的结果
# /sbin/service iptables status
Chain INPUT (policy DROP)
target     prot opt source               destination
ACCEPT     tcp  –  192.168.0.0/24       0.0.0.0/0           tcp dpt:80
ACCEPT     tcp  –  192.168.1.0/24       0.0.0.0/0           tcp dpt:80
ACCEPT     icmp –  0.0.0.0/0            0.0.0.0/0
ACCEPT     tcp  –  0.0.0.0/0            0.0.0.0/0           multiport dports 22,3306
ACCEPT     all  –  0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED
Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
这些规则要看你个人的需要.再去选择添加这些还有很多.所以要研究的朋友.还需要学的更多.

Share

nginx+PHP+ mysql

环境说明: /0.5.33 + 5.2.4-2  +   5.0.51a

1. 安装Nginx.PHP和Mysql

  1. sudo apt-get install nginx
  2. sudo apt-get install php-pear php5-cli php5-common php5-xcache php5-cgi php5-mysql php5-gd
  3. sudo apt-get install mysql-server mysql-client

2. 从lighttpd中取得spawn-fcgi

  1. cd /home/hacder/
  2. sudo apt-get install lighttpd
  3. sudo cp /usr/bin/spawn-fcgi ./
  4. sudo apt-get remove lighttpd
  5. sudo mv spawn-fcgi /usr/bin/

阅读更多 »

Share
Page 3 of 3123