web程序员开发网站,问题及解决,知识点总结

RPM是RPM Package Manager(RPM软件包管理器)。

Yum(全称为 Yellow dog Updater, Modified)是一个在Fedora和RedHat以及CentOS中的Shell前端软件包管理器。

基于RPM包管理,能够从指定的服务器自动下载RPM包并且安装,可以自动处理依赖性关系,并且一次安装所有依赖的软件包,无须繁琐地一次次下载、安装。

Linux命令:

显示详细信息 ls -l

显示工作路径 pwd

centos开机自动开启网络

进入终端,cd /etc/sysconfig/network-scripts

输入 vi ifcfg-eno16777736

修改onboot把no改为yes

:wq!保存退出

centos安装lnmp

输入:

1、wget -c http://lamp.phpstudy.net/phpstudy.bin

2、chmod +x phpstudy.bin #权限设置

3、./phpstudy.bin     #运行安装

命令

服务进程管理:phpstudy (start|stop|restart|uninstall)

站点主机管理:phpstudy (add|del|list)

ftpd用户管理:phpstudy ftp (add|del|list)

web服务器的选择建议:

Apache 后台服务器(主要处理php及一些功能请求 如:中文url)

Nginx 前端服务器(利用它占用系统资源少得优势来处理静态页面大量请求)

Lighttpd 图片服务器

总体来说,随着nginx功能得完善将使他成为今后web server得主流。

宿主无法通过url访问虚拟机web服务器,很可能是虚拟机开启防火墙的原因。

命令

systemctl stop firewalld.service #停止防火墙

systemctl disable firewalld.service #禁止防火墙开机启动

(设置 iptables service

yum -y install iptables-services 安装

yum remove iptables-services 卸载

如果要修改防火墙配置,如增加防火墙端口3306

vi /etc/sysconfig/iptables

增加规则

-A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT

保存退出后

systemctl restart iptables.service #重启防火墙使配置生效

systemctl enable iptables.service #设置防火墙开机启动

最后重启系统使设置生效即可。)

centos中新版本,从6.5开始,不要使用iptables而是使用firewalld

防火墙添加端口命令

firewall-cmd --permanent --zone=public --add-port=80/tcp

把命令放到全局

ln -s /phpstudy/mysql/bin/mysql /bin数据库全局

ln -s /phpstudy/server/php/bin/php /bin全局php

修改mysql不可以远程访问

update user set host = '%' where user = 'root';

web程序员开发网站,问题及解决,知识点总结

相关推荐