debian配置网络,怎么搭建php服务器?

用户投稿 137 0

关于“debian配置php”的问题,小编就整理了【3】个相关介绍“debian配置php”的解答:

怎么搭建php服务器?

在windows下安装apache+php+mysql

从各官方网站下了APACHE2.050、PHP5、MYSQL4.0.20、PHPMYADMIN2.57

apache_2.0.50-win32-x86-no_ssl.msi

php-5.0.0-Win32.zip

mysql-4.0.20d-win.zip

phpMyAdmin-2.5.7.zip

系统 win2003 系统盘为: D盘

第一步: 安装apache 并配置支持PHP

点击安装文件apache_2.0.50-win32-x86-no_ssl.msi

将apache安装在 D:\apache2 目录(随自己喜好)下

将php-5.0.0-Win32.zip 里内容解压到 D:\php 里

找到 php目录里的 php.ini-dist 重命名为 php.ini 并拷到 windows目录里(win2k 里为winnt)

如我的php.ini是拷到 D:\windows目录

再将php目录里的 php5ts.dll,libmysql.dll 拷到 系统目录(system/system32) 如我的是D:\windows\system里

配置apache里的httpd.conf

debian9网络配置?

debian网络配置

(1)配置动态IP

打开网络配置文件 vim /etc/network/interfaces,只需设置为DHCP就可以

iface ens33 inet dhcp

(2)配置静态IP

修改 /etc/network/interfaces 添加如下

复制代码

allow-hotplug ens33

auto ens33 # 开机自动激活

iface ens33 inet static # 静态IP

address 192.168.3.131 # 本机IP

netmask 255.255.255.0 # 子网掩码

gateway 192.168.3.2 # 路由网关

复制代码

2、设置DNS

echo "nameserver x.x.x.x" >> /etc/resolv.conf

3、重启网卡

systemctl restart networking

注意:VMware下安装的Debian9重启网卡后,静态IP不生效,重启系统后才会生效。

Debian系统下如何配置网络?

  1、设置IP地址、网关  cp /etc/network/interfaces /etc/network/interfaces.bak # 备份原有配置文件  vi /etc/network/interfaces # 编辑网网卡配置文件  # The loopback network interface  auto lo  iface lo inet loopback  # The primary network interface  auto eth0 # 开机自动连接网络  allow-hotplug eth0  iface eth0 inet static # static表示使用固定ip,dhcp表述使用动态ip  address 192.168.21.166 # 设置ip地址  netmask 255.255.255.0 # 设置子网掩码  gateway 192.168.21.2 # 设置网关  按 ESC 键,然后输入 :eq 保存并退出。  下面的版本便于复制, 因为配置文件里最好不要有中文:  # The loopback network interface  auto lo  iface lo inet loopback  # The primary network interface  auto eth0  allow-hotplug eth0  iface eth0 inet static  address 192.168.21.166  netmask 255.255.255.0  gateway 192.168.21.1  2、设置dns  cp /etc/resolv.conf /etc/resolv.conf.bak # 备份原有dns配置文件  vi /etc/resolv.conf # 编辑配置文件  nameserver 127.0.0.1  nameserver 8.8.8.8 # 设置首选dns  nameserver 8.8.4.4 # 设置备用dns  按 ESC 键,然后输入 :eq 保存并退出。  下面的版本便于复制, 因为配置文件里最好不要有中文:  nameserver 127.0.0.1  nameserver 8.8.8.8  nameserver 8.8.4.4  3、重启网络  service networking restart # 重启网络  至此,IP地址、网关、DNS配置完成,现在系统已经可以上网了。

到此,以上就是小编对于“debian配置php”的问题就介绍到这了,希望介绍关于“debian配置php”的【3】点解答对大家有用。

抱歉,评论功能暂时关闭!