xshell能连接虚拟机的前提是真机能够ping通虚拟机网址










装OpenSSL依赖文件 root@localhost nginx-1.12.2# yum -y install openssl pcre-devel
依赖检测root@localhost nginx-1.12.2# ./configure

root@localhost nginx-1.12.2# yum -y install zlib

root@localhost nginx-1.12.2# ./configure --without-http_gzip_module

root@localhost nginx-1.12.2# make && make install

root@localhost nginx-1.12.2# ls /usr/local/nginx/
conf html logs sbin
root@localhost nginx-1.12.2# cd /usr/local/nginx/
root@localhost nginx# pwd
/usr/local/nginx
root@localhost nginx# ls sbin/
nginx
root@localhost nginx# sbin/nginx
root@localhost nginx# ss -antulp | grep :80
tcp LISTEN 0 128 *:80 : users:(("nginx",pid=59064,fd=6),("nginx",pid=59063,fd=6))
root@localhost nginx#

关闭防火墙root@localhost nginx# systemctl stop firewalld.service


装root@localhost nginx# yum -y install mariadb

yum安装的用systemd来起服务
源码安装用绝对路径来起服务
源码安装:
下载对应操作系统的源码,exec,rpm
解压缩
安装对应依赖
./configure
make && make install
安装root@localhost nginx# yum -y install mariadb-server mariadb-devel

root@localhost nginx# systemctl start mariadb.service
root@localhost nginx# !ss
bash: !ss: command not found...
root@localhost nginx# !ss
ss -antulp | grep :80
tcp LISTEN 0 128 *:80 : users:(("nginx",pid=59064,fd=6),("nginx",pid=59063,fd=6))
root@localhost nginx#



修改配置文件root@localhost nginx# vim conf/nginx.conf
:set nu 设置行号
u撤销前一步操作
60 gg瞬移行
Ctrl+V
s删除#
I shift+# esc批量加
dd删除
sbin/nginx -s reload重启服务
手写页面vim html/test.php